summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-02-07 19:18:06 +0000
committerDavid Carlton <carlton@bactrian.org>2003-02-07 19:18:06 +0000
commitac76b6586667847f203bb86621559fb71162a91b (patch)
treecacefcbb7f9755c389769e8bbac45240ee428cd4
parent3bebe8f1863428e19f3d404f7bf0007c1451e51a (diff)
downloadgdb-ac76b6586667847f203bb86621559fb71162a91b.tar.gz
2003-02-07 David Carlton <carlton@math.stanford.edu>
* Merge with mainline; tag is carlton_dictionary-20030207-merge.
-rw-r--r--ChangeLog205
-rw-r--r--Makefile.in1683
-rw-r--r--bfd/ChangeLog625
-rw-r--r--bfd/Makefile.am42
-rw-r--r--bfd/Makefile.in42
-rw-r--r--bfd/aclocal.m42
-rw-r--r--bfd/aoutx.h1
-rw-r--r--bfd/archures.c25
-rw-r--r--bfd/bfd-in2.h183
-rw-r--r--bfd/bfd.c3
-rw-r--r--bfd/coff64-rs6000.c2
-rw-r--r--bfd/coffcode.h3
-rw-r--r--bfd/config.bfd11
-rwxr-xr-xbfd/configure30
-rw-r--r--bfd/configure.in2
-rw-r--r--bfd/cpu-iq2000.c57
-rw-r--r--bfd/cpu-mips.c2
-rw-r--r--bfd/cpu-msp430.c107
-rw-r--r--bfd/cpu-sh.c57
-rw-r--r--bfd/ecoff.c8
-rw-r--r--bfd/elf-bfd.h109
-rw-r--r--bfd/elf-eh-frame.c52
-rw-r--r--bfd/elf.c149
-rw-r--r--bfd/elf32-hppa.c13
-rw-r--r--bfd/elf32-i386.c45
-rw-r--r--bfd/elf32-ip2k.c1457
-rw-r--r--bfd/elf32-iq2000.c974
-rw-r--r--bfd/elf32-m68k.c104
-rw-r--r--bfd/elf32-mips.c5
-rw-r--r--bfd/elf32-msp430.c720
-rw-r--r--bfd/elf32-ppc.c349
-rw-r--r--bfd/elf32-s390.c1207
-rw-r--r--bfd/elf32-sh.c46
-rw-r--r--bfd/elf32-sh64-com.c3
-rw-r--r--bfd/elf32-sh64.c42
-rw-r--r--bfd/elf32-sh64.h83
-rw-r--r--bfd/elf32-sparc.c1991
-rw-r--r--bfd/elf32-xstormy16.c2
-rw-r--r--bfd/elf64-alpha.c465
-rw-r--r--bfd/elf64-mips.c3
-rw-r--r--bfd/elf64-mmix.c75
-rw-r--r--bfd/elf64-ppc.c2994
-rw-r--r--bfd/elf64-ppc.h4
-rw-r--r--bfd/elf64-s390.c1270
-rw-r--r--bfd/elf64-sparc.c88
-rw-r--r--bfd/elflink.h32
-rw-r--r--bfd/elfn32-mips.c28
-rw-r--r--bfd/elfxx-ia64.c63
-rw-r--r--bfd/elfxx-mips.c1843
-rw-r--r--bfd/elfxx-mips.h4
-rw-r--r--bfd/elfxx-target.h6
-rw-r--r--bfd/ieee.c13
-rw-r--r--bfd/libbfd.h101
-rw-r--r--bfd/mmo.c46
-rw-r--r--bfd/oasys.c6
-rw-r--r--bfd/opncls.c341
-rw-r--r--bfd/po/SRC-POTFILES.in4
-rw-r--r--bfd/reloc.c236
-rw-r--r--bfd/section.c37
-rw-r--r--bfd/targets.c6
-rw-r--r--bfd/version.h2
-rwxr-xr-xconfig.guess154
-rw-r--r--config.if41
-rwxr-xr-xconfig.sub35
-rw-r--r--config/ChangeLog17
-rw-r--r--config/acx.m481
-rw-r--r--config/mh-a68bsd2
-rw-r--r--config/mh-aix3861
-rw-r--r--config/mh-apollo681
-rw-r--r--config/mh-cxux2
-rw-r--r--config/mh-delta884
-rw-r--r--config/mh-dgux3863
-rw-r--r--config/mh-hp3003
-rw-r--r--config/mh-hpux1
-rw-r--r--config/mh-hpux81
-rw-r--r--config/mh-interix1
-rw-r--r--config/mh-irix52
-rw-r--r--config/mh-irix62
-rw-r--r--config/mh-lynxrs6k3
-rw-r--r--config/mh-ncr30002
-rw-r--r--config/mh-ncrsvr433
-rw-r--r--config/mh-necv42
-rw-r--r--config/mh-openedition1
-rw-r--r--config/mh-riscos3
-rw-r--r--config/mh-sco1
-rw-r--r--config/mh-solaris3
-rw-r--r--config/mh-sysv1
-rw-r--r--config/mh-sysv42
-rw-r--r--config/mh-sysv52
-rw-r--r--config/mt-aix434
-rw-r--r--config/mt-v8101
-rwxr-xr-xconfigure4919
-rw-r--r--configure.in937
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/Makefile.in8
-rw-r--r--gdb/ChangeLog17904
-rw-r--r--gdb/ChangeLog-200215039
-rw-r--r--gdb/MAINTAINERS72
-rw-r--r--gdb/Makefile.in348
-rw-r--r--gdb/NEWS40
-rw-r--r--gdb/PROBLEMS9
-rw-r--r--gdb/README33
-rw-r--r--gdb/TODO10
-rw-r--r--gdb/a68v-nat.c128
-rw-r--r--gdb/acconfig.h22
-rw-r--r--gdb/acinclude.m424
-rw-r--r--gdb/aclocal.m4160
-rw-r--r--gdb/ada-lang.c4
-rw-r--r--gdb/ada-valprint.c4
-rw-r--r--gdb/alpha-linux-tdep.c5
-rw-r--r--gdb/alpha-nat.c31
-rw-r--r--gdb/alpha-osf1-tdep.c5
-rw-r--r--gdb/alpha-tdep.c166
-rw-r--r--gdb/alpha-tdep.h9
-rw-r--r--gdb/alphafbsd-tdep.c3
-rw-r--r--gdb/alphanbsd-tdep.c3
-rw-r--r--gdb/arch-utils.c3
-rw-r--r--gdb/arm-linux-tdep.c3
-rw-r--r--gdb/arm-tdep.c314
-rw-r--r--gdb/arm-tdep.h6
-rw-r--r--gdb/armnbsd-tdep.c3
-rw-r--r--gdb/avr-tdep.c165
-rw-r--r--gdb/ax-gdb.c8
-rw-r--r--gdb/blockframe.c107
-rw-r--r--gdb/breakpoint.c119
-rw-r--r--gdb/breakpoint.h10
-rw-r--r--gdb/buildsym.c27
-rw-r--r--gdb/buildsym.h20
-rw-r--r--gdb/c-exp.y2
-rw-r--r--gdb/c-typeprint.c39
-rw-r--r--gdb/c-valprint.c8
-rw-r--r--gdb/charset.c13
-rw-r--r--gdb/cli-out.c9
-rw-r--r--gdb/cli-out.h3
-rw-r--r--gdb/cli/cli-decode.h6
-rw-r--r--gdb/cli/cli-dump.c6
-rw-r--r--gdb/cli/cli-interp.c138
-rw-r--r--gdb/cli/cli-script.c6
-rw-r--r--gdb/cli/cli-setshow.c21
-rw-r--r--gdb/coffread.c6
-rw-r--r--gdb/complaints.c10
-rw-r--r--gdb/complaints.h38
-rw-r--r--gdb/config.in76
-rw-r--r--gdb/config/alpha/nm-linux.h7
-rw-r--r--gdb/config/djgpp/fnchange.lst31
-rw-r--r--gdb/config/h8500/h8500.mt12
-rw-r--r--gdb/config/h8500/tm-h8500.h590
-rw-r--r--gdb/config/i386/gdbserve.mt3
-rw-r--r--gdb/config/i386/go32.mh1
-rw-r--r--gdb/config/i386/i386dgux.mh10
-rw-r--r--gdb/config/i386/i386mk.mh4
-rw-r--r--gdb/config/i386/i386mk.mt6
-rw-r--r--gdb/config/i386/i386sco5.mt3
-rw-r--r--gdb/config/i386/i386v32.mh8
-rw-r--r--gdb/config/i386/i386v4.mt3
-rw-r--r--gdb/config/i386/i386v42mp.mt3
-rw-r--r--gdb/config/i386/tm-i386os9k.h65
-rw-r--r--gdb/config/i386/tm-ptx.h15
-rw-r--r--gdb/config/i386/tm-symmetry.h15
-rw-r--r--gdb/config/i386/xm-i386sco.h4
-rw-r--r--gdb/config/m32r/m32r.mt10
-rw-r--r--gdb/config/m32r/tm-m32r.h465
-rw-r--r--gdb/config/m68k/es1800.mt9
-rw-r--r--gdb/config/m68k/nm-hp300bsd.h90
-rw-r--r--gdb/config/m68k/tm-apollo68b.h61
-rw-r--r--gdb/config/m68k/tm-es1800.h60
-rw-r--r--gdb/config/m68k/tm-hp300bsd.h64
-rw-r--r--gdb/config/m68k/tm-m68kv4.h6
-rw-r--r--gdb/config/m68k/tm-mac.h21
-rw-r--r--gdb/config/m68k/tm-monitor.h7
-rw-r--r--gdb/config/m68k/tm-os68k.h10
-rw-r--r--gdb/config/m68k/tm-sun3.h2
-rw-r--r--gdb/config/m68k/tm-vx68.h11
-rw-r--r--gdb/config/m68k/xm-apollo68b.h21
-rw-r--r--gdb/config/mips/linux64.mt7
-rw-r--r--gdb/config/mips/tm-linux64.h (renamed from gdb/config/powerpc/tm-ppc-sim.h)14
-rw-r--r--gdb/config/mn10200/mn10200.mt12
-rw-r--r--gdb/config/mn10200/tm-mn10200.h429
-rw-r--r--gdb/config/nm-lynx.h7
-rw-r--r--gdb/config/ns32k/nm-nbsd.h4
-rw-r--r--gdb/config/pa/hpux1020.mt3
-rw-r--r--gdb/config/pa/hpux11.mt3
-rw-r--r--gdb/config/pa/hpux11w.mt3
-rw-r--r--gdb/config/pa/tm-hppa.h210
-rw-r--r--gdb/config/pa/tm-hppa64.h1
-rw-r--r--gdb/config/pa/tm-hppah.h50
-rw-r--r--gdb/config/powerpc/gdbserve.mt3
-rw-r--r--gdb/config/powerpc/ppcle-eabi.mt3
-rw-r--r--gdb/config/powerpc/ppcle-sim.mt6
-rw-r--r--gdb/config/sparc/sp64sim.mt13
-rw-r--r--gdb/config/sparc/tm-sp64.h7
-rw-r--r--gdb/config/sparc/tm-sp64sim.h50
-rw-r--r--gdb/config/sparc/tm-sparc.h20
-rw-r--r--gdb/config/sparc/tm-sparclite.h5
-rw-r--r--gdb/config/z8k/tm-z8k.h584
-rw-r--r--gdb/config/z8k/z8k.mt13
-rwxr-xr-xgdb/configure4875
-rw-r--r--gdb/configure.host23
-rw-r--r--gdb/configure.in789
-rw-r--r--gdb/configure.tgt52
-rw-r--r--gdb/corefile.c8
-rw-r--r--gdb/corelow.c8
-rw-r--r--gdb/cp-valprint.c15
-rw-r--r--gdb/cris-tdep.c120
-rw-r--r--gdb/d10v-tdep.c653
-rw-r--r--gdb/dbxread.c337
-rw-r--r--gdb/defs.h63
-rw-r--r--gdb/demangle.c10
-rw-r--r--gdb/disasm.c56
-rw-r--r--gdb/doc/ChangeLog128
-rw-r--r--gdb/doc/fdl.texi6
-rw-r--r--gdb/doc/gdb.texinfo1219
-rw-r--r--gdb/doc/gdbint.texinfo233
-rw-r--r--gdb/doc/stabs.texinfo29
-rw-r--r--gdb/dummy-frame.c87
-rw-r--r--gdb/dummy-frame.h27
-rw-r--r--gdb/dve3900-rom.c4
-rw-r--r--gdb/dwarf2cfi.c104
-rw-r--r--gdb/dwarf2read.c365
-rw-r--r--gdb/dwarfread.c95
-rw-r--r--gdb/elfread.c18
-rw-r--r--gdb/eval.c18
-rw-r--r--gdb/event-top.c14
-rw-r--r--gdb/event-top.h2
-rw-r--r--gdb/exec.c20
-rw-r--r--gdb/expprint.c34
-rw-r--r--gdb/expression.h32
-rw-r--r--gdb/f-exp.y2
-rw-r--r--gdb/f-typeprint.c9
-rw-r--r--gdb/f-valprint.c4
-rw-r--r--gdb/findvar.c165
-rw-r--r--gdb/frame-unwind.c103
-rw-r--r--gdb/frame-unwind.h111
-rw-r--r--gdb/frame.c786
-rw-r--r--gdb/frame.h151
-rw-r--r--gdb/frv-tdep.c8
-rw-r--r--gdb/gcore.c7
-rw-r--r--gdb/gdb-stabs.h4
-rw-r--r--gdb/gdb_dirent.h18
-rwxr-xr-xgdb/gdb_indent.sh26
-rwxr-xr-xgdb/gdb_mbuild.sh379
-rw-r--r--gdb/gdb_regex.h14
-rw-r--r--gdb/gdbarch.c171
-rw-r--r--gdb/gdbarch.h173
-rwxr-xr-xgdb/gdbarch.sh129
-rw-r--r--gdb/gdbcore.h3
-rw-r--r--gdb/gdbserver/ChangeLog8
-rw-r--r--gdb/gdbserver/Makefile.in5
-rw-r--r--gdb/gdbserver/linux-m68k-low.c4
-rw-r--r--gdb/gdbtypes.c460
-rw-r--r--gdb/gdbtypes.h29
-rw-r--r--gdb/gnu-v2-abi.c8
-rw-r--r--gdb/h8300-tdep.c84
-rw-r--r--gdb/h8500-tdep.c1478
-rw-r--r--gdb/hp300ux-nat.c226
-rw-r--r--gdb/hppa-hpux-tdep.c68
-rw-r--r--gdb/hppa-tdep.c221
-rw-r--r--gdb/hppab-nat.c2
-rw-r--r--gdb/hppah-nat.c4
-rw-r--r--gdb/hpread.c75
-rw-r--r--gdb/hpux-thread.c6
-rw-r--r--gdb/i386-linux-tdep.c19
-rw-r--r--gdb/i386-sol2-tdep.c7
-rw-r--r--gdb/i386-tdep.c89
-rw-r--r--gdb/i386-tdep.h7
-rw-r--r--gdb/i386bsd-tdep.c3
-rw-r--r--gdb/i386gnu-tdep.c3
-rw-r--r--gdb/i386ly-tdep.c3
-rw-r--r--gdb/i386nbsd-tdep.c3
-rw-r--r--gdb/i386obsd-tdep.c3
-rw-r--r--gdb/i386v-nat.c8
-rw-r--r--gdb/ia64-linux-nat.c5
-rw-r--r--gdb/ia64-tdep.c247
-rw-r--r--gdb/infcmd.c52
-rw-r--r--gdb/inferior.h30
-rw-r--r--gdb/inflow.c17
-rw-r--r--gdb/inflow.h51
-rw-r--r--gdb/infrun.c38
-rw-r--r--gdb/inftarg.c13
-rw-r--r--gdb/infttrace.c6
-rw-r--r--gdb/interps.c484
-rw-r--r--gdb/interps.h73
-rw-r--r--gdb/irix4-nat.c8
-rw-r--r--gdb/jv-lang.c6
-rw-r--r--gdb/jv-typeprint.c6
-rw-r--r--gdb/language.c25
-rw-r--r--gdb/language.h7
-rw-r--r--gdb/lin-lwp.c279
-rw-r--r--gdb/linux-proc.c2
-rw-r--r--gdb/lynx-nat.c53
-rw-r--r--gdb/m32r-rom.c1252
-rw-r--r--gdb/m32r-stub.c3436
-rw-r--r--gdb/m32r-tdep.c1413
-rw-r--r--gdb/m68hc11-tdep.c94
-rw-r--r--gdb/m68k-tdep.c84
-rw-r--r--gdb/m68klinux-nat.c2
-rw-r--r--gdb/main.c129
-rw-r--r--gdb/maint.c88
-rw-r--r--gdb/mcore-tdep.c133
-rw-r--r--gdb/mdebugread.c165
-rw-r--r--gdb/mi/ChangeLog62
-rw-r--r--gdb/mi/gdbmi.texinfo31
-rw-r--r--gdb/mi/mi-cmd-env.c10
-rw-r--r--gdb/mi/mi-cmd-var.c5
-rw-r--r--gdb/mi/mi-cmds.c7
-rw-r--r--gdb/mi/mi-cmds.h11
-rw-r--r--gdb/mi/mi-console.c18
-rw-r--r--gdb/mi/mi-console.h4
-rw-r--r--gdb/mi/mi-interp.c412
-rw-r--r--gdb/mi/mi-main.c201
-rw-r--r--gdb/mi/mi-main.h (renamed from gdb/config/i386/xm-i386v32.h)20
-rw-r--r--gdb/minsyms.c65
-rw-r--r--gdb/mips-linux-tdep.c444
-rw-r--r--gdb/mips-nat.c11
-rw-r--r--gdb/mips-tdep.c168
-rw-r--r--gdb/mipsv4-nat.c8
-rw-r--r--gdb/mn10200-tdep.c1790
-rw-r--r--gdb/mn10300-tdep.c163
-rw-r--r--gdb/mon960-rom.c261
-rw-r--r--gdb/monitor.c16
-rw-r--r--gdb/monitor.h4
-rw-r--r--gdb/nindy-share/Makefile117
-rw-r--r--gdb/nindy-share/Onindy.c743
-rw-r--r--gdb/nindy-share/README3
-rw-r--r--gdb/nindy-share/VERSION1
-rw-r--r--gdb/nindy-share/b.out.h158
-rw-r--r--gdb/nindy-share/block_io.h68
-rw-r--r--gdb/nindy-share/coff.h336
-rw-r--r--gdb/nindy-share/env.h12
-rw-r--r--gdb/nindy-share/nindy.c1154
-rw-r--r--gdb/nindy-share/stop.h86
-rw-r--r--gdb/nindy-share/ttyflush.c48
-rw-r--r--gdb/nindy-tdep.c77
-rw-r--r--gdb/ns32k-tdep.c90
-rw-r--r--gdb/ns32k-tdep.h9
-rw-r--r--gdb/ns32knbsd-tdep.c3
-rw-r--r--gdb/objc-exp.y7
-rw-r--r--gdb/objc-lang.c6
-rw-r--r--gdb/objfiles.c77
-rw-r--r--gdb/objfiles.h28
-rw-r--r--gdb/ocd.c4
-rw-r--r--gdb/osabi.c130
-rw-r--r--gdb/osabi.h36
-rw-r--r--gdb/parse.c4
-rw-r--r--gdb/ppc-linux-nat.c7
-rw-r--r--gdb/ppc-linux-tdep.c35
-rw-r--r--gdb/ppc-tdep.h5
-rw-r--r--gdb/ppcnbsd-tdep.c6
-rw-r--r--gdb/printcmd.c6
-rw-r--r--gdb/proc-api.c6
-rw-r--r--gdb/proc-utils.h43
-rw-r--r--gdb/procfs.c40
-rw-r--r--gdb/ptx4-nat.c211
-rw-r--r--gdb/rdi-share/ardi.c4
-rw-r--r--gdb/regformats/reg-m68k.dat2
-rw-r--r--gdb/remote-e7000.c6
-rw-r--r--gdb/remote-es.c2047
-rw-r--r--gdb/remote-mips.c8
-rw-r--r--gdb/remote-sds.c4
-rw-r--r--gdb/remote-sim.c2
-rw-r--r--gdb/remote-vx.c2
-rw-r--r--gdb/rom68k-rom.c2
-rw-r--r--gdb/rs6000-nat.c5
-rw-r--r--gdb/rs6000-tdep.c29
-rw-r--r--gdb/s390-tdep.c171
-rw-r--r--gdb/saber.suppress451
-rw-r--r--gdb/scm-lang.c7
-rw-r--r--gdb/scm-lang.h6
-rw-r--r--gdb/sentinel-frame.c113
-rw-r--r--gdb/sentinel-frame.h (renamed from gdb/config/m68k/nm-apollo68b.h)33
-rw-r--r--gdb/ser-go32.c4
-rw-r--r--gdb/sh-tdep.c391
-rw-r--r--gdb/sh-tdep.h5
-rw-r--r--gdb/shnbsd-tdep.c3
-rw-r--r--gdb/sol-thread.c2
-rw-r--r--gdb/solib-svr4.c4
-rw-r--r--gdb/solib.c16
-rw-r--r--gdb/somread.c7
-rw-r--r--gdb/somsolib.c26
-rw-r--r--gdb/somsolib.h9
-rw-r--r--gdb/source.c24
-rw-r--r--gdb/sparc-nat.c8
-rw-r--r--gdb/sparc-tdep.c264
-rw-r--r--gdb/stabsread.c1601
-rw-r--r--gdb/stabsread.h24
-rw-r--r--gdb/stack.c211
-rw-r--r--gdb/symfile.c539
-rw-r--r--gdb/symfile.h24
-rw-r--r--gdb/symm-nat.c8
-rw-r--r--gdb/symmisc.c20
-rw-r--r--gdb/symtab.c193
-rw-r--r--gdb/symtab.h33
-rw-r--r--gdb/target.c4
-rw-r--r--gdb/target.h16
-rw-r--r--gdb/testsuite/ChangeLog330
-rw-r--r--gdb/testsuite/Makefile.in12
-rw-r--r--gdb/testsuite/config.hin (renamed from gdb/testsuite/gdb.threads/config.in)2
-rwxr-xr-xgdb/testsuite/configure528
-rw-r--r--gdb/testsuite/configure.in192
-rw-r--r--gdb/testsuite/gdb.arch/Makefile.in15
-rw-r--r--gdb/testsuite/gdb.arch/altivec-abi.exp7
-rw-r--r--gdb/testsuite/gdb.arch/altivec-regs.exp6
-rwxr-xr-xgdb/testsuite/gdb.arch/configure913
-rw-r--r--gdb/testsuite/gdb.arch/configure.in15
-rw-r--r--gdb/testsuite/gdb.asm/Makefile.in27
-rw-r--r--gdb/testsuite/gdb.asm/arm.inc3
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp10
-rwxr-xr-xgdb/testsuite/gdb.asm/configure913
-rw-r--r--gdb/testsuite/gdb.asm/configure.in15
-rw-r--r--gdb/testsuite/gdb.base/Makefile.in15
-rw-r--r--gdb/testsuite/gdb.base/advance.c50
-rw-r--r--gdb/testsuite/gdb.base/advance.exp95
-rw-r--r--gdb/testsuite/gdb.base/args.c12
-rw-r--r--gdb/testsuite/gdb.base/args.exp77
-rw-r--r--gdb/testsuite/gdb.base/break.exp33
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp8
-rw-r--r--gdb/testsuite/gdb.base/completion.exp4
-rw-r--r--gdb/testsuite/gdb.base/configure902
-rw-r--r--gdb/testsuite/gdb.base/configure.in15
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp5
-rw-r--r--gdb/testsuite/gdb.base/default.exp14
-rw-r--r--gdb/testsuite/gdb.base/detach.exp75
-rw-r--r--gdb/testsuite/gdb.base/display.exp6
-rw-r--r--gdb/testsuite/gdb.base/dump.exp1
-rw-r--r--gdb/testsuite/gdb.base/float.exp62
-rw-r--r--gdb/testsuite/gdb.base/help.exp6
-rw-r--r--gdb/testsuite/gdb.base/long_long.exp7
-rw-r--r--gdb/testsuite/gdb.base/maint.exp6
-rw-r--r--gdb/testsuite/gdb.base/mips_pro.exp8
-rw-r--r--gdb/testsuite/gdb.base/miscexprs.c2
-rw-r--r--gdb/testsuite/gdb.base/overlays.exp18
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp4
-rw-r--r--gdb/testsuite/gdb.base/psymtab.exp72
-rw-r--r--gdb/testsuite/gdb.base/psymtab1.c4
-rw-r--r--gdb/testsuite/gdb.base/psymtab2.c3
-rw-r--r--gdb/testsuite/gdb.base/relocate.exp6
-rw-r--r--gdb/testsuite/gdb.base/selftest.exp6
-rw-r--r--gdb/testsuite/gdb.base/setshow.exp7
-rw-r--r--gdb/testsuite/gdb.base/step-line.exp6
-rw-r--r--gdb/testsuite/gdb.base/step-test.exp7
-rw-r--r--gdb/testsuite/gdb.base/store.exp18
-rw-r--r--gdb/testsuite/gdb.base/until.exp81
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp2
-rw-r--r--gdb/testsuite/gdb.base/whatis.exp18
-rw-r--r--gdb/testsuite/gdb.c++/Makefile.in15
-rw-r--r--gdb/testsuite/gdb.c++/annota2.exp4
-rw-r--r--gdb/testsuite/gdb.c++/anon-union.exp5
-rw-r--r--gdb/testsuite/gdb.c++/casts.exp4
-rw-r--r--gdb/testsuite/gdb.c++/configure899
-rw-r--r--gdb/testsuite/gdb.c++/configure.in15
-rw-r--r--gdb/testsuite/gdb.c++/cplusfuncs.exp43
-rw-r--r--gdb/testsuite/gdb.c++/demangle.exp7
-rw-r--r--gdb/testsuite/gdb.c++/inherit.exp22
-rw-r--r--gdb/testsuite/gdb.c++/local.cc7
-rw-r--r--gdb/testsuite/gdb.c++/local.exp41
-rw-r--r--gdb/testsuite/gdb.c++/overload.cc7
-rw-r--r--gdb/testsuite/gdb.c++/overload.exp17
-rw-r--r--gdb/testsuite/gdb.c++/ovldbreak.exp37
-rw-r--r--gdb/testsuite/gdb.c++/pr-1023.cc20
-rw-r--r--gdb/testsuite/gdb.c++/pr-1023.exp79
-rw-r--r--gdb/testsuite/gdb.c++/printmethod.exp4
-rw-r--r--gdb/testsuite/gdb.c++/virtfunc.exp11
-rw-r--r--gdb/testsuite/gdb.disasm/Makefile.in11
-rw-r--r--gdb/testsuite/gdb.disasm/configure899
-rw-r--r--gdb/testsuite/gdb.disasm/configure.in15
-rw-r--r--gdb/testsuite/gdb.disasm/mn10200.exp956
-rw-r--r--gdb/testsuite/gdb.java/Makefile.in9
-rwxr-xr-xgdb/testsuite/gdb.java/configure913
-rw-r--r--gdb/testsuite/gdb.java/configure.in11
-rw-r--r--gdb/testsuite/gdb.mi/Makefile.in13
-rw-r--r--gdb/testsuite/gdb.mi/config.in4
-rwxr-xr-xgdb/testsuite/gdb.mi/configure1121
-rw-r--r--gdb/testsuite/gdb.mi/configure.in19
-rw-r--r--gdb/testsuite/gdb.mi/gdb669.exp10
-rw-r--r--gdb/testsuite/gdb.mi/gdb792.exp16
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp208
-rw-r--r--gdb/testsuite/gdb.mi/mi-console.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-pthreads.exp15
-rw-r--r--gdb/testsuite/gdb.mi/mi-syn-frame.c66
-rw-r--r--gdb/testsuite/gdb.mi/mi-syn-frame.exp106
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.exp78
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-display.exp10
-rw-r--r--gdb/testsuite/gdb.mi/mi1-console.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi1-pthreads.exp15
-rw-r--r--gdb/testsuite/gdb.threads/Makefile.in22
-rwxr-xr-xgdb/testsuite/gdb.threads/configure1098
-rw-r--r--gdb/testsuite/gdb.threads/configure.in18
-rw-r--r--gdb/testsuite/gdb.threads/gcore-thread.exp31
-rw-r--r--gdb/testsuite/gdb.threads/killed.exp9
-rw-r--r--gdb/testsuite/gdb.threads/linux-dp.exp4
-rw-r--r--gdb/testsuite/gdb.threads/print-threads.exp38
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.exp6
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.exp38
-rw-r--r--gdb/testsuite/gdb.trace/Makefile.in13
-rw-r--r--gdb/testsuite/gdb.trace/configure.in15
-rw-r--r--gdb/testsuite/lib/gdb.exp186
-rw-r--r--gdb/testsuite/lib/mi-support.exp27
-rw-r--r--gdb/thread-db.c242
-rw-r--r--gdb/thread.c9
-rw-r--r--gdb/top.c19
-rw-r--r--gdb/tracepoint.c6
-rw-r--r--gdb/typeprint.c22
-rw-r--r--gdb/ui-out.c49
-rw-r--r--gdb/ui-out.h18
-rw-r--r--gdb/utils.c464
-rw-r--r--gdb/v850-tdep.c57
-rw-r--r--gdb/v850ice.c4
-rw-r--r--gdb/valarith.c21
-rw-r--r--gdb/valops.c270
-rw-r--r--gdb/value.h25
-rw-r--r--gdb/values.c34
-rw-r--r--gdb/vax-tdep.c87
-rw-r--r--gdb/vax-tdep.h10
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c259
-rw-r--r--gdb/wrapper.h2
-rw-r--r--gdb/x86-64-linux-nat.c13
-rw-r--r--gdb/x86-64-linux-tdep.c18
-rw-r--r--gdb/x86-64-tdep.c13
-rw-r--r--gdb/xcoffread.c52
-rw-r--r--gdb/xstormy16-tdep.c96
-rw-r--r--gdb/z8k-tdep.c1070
-rw-r--r--include/ChangeLog40
-rw-r--r--include/coff/ti.h8
-rw-r--r--include/coff/tic4x.h6
-rw-r--r--include/dis-asm.h3
-rw-r--r--include/elf/ChangeLog82
-rw-r--r--include/elf/common.h323
-rw-r--r--include/elf/iq2000.h58
-rw-r--r--include/elf/mips.h6
-rw-r--r--include/elf/msp430.h55
-rw-r--r--include/elf/ppc.h225
-rw-r--r--include/elf/ppc64.h156
-rw-r--r--include/elf/s390.h49
-rw-r--r--include/elf/sh.h65
-rw-r--r--include/elf/sparc.h31
-rw-r--r--include/gdb/ChangeLog4
-rw-r--r--include/gdb/sim-h8300.h66
-rw-r--r--include/hashtab.h25
-rw-r--r--include/opcode/ChangeLog45
-rw-r--r--include/opcode/h8300.h10
-rw-r--r--include/opcode/hppa.h2
-rw-r--r--include/opcode/m68hc11.h4
-rw-r--r--include/opcode/mips.h64
-rw-r--r--include/opcode/msp430.h111
-rw-r--r--include/splay-tree.h25
-rw-r--r--libiberty/ChangeLog69
-rw-r--r--libiberty/Makefile.in36
-rwxr-xr-xlibiberty/configure269
-rw-r--r--libiberty/configure.in13
-rw-r--r--libiberty/functions.texi33
-rw-r--r--libiberty/hashtab.c76
-rw-r--r--libiberty/libiberty.texi4
-rw-r--r--libiberty/pex-common.h42
-rw-r--r--libiberty/pex-djgpp.c103
-rw-r--r--libiberty/pex-mpw.c161
-rw-r--r--libiberty/pex-msdos.c147
-rw-r--r--libiberty/pex-os2.c72
-rw-r--r--libiberty/pex-unix.c166
-rw-r--r--libiberty/pex-win32.c243
-rw-r--r--libiberty/pexecute.c792
-rw-r--r--libiberty/pexecute.txh63
-rw-r--r--opcodes/ChangeLog174
-rw-r--r--opcodes/Makefile.am105
-rw-r--r--opcodes/Makefile.in111
-rw-r--r--opcodes/alpha-opc.c4
-rwxr-xr-xopcodes/configure4
-rw-r--r--opcodes/configure.in2
-rw-r--r--opcodes/disassemble.c15
-rw-r--r--opcodes/i386-dis.c244
-rw-r--r--opcodes/iq2000-asm.c891
-rw-r--r--opcodes/iq2000-desc.c2222
-rw-r--r--opcodes/iq2000-desc.h302
-rw-r--r--opcodes/iq2000-dis.c619
-rw-r--r--opcodes/iq2000-ibld.c1394
-rw-r--r--opcodes/iq2000-opc.c3482
-rw-r--r--opcodes/iq2000-opc.h181
-rw-r--r--opcodes/mips-dis.c1360
-rw-r--r--opcodes/mips-opc.c44
-rw-r--r--opcodes/msp430-dis.c805
-rw-r--r--opcodes/po/POTFILES.in7
-rw-r--r--opcodes/ppc-opc.c4
-rw-r--r--opcodes/sh-dis.c27
-rw-r--r--opcodes/sh-opc.h387
-rw-r--r--opcodes/sh64-dis.c3
-rw-r--r--opcodes/sparc-dis.c102
-rw-r--r--readline/ChangeLog.gdb10
-rw-r--r--readline/display.c26
-rwxr-xr-xreadline/support/config.guess159
-rwxr-xr-xreadline/support/config.sub49
-rw-r--r--sim/ChangeLog8
-rw-r--r--sim/arm/ChangeLog29
-rw-r--r--sim/arm/README (renamed from sim/arm/README.Cygnus)0
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/run.c4
-rw-r--r--sim/h8300/ChangeLog19
-rw-r--r--sim/h8300/compile.c206
-rw-r--r--sim/h8300/inst.h9
-rw-r--r--sim/mips/ChangeLog50
-rw-r--r--sim/mips/Makefile.in94
-rwxr-xr-xsim/mips/configure572
-rw-r--r--sim/mips/configure.in228
-rw-r--r--sim/mips/mips.igen105
-rw-r--r--sim/mips/sim-main.h14
-rw-r--r--sim/mips/vr.igen321
-rw-r--r--sim/sh/gencode.c48
606 files changed, 75768 insertions, 56102 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f57aaa1e49..164e10d2d4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,208 @@
+2003-02-06 Keith R Seitz <keiths@redhat.com>
+
+ * Makefile.def: Remove "snavigator", "grep", and "db" modules.
+ * Makefile.tpl: Remove "all-snavigator" and "all-grep".
+ * Makefile.in: Regenerated.
+ * configure.in: Remove all traces of snavigator, db, and grep.
+ * configure: Regenerated.
+
+2003-01-31 Frank Ch. Eigler <fche@redhat.com>
+
+ * Makefile.tpl (all-sid): Add libiberty/bfd/opcodes dependencies.
+ * Makefile.in: Regenerated.
+
+2003-01-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * config.if: Copy from GCC.
+
+2003-01-27 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in: Revert 24Jan change.
+ * configure: Regenerate.
+
+2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Revert previous change.
+ * configure: Regenerate.
+
+2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Make rda native-only.
+ * configure: Regenerate.
+
+2003-01-19 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Add missing \.
+ * configure: Rebuilt.
+
+2003-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in (baseargs): Avoid using \| in sed regular
+ expressions.
+ * configure: Rebuilt.
+
+2003-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in (baseargs): Remove all supported forms of
+ --cache-file, --srcdir, --host, --build and --target options
+ from argument lists.
+ * configure: Rebuilt.
+
+2003-01-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (noconfigdirs): Don't skip gas on IRIX 6.
+ * configure: Rebuilt.
+
+2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Substitute TOPLEVEL_CONFIGURE_ARGUMENTS.
+ * Makefile.tpl: Pass TOPLEVEL_CONFIGURE_ARGUMENTS to gcc.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Makefile.tpl (BASE_FLAGS_TO_PASS): Also pass DESTDIR.
+ (install-info, dir.info): Prepend $(DESTDIR) to $(infodir).
+ * Makefile.in: Regenerate.
+
+2003-01-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in: Remove Makefile in build, host and target modules
+ unless configure was run with --no-recursion.
+ * configure: Rebuilt.
+
+2003-01-08 Chris Demetriou <cgd@broadcom.com>
+
+ * config.guess: Update to 2003-01-03 version.
+ * config.sub: Update to 2003-01-03 version.
+
+2003-01-07 Christopher Faylor <cgf@redhat.com>
+
+ * configure: Regenerate with proper autoconf 2.13.
+
+2003-01-07 Christopher Faylor <cgf@redhat.com>
+
+ * configure.in: Add AC_PREREQ for consistency.
+ * configure: Regenerate.
+
+2003-01-06 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.in (GDB_TK): Add tcl directories conditional on
+ gdb/gdbtk directory being present.
+ * configure: Regenerate.
+
+2003-01-04 John David Anglin <dave.anglin@nrc.ca>
+
+ * configure.in (LD): Improve test for gcc. Try to set LD to the ld used
+ by gcc if LD is not defined and we are not doing a Canadian Cross.
+ * configure: Rebuilt.
+
+2003-01-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * src-release (ETC_SUPPORT): Add fdl.texi and texi2pod.pl.
+
+2002-12-31 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in: Rebuilt.
+ * Makefile.def (target_modules) [libffi]: Allow installation.
+
+2002-12-31 Andreas Schwab <schwab@suse.de>
+
+ * configure.in: Fix use of $program_transform_name.
+ * configure: Regenerated.
+
+2002-12-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.in (baseargs): Don't remove first configure argument.
+ * configure: Regenerated.
+
+2002-12-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.tpl (local-distclean): Don't remove...
+ (multilib.ts): ... this. Moved into...
+ (multilib.out): ... this. Don't use sub-make.
+ ($(BUILD_SUBDIR)/[+module+]/Makefile, [+module+]/Makefile,
+ $(TARGET_SUBDIR)/[+module+]/Makefile, gcc/Makefile): Moved into...
+ (configure-build-[+module+], configure-[+module+],
+ configure-target-[+module+], configure-gcc): ... these. Test
+ for Makefile existence. Drop config.status from dependencies.
+ * Makefile.in: Rebuilt.
+ * configure.in: Move gcc-version-trigger to the end of
+ ac_configure_args. Add comments to maybedep.tmp and
+ serdep.tmp. Introduce --disable-serial-configure. Remove
+ nonopt from baseargs, matching and removing corresponding
+ whitespace while at it.
+ * configure: Rebuilt.
+
+2002-12-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (host_configargs): Replace reference to
+ no-longer-defined buildopts with --build=${build_alias}.
+ * configure: Rebuilt.
+
+2002-12-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.tpl ($(NOTPARALLEL)): Move to the end. Bring uses of
+ program_transform_name to standard idiom.
+ (AUTOGEN, AUTOCONF): Define.
+ (Makefile.in): Use $(AUTOGEN).
+ (Makefile): Depend on config.status, and use autoconf-style rule to
+ build it. Move original commands to...
+ (config.status): ... this new target.
+ (configure): Add $(srcdir). Depend on config/acx.m4. Use
+ $(AUTOCONF).
+ * Makefile.in: Rebuilt.
+
+2002-12-28 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Fix dramatic bustage due to change in
+ program_transform_name.
+ * Makefile.in: Regenerate.
+
+ * configure.in: Remove unnecessary PATH setting.
+ * configure: Regnerate.
+
+ * configure.in: Don't default to unprefixed tools unless
+ the native tools will work.
+ * configure: Regenerate.
+
+ * configure.in: Convert to autoconf script. Blow away lots
+ of now-redundant Makefile fragments.
+ * configure: Generate using Autoconf.
+ * Makefile.tpl: Rewrite to reflect autoconfiscation.
+ * Makefile.in: Regenerate.
+
+2002-12-27 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure: Remove unneeded 'export's. Make CC_FOR_TARGET,
+ CXX_FOR_TARGET, GCJ_FOR_TARGET substituted in configure.in only.
+
+ * ChangeLog: Move a couple of entries from here to winsup/cygwin,
+ where they belong.
+
+2002-12-24 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.tpl (multilib.out): Fix missing space.
+ * Makefile.in: Regenerate.
+
+2002-12-23 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Use shared multilib.out. Use move-if-change for it.
+ Convert (cd foo; make) to (cd foo && make). Clean up multilib.out.
+ * 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.
+ (*-*-darwin): Add -c to ranlib commands.
+ * configure (tooldir): Handle extra_ranlibflags_for_target.
+
2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
* COPYING.NEWLIB: Updated.
diff --git a/Makefile.in b/Makefile.in
index 64b0657ef12..4a5ad2e7ece 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,7 +3,7 @@
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002 Free Software Foundation
+# 1999, 2000, 2001, 2002, 2003 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,12 +20,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# Tell GNU make 3.79 not to run the top level in parallel. This
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
VPATH=@srcdir@
links=@configlinks@
@@ -52,6 +46,9 @@ enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@
gcc_version_trigger = @gcc_version_trigger@
gcc_version = @gcc_version@
+# The gcc driver likes to know the arguments it was configured with.
+TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@
+
srcdir = @srcdir@
prefix = @prefix@
@@ -279,7 +276,7 @@ USUAL_AS_FOR_TARGET = ` \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AS); \
else \
- t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
+ echo as | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -293,7 +290,7 @@ USUAL_LD_FOR_TARGET = ` \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(LD); \
else \
- t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
+ echo ld | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -305,7 +302,7 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(DLLTOOL); \
else \
- t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
+ echo dlltool | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -317,7 +314,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(WINDRES); \
else \
- t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
+ echo windres | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -329,7 +326,7 @@ USUAL_AR_FOR_TARGET = ` \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AR); \
else \
- t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
+ echo ar | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -345,7 +342,7 @@ USUAL_RANLIB_FOR_TARGET = ` \
echo ranlib; \
fi; \
else \
- t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
+ echo ranlib | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -359,7 +356,7 @@ USUAL_NM_FOR_TARGET = ` \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(NM); \
else \
- t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
+ echo nm | sed '$(program_transform_name)' ; \
fi; \
fi`
@@ -369,6 +366,10 @@ all: all.normal
.PHONY: all
#### host and target specific makefile fragments come in here.
+@target_makefile_frag@
+@alphaieee_frag@
+@ospace_frag@
+@host_makefile_frag@
###
# Flags to pass down to all sub-makes.
@@ -387,6 +388,7 @@ BASE_FLAGS_TO_PASS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
+ "DESTDIR=$(DESTDIR)" \
"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
@@ -541,7 +543,6 @@ CLEAN_MODULES = \
clean-bison \
clean-byacc \
clean-bzip2 \
- clean-db \
clean-dejagnu \
clean-diff \
clean-dosutils \
@@ -556,7 +557,6 @@ CLEAN_MODULES = \
clean-gettext \
clean-gnuserv \
clean-gprof \
- clean-grep \
clean-gzip \
clean-hello \
clean-indent \
@@ -582,7 +582,6 @@ CLEAN_MODULES = \
clean-shellutils \
clean-sid \
clean-sim \
- clean-snavigator \
clean-tar \
clean-texinfo \
clean-textutils \
@@ -656,13 +655,13 @@ do-clean:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean); \
- then true; else exit 1; fi; \
+ clean) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -674,13 +673,13 @@ do-clean:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean); \
- then true; else exit 1; fi; \
+ clean) \
+ || exit 1; \
else true; fi; \
done
@@ -703,13 +702,13 @@ do-distclean:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean); \
- then true; else exit 1; fi; \
+ distclean) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -721,13 +720,13 @@ do-distclean:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean); \
- then true; else exit 1; fi; \
+ distclean) \
+ || exit 1; \
else true; fi; \
done
@@ -750,13 +749,13 @@ do-dvi:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi); \
- then true; else exit 1; fi; \
+ dvi) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -768,13 +767,13 @@ do-dvi:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi); \
- then true; else exit 1; fi; \
+ dvi) \
+ || exit 1; \
else true; fi; \
done
@@ -797,13 +796,13 @@ do-info:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info); \
- then true; else exit 1; fi; \
+ info) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -815,13 +814,13 @@ do-info:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info); \
- then true; else exit 1; fi; \
+ info) \
+ || exit 1; \
else true; fi; \
done
@@ -844,13 +843,13 @@ do-install-info:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info); \
- then true; else exit 1; fi; \
+ install-info) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -862,13 +861,13 @@ do-install-info:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info); \
- then true; else exit 1; fi; \
+ install-info) \
+ || exit 1; \
else true; fi; \
done
@@ -891,13 +890,13 @@ do-installcheck:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck); \
- then true; else exit 1; fi; \
+ installcheck) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -909,13 +908,13 @@ do-installcheck:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck); \
- then true; else exit 1; fi; \
+ installcheck) \
+ || exit 1; \
else true; fi; \
done
@@ -938,13 +937,13 @@ do-mostlyclean:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean); \
- then true; else exit 1; fi; \
+ mostlyclean) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -956,13 +955,13 @@ do-mostlyclean:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean); \
- then true; else exit 1; fi; \
+ mostlyclean) \
+ || exit 1; \
else true; fi; \
done
@@ -985,13 +984,13 @@ do-maintainer-clean:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean); \
- then true; else exit 1; fi; \
+ maintainer-clean) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -1003,13 +1002,13 @@ do-maintainer-clean:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean); \
- then true; else exit 1; fi; \
+ maintainer-clean) \
+ || exit 1; \
else true; fi; \
done
@@ -1032,13 +1031,13 @@ do-TAGS:
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS); \
- then true; else exit 1; fi; \
+ TAGS) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
@@ -1050,13 +1049,13 @@ do-TAGS:
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS); \
- then true; else exit 1; fi; \
+ TAGS) \
+ || exit 1; \
else true; fi; \
done
@@ -1078,7 +1077,7 @@ do-info: maybe-all-texinfo
install-info: do-install-info dir.info
s=`cd $(srcdir); ${PWD}`; export s; \
if [ -f dir.info ] ; then \
- $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
+ $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
else true ; fi
local-clean:
@@ -1086,6 +1085,7 @@ local-clean:
local-distclean:
-rm -f Makefile config.status config.cache mh-frag mt-frag
+ -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
-if [ "$(TARGET_SUBDIR)" != "." ]; then \
rm -rf $(TARGET_SUBDIR); \
else true; fi
@@ -1114,7 +1114,7 @@ $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
+ (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
else \
true; \
fi
@@ -1127,7 +1127,7 @@ $(CLEAN_TARGET_MODULES):
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
+ (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
else \
true; \
fi
@@ -1185,7 +1185,7 @@ install.all: install-no-fixedincludes
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD}` ; export r ; \
$(SET_LIB_PATH) \
- (cd ./gcc; \
+ (cd ./gcc && \
$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
else \
true ; \
@@ -1208,7 +1208,7 @@ installdirs: mkinstalldirs
dir.info: do-install-info
if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
- $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
+ $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
mv -f dir.info.new dir.info ; \
else true ; \
fi
@@ -1227,16 +1227,16 @@ etags tags: TAGS
# built are.
TAGS: do-TAGS
-
# --------------------------------------
# Modules which run on the build machine
# --------------------------------------
.PHONY: configure-build-libiberty maybe-configure-build-libiberty
maybe-configure-build-libiberty:
-configure-build-libiberty: $(BUILD_SUBDIR)/libiberty/Makefile
-$(BUILD_SUBDIR)/libiberty/Makefile: config.status
- @[ -d $(BUILD_SUBDIR)/libiberty ] || mkdir $(BUILD_SUBDIR)/libiberty;\
+configure-build-libiberty:
+ @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
+ [ -d $(BUILD_SUBDIR)/libiberty ] || \
+ mkdir $(BUILD_SUBDIR)/libiberty;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
AR="$(AR_FOR_BUILD)"; export AR; \
@@ -1307,10 +1307,9 @@ all-build-libiberty: configure-build-libiberty
.PHONY: configure-ash maybe-configure-ash
maybe-configure-ash:
-configure-ash: ash/Makefile
-
-ash/Makefile: config.status
- @[ -d ash ] || mkdir ash; \
+configure-ash:
+ @test ! -f ash/Makefile || exit 0; \
+ [ -d ash ] || mkdir ash; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1352,7 +1351,7 @@ all-ash: configure-ash
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd ash; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-ash
@@ -1360,7 +1359,7 @@ check-ash:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd ash; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1370,15 +1369,14 @@ install-ash: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd ash; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-autoconf maybe-configure-autoconf
maybe-configure-autoconf:
-configure-autoconf: autoconf/Makefile
-
-autoconf/Makefile: config.status
- @[ -d autoconf ] || mkdir autoconf; \
+configure-autoconf:
+ @test ! -f autoconf/Makefile || exit 0; \
+ [ -d autoconf ] || mkdir autoconf; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1420,7 +1418,7 @@ all-autoconf: configure-autoconf
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-autoconf
@@ -1428,7 +1426,7 @@ check-autoconf:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1438,15 +1436,14 @@ install-autoconf: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-automake maybe-configure-automake
maybe-configure-automake:
-configure-automake: automake/Makefile
-
-automake/Makefile: config.status
- @[ -d automake ] || mkdir automake; \
+configure-automake:
+ @test ! -f automake/Makefile || exit 0; \
+ [ -d automake ] || mkdir automake; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1488,7 +1485,7 @@ all-automake: configure-automake
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd automake; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-automake
@@ -1496,7 +1493,7 @@ check-automake:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd automake; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1506,15 +1503,14 @@ install-automake: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd automake; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-bash maybe-configure-bash
maybe-configure-bash:
-configure-bash: bash/Makefile
-
-bash/Makefile: config.status
- @[ -d bash ] || mkdir bash; \
+configure-bash:
+ @test ! -f bash/Makefile || exit 0; \
+ [ -d bash ] || mkdir bash; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1556,7 +1552,7 @@ all-bash: configure-bash
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bash; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-bash
@@ -1564,7 +1560,7 @@ check-bash:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bash; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1574,15 +1570,14 @@ install-bash: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bash; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-bfd maybe-configure-bfd
maybe-configure-bfd:
-configure-bfd: bfd/Makefile
-
-bfd/Makefile: config.status
- @[ -d bfd ] || mkdir bfd; \
+configure-bfd:
+ @test ! -f bfd/Makefile || exit 0; \
+ [ -d bfd ] || mkdir bfd; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1624,7 +1619,7 @@ all-bfd: configure-bfd
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bfd; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-bfd
@@ -1632,7 +1627,7 @@ check-bfd:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bfd; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1642,15 +1637,14 @@ install-bfd: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bfd; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-opcodes maybe-configure-opcodes
maybe-configure-opcodes:
-configure-opcodes: opcodes/Makefile
-
-opcodes/Makefile: config.status
- @[ -d opcodes ] || mkdir opcodes; \
+configure-opcodes:
+ @test ! -f opcodes/Makefile || exit 0; \
+ [ -d opcodes ] || mkdir opcodes; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1692,7 +1686,7 @@ all-opcodes: configure-opcodes
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-opcodes
@@ -1700,7 +1694,7 @@ check-opcodes:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1710,15 +1704,14 @@ install-opcodes: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-binutils maybe-configure-binutils
maybe-configure-binutils:
-configure-binutils: binutils/Makefile
-
-binutils/Makefile: config.status
- @[ -d binutils ] || mkdir binutils; \
+configure-binutils:
+ @test ! -f binutils/Makefile || exit 0; \
+ [ -d binutils ] || mkdir binutils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1760,7 +1753,7 @@ all-binutils: configure-binutils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd binutils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-binutils
@@ -1768,7 +1761,7 @@ check-binutils:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd binutils; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1778,15 +1771,14 @@ install-binutils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd binutils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-bison maybe-configure-bison
maybe-configure-bison:
-configure-bison: bison/Makefile
-
-bison/Makefile: config.status
- @[ -d bison ] || mkdir bison; \
+configure-bison:
+ @test ! -f bison/Makefile || exit 0; \
+ [ -d bison ] || mkdir bison; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1828,7 +1820,7 @@ all-bison: configure-bison
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bison; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-bison
@@ -1838,7 +1830,7 @@ check-bison:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bison; $(MAKE) $(FLAGS_TO_PASS) check); \
+ (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
@@ -1849,15 +1841,14 @@ install-bison: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bison; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-byacc maybe-configure-byacc
maybe-configure-byacc:
-configure-byacc: byacc/Makefile
-
-byacc/Makefile: config.status
- @[ -d byacc ] || mkdir byacc; \
+configure-byacc:
+ @test ! -f byacc/Makefile || exit 0; \
+ [ -d byacc ] || mkdir byacc; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1899,7 +1890,7 @@ all-byacc: configure-byacc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd byacc; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-byacc
@@ -1909,7 +1900,7 @@ check-byacc:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd byacc; $(MAKE) $(FLAGS_TO_PASS) check); \
+ (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
@@ -1920,15 +1911,14 @@ install-byacc: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd byacc; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-bzip2 maybe-configure-bzip2
maybe-configure-bzip2:
-configure-bzip2: bzip2/Makefile
-
-bzip2/Makefile: config.status
- @[ -d bzip2 ] || mkdir bzip2; \
+configure-bzip2:
+ @test ! -f bzip2/Makefile || exit 0; \
+ [ -d bzip2 ] || mkdir bzip2; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -1970,7 +1960,7 @@ all-bzip2: configure-bzip2
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-bzip2
@@ -1978,7 +1968,7 @@ check-bzip2:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -1988,83 +1978,14 @@ install-bzip2: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) install)
-
-
-.PHONY: configure-db maybe-configure-db
-maybe-configure-db:
-configure-db: db/Makefile
-
-db/Makefile: config.status
- @[ -d db ] || mkdir db; \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
- echo Configuring in db; \
- cd db || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/db"; \
- libsrcdir="$$s/db";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/db"; \
- libsrcdir="$$s/db";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
-
-.PHONY: all-db maybe-all-db
-maybe-all-db:
-all-db: configure-db
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd db; $(MAKE) $(FLAGS_TO_PASS) all)
-
-
-.PHONY: check-db
-check-db:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd db; $(MAKE) $(FLAGS_TO_PASS) check)
-
-
-
-.PHONY: install-db maybe-install-db
-maybe-install-db:
-install-db: installdirs
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd db; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-dejagnu maybe-configure-dejagnu
maybe-configure-dejagnu:
-configure-dejagnu: dejagnu/Makefile
-
-dejagnu/Makefile: config.status
- @[ -d dejagnu ] || mkdir dejagnu; \
+configure-dejagnu:
+ @test ! -f dejagnu/Makefile || exit 0; \
+ [ -d dejagnu ] || mkdir dejagnu; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2106,7 +2027,7 @@ all-dejagnu: configure-dejagnu
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-dejagnu
@@ -2114,7 +2035,7 @@ check-dejagnu:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2124,15 +2045,14 @@ install-dejagnu: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-diff maybe-configure-diff
maybe-configure-diff:
-configure-diff: diff/Makefile
-
-diff/Makefile: config.status
- @[ -d diff ] || mkdir diff; \
+configure-diff:
+ @test ! -f diff/Makefile || exit 0; \
+ [ -d diff ] || mkdir diff; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2174,7 +2094,7 @@ all-diff: configure-diff
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd diff; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-diff
@@ -2182,7 +2102,7 @@ check-diff:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd diff; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2192,15 +2112,14 @@ install-diff: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd diff; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-dosutils maybe-configure-dosutils
maybe-configure-dosutils:
-configure-dosutils: dosutils/Makefile
-
-dosutils/Makefile: config.status
- @[ -d dosutils ] || mkdir dosutils; \
+configure-dosutils:
+ @test ! -f dosutils/Makefile || exit 0; \
+ [ -d dosutils ] || mkdir dosutils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2242,7 +2161,7 @@ all-dosutils: configure-dosutils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd dosutils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-dosutils
@@ -2256,15 +2175,14 @@ install-dosutils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd dosutils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-etc maybe-configure-etc
maybe-configure-etc:
-configure-etc: etc/Makefile
-
-etc/Makefile: config.status
- @[ -d etc ] || mkdir etc; \
+configure-etc:
+ @test ! -f etc/Makefile || exit 0; \
+ [ -d etc ] || mkdir etc; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2306,7 +2224,7 @@ all-etc: configure-etc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd etc; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-etc
@@ -2314,7 +2232,7 @@ check-etc:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd etc; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2324,15 +2242,14 @@ install-etc: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd etc; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-fastjar maybe-configure-fastjar
maybe-configure-fastjar:
-configure-fastjar: fastjar/Makefile
-
-fastjar/Makefile: config.status
- @[ -d fastjar ] || mkdir fastjar; \
+configure-fastjar:
+ @test ! -f fastjar/Makefile || exit 0; \
+ [ -d fastjar ] || mkdir fastjar; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2374,7 +2291,7 @@ all-fastjar: configure-fastjar
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-fastjar
@@ -2384,7 +2301,7 @@ check-fastjar:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) check); \
+ (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
@@ -2395,15 +2312,14 @@ install-fastjar: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-fileutils maybe-configure-fileutils
maybe-configure-fileutils:
-configure-fileutils: fileutils/Makefile
-
-fileutils/Makefile: config.status
- @[ -d fileutils ] || mkdir fileutils; \
+configure-fileutils:
+ @test ! -f fileutils/Makefile || exit 0; \
+ [ -d fileutils ] || mkdir fileutils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2445,7 +2361,7 @@ all-fileutils: configure-fileutils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-fileutils
@@ -2453,7 +2369,7 @@ check-fileutils:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2463,15 +2379,14 @@ install-fileutils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-findutils maybe-configure-findutils
maybe-configure-findutils:
-configure-findutils: findutils/Makefile
-
-findutils/Makefile: config.status
- @[ -d findutils ] || mkdir findutils; \
+configure-findutils:
+ @test ! -f findutils/Makefile || exit 0; \
+ [ -d findutils ] || mkdir findutils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2513,7 +2428,7 @@ all-findutils: configure-findutils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd findutils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-findutils
@@ -2521,7 +2436,7 @@ check-findutils:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd findutils; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2531,15 +2446,14 @@ install-findutils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd findutils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-find maybe-configure-find
maybe-configure-find:
-configure-find: find/Makefile
-
-find/Makefile: config.status
- @[ -d find ] || mkdir find; \
+configure-find:
+ @test ! -f find/Makefile || exit 0; \
+ [ -d find ] || mkdir find; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2581,7 +2495,7 @@ all-find: configure-find
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd find; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-find
@@ -2589,7 +2503,7 @@ check-find:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd find; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd find && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2599,15 +2513,14 @@ install-find: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd find; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd find && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-flex maybe-configure-flex
maybe-configure-flex:
-configure-flex: flex/Makefile
-
-flex/Makefile: config.status
- @[ -d flex ] || mkdir flex; \
+configure-flex:
+ @test ! -f flex/Makefile || exit 0; \
+ [ -d flex ] || mkdir flex; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2649,7 +2562,7 @@ all-flex: configure-flex
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd flex; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-flex
@@ -2659,7 +2572,7 @@ check-flex:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd flex; $(MAKE) $(FLAGS_TO_PASS) check); \
+ (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
@@ -2670,15 +2583,14 @@ install-flex: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd flex; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-gas maybe-configure-gas
maybe-configure-gas:
-configure-gas: gas/Makefile
-
-gas/Makefile: config.status
- @[ -d gas ] || mkdir gas; \
+configure-gas:
+ @test ! -f gas/Makefile || exit 0; \
+ [ -d gas ] || mkdir gas; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2720,7 +2632,7 @@ all-gas: configure-gas
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gas; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-gas
@@ -2728,7 +2640,7 @@ check-gas:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gas; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2738,15 +2650,14 @@ install-gas: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gas; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-gawk maybe-configure-gawk
maybe-configure-gawk:
-configure-gawk: gawk/Makefile
-
-gawk/Makefile: config.status
- @[ -d gawk ] || mkdir gawk; \
+configure-gawk:
+ @test ! -f gawk/Makefile || exit 0; \
+ [ -d gawk ] || mkdir gawk; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2788,7 +2699,7 @@ all-gawk: configure-gawk
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gawk; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-gawk
@@ -2796,7 +2707,7 @@ check-gawk:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gawk; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2806,15 +2717,14 @@ install-gawk: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gawk; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-gettext maybe-configure-gettext
maybe-configure-gettext:
-configure-gettext: gettext/Makefile
-
-gettext/Makefile: config.status
- @[ -d gettext ] || mkdir gettext; \
+configure-gettext:
+ @test ! -f gettext/Makefile || exit 0; \
+ [ -d gettext ] || mkdir gettext; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2856,7 +2766,7 @@ all-gettext: configure-gettext
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gettext; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-gettext
@@ -2864,7 +2774,7 @@ check-gettext:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gettext; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2874,15 +2784,14 @@ install-gettext: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gettext; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-gnuserv maybe-configure-gnuserv
maybe-configure-gnuserv:
-configure-gnuserv: gnuserv/Makefile
-
-gnuserv/Makefile: config.status
- @[ -d gnuserv ] || mkdir gnuserv; \
+configure-gnuserv:
+ @test ! -f gnuserv/Makefile || exit 0; \
+ [ -d gnuserv ] || mkdir gnuserv; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2924,7 +2833,7 @@ all-gnuserv: configure-gnuserv
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-gnuserv
@@ -2932,7 +2841,7 @@ check-gnuserv:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -2942,15 +2851,14 @@ install-gnuserv: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-gprof maybe-configure-gprof
maybe-configure-gprof:
-configure-gprof: gprof/Makefile
-
-gprof/Makefile: config.status
- @[ -d gprof ] || mkdir gprof; \
+configure-gprof:
+ @test ! -f gprof/Makefile || exit 0; \
+ [ -d gprof ] || mkdir gprof; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -2992,7 +2900,7 @@ all-gprof: configure-gprof
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gprof; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-gprof
@@ -3000,7 +2908,7 @@ check-gprof:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gprof; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3010,83 +2918,14 @@ install-gprof: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gprof; $(MAKE) $(FLAGS_TO_PASS) install)
-
-
-.PHONY: configure-grep maybe-configure-grep
-maybe-configure-grep:
-configure-grep: grep/Makefile
-
-grep/Makefile: config.status
- @[ -d grep ] || mkdir grep; \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
- echo Configuring in grep; \
- cd grep || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/grep"; \
- libsrcdir="$$s/grep";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/grep"; \
- libsrcdir="$$s/grep";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
-
-.PHONY: all-grep maybe-all-grep
-maybe-all-grep:
-all-grep: configure-grep
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd grep; $(MAKE) $(FLAGS_TO_PASS) all)
-
-
-.PHONY: check-grep
-check-grep:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd grep; $(MAKE) $(FLAGS_TO_PASS) check)
-
-
-
-.PHONY: install-grep maybe-install-grep
-maybe-install-grep:
-install-grep: installdirs
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd grep; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-gzip maybe-configure-gzip
maybe-configure-gzip:
-configure-gzip: gzip/Makefile
-
-gzip/Makefile: config.status
- @[ -d gzip ] || mkdir gzip; \
+configure-gzip:
+ @test ! -f gzip/Makefile || exit 0; \
+ [ -d gzip ] || mkdir gzip; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3128,7 +2967,7 @@ all-gzip: configure-gzip
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gzip; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-gzip
@@ -3136,7 +2975,7 @@ check-gzip:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gzip; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3146,15 +2985,14 @@ install-gzip: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gzip; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-hello maybe-configure-hello
maybe-configure-hello:
-configure-hello: hello/Makefile
-
-hello/Makefile: config.status
- @[ -d hello ] || mkdir hello; \
+configure-hello:
+ @test ! -f hello/Makefile || exit 0; \
+ [ -d hello ] || mkdir hello; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3196,7 +3034,7 @@ all-hello: configure-hello
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd hello; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-hello
@@ -3204,7 +3042,7 @@ check-hello:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd hello; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3214,15 +3052,14 @@ install-hello: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd hello; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-indent maybe-configure-indent
maybe-configure-indent:
-configure-indent: indent/Makefile
-
-indent/Makefile: config.status
- @[ -d indent ] || mkdir indent; \
+configure-indent:
+ @test ! -f indent/Makefile || exit 0; \
+ [ -d indent ] || mkdir indent; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3264,7 +3101,7 @@ all-indent: configure-indent
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd indent; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-indent
@@ -3272,7 +3109,7 @@ check-indent:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd indent; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3282,15 +3119,14 @@ install-indent: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd indent; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-intl maybe-configure-intl
maybe-configure-intl:
-configure-intl: intl/Makefile
-
-intl/Makefile: config.status
- @[ -d intl ] || mkdir intl; \
+configure-intl:
+ @test ! -f intl/Makefile || exit 0; \
+ [ -d intl ] || mkdir intl; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3332,7 +3168,7 @@ all-intl: configure-intl
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd intl; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-intl
@@ -3340,7 +3176,7 @@ check-intl:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd intl; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3350,15 +3186,14 @@ install-intl: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd intl; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-tcl maybe-configure-tcl
maybe-configure-tcl:
-configure-tcl: tcl/Makefile
-
-tcl/Makefile: config.status
- @[ -d tcl ] || mkdir tcl; \
+configure-tcl:
+ @test ! -f tcl/Makefile || exit 0; \
+ [ -d tcl ] || mkdir tcl; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3400,7 +3235,7 @@ all-tcl: configure-tcl
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tcl; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-tcl
@@ -3408,7 +3243,7 @@ check-tcl:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tcl; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3418,15 +3253,14 @@ install-tcl: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tcl; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-itcl maybe-configure-itcl
maybe-configure-itcl:
-configure-itcl: itcl/Makefile
-
-itcl/Makefile: config.status
- @[ -d itcl ] || mkdir itcl; \
+configure-itcl:
+ @test ! -f itcl/Makefile || exit 0; \
+ [ -d itcl ] || mkdir itcl; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3468,7 +3302,7 @@ all-itcl: configure-itcl
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd itcl; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-itcl
@@ -3476,7 +3310,7 @@ check-itcl:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd itcl; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3486,15 +3320,14 @@ install-itcl: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd itcl; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-ld maybe-configure-ld
maybe-configure-ld:
-configure-ld: ld/Makefile
-
-ld/Makefile: config.status
- @[ -d ld ] || mkdir ld; \
+configure-ld:
+ @test ! -f ld/Makefile || exit 0; \
+ [ -d ld ] || mkdir ld; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3536,7 +3369,7 @@ all-ld: configure-ld
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd ld; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-ld
@@ -3544,7 +3377,7 @@ check-ld:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd ld; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3554,15 +3387,14 @@ install-ld: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd ld; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-libgui maybe-configure-libgui
maybe-configure-libgui:
-configure-libgui: libgui/Makefile
-
-libgui/Makefile: config.status
- @[ -d libgui ] || mkdir libgui; \
+configure-libgui:
+ @test ! -f libgui/Makefile || exit 0; \
+ [ -d libgui ] || mkdir libgui; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3604,7 +3436,7 @@ all-libgui: configure-libgui
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libgui; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-libgui
@@ -3612,7 +3444,7 @@ check-libgui:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libgui; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3622,15 +3454,14 @@ install-libgui: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libgui; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-libiberty maybe-configure-libiberty
maybe-configure-libiberty:
-configure-libiberty: libiberty/Makefile
-
-libiberty/Makefile: config.status
- @[ -d libiberty ] || mkdir libiberty; \
+configure-libiberty:
+ @test ! -f libiberty/Makefile || exit 0; \
+ [ -d libiberty ] || mkdir libiberty; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3672,7 +3503,7 @@ all-libiberty: configure-libiberty
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-libiberty
@@ -3680,7 +3511,7 @@ check-libiberty:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3690,15 +3521,14 @@ install-libiberty: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-libtool maybe-configure-libtool
maybe-configure-libtool:
-configure-libtool: libtool/Makefile
-
-libtool/Makefile: config.status
- @[ -d libtool ] || mkdir libtool; \
+configure-libtool:
+ @test ! -f libtool/Makefile || exit 0; \
+ [ -d libtool ] || mkdir libtool; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3740,7 +3570,7 @@ all-libtool: configure-libtool
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libtool; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-libtool
@@ -3748,7 +3578,7 @@ check-libtool:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libtool; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3758,15 +3588,14 @@ install-libtool: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libtool; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-m4 maybe-configure-m4
maybe-configure-m4:
-configure-m4: m4/Makefile
-
-m4/Makefile: config.status
- @[ -d m4 ] || mkdir m4; \
+configure-m4:
+ @test ! -f m4/Makefile || exit 0; \
+ [ -d m4 ] || mkdir m4; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3808,7 +3637,7 @@ all-m4: configure-m4
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd m4; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-m4
@@ -3816,7 +3645,7 @@ check-m4:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd m4; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3826,15 +3655,14 @@ install-m4: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd m4; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-make maybe-configure-make
maybe-configure-make:
-configure-make: make/Makefile
-
-make/Makefile: config.status
- @[ -d make ] || mkdir make; \
+configure-make:
+ @test ! -f make/Makefile || exit 0; \
+ [ -d make ] || mkdir make; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3876,7 +3704,7 @@ all-make: configure-make
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd make; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-make
@@ -3884,7 +3712,7 @@ check-make:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd make; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd make && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -3894,15 +3722,14 @@ install-make: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd make; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd make && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-mmalloc maybe-configure-mmalloc
maybe-configure-mmalloc:
-configure-mmalloc: mmalloc/Makefile
-
-mmalloc/Makefile: config.status
- @[ -d mmalloc ] || mkdir mmalloc; \
+configure-mmalloc:
+ @test ! -f mmalloc/Makefile || exit 0; \
+ [ -d mmalloc ] || mkdir mmalloc; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -3944,7 +3771,7 @@ all-mmalloc: configure-mmalloc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd mmalloc; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-mmalloc
@@ -3958,15 +3785,14 @@ install-mmalloc: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd mmalloc; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-patch maybe-configure-patch
maybe-configure-patch:
-configure-patch: patch/Makefile
-
-patch/Makefile: config.status
- @[ -d patch ] || mkdir patch; \
+configure-patch:
+ @test ! -f patch/Makefile || exit 0; \
+ [ -d patch ] || mkdir patch; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4008,7 +3834,7 @@ all-patch: configure-patch
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd patch; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-patch
@@ -4016,7 +3842,7 @@ check-patch:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd patch; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4026,15 +3852,14 @@ install-patch: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd patch; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-perl maybe-configure-perl
maybe-configure-perl:
-configure-perl: perl/Makefile
-
-perl/Makefile: config.status
- @[ -d perl ] || mkdir perl; \
+configure-perl:
+ @test ! -f perl/Makefile || exit 0; \
+ [ -d perl ] || mkdir perl; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4076,7 +3901,7 @@ all-perl: configure-perl
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd perl; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-perl
@@ -4084,7 +3909,7 @@ check-perl:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd perl; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4094,15 +3919,14 @@ install-perl: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd perl; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-prms maybe-configure-prms
maybe-configure-prms:
-configure-prms: prms/Makefile
-
-prms/Makefile: config.status
- @[ -d prms ] || mkdir prms; \
+configure-prms:
+ @test ! -f prms/Makefile || exit 0; \
+ [ -d prms ] || mkdir prms; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4144,7 +3968,7 @@ all-prms: configure-prms
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd prms; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-prms
@@ -4152,7 +3976,7 @@ check-prms:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd prms; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4162,15 +3986,14 @@ install-prms: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd prms; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-rcs maybe-configure-rcs
maybe-configure-rcs:
-configure-rcs: rcs/Makefile
-
-rcs/Makefile: config.status
- @[ -d rcs ] || mkdir rcs; \
+configure-rcs:
+ @test ! -f rcs/Makefile || exit 0; \
+ [ -d rcs ] || mkdir rcs; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4212,7 +4035,7 @@ all-rcs: configure-rcs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd rcs; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-rcs
@@ -4220,7 +4043,7 @@ check-rcs:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd rcs; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4230,15 +4053,14 @@ install-rcs: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd rcs; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-readline maybe-configure-readline
maybe-configure-readline:
-configure-readline: readline/Makefile
-
-readline/Makefile: config.status
- @[ -d readline ] || mkdir readline; \
+configure-readline:
+ @test ! -f readline/Makefile || exit 0; \
+ [ -d readline ] || mkdir readline; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4280,7 +4102,7 @@ all-readline: configure-readline
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd readline; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-readline
@@ -4288,7 +4110,7 @@ check-readline:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd readline; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4298,15 +4120,14 @@ install-readline: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd readline; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-release maybe-configure-release
maybe-configure-release:
-configure-release: release/Makefile
-
-release/Makefile: config.status
- @[ -d release ] || mkdir release; \
+configure-release:
+ @test ! -f release/Makefile || exit 0; \
+ [ -d release ] || mkdir release; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4348,7 +4169,7 @@ all-release: configure-release
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd release; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-release
@@ -4363,10 +4184,9 @@ install-release:
.PHONY: configure-recode maybe-configure-recode
maybe-configure-recode:
-configure-recode: recode/Makefile
-
-recode/Makefile: config.status
- @[ -d recode ] || mkdir recode; \
+configure-recode:
+ @test ! -f recode/Makefile || exit 0; \
+ [ -d recode ] || mkdir recode; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4408,7 +4228,7 @@ all-recode: configure-recode
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd recode; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-recode
@@ -4416,7 +4236,7 @@ check-recode:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd recode; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4426,15 +4246,14 @@ install-recode: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd recode; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-sed maybe-configure-sed
maybe-configure-sed:
-configure-sed: sed/Makefile
-
-sed/Makefile: config.status
- @[ -d sed ] || mkdir sed; \
+configure-sed:
+ @test ! -f sed/Makefile || exit 0; \
+ [ -d sed ] || mkdir sed; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4476,7 +4295,7 @@ all-sed: configure-sed
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sed; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-sed
@@ -4484,7 +4303,7 @@ check-sed:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sed; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4494,15 +4313,14 @@ install-sed: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sed; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-send-pr maybe-configure-send-pr
maybe-configure-send-pr:
-configure-send-pr: send-pr/Makefile
-
-send-pr/Makefile: config.status
- @[ -d send-pr ] || mkdir send-pr; \
+configure-send-pr:
+ @test ! -f send-pr/Makefile || exit 0; \
+ [ -d send-pr ] || mkdir send-pr; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4544,7 +4362,7 @@ all-send-pr: configure-send-pr
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-send-pr
@@ -4552,7 +4370,7 @@ check-send-pr:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4562,15 +4380,14 @@ install-send-pr: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-shellutils maybe-configure-shellutils
maybe-configure-shellutils:
-configure-shellutils: shellutils/Makefile
-
-shellutils/Makefile: config.status
- @[ -d shellutils ] || mkdir shellutils; \
+configure-shellutils:
+ @test ! -f shellutils/Makefile || exit 0; \
+ [ -d shellutils ] || mkdir shellutils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4612,7 +4429,7 @@ all-shellutils: configure-shellutils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-shellutils
@@ -4620,7 +4437,7 @@ check-shellutils:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4630,15 +4447,14 @@ install-shellutils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-sid maybe-configure-sid
maybe-configure-sid:
-configure-sid: sid/Makefile
-
-sid/Makefile: config.status
- @[ -d sid ] || mkdir sid; \
+configure-sid:
+ @test ! -f sid/Makefile || exit 0; \
+ [ -d sid ] || mkdir sid; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4680,7 +4496,7 @@ all-sid: configure-sid
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sid; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-sid
@@ -4688,7 +4504,7 @@ check-sid:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sid; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4698,15 +4514,14 @@ install-sid: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sid; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-sim maybe-configure-sim
maybe-configure-sim:
-configure-sim: sim/Makefile
-
-sim/Makefile: config.status
- @[ -d sim ] || mkdir sim; \
+configure-sim:
+ @test ! -f sim/Makefile || exit 0; \
+ [ -d sim ] || mkdir sim; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4748,7 +4563,7 @@ all-sim: configure-sim
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sim; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-sim
@@ -4756,7 +4571,7 @@ check-sim:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sim; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4766,83 +4581,14 @@ install-sim: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd sim; $(MAKE) $(FLAGS_TO_PASS) install)
-
-
-.PHONY: configure-snavigator maybe-configure-snavigator
-maybe-configure-snavigator:
-configure-snavigator: snavigator/Makefile
-
-snavigator/Makefile: config.status
- @[ -d snavigator ] || mkdir snavigator; \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
- echo Configuring in snavigator; \
- cd snavigator || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/snavigator"; \
- libsrcdir="$$s/snavigator";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/snavigator"; \
- libsrcdir="$$s/snavigator";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
-
-.PHONY: all-snavigator maybe-all-snavigator
-maybe-all-snavigator:
-all-snavigator: configure-snavigator
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) all)
-
-
-.PHONY: check-snavigator
-check-snavigator:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) check)
-
-
-
-.PHONY: install-snavigator maybe-install-snavigator
-maybe-install-snavigator:
-install-snavigator: installdirs
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-tar maybe-configure-tar
maybe-configure-tar:
-configure-tar: tar/Makefile
-
-tar/Makefile: config.status
- @[ -d tar ] || mkdir tar; \
+configure-tar:
+ @test ! -f tar/Makefile || exit 0; \
+ [ -d tar ] || mkdir tar; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4884,7 +4630,7 @@ all-tar: configure-tar
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tar; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-tar
@@ -4892,7 +4638,7 @@ check-tar:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tar; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4902,15 +4648,14 @@ install-tar: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tar; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-texinfo maybe-configure-texinfo
maybe-configure-texinfo:
-configure-texinfo: texinfo/Makefile
-
-texinfo/Makefile: config.status
- @[ -d texinfo ] || mkdir texinfo; \
+configure-texinfo:
+ @test ! -f texinfo/Makefile || exit 0; \
+ [ -d texinfo ] || mkdir texinfo; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -4952,7 +4697,7 @@ all-texinfo: configure-texinfo
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd texinfo; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-texinfo
@@ -4960,7 +4705,7 @@ check-texinfo:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd texinfo; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -4971,10 +4716,9 @@ install-texinfo:
.PHONY: configure-textutils maybe-configure-textutils
maybe-configure-textutils:
-configure-textutils: textutils/Makefile
-
-textutils/Makefile: config.status
- @[ -d textutils ] || mkdir textutils; \
+configure-textutils:
+ @test ! -f textutils/Makefile || exit 0; \
+ [ -d textutils ] || mkdir textutils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5016,7 +4760,7 @@ all-textutils: configure-textutils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd textutils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-textutils
@@ -5024,7 +4768,7 @@ check-textutils:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd textutils; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -5034,15 +4778,14 @@ install-textutils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd textutils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-time maybe-configure-time
maybe-configure-time:
-configure-time: time/Makefile
-
-time/Makefile: config.status
- @[ -d time ] || mkdir time; \
+configure-time:
+ @test ! -f time/Makefile || exit 0; \
+ [ -d time ] || mkdir time; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5084,7 +4827,7 @@ all-time: configure-time
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd time; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-time
@@ -5092,7 +4835,7 @@ check-time:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd time; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd time && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -5102,15 +4845,14 @@ install-time: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd time; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd time && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-uudecode maybe-configure-uudecode
maybe-configure-uudecode:
-configure-uudecode: uudecode/Makefile
-
-uudecode/Makefile: config.status
- @[ -d uudecode ] || mkdir uudecode; \
+configure-uudecode:
+ @test ! -f uudecode/Makefile || exit 0; \
+ [ -d uudecode ] || mkdir uudecode; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5152,7 +4894,7 @@ all-uudecode: configure-uudecode
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-uudecode
@@ -5160,7 +4902,7 @@ check-uudecode:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -5170,15 +4912,14 @@ install-uudecode: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-wdiff maybe-configure-wdiff
maybe-configure-wdiff:
-configure-wdiff: wdiff/Makefile
-
-wdiff/Makefile: config.status
- @[ -d wdiff ] || mkdir wdiff; \
+configure-wdiff:
+ @test ! -f wdiff/Makefile || exit 0; \
+ [ -d wdiff ] || mkdir wdiff; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5220,7 +4961,7 @@ all-wdiff: configure-wdiff
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-wdiff
@@ -5228,7 +4969,7 @@ check-wdiff:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
@@ -5238,15 +4979,14 @@ install-wdiff: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-zip maybe-configure-zip
maybe-configure-zip:
-configure-zip: zip/Makefile
-
-zip/Makefile: config.status
- @[ -d zip ] || mkdir zip; \
+configure-zip:
+ @test ! -f zip/Makefile || exit 0; \
+ [ -d zip ] || mkdir zip; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5288,7 +5028,7 @@ all-zip: configure-zip
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd zip; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-zip
@@ -5298,7 +5038,7 @@ check-zip:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd zip; $(MAKE) $(FLAGS_TO_PASS) check); \
+ (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
fi
@@ -5309,15 +5049,14 @@ install-zip: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd zip; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-zlib maybe-configure-zlib
maybe-configure-zlib:
-configure-zlib: zlib/Makefile
-
-zlib/Makefile: config.status
- @[ -d zlib ] || mkdir zlib; \
+configure-zlib:
+ @test ! -f zlib/Makefile || exit 0; \
+ [ -d zlib ] || mkdir zlib; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5359,7 +5098,7 @@ all-zlib: configure-zlib
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd zlib; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-zlib
@@ -5374,10 +5113,9 @@ install-zlib:
.PHONY: configure-gdb maybe-configure-gdb
maybe-configure-gdb:
-configure-gdb: gdb/Makefile
-
-gdb/Makefile: config.status
- @[ -d gdb ] || mkdir gdb; \
+configure-gdb:
+ @test ! -f gdb/Makefile || exit 0; \
+ [ -d gdb ] || mkdir gdb; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5419,7 +5157,7 @@ all-gdb: configure-gdb
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+ (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
.PHONY: check-gdb
@@ -5427,7 +5165,7 @@ check-gdb:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
@@ -5437,15 +5175,14 @@ install-gdb: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
.PHONY: configure-expect maybe-configure-expect
maybe-configure-expect:
-configure-expect: expect/Makefile
-
-expect/Makefile: config.status
- @[ -d expect ] || mkdir expect; \
+configure-expect:
+ @test ! -f expect/Makefile || exit 0; \
+ [ -d expect ] || mkdir expect; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5487,7 +5224,7 @@ all-expect: configure-expect
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+ (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
.PHONY: check-expect
@@ -5495,7 +5232,7 @@ check-expect:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
@@ -5505,15 +5242,14 @@ install-expect: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
.PHONY: configure-guile maybe-configure-guile
maybe-configure-guile:
-configure-guile: guile/Makefile
-
-guile/Makefile: config.status
- @[ -d guile ] || mkdir guile; \
+configure-guile:
+ @test ! -f guile/Makefile || exit 0; \
+ [ -d guile ] || mkdir guile; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5555,7 +5291,7 @@ all-guile: configure-guile
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+ (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
.PHONY: check-guile
@@ -5563,7 +5299,7 @@ check-guile:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
@@ -5573,15 +5309,14 @@ install-guile: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
.PHONY: configure-tk maybe-configure-tk
maybe-configure-tk:
-configure-tk: tk/Makefile
-
-tk/Makefile: config.status
- @[ -d tk ] || mkdir tk; \
+configure-tk:
+ @test ! -f tk/Makefile || exit 0; \
+ [ -d tk ] || mkdir tk; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5623,7 +5358,7 @@ all-tk: configure-tk
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+ (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
.PHONY: check-tk
@@ -5631,7 +5366,7 @@ check-tk:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
@@ -5641,15 +5376,14 @@ install-tk: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
.PHONY: configure-tix maybe-configure-tix
maybe-configure-tix:
-configure-tix: tix/Makefile
-
-tix/Makefile: config.status
- @[ -d tix ] || mkdir tix; \
+configure-tix:
+ @test ! -f tix/Makefile || exit 0; \
+ [ -d tix ] || mkdir tix; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5691,7 +5425,7 @@ all-tix: configure-tix
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+ (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
.PHONY: check-tix
@@ -5699,7 +5433,7 @@ check-tix:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
@@ -5709,15 +5443,14 @@ install-tix: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
.PHONY: configure-libtermcap maybe-configure-libtermcap
maybe-configure-libtermcap:
-configure-libtermcap: libtermcap/Makefile
-
-libtermcap/Makefile: config.status
- @[ -d libtermcap ] || mkdir libtermcap; \
+configure-libtermcap:
+ @test ! -f libtermcap/Makefile || exit 0; \
+ [ -d libtermcap ] || mkdir libtermcap; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5759,7 +5492,7 @@ all-libtermcap: configure-libtermcap
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libtermcap; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-libtermcap
@@ -5773,15 +5506,14 @@ install-libtermcap: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd libtermcap; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
.PHONY: configure-utils maybe-configure-utils
maybe-configure-utils:
-configure-utils: utils/Makefile
-
-utils/Makefile: config.status
- @[ -d utils ] || mkdir utils; \
+configure-utils:
+ @test ! -f utils/Makefile || exit 0; \
+ [ -d utils ] || mkdir utils; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
@@ -5823,7 +5555,7 @@ all-utils: configure-utils
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd utils; $(MAKE) $(FLAGS_TO_PASS) all)
+ (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
.PHONY: check-utils
@@ -5837,7 +5569,7 @@ install-utils: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd utils; $(MAKE) $(FLAGS_TO_PASS) install)
+ (cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
@@ -5847,18 +5579,18 @@ install-utils: installdirs
.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
maybe-configure-target-libstdc++-v3:
-configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libstdc++-v3"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libstdc++-v3/Makefile: config.status $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
- @[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || \
+ mkdir $(TARGET_SUBDIR)/libstdc++-v3; \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
+
+configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || \
+ mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -5923,7 +5655,7 @@ all-target-libstdc++-v3: configure-target-libstdc++-v3
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libstdc++-v3; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all)
.PHONY: check-target-libstdc++-v3
@@ -5931,7 +5663,7 @@ check-target-libstdc++-v3:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libstdc++-v3; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
@@ -5941,24 +5673,24 @@ install-target-libstdc++-v3: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libstdc++-v3; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-newlib maybe-configure-target-newlib
maybe-configure-target-newlib:
-configure-target-newlib: $(TARGET_SUBDIR)/newlib/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/newlib/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for newlib"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/newlib/Makefile: config.status $(TARGET_SUBDIR)/newlib/multilib.out
- @[ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/newlib ] || \
+ mkdir $(TARGET_SUBDIR)/newlib; \
+ rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out
+
+configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/newlib ] || \
+ mkdir $(TARGET_SUBDIR)/newlib;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6022,7 +5754,7 @@ all-target-newlib: configure-target-newlib
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/newlib; \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-newlib
@@ -6030,7 +5762,7 @@ check-target-newlib:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/newlib; \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -6040,24 +5772,24 @@ install-target-newlib: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/newlib; \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-libf2c maybe-configure-target-libf2c
maybe-configure-target-libf2c:
-configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libf2c/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libf2c"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libf2c/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libf2c/Makefile: config.status $(TARGET_SUBDIR)/libf2c/multilib.out
- @[ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libf2c ] || \
+ mkdir $(TARGET_SUBDIR)/libf2c; \
+ rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out
+
+configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libf2c ] || \
+ mkdir $(TARGET_SUBDIR)/libf2c;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6121,7 +5853,7 @@ all-target-libf2c: configure-target-libf2c
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-libf2c
@@ -6129,7 +5861,7 @@ check-target-libf2c:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -6139,24 +5871,24 @@ install-target-libf2c: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-libobjc maybe-configure-target-libobjc
maybe-configure-target-libobjc:
-configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libobjc/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libobjc"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libobjc/Makefile: config.status $(TARGET_SUBDIR)/libobjc/multilib.out
- @[ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libobjc ] || \
+ mkdir $(TARGET_SUBDIR)/libobjc; \
+ rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out
+
+configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libobjc ] || \
+ mkdir $(TARGET_SUBDIR)/libobjc;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6220,7 +5952,7 @@ all-target-libobjc: configure-target-libobjc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libobjc; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-libobjc
@@ -6228,7 +5960,7 @@ check-target-libobjc:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libobjc; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -6238,24 +5970,24 @@ install-target-libobjc: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libobjc; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
maybe-configure-target-libtermcap:
-configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libtermcap/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libtermcap"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libtermcap/Makefile: config.status $(TARGET_SUBDIR)/libtermcap/multilib.out
- @[ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libtermcap ] || \
+ mkdir $(TARGET_SUBDIR)/libtermcap; \
+ rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out
+
+configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libtermcap ] || \
+ mkdir $(TARGET_SUBDIR)/libtermcap;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6319,7 +6051,7 @@ all-target-libtermcap: configure-target-libtermcap
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libtermcap; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
# Dummy target for uncheckable module.
@@ -6333,24 +6065,24 @@ install-target-libtermcap: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libtermcap; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-winsup maybe-configure-target-winsup
maybe-configure-target-winsup:
-configure-target-winsup: $(TARGET_SUBDIR)/winsup/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/winsup/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for winsup"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/winsup/Makefile: config.status $(TARGET_SUBDIR)/winsup/multilib.out
- @[ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/winsup ] || \
+ mkdir $(TARGET_SUBDIR)/winsup; \
+ rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out
+
+configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/winsup ] || \
+ mkdir $(TARGET_SUBDIR)/winsup;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6414,7 +6146,7 @@ all-target-winsup: configure-target-winsup
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/winsup; \
+ (cd $(TARGET_SUBDIR)/winsup && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-winsup
@@ -6422,7 +6154,7 @@ check-target-winsup:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/winsup; \
+ (cd $(TARGET_SUBDIR)/winsup && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -6432,24 +6164,24 @@ install-target-winsup: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/winsup; \
+ (cd $(TARGET_SUBDIR)/winsup && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-libgloss maybe-configure-target-libgloss
maybe-configure-target-libgloss:
-configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libgloss/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libgloss"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libgloss/Makefile: config.status $(TARGET_SUBDIR)/libgloss/multilib.out
- @[ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libgloss ] || \
+ mkdir $(TARGET_SUBDIR)/libgloss; \
+ rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out
+
+configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libgloss ] || \
+ mkdir $(TARGET_SUBDIR)/libgloss;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6513,7 +6245,7 @@ all-target-libgloss: configure-target-libgloss
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libgloss; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
# Dummy target for uncheckable module.
@@ -6527,24 +6259,24 @@ install-target-libgloss: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libgloss; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-libiberty maybe-configure-target-libiberty
maybe-configure-target-libiberty:
-configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libiberty/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libiberty"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libiberty/Makefile: config.status $(TARGET_SUBDIR)/libiberty/multilib.out
- @[ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libiberty ] || \
+ mkdir $(TARGET_SUBDIR)/libiberty; \
+ rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out
+
+configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libiberty ] || \
+ mkdir $(TARGET_SUBDIR)/libiberty;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6608,7 +6340,7 @@ all-target-libiberty: configure-target-libiberty
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libiberty; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-libiberty
@@ -6616,7 +6348,7 @@ check-target-libiberty:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libiberty; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -6626,24 +6358,24 @@ install-target-libiberty: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libiberty; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-gperf maybe-configure-target-gperf
maybe-configure-target-gperf:
-configure-target-gperf: $(TARGET_SUBDIR)/gperf/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/gperf/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for gperf"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/gperf/Makefile: config.status $(TARGET_SUBDIR)/gperf/multilib.out
- @[ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/gperf ] || \
+ mkdir $(TARGET_SUBDIR)/gperf; \
+ rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out
+
+configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/gperf ] || \
+ mkdir $(TARGET_SUBDIR)/gperf;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6707,7 +6439,7 @@ all-target-gperf: configure-target-gperf
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/gperf; \
+ (cd $(TARGET_SUBDIR)/gperf && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-gperf
@@ -6715,7 +6447,7 @@ check-target-gperf:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/gperf; \
+ (cd $(TARGET_SUBDIR)/gperf && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -6725,24 +6457,24 @@ install-target-gperf: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/gperf; \
+ (cd $(TARGET_SUBDIR)/gperf && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-examples maybe-configure-target-examples
maybe-configure-target-examples:
-configure-target-examples: $(TARGET_SUBDIR)/examples/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/examples/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for examples"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/examples/Makefile: config.status $(TARGET_SUBDIR)/examples/multilib.out
- @[ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/examples/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/examples ] || \
+ mkdir $(TARGET_SUBDIR)/examples; \
+ rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out
+
+configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/examples ] || \
+ mkdir $(TARGET_SUBDIR)/examples;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6806,7 +6538,7 @@ all-target-examples: configure-target-examples
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/examples; \
+ (cd $(TARGET_SUBDIR)/examples && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
# Dummy target for uncheckable module.
@@ -6822,18 +6554,18 @@ install-target-examples:
.PHONY: configure-target-libffi maybe-configure-target-libffi
maybe-configure-target-libffi:
-configure-target-libffi: $(TARGET_SUBDIR)/libffi/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libffi/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libffi"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/libffi/Makefile: config.status $(TARGET_SUBDIR)/libffi/multilib.out
- @[ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libffi ] || \
+ mkdir $(TARGET_SUBDIR)/libffi; \
+ rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out
+
+configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libffi ] || \
+ mkdir $(TARGET_SUBDIR)/libffi;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6897,7 +6629,7 @@ all-target-libffi: configure-target-libffi
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libffi; \
+ (cd $(TARGET_SUBDIR)/libffi && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-libffi
@@ -6905,30 +6637,34 @@ check-target-libffi:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libffi; \
+ (cd $(TARGET_SUBDIR)/libffi && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
.PHONY: install-target-libffi maybe-install-target-libffi
maybe-install-target-libffi:
-# Dummy target for uninstallable.
-install-target-libffi:
+install-target-libffi: installdirs
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-libjava maybe-configure-target-libjava
maybe-configure-target-libjava:
-configure-target-libjava: $(TARGET_SUBDIR)/libjava/Makefile
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/libjava/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for libjava"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.out 2> /dev/null
-
-$(TARGET_SUBDIR)/libjava/Makefile: config.status $(TARGET_SUBDIR)/libjava/multilib.out
- @[ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/libjava ] || \
+ mkdir $(TARGET_SUBDIR)/libjava; \
+ rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out
+
+configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/libjava ] || \
+ mkdir $(TARGET_SUBDIR)/libjava;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -6993,7 +6729,7 @@ all-target-libjava: configure-target-libjava
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libjava; \
+ (cd $(TARGET_SUBDIR)/libjava && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all)
.PHONY: check-target-libjava
@@ -7001,7 +6737,7 @@ check-target-libjava:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libjava; \
+ (cd $(TARGET_SUBDIR)/libjava && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
@@ -7011,24 +6747,24 @@ install-target-libjava: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libjava; \
+ (cd $(TARGET_SUBDIR)/libjava && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-zlib maybe-configure-target-zlib
maybe-configure-target-zlib:
-configure-target-zlib: $(TARGET_SUBDIR)/zlib/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/zlib/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for zlib"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/zlib/Makefile: config.status $(TARGET_SUBDIR)/zlib/multilib.out
- @[ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/zlib ] || \
+ mkdir $(TARGET_SUBDIR)/zlib; \
+ rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out
+
+configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/zlib ] || \
+ mkdir $(TARGET_SUBDIR)/zlib;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -7092,7 +6828,7 @@ all-target-zlib: configure-target-zlib
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/zlib; \
+ (cd $(TARGET_SUBDIR)/zlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-zlib
@@ -7100,7 +6836,7 @@ check-target-zlib:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/zlib; \
+ (cd $(TARGET_SUBDIR)/zlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -7110,24 +6846,24 @@ install-target-zlib: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/zlib; \
+ (cd $(TARGET_SUBDIR)/zlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
maybe-configure-target-boehm-gc:
-configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/Makefile
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/boehm-gc/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for boehm-gc"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/multilib.out 2> /dev/null
-
-$(TARGET_SUBDIR)/boehm-gc/Makefile: config.status $(TARGET_SUBDIR)/boehm-gc/multilib.out
- @[ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/boehm-gc ] || \
+ mkdir $(TARGET_SUBDIR)/boehm-gc; \
+ rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out
+
+configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/boehm-gc ] || \
+ mkdir $(TARGET_SUBDIR)/boehm-gc;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -7191,7 +6927,7 @@ all-target-boehm-gc: configure-target-boehm-gc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/boehm-gc; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-boehm-gc
@@ -7199,7 +6935,7 @@ check-target-boehm-gc:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/boehm-gc; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -7209,24 +6945,24 @@ install-target-boehm-gc: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/boehm-gc; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-qthreads maybe-configure-target-qthreads
maybe-configure-target-qthreads:
-configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/Makefile
-
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/qthreads/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for qthreads"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/multilib.out 2> /dev/null
-$(TARGET_SUBDIR)/qthreads/Makefile: config.status $(TARGET_SUBDIR)/qthreads/multilib.out
- @[ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/qthreads ] || \
+ mkdir $(TARGET_SUBDIR)/qthreads; \
+ rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out
+
+configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/qthreads ] || \
+ mkdir $(TARGET_SUBDIR)/qthreads;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -7290,7 +7026,7 @@ all-target-qthreads: configure-target-qthreads
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/qthreads; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-qthreads
@@ -7298,7 +7034,7 @@ check-target-qthreads:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/qthreads; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -7308,24 +7044,24 @@ install-target-qthreads: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/qthreads; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
.PHONY: configure-target-rda maybe-configure-target-rda
maybe-configure-target-rda:
-configure-target-rda: $(TARGET_SUBDIR)/rda/Makefile
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/rda/multilib.out: maybe-all-gcc
- @[ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for rda"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/multilib.out 2> /dev/null
-
-$(TARGET_SUBDIR)/rda/Makefile: config.status $(TARGET_SUBDIR)/rda/multilib.out
- @[ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/rda/multilib.out: multilib.out
+ @[ -d $(TARGET_SUBDIR)/rda ] || \
+ mkdir $(TARGET_SUBDIR)/rda; \
+ rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out
+
+configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \
+ [ -d $(TARGET_SUBDIR)/rda ] || \
+ mkdir $(TARGET_SUBDIR)/rda;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -7389,7 +7125,7 @@ all-target-rda: configure-target-rda
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/rda; \
+ (cd $(TARGET_SUBDIR)/rda && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all)
.PHONY: check-target-rda
@@ -7397,7 +7133,7 @@ check-target-rda:
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/rda; \
+ (cd $(TARGET_SUBDIR)/rda && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@@ -7407,7 +7143,7 @@ install-target-rda: installdirs
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/rda; \
+ (cd $(TARGET_SUBDIR)/rda && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -7423,16 +7159,16 @@ install-target-rda: installdirs
# gcc is the only module which uses GCC_FLAGS_TO_PASS.
.PHONY: configure-gcc maybe-configure-gcc
maybe-configure-gcc:
-configure-gcc: gcc/Makefile
-
-gcc/Makefile: config.status
- @[ -d gcc ] || mkdir gcc; \
+configure-gcc:
+ @test ! -f gcc/Makefile || exit 0; \
+ [ -d gcc ] || mkdir gcc; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
CC="$(CC)"; export CC; \
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
AR="$(AR)"; export AR; \
AS="$(AS)"; export AS; \
@@ -7472,12 +7208,12 @@ all-gcc: configure-gcc
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
else \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
fi
# Building GCC uses some tools for rebuilding "source" files
@@ -7539,7 +7275,7 @@ check-gcc:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
else \
true; \
fi
@@ -7550,7 +7286,7 @@ check-gcc-c++:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
else \
true; \
fi
@@ -7565,7 +7301,7 @@ install-gcc:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
else \
true; \
fi
@@ -7585,7 +7321,7 @@ gcc-no-fixedincludes:
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}` ; export s; \
$(SET_LIB_PATH) \
- (cd ./gcc; \
+ (cd ./gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) install); \
rm -rf gcc/include; \
mv gcc/tmp-include gcc/include 2>/dev/null; \
@@ -7642,7 +7378,7 @@ all-itcl: maybe-all-tcl maybe-all-tk
# We put install-tcl before install-itcl because itcl wants to run a
# program on installation which uses the Tcl libraries.
install-itcl: maybe-install-tcl
-all-sid: maybe-all-tcl maybe-all-tk
+all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
install-sid: maybe-install-tcl maybe-install-tk
all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
configure-tk: maybe-configure-tcl
@@ -7659,7 +7395,6 @@ all-diff: maybe-all-libiberty
all-fastjar: maybe-all-zlib maybe-all-libiberty
all-fileutils: maybe-all-libiberty
all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-grep: maybe-all-libiberty
all-gzip: maybe-all-libiberty
all-hello: maybe-all-libiberty
all-m4: maybe-all-libiberty maybe-all-texinfo
@@ -7669,7 +7404,6 @@ all-prms: maybe-all-libiberty
all-recode: maybe-all-libiberty
all-sed: maybe-all-libiberty
all-send-pr: maybe-all-prms
-all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui
all-tar: maybe-all-libiberty
all-uudecode: maybe-all-libiberty
@@ -7721,21 +7455,42 @@ configure-target-qthreads: $(ALL_GCC_C)
# Regenerating top level configury
# --------------------------------
+# Multilib.out tells target dirs what multilibs they should build.
+# There is really only one copy. We use the 'timestamp' method to
+# work around various timestamp bugs on some systems.
+# We use move-if-change so that it's only considered updated when it
+# actually changes, because it has to depend on a phony target.
+multilib.out: maybe-all-gcc
+ @r=`${PWD}`; export r; \
+ echo "Checking multilib configuration..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
+
# Rebuilding Makefile.in, using autogen.
+AUTOGEN = autogen
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
- cd $(srcdir) && autogen Makefile.def
-
-# with the gnu make, this is done automatically.
+ cd $(srcdir) && $(AUTOGEN) Makefile.def
-host_makefile_frag=@host_makefile_frag@
-target_makefile_frag=@target_makefile_frag@
+# Rebuilding Makefile.
+Makefile: $(srcdir)/Makefile.in config.status
+ CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
- $(SHELL) ./config.status
+config.status: configure $(gcc_version_trigger)
+ $(SHELL) ./config.status --recheck
+# Rebuilding configure.
+AUTOCONF = autoconf
+$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/config/acx.m4
+ cd $(srcdir) && $(AUTOCONF)
#
.NOEXPORT:
MAKEOVERRIDES=
+# Tell GNU make 3.79 not to run the top level in parallel. This
+# prevents contention for $builddir/$target/config.cache, as well
+# as minimizing scatter in file system caches.
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+
# end of Makefile.in
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index df7a736b37b..85bffb4ccc0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,628 @@
+2003-02-07 Nick Clifton <nickc@redhat.com>
+
+ * elf.c (swap_out_syms): Generate an error message if an
+ equivalent output section cannot be found for a symbol.
+
+2003-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
+ local_got_entries is NULL.
+
+
+2003-02-06 Andreas Schwab <schwab@suse.de>
+
+ * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
+ (read_value): Add parameter is_signed, use signed extraction if
+ the value is signed.
+ (_bfd_elf_write_section_eh_frame): Pass signed flag of the
+ encoding to read_value.
+
+2003-02-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
+ plt info when called to transfer weak sym info.
+
+2003-02-05 Alan Modra <amodra@bigpond.net.au>
+
+ * reloc.c: Add PPC and PPC64 TLS relocs.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
+ (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
+ against a 32 bit field.
+ (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
+ (_ppc64_elf_section_data): Add t_symndx and comments.
+ (ppc64_elf_section_data): Use elf_section_data macro.
+ (ppc64_elf_new_section_hook): American spelling.
+ (struct got_entry, struct plt_entry): New.
+ (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
+ (struct ppc_stub_hash_entry): Add "addend" field.
+ (struct ppc_link_hash_entry): Add "tls_type".
+ (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
+ TLS_EXPLICIT): Define.
+ (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
+ (link_hash_newfunc): Init new fields.
+ (ppc64_elf_link_hash_table_create): Likewise. Set init_relcount and
+ init_offset to NULL.
+ (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
+ _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
+ there.
+ (update_local_sym_info, update_plt_info): New functions.
+ (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
+ handling to use got.glist rather than got.refcount. Likewise for PLT.
+ (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
+ (func_desc_adjust): Adjust for new PLT list.
+ (ppc64_elf_adjust_dynamic_symbol): Likewise.
+ (get_sym_h, get_tls_type): New functions.
+ (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
+ (ppc64_elf_tls_optimize): New function.
+ (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
+ TLS relocs.
+ (ppc64_elf_size_dynamic_sections): Likewise.
+ (ppc_type_of_stub): Adjust for new PLT list.
+ (ppc_build_one_stub): Likewise.
+ (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
+ calls specially.
+ (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
+ TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
+ init GOT entries that have a reloc. Generate GOT relocs here..
+ (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
+ * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
+
+2003-02-04 Andreas Schwab <schwab@suse.de>
+
+ * elf32-m68k.c (elf_m68k_hash_entry): Define.
+ (elf_m68k_link_hash_traverse): Remove.
+ (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
+ elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
+ reduce casting.
+ (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
+ casting.
+ (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
+ instead of elf_m68k_link_hash_traverse.
+ (elf_m68k_discard_copies): Change first parameter to pointer to
+ struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
+ elf_m68k_link_hash_entry is needed.
+
+2003-02-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
+ (struct elf_link_hash_entry): Add "glist" and "plist" fields to
+ "got" union, and declare as gotplt_union. Use gotplt_uinion for
+ "plt" field.
+ (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
+ Add "init_offset" field.
+ (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
+ (elf_local_got_ents): Declare.
+ * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
+ and "plt".
+ (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
+ (_bfd_elf_link_hash_table_init): Set "init_offset".
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
+ from init_offset.
+ (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
+
+ * elf.c (bfd_elf_local_sym_name): Split out from..
+ (group_signature): ..here.
+ * elf-bfd.h (bfd_elf_local_sym_name): Declare.
+
+2003-02-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (enum elf_link_info_type): Remove.
+ (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
+ to struct sec. Remove linkonce_p field.
+ (elf_linkonce_p): Delete.
+ (elf_discarded_section): Update for sec_info_type change.
+ * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
+ flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
+ (ELF_INFO_TYPE_NONE): Define.
+ (ELF_INFO_TYPE_STABS): Define.
+ (ELF_INFO_TYPE_MERGE): Define.
+ (ELF_INFO_TYPE_EH_FRAME): Define.
+ (ELF_INFO_TYPE_JUST_SYMS): Define.
+ (STD_SECTION): Update struct sec initializer.
+ * ecoff.c (bfd_debug_section): Likewise.
+ * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
+ * elflink.h: Likewise.
+ * elf-eh-frame.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * bfd-in2.h: Regenerate.
+
+ * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
+ referring to used_by_bfd.
+ * elf64-sparc.c (sec_do_relax): Likewise.
+ * elf64-mmix.c (mmix_elf_section_data): Likewise.
+ * elfxx-mips.c (mips_elf_section_data): Likewise.
+ * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
+ (ieee_get_section_contents): Likewise.
+ (ieee_new_section_hook): Formatting.
+ (ieee_canonicalize_reloc): Remove commented out code.
+ * mmo.c (mmo_section_data): Define. Use throughout file.
+ * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
+
+2003-01-31 Graydon Hoare <graydon@redhat.com>
+
+ * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
+ * Makefile.in: Regenerate.
+ * opncls.c (calc_crc32, get_debug_link_info,
+ seperate_debug_file_exists, find_seperate_debug_file): New
+ internal functions.
+ (bfd_follow_gnu_debuglink): New function. Follow the pointer
+ contained inside a .gnu_debuglink section.
+ * bfd-in2.h: Regenerate.
+
+2003-01-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
+ entry->abfd when it's NULL.
+
+2003-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
+ _bfd_elf_section_offset returning -2 the same way as -1.
+
+ * elfxx-mips.c (mips_elf_multi_got): New function.
+ (struct mips_got_entry): Make symndx and gotidx signed. Moved
+ addend into union along with address and link hash entry.
+ (struct mips_got_info): Added bfd2got and next.
+ (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
+ (mips_elf_got_section, mips_elf_create_got_section): Use
+ SEC_EXCLUDE bit to tell whether we really need the got
+ section. Take boolean arguments to disregard an excluded
+ section, or to create it as excluded. Adjust all callers.
+ Use mips_elf_got_section all over.
+ (mips_elf_local_got_index, mips_elf_got_page,
+ mips_elf_got16_entry): Take input bfd as argument, and pass it
+ on to mips_elf_create_local_got_entry.
+ (mips_elf_global_got_index, mips_elf_create_local_got_entry):
+ Take input bfd as argument, and manage entries in the
+ appropriate GOT.
+ (mips_elf_got_offset_from_index): Take input bfd as argument,
+ and use it to adjust the GP offset of the bfd.
+ (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
+ unreferenced GOT entries of global symbols to the end.
+ (mips_elf_record_global_got_symbol): Take input bfd as
+ argument. Add entries to the master GOT hash table.
+ (struct mips_elf_bfd2got_hash): New.
+ (struct mips_elf_got_per_bfd_arg): New.
+ (struct mips_elf_set_global_got_offset_arg): New.
+ (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
+ mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
+ mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
+ mips_elf_merge_gots, mips_elf_set_global_got_offset,
+ mips_elf_resolve_final_got_entry,
+ mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
+ mips_elf_got_for_ibfd): New functions.
+ (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
+ (MIPS_ELF_GOT_MAX_SIZE): New macro.
+ (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
+ (mips_elf_got_entry_hash): Take new fields into account. Use
+ mips_elf_hash_bfd_vma.
+ (mips_elf_got_entry_eq): Take new fields into account.
+ (mips_elf_create_got_section): Initialize new fields.
+ (mips_elf_calculate_relocation): Pass input_bfd to functions
+ that now take it. Adjust gp for the input_bfd.
+ (mips_elf_allocate_dynamic_relocation,
+ mips_elf_create_dynamic_relocation,
+ _bfd_mips_elf_create_dynamic_sections): Use...
+ (mips_elf_rel_dyn_section): New function. Borrow code from...
+ (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
+ now take it. Create the got section if needed, even if
+ excluded, before recording a global got symbol. Move some
+ code to...
+ (mips_elf_record_local_got_symbol): New fn.
+ (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
+ Compute multi-got global entries offsets. Move GOT code to...
+ (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
+ if the GOT is too big.
+ (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
+ undefweak symbol to zero. Generate dynamic relocations for
+ non-primary GOT entries for global symbols.
+ (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
+ case. Generate dynamic relocations for local got entries.
+ Sort dynamic relocations on N64 too, using...
+ (sort_dynamic_relocs_64): New fns.
+ (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
+ (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
+
+2003-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * bfd.c (struct _bfd): Added id field.
+ * opncls.c (_bfd_id_counter): New static variable.
+ (_bfd_new_bfd): Use it.
+ * bfd-in2.h: Rebuilt.
+
+2003-01-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
+
+2003-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
+ (elf32_sparc_rev32_howto): New variable.
+ (sparc_reloc_map): Add TLS relocs.
+ (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
+ Handle REV32.
+ (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
+ New functions.
+ (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
+ struct elf32_sparc_link_hash_table):
+ New structures.
+ (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
+ elf32_sparc_hash_table): Define.
+ (link_hash_newfunc, elf32_sparc_link_hash_table_create,
+ create_got_section, elf32_sparc_create_dynamic_sections,
+ elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
+ functions.
+ (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
+ reference counting.
+ (elf32_sparc_gc_sweep_hook): Likewise.
+ (elf32_sparc_adjust_dynamic_symbol): Likewise.
+ (elf32_sparc_size_dynamic_sections): Likewise.
+ (elf32_sparc_relocate_section): Likewise.
+ (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
+ New functions.
+ (elf32_sparc_object_p): Allocate backend private object data.
+ (bfd_elf32_bfd_link_hash_table_create,
+ elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
+ elf_backend_can_refcount): Define.
+ (elf_backend_create_dynamic_sections): Define to
+ elf32_sparc_create_dynamic_sections.
+ * reloc.c: Add SPARC TLS relocs.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+ * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
+ (sparc_reloc_map): Likewise.
+
+2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * bfd-in2.h: Regenerate.
+ * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
+ s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
+ (elf_howto_table): Add TLS relocs.
+ (elf_s390_reloc_type_lookup): Likewise.
+ (elf_s390_link_hash_entry): Add tls_type.
+ (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
+ New macros.
+ (elf_s390_link_hash_table): Add tls_ldm_got.
+ (link_hash_newfunc): Initialize tls_type.
+ (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
+ (elf_s390_copy_indirect_symbol): Copy tls_type information.
+ (elf_s390_check_relocs): Support TLS relocs.
+ (elf_s390_gc_sweep_hook): Likewise.
+ (allocate_dynrelocs): Likewise.
+ (elf_s390_size_dynamic_sections): Likewise.
+ (elf_s390_relocate_section): Likewise.
+ (elf_s390_finish_dynamic_symbol): Likewise.
+ (bfd_elf32_mkobject): Define for TLS.
+ * elf64-s390.c: Same changes as for elf32-s390.c.
+ * libbfd.h: Regenerate.
+ * reloc.c: Add s390 TLS relocations.
+
+2003-01-24 Charles Lepple clepple.ghz.cc
+
+ * aclocal.m4: Fix name of --enable-install-libbfd switch.
+
+2003-01-23 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * archures.c (bfd_mach_sh2e): Added.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (arch_info_struct): Added SH2e.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
+
+2003-01-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
+ dynindx to an int. Rearrange for better packing.
+ * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
+ * elf32-mips.c (bfd_elf32_new_section_hook): Define.
+ * elf32-sh64.h: New. Split out from include/elf/sh.h.
+ (struct _sh64_elf_section_data): New struct.
+ (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
+ * elf32-sh64-com.c: Include elf32-sh64.h.
+ * elf32-sh64.c: Likewise.
+ (sh64_elf_new_section_hook): New function.
+ (bfd_elf32_new_section_hook): Define.
+ (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
+ (sh64_bfd_elf_copy_private_section_data): Likewise.
+ (sh64_elf_final_write_processing): Likewise.
+ * elf32-sparc.c (struct elf32_sparc_section_data): New.
+ (elf32_sparc_new_section_hook): New function.
+ (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
+ (sec_do_relax): Define.
+ (elf32_sparc_relax_section): Adjust to use sec_do_relax.
+ (elf32_sparc_relocate_section): Likewise.
+ * elf64-mips.c (bfd_elf64_new_section_hook): Define.
+ * elf64-mmix.c (struct _mmix_elf_section_data): New.
+ (mmix_elf_section_data): Define. Use throughout file.
+ (mmix_elf_new_section_hook): New function.
+ (bfd_elf64_new_section_hook): Define.
+ * elf64-ppc.c (struct _ppc64_elf_section_data): New.
+ (ppc64_elf_section_data): Define. Use throughout.
+ (ppc64_elf_new_section_hook): New function.
+ (bfd_elf64_new_section_hook): Define.
+ * elf64-sparc.c (struct sparc64_elf_section_data): New.
+ (sparc64_elf_new_section_hook): New function.
+ (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
+ (sec_do_relax): Define.
+ (sparc64_elf_relax_section): Adjust to use sec_do_relax.
+ (sparc64_elf_relocate_section): Likewise.
+ (bfd_elf64_new_section_hook): Define.
+ * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
+ * elfxx-mips.c (struct _mips_elf_section_data): New.
+ (mips_elf_section_data): Define. Use throughout.
+ (_bfd_mips_elf_new_section_hook): New function.
+ (mips_elf_create_got_section): Don't alloc used_by_bfd.
+ * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
+ * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2003-01-21 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
+ (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
+ (elf64_alpha_adjust_dynamic_symbol): Set them.
+ (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
+ (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
+ symbol index when relaxing LDM to TPREL.
+ (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
+ relocs, even if the target isn't locally defined.
+ (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
+ (elf64_alpha_relocate_section): Likewise. Force TP-relative
+ relocs vs symndx 0 to the tp base.
+
+2003-01-21 Fabio Alemagna <falemagn@aros.org>
+
+ * config.bfd: Handle i[3456]86-*-aros*.
+
+2003-01-21 Andreas Schwab <schwab@suse.de>
+
+ * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
+ (struct ppc_elf_link_hash_entry): Define.
+ (ppc_elf_hash_entry): New function.
+ (struct ppc_elf_link_hash_table): Define.
+ (ppc_elf_hash_table): New function.
+ (ppc_elf_link_hash_newfunc): New function.
+ (ppc_elf_link_hash_table_create): New function.
+ (ppc_elf_copy_indirect_symbol): New function.
+ (allocate_dynrelocs): New function.
+ (readonly_dynrelocs): New function.
+ (ppc_elf_size_dynamic_sections): Allocate space for dynamic
+ relocs and determine DT_TEXTREL.
+ (ppc_elf_check_relocs): Don't do that here, just count the
+ dynamic relocs.
+ (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
+ removed section.
+ (bfd_elf32_bfd_link_hash_table_create): Define.
+ (elf_backend_copy_indirect_symbol): Define.
+
+2003-01-21 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
+ TPREL also get a reloc if shared. Remove SREL support.
+ (elf64_alpha_emit_dynrel): New.
+ (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
+ and GOTTPREL relocs to local symbols against the tp base.
+ (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
+
+ * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
+ use count before clobbering r_type.
+ (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
+ ordering would mean dataflow inspection is necessary.
+
+2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coffcode.h (coff_set_flags): Added get/set arch hooks.
+
+2003-01-20 Fabio Alemagna <falemagn@aros.org>
+
+ * elf32-sh.c: Treat elfNN_bed like other macros defined in
+ elfxx-target.h and #undef it before #define'ing it.
+ * elf32-i386.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-sh64.c: Likewise.
+
+2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * bfd-in2.h: Regenerate.
+ * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
+ (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
+ R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
+ R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
+ R_390_PLTOFF32 and R_390_PLTOFF64.
+ (elf_s390_reloc_type_lookup): Likewise.
+ (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
+ of GOTPLT references to a function.
+ (link_hash_newfunc): Initialize gotplt_refcount.
+ (elf_s390_check_relocs): Move allocation of local_got_refcounts array
+ and creation of the got section out of the main switch. Add support
+ for the gotoff, gotplt and pltoff relocations.
+ (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
+ and pltoff.
+ (elf_s390_adjust_gotplt): New function.
+ (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
+ plt entries.
+ (allocate_dynrelocs): Add comment.
+ (elf_s390_relocate_section): Change r_type to unsigned. Add support
+ for gotoff, gotplt and pltoff relocations.
+ * elf64-s390.c: Same changes as for elf32-s390.c.
+ * libbfd.h: Regenerate.
+ * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
+ BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
+ BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
+ and BFD_RELOC_390_PLTOFF64.
+
+2003-01-18 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
+ R_IA64_TPREL64[LM]SB against non-global symbol properly.
+
+2003-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
+ self_dtpmod_done and self_dtpmod_offset.
+ (allocate_global_data_got): Only use one got entry for all
+ dtpmod relocs against local symbols.
+ (allocate_dynrel_entries): Only need .rela.got entry for
+ dtpmod against global symbol.
+ (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
+ Reserve space in .rela.got for the local dtpmod entry.
+ (set_got_entry): Initialize the common local dtpmod .got entry.
+ (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
+ and R_IA_64_DTPREL64MSB.
+
+2003-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
+ (R_PPC_*): Rename all occurrences to R_PPC64_*.
+ (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
+ (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
+ (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
+ relative relocs, not with absolute ones.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2003-01-15 Andreas Schwab <schwab@suse.de>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
+ relocation against a non-allocated readonly section.
+
+2003-01-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
+
+2002-01-08 Klee Dienes <kdienes@apple.com>
+
+ * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
+ (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
+ * Makefile.in: Regenerate.
+
+2003-01-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * elfn32-mips.c (prev_reloc_section): New.
+ (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
+ (SET_RELOC_ADDEND): Parenthesize macro argument.
+
+2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
+
+ * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
+ adjust addil instructions if the symbol has no section.
+
+2003-01-07 DJ Delorie <dj@redhat.com>
+
+ * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
+ partial_inplace.
+
+2003-01-07 Andreas Schwab <schwab@suse.de>
+
+ * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
+ PC relative relocations.
+ (elf_m68k_discard_copies): Set it here instead.
+
+2002-01-02 Ben Elliston <bje@redhat.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
+ (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
+ (BFD32_BACKENDS): Add elf32-iq2000.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
+ (cpu-iq2000.lo): New target.
+ * Makefile.in: Regenerate.
+ * config.bfd: Handle iq2000-*-elf.
+ * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
+ (bfd_archures_list): Add bfd_iq2000_arch.
+ * configure.in: Handle bfd_elf32_iq2000_vec.
+ * configure: Regenerate.
+ * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
+ and BFD_RELOC_IQ2000_UHI16.
+ * targets.c (bfd_elf32_iq2000_vec): Declare.
+ (bfd_target_vector): Add bfd_elf32_iq2000_vec.
+ * elf.c (prep_headers): Set e_machine to EM_IQ2000.
+ * cpu-iq2000.c: New file.
+ * elf32-iq2000.c: Likewise.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Likewise.
+
+2003-01-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * elfxx-mips.c: Include libiberty.h.
+ (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
+ (mips_set_isa_flags): New function, split out from...
+ (_bfd_mips_elf_final_write_processing): ...here. Only call
+ mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
+ (mips_mach_extensions): New array.
+ (mips_32bit_flags_p): New function.
+ (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
+ Use mips_32bit_flags_p to check if one binary is 32-bit and the
+ other is 64-bit. When adopting IBFD's architecture, adopt the
+ bfd_mach as well as the flags.
+
+2003-01-02 Nick Kelsey <nickk@ubicom.com>
+
+ * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
+ fix internal errors, fix bad code generation, fix incorrect stabs
+ information, and improve ability to eliminate redundant page
+ instructions. Added code to ip2k_final_link_relocate to self-verify
+ the linker relaxation. Fix formatting problems.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
+ * archures.c (bfd_mach_mipsisa32r2): New define.
+ * bfd-in2.h: Regenerate.
+ * cpu-mips.c (I_mipsisa32r2): New enum value.
+ (arch_info_struct): Add entry for I_mipsisa32r2.
+ * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
+ (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
+ (_bfd_mips_elf_final_write_processing): Add
+ bfd_mach_mipsisa32r2 case.
+ (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
+ binaries marked as using MIPS32 Release 2.
+
+2002-12-30 Dmitry Diky <diwil@mail.ru>
+
+ * Makefile.am: Add msp430 target.
+ * configure.in: Likewise.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * archures.c: Add msp430 architecture vector.
+ * config.bfd: Likewise.
+ * reloc.c: Add msp430 relocs.
+ * targets.c: Add msp320 target.
+ * cpu-msp430.c: New file: msp430 cpu detection.
+ * elf32-msp430.c: New file: msp430 reloc processing.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2002-12-28 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (elf_sort_sections): Don't reorder .tbss.
+ (assign_file_positions_for_segments): Only adjust off/voff
+ for increased alignment in PT_LOAD or PT_NOTE segment,
+ but adjust p_filesz for .tbss too. in PT_LOAD consider
+ .tbss to have zero memory size.
+ (copy_private_bfd_data) [SECTION_SIZE]: Define.
+ [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
+ [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
+ into PT_TLS segment. Never put SHF_TLS sections in
+ segments other than PT_TLS or PT_LOAD.
+
+ * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
+ sh_entsize.
+
+2002-12-23 DJ Delorie <dj@redhat.com>
+
+ * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
+
2002-12-23 Alan Modra <amodra@bigpond.net.au>
* elflink.h (elf_link_output_extsym): Heed strip_discarded.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 73739fdc57d..6f053197b5b 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -70,6 +70,7 @@ ALL_MACHINES = \
cpu-i860.lo \
cpu-i960.lo \
cpu-ip2k.lo \
+ cpu-iq2000.lo \
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
@@ -80,6 +81,7 @@ ALL_MACHINES = \
cpu-mcore.lo \
cpu-mips.lo \
cpu-mmix.lo \
+ cpu-msp430.lo \
cpu-or32.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
@@ -122,6 +124,7 @@ ALL_MACHINES_CFILES = \
cpu-i860.c \
cpu-i960.c \
cpu-ip2k.c \
+ cpu-iq2000.c \
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
@@ -132,6 +135,7 @@ ALL_MACHINES_CFILES = \
cpu-mcore.c \
cpu-mips.c \
cpu-mmix.c \
+ cpu-msp430.c \
cpu-or32.c \
cpu-ns32k.c \
cpu-openrisc.c \
@@ -221,6 +225,7 @@ BFD32_BACKENDS = \
elf32-i960.lo \
elf32-ia64.lo \
elf32-ip2k.lo \
+ elf32-iq2000.lo \
elf32-m32r.lo \
elf32-m68hc11.lo \
elf32-m68hc12.lo \
@@ -231,6 +236,7 @@ BFD32_BACKENDS = \
elf32-mcore.lo \
elfxx-mips.lo \
elf32-mips.lo \
+ elf32-msp430.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
@@ -378,6 +384,7 @@ BFD32_BACKENDS_CFILES = \
elf32-i860.c \
elf32-i960.c \
elf32-ip2k.c \
+ elf32-iq2000.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m68hc11.c \
@@ -388,6 +395,7 @@ BFD32_BACKENDS_CFILES = \
elf32-mcore.c \
elfxx-mips.c \
elf32-mips.c \
+ elf32-msp430.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
@@ -869,7 +877,8 @@ corefile.lo: corefile.c $(INCDIR)/filenames.h
format.lo: format.c $(INCDIR)/filenames.h
init.lo: init.c $(INCDIR)/filenames.h
libbfd.lo: libbfd.c $(INCDIR)/filenames.h
-opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
+opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/objalloc.h
reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
@@ -917,6 +926,7 @@ cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
+cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h
cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
@@ -927,6 +937,7 @@ cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
+cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
@@ -1008,7 +1019,8 @@ coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
coffswap.h
coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/libiberty.h \
+ coffcode.h coffswap.h
coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
@@ -1170,6 +1182,10 @@ elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/iq2000.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
@@ -1201,17 +1217,23 @@ elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elfxx-mips.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h
+elfxx-mips.lo: elfxx-mips.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 elfxx-mips.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/hashtab.h
elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h elfxx-mips.h $(INCDIR)/elf/mips.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
$(INCDIR)/coff/external.h ecoffswap.h elf32-target.h
+elf32-msp430.lo: elf32-msp430.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/msp430.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
@@ -1232,12 +1254,12 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
- elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-sh64.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h
+ $(INCDIR)/elf/reloc-macros.h elf32-sh64.h $(srcdir)/../opcodes/sh64-opc.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
@@ -1527,7 +1549,7 @@ elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/opcode/mmix.h elf64-target.h
elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/reloc-macros.h \
elf64-ppc.h elf64-target.h
elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 2bd807c04eb..e6a600fd8a2 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -195,6 +195,7 @@ ALL_MACHINES = \
cpu-i860.lo \
cpu-i960.lo \
cpu-ip2k.lo \
+ cpu-iq2000.lo \
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
@@ -205,6 +206,7 @@ ALL_MACHINES = \
cpu-mcore.lo \
cpu-mips.lo \
cpu-mmix.lo \
+ cpu-msp430.lo \
cpu-or32.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
@@ -248,6 +250,7 @@ ALL_MACHINES_CFILES = \
cpu-i860.c \
cpu-i960.c \
cpu-ip2k.c \
+ cpu-iq2000.c \
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
@@ -258,6 +261,7 @@ ALL_MACHINES_CFILES = \
cpu-mcore.c \
cpu-mips.c \
cpu-mmix.c \
+ cpu-msp430.c \
cpu-or32.c \
cpu-ns32k.c \
cpu-openrisc.c \
@@ -348,6 +352,7 @@ BFD32_BACKENDS = \
elf32-i960.lo \
elf32-ia64.lo \
elf32-ip2k.lo \
+ elf32-iq2000.lo \
elf32-m32r.lo \
elf32-m68hc11.lo \
elf32-m68hc12.lo \
@@ -358,6 +363,7 @@ BFD32_BACKENDS = \
elf32-mcore.lo \
elfxx-mips.lo \
elf32-mips.lo \
+ elf32-msp430.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
@@ -506,6 +512,7 @@ BFD32_BACKENDS_CFILES = \
elf32-i860.c \
elf32-i960.c \
elf32-ip2k.c \
+ elf32-iq2000.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m68hc11.c \
@@ -516,6 +523,7 @@ BFD32_BACKENDS_CFILES = \
elf32-mcore.c \
elfxx-mips.c \
elf32-mips.c \
+ elf32-msp430.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
@@ -1402,7 +1410,8 @@ corefile.lo: corefile.c $(INCDIR)/filenames.h
format.lo: format.c $(INCDIR)/filenames.h
init.lo: init.c $(INCDIR)/filenames.h
libbfd.lo: libbfd.c $(INCDIR)/filenames.h
-opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
+opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/objalloc.h
reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
@@ -1450,6 +1459,7 @@ cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
+cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h
cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
@@ -1460,6 +1470,7 @@ cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
+cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
@@ -1541,7 +1552,8 @@ coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
coffswap.h
coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/libiberty.h \
+ coffcode.h coffswap.h
coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
@@ -1703,6 +1715,10 @@ elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/iq2000.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
@@ -1734,17 +1750,23 @@ elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elfxx-mips.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h
+elfxx-mips.lo: elfxx-mips.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 elfxx-mips.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/hashtab.h
elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h elfxx-mips.h $(INCDIR)/elf/mips.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
$(INCDIR)/coff/external.h ecoffswap.h elf32-target.h
+elf32-msp430.lo: elf32-msp430.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/msp430.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
@@ -1765,12 +1787,12 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
- elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-sh64.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h
+ $(INCDIR)/elf/reloc-macros.h elf32-sh64.h $(srcdir)/../opcodes/sh64-opc.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
@@ -2060,7 +2082,7 @@ elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/opcode/mmix.h elf64-target.h
elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/reloc-macros.h \
elf64-ppc.h elf64-target.h
elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4
index fd54b1b0070..9e739ea7737 100644
--- a/bfd/aclocal.m4
+++ b/bfd/aclocal.m4
@@ -139,7 +139,7 @@ AC_SUBST(INTLLIBS)
AC_DEFUN([AM_INSTALL_LIBBFD],
[AC_MSG_CHECKING([whether to install libbfd])
AC_ARG_ENABLE(install-libbfd,
-[ --install-libbfd controls installation of libbfd and related headers],
+[ --enable-install-libbfd controls installation of libbfd and related headers],
install_libbfd_p=$enableval,
if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
install_libbfd_p=yes
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index d8b465c47b8..998bca76230 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -800,6 +800,7 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_mach_mips12000:
case bfd_mach_mips16:
case bfd_mach_mipsisa32:
+ case bfd_mach_mipsisa32r2:
case bfd_mach_mips5:
case bfd_mach_mipsisa64:
case bfd_mach_mips_sb1:
diff --git a/bfd/archures.c b/bfd/archures.c
index b73766f775f..08015f96dda 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1,6 +1,6 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
@@ -145,6 +145,7 @@ DESCRIPTION
.#define bfd_mach_mips5 5
.#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *}
.#define bfd_mach_mipsisa32 32
+.#define bfd_mach_mipsisa32r2 33
.#define bfd_mach_mipsisa64 64
. bfd_arch_i386, {* Intel 386 *}
.#define bfd_mach_i386_i386 1
@@ -212,6 +213,7 @@ DESCRIPTION
.#define bfd_mach_sh 1
.#define bfd_mach_sh2 0x20
.#define bfd_mach_sh_dsp 0x2d
+.#define bfd_mach_sh2e 0x2e
.#define bfd_mach_sh3 0x30
.#define bfd_mach_sh3_dsp 0x3d
.#define bfd_mach_sh3e 0x3e
@@ -271,6 +273,9 @@ DESCRIPTION
. bfd_arch_ip2k, {* Ubicom IP2K microcontrollers. *}
.#define bfd_mach_ip2022 1
.#define bfd_mach_ip2022ext 2
+. bfd_arch_iq2000, {* Vitesse IQ2000. *}
+.#define bfd_mach_iq2000 1
+.#define bfd_mach_iq10 2
. bfd_arch_pj,
. bfd_arch_avr, {* Atmel AVR microcontrollers. *}
.#define bfd_mach_avr1 1
@@ -286,6 +291,20 @@ DESCRIPTION
. bfd_arch_mmix, {* Donald Knuth's educational processor. *}
. bfd_arch_xstormy16,
.#define bfd_mach_xstormy16 1
+. bfd_arch_msp430, {* Texas Instruments MSP430 architecture. *}
+.#define bfd_mach_msp110 110
+.#define bfd_mach_msp11 11
+.#define bfd_mach_msp12 12
+.#define bfd_mach_msp13 13
+.#define bfd_mach_msp14 14
+.#define bfd_mach_msp41 41
+.#define bfd_mach_msp31 31
+.#define bfd_mach_msp32 32
+.#define bfd_mach_msp33 33
+.#define bfd_mach_msp43 43
+.#define bfd_mach_msp44 44
+.#define bfd_mach_msp15 15
+.#define bfd_mach_msp16 16
. bfd_arch_last
. };
*/
@@ -345,6 +364,7 @@ extern const bfd_arch_info_type bfd_i860_arch;
extern const bfd_arch_info_type bfd_i960_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
extern const bfd_arch_info_type bfd_ip2k_arch;
+extern const bfd_arch_info_type bfd_iq2000_arch;
extern const bfd_arch_info_type bfd_m32r_arch;
extern const bfd_arch_info_type bfd_m68hc11_arch;
extern const bfd_arch_info_type bfd_m68hc12_arch;
@@ -355,6 +375,7 @@ extern const bfd_arch_info_type bfd_mips_arch;
extern const bfd_arch_info_type bfd_mmix_arch;
extern const bfd_arch_info_type bfd_mn10200_arch;
extern const bfd_arch_info_type bfd_mn10300_arch;
+extern const bfd_arch_info_type bfd_msp430_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
extern const bfd_arch_info_type bfd_or32_arch;
@@ -402,6 +423,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_i960_arch,
&bfd_ia64_arch,
&bfd_ip2k_arch,
+ &bfd_iq2000_arch,
&bfd_m32r_arch,
&bfd_m68hc11_arch,
&bfd_m68hc12_arch,
@@ -412,6 +434,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_mmix_arch,
&bfd_mn10200_arch,
&bfd_mn10300_arch,
+ &bfd_msp430_arch,
&bfd_ns32k_arch,
&bfd_openrisc_arch,
&bfd_or32_arch,
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 362cc8f04f4..1820b232083 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -880,6 +880,9 @@ bfd_make_writable PARAMS ((bfd *abfd));
bfd_boolean
bfd_make_readable PARAMS ((bfd *abfd));
+char *
+bfd_follow_gnu_debuglink PARAMS ((bfd *abfd, const char *dir));
+
/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
@@ -1258,10 +1261,35 @@ typedef struct sec
/* A mark flag used by some linker backends for garbage collection. */
unsigned int gc_mark : 1;
- /* Used by the ELF code to mark sections which have been allocated
- to segments. */
+ /* The following flags are used by the ELF linker. */
+
+ /* Mark sections which have been allocated to segments. */
unsigned int segment_mark : 1;
+ /* Type of sec_info information. */
+ unsigned int sec_info_type:3;
+#define ELF_INFO_TYPE_NONE 0
+#define ELF_INFO_TYPE_STABS 1
+#define ELF_INFO_TYPE_MERGE 2
+#define ELF_INFO_TYPE_EH_FRAME 3
+#define ELF_INFO_TYPE_JUST_SYMS 4
+
+ /* Nonzero if this section uses RELA relocations, rather than REL. */
+ unsigned int use_rela_p:1;
+
+ /* Bits used by various backends. */
+ unsigned int has_tls_reloc:1;
+
+ /* Usused bits. */
+ unsigned int flag11:1;
+ unsigned int flag12:1;
+ unsigned int flag13:1;
+ unsigned int flag14:1;
+ unsigned int flag15:1;
+ unsigned int flag16:4;
+ unsigned int flag20:4;
+ unsigned int flag24:8;
+
/* End of internal packed boolean fields. */
/* The virtual memory address of the section - where it will be
@@ -1572,6 +1600,7 @@ enum bfd_architecture
#define bfd_mach_mips5 5
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
#define bfd_mach_mipsisa32 32
+#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa64 64
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 1
@@ -1639,6 +1668,7 @@ enum bfd_architecture
#define bfd_mach_sh 1
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
+#define bfd_mach_sh2e 0x2e
#define bfd_mach_sh3 0x30
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
@@ -1698,6 +1728,9 @@ enum bfd_architecture
bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
#define bfd_mach_ip2022 1
#define bfd_mach_ip2022ext 2
+ bfd_arch_iq2000, /* Vitesse IQ2000. */
+#define bfd_mach_iq2000 1
+#define bfd_mach_iq10 2
bfd_arch_pj,
bfd_arch_avr, /* Atmel AVR microcontrollers. */
#define bfd_mach_avr1 1
@@ -1713,6 +1746,20 @@ enum bfd_architecture
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
#define bfd_mach_xstormy16 1
+ bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
+#define bfd_mach_msp110 110
+#define bfd_mach_msp11 11
+#define bfd_mach_msp12 12
+#define bfd_mach_msp13 13
+#define bfd_mach_msp14 14
+#define bfd_mach_msp41 41
+#define bfd_mach_msp31 31
+#define bfd_mach_msp32 32
+#define bfd_mach_msp33 33
+#define bfd_mach_msp43 43
+#define bfd_mach_msp44 44
+#define bfd_mach_msp15 15
+#define bfd_mach_msp16 16
bfd_arch_last
};
@@ -2144,6 +2191,32 @@ relocation types already defined. */
/* SPARC little endian relocation */
BFD_RELOC_SPARC_REV32,
+/* SPARC TLS relocations */
+ BFD_RELOC_SPARC_TLS_GD_HI22,
+ BFD_RELOC_SPARC_TLS_GD_LO10,
+ BFD_RELOC_SPARC_TLS_GD_ADD,
+ BFD_RELOC_SPARC_TLS_GD_CALL,
+ BFD_RELOC_SPARC_TLS_LDM_HI22,
+ BFD_RELOC_SPARC_TLS_LDM_LO10,
+ BFD_RELOC_SPARC_TLS_LDM_ADD,
+ BFD_RELOC_SPARC_TLS_LDM_CALL,
+ BFD_RELOC_SPARC_TLS_LDO_HIX22,
+ BFD_RELOC_SPARC_TLS_LDO_LOX10,
+ BFD_RELOC_SPARC_TLS_LDO_ADD,
+ BFD_RELOC_SPARC_TLS_IE_HI22,
+ BFD_RELOC_SPARC_TLS_IE_LO10,
+ BFD_RELOC_SPARC_TLS_IE_LD,
+ BFD_RELOC_SPARC_TLS_IE_LDX,
+ BFD_RELOC_SPARC_TLS_IE_ADD,
+ BFD_RELOC_SPARC_TLS_LE_HIX22,
+ BFD_RELOC_SPARC_TLS_LE_LOX10,
+ BFD_RELOC_SPARC_TLS_DTPMOD32,
+ BFD_RELOC_SPARC_TLS_DTPMOD64,
+ BFD_RELOC_SPARC_TLS_DTPOFF32,
+ BFD_RELOC_SPARC_TLS_DTPOFF64,
+ BFD_RELOC_SPARC_TLS_TPOFF32,
+ BFD_RELOC_SPARC_TLS_TPOFF64,
+
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
"addend" in some special way.
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
@@ -2415,6 +2488,48 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_PPC64_PLTGOT16_DS,
BFD_RELOC_PPC64_PLTGOT16_LO_DS,
+/* PowerPC and PowerPC64 thread-local storage relocations. */
+ BFD_RELOC_PPC_TLS,
+ BFD_RELOC_PPC_DTPMOD,
+ BFD_RELOC_PPC_TPREL16,
+ BFD_RELOC_PPC_TPREL16_LO,
+ BFD_RELOC_PPC_TPREL16_HI,
+ BFD_RELOC_PPC_TPREL16_HA,
+ BFD_RELOC_PPC_TPREL,
+ BFD_RELOC_PPC_DTPREL16,
+ BFD_RELOC_PPC_DTPREL16_LO,
+ BFD_RELOC_PPC_DTPREL16_HI,
+ BFD_RELOC_PPC_DTPREL16_HA,
+ BFD_RELOC_PPC_DTPREL,
+ BFD_RELOC_PPC_GOT_TLSGD16,
+ BFD_RELOC_PPC_GOT_TLSGD16_LO,
+ BFD_RELOC_PPC_GOT_TLSGD16_HI,
+ BFD_RELOC_PPC_GOT_TLSGD16_HA,
+ BFD_RELOC_PPC_GOT_TLSLD16,
+ BFD_RELOC_PPC_GOT_TLSLD16_LO,
+ BFD_RELOC_PPC_GOT_TLSLD16_HI,
+ BFD_RELOC_PPC_GOT_TLSLD16_HA,
+ BFD_RELOC_PPC_GOT_TPREL16,
+ BFD_RELOC_PPC_GOT_TPREL16_LO,
+ BFD_RELOC_PPC_GOT_TPREL16_HI,
+ BFD_RELOC_PPC_GOT_TPREL16_HA,
+ BFD_RELOC_PPC_GOT_DTPREL16,
+ BFD_RELOC_PPC_GOT_DTPREL16_LO,
+ BFD_RELOC_PPC_GOT_DTPREL16_HI,
+ BFD_RELOC_PPC_GOT_DTPREL16_HA,
+ BFD_RELOC_PPC64_TPREL16_DS,
+ BFD_RELOC_PPC64_TPREL16_LO_DS,
+ BFD_RELOC_PPC64_TPREL16_HIGHER,
+ BFD_RELOC_PPC64_TPREL16_HIGHERA,
+ BFD_RELOC_PPC64_TPREL16_HIGHEST,
+ BFD_RELOC_PPC64_TPREL16_HIGHESTA,
+ BFD_RELOC_PPC64_DTPREL16_DS,
+ BFD_RELOC_PPC64_DTPREL16_LO_DS,
+ BFD_RELOC_PPC64_DTPREL16_HIGHER,
+ BFD_RELOC_PPC64_DTPREL16_HIGHERA,
+ BFD_RELOC_PPC64_DTPREL16_HIGHEST,
+ BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
+
/* IBM 370/390 relocations */
BFD_RELOC_I370_D12,
@@ -2978,6 +3093,55 @@ into 22 bits. */
/* 32 bit rel. offset to GOT entry. */
BFD_RELOC_390_GOTENT,
+/* 64 bit offset to GOT. */
+ BFD_RELOC_390_GOTOFF64,
+
+/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_390_GOTPLT12,
+
+/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_390_GOTPLT16,
+
+/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_390_GOTPLT32,
+
+/* 64-bit offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_390_GOTPLT64,
+
+/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_390_GOTPLTENT,
+
+/* 16-bit rel. offset from the GOT to a PLT entry. */
+ BFD_RELOC_390_PLTOFF16,
+
+/* 32-bit rel. offset from the GOT to a PLT entry. */
+ BFD_RELOC_390_PLTOFF32,
+
+/* 64-bit rel. offset from the GOT to a PLT entry. */
+ BFD_RELOC_390_PLTOFF64,
+
+/* s390 tls relocations. */
+ BFD_RELOC_390_TLS_LOAD,
+ BFD_RELOC_390_TLS_GDCALL,
+ BFD_RELOC_390_TLS_LDCALL,
+ BFD_RELOC_390_TLS_GD32,
+ BFD_RELOC_390_TLS_GD64,
+ BFD_RELOC_390_TLS_GOTIE12,
+ BFD_RELOC_390_TLS_GOTIE32,
+ BFD_RELOC_390_TLS_GOTIE64,
+ BFD_RELOC_390_TLS_LDM32,
+ BFD_RELOC_390_TLS_LDM64,
+ BFD_RELOC_390_TLS_IE32,
+ BFD_RELOC_390_TLS_IE64,
+ BFD_RELOC_390_TLS_IEENT,
+ BFD_RELOC_390_TLS_LE32,
+ BFD_RELOC_390_TLS_LE64,
+ BFD_RELOC_390_TLS_LDO32,
+ BFD_RELOC_390_TLS_LDO64,
+ BFD_RELOC_390_TLS_DTPMOD,
+ BFD_RELOC_390_TLS_DTPOFF,
+ BFD_RELOC_390_TLS_TPOFF,
+
/* Scenix IP2K - 9-bit register number / data address */
BFD_RELOC_IP2K_FR9,
@@ -3246,6 +3410,18 @@ to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
+
+/* msp430 specific relocation codes */
+ BFD_RELOC_MSP430_10_PCREL,
+ BFD_RELOC_MSP430_16_PCREL,
+ BFD_RELOC_MSP430_16,
+ BFD_RELOC_MSP430_16_PCREL_BYTE,
+ BFD_RELOC_MSP430_16_BYTE,
+
+/* IQ2000 Relocations. */
+ BFD_RELOC_IQ2000_OFFSET_16,
+ BFD_RELOC_IQ2000_OFFSET_21,
+ BFD_RELOC_IQ2000_UHI16,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@@ -3430,6 +3606,9 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
/* Extracted from bfd.c. */
struct _bfd
{
+ /* A unique identifier of the BFD */
+ unsigned int id;
+
/* The filename the application opened the BFD with. */
const char *filename;
diff --git a/bfd/bfd.c b/bfd/bfd.c
index f9051c0d585..1a332a866b2 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -36,6 +36,9 @@ CODE_FRAGMENT
.
.struct _bfd
.{
+. {* A unique identifier of the BFD *}
+. unsigned int id;
+.
. {* The filename the application opened the BFD with. *}
. const char *filename;
.
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index c13d54b7743..dcb96dd7127 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1292,7 +1292,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
}
if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
- || ((*xcoff64_calculate_relocation[rel->r_type])
+ || !((*xcoff64_calculate_relocation[rel->r_type])
(input_bfd, input_section, output_bfd, rel, sym, &howto, val,
addend, &relocation, contents)))
return FALSE;
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 36ae1a9807f..7ce60db76c1 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -2128,6 +2128,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
/* this TI COFF section should be used by all new TI COFF v0 targets */
case TICOFF0MAGIC:
arch = TICOFF_TARGET_ARCH;
+ machine = TICOFF_TARGET_MACHINE_GET (internal_f->f_flags);
break;
#endif
#endif
@@ -2142,6 +2143,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
#ifdef TI_TARGET_ID
case TI_TARGET_ID:
arch = TICOFF_TARGET_ARCH;
+ machine = TICOFF_TARGET_MACHINE_GET (internal_f->f_flags);
break;
#endif
default:
@@ -2612,6 +2614,7 @@ coff_set_flags (abfd, magicp, flagsp)
return FALSE;
}
}
+ TICOFF_TARGET_MACHINE_SET (flagsp, bfd_get_mach (abfd));
return TRUE;
#endif
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 9270d7e9e85..96d4765f722 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -374,6 +374,9 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
+ i[3456]86-*-aros*)
+ targ_defvec=bfd_elf32_i386_vec
+ ;;
i[3456]86-*-chorus*)
targ_defvec=bfd_elf32_i386_vec
;;
@@ -553,6 +556,10 @@ case "${targ}" in
targ_defvec=bfd_elf32_ip2k_vec
;;
+ iq2000-*-elf)
+ targ_defvec=bfd_elf32_iq2000_vec
+ ;;
+
m32r-*-*)
targ_defvec=bfd_elf32_m32r_vec
;;
@@ -807,6 +814,10 @@ case "${targ}" in
targ_defvec=bfd_elf32_mn10300_vec
;;
+ msp430-*-*)
+ targ_defvec=bfd_elf32_msp430_vec
+ ;;
+
ns32k-pc532-mach* | ns32k-pc532-ux*)
targ_defvec=pc532machaout_vec
targ_underscore=yes
diff --git a/bfd/configure b/bfd/configure
index 74fe037d5e0..f41ac1d3cfa 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -6094,6 +6094,7 @@ do
bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
bfd_elf32_ip2k_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
+ bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
@@ -6108,6 +6109,7 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -6358,10 +6360,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:6362: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6363: 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 6365 "configure"
+#line 6366 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6407,17 +6409,17 @@ for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6411: checking for $ac_hdr" >&5
+echo "configure:6412: 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 6416 "configure"
+#line 6417 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6422: \"$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*
@@ -6446,12 +6448,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6450: checking for $ac_func" >&5
+echo "configure:6451: 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 6455 "configure"
+#line 6456 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6474,7 +6476,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6479: \"$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
@@ -6499,7 +6501,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6503: checking for working mmap" >&5
+echo "configure:6504: 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
@@ -6507,7 +6509,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6511 "configure"
+#line 6512 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6660,7 +6662,7 @@ main()
}
EOF
-if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6665: \"$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
@@ -6685,12 +6687,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6689: checking for $ac_func" >&5
+echo "configure:6690: 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 6694 "configure"
+#line 6695 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6713,7 +6715,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/bfd/configure.in b/bfd/configure.in
index aa34e7da4b1..82dc090428f 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -590,6 +590,7 @@ do
bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
bfd_elf32_ip2k_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
+ bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
@@ -604,6 +605,7 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
diff --git a/bfd/cpu-iq2000.c b/bfd/cpu-iq2000.c
new file mode 100644
index 00000000000..fd6d2307f4e
--- /dev/null
+++ b/bfd/cpu-iq2000.c
@@ -0,0 +1,57 @@
+/* BFD support for the Vitesse IQ2000 processor.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+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 */
+};
+
+const bfd_arch_info_type bfd_iq2000_arch =
+{
+ 32, /* bits per word */
+ 32, /* bits per address */
+ 8, /* bits per byte */
+ bfd_arch_iq2000, /* architecture */
+ bfd_mach_iq2000, /* machine */
+ "iq2000", /* architecture name */
+ "iq2000", /* printable name */
+ 3, /* section align power */
+ TRUE, /* the default ? */
+ bfd_default_compatible, /* architecture comparison fn */
+ bfd_default_scan, /* string to architecture convert fn */
+ &arch_info_struct[0], /* next in list */
+};
+
+
+
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index e587535e28b..13355c5c5af 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -82,6 +82,7 @@ enum
I_mips16,
I_mips5,
I_mipsisa32,
+ I_mipsisa32r2,
I_mipsisa64,
I_sb1,
};
@@ -111,6 +112,7 @@ static const bfd_arch_info_type arch_info_struct[] =
N (64, 64, bfd_mach_mips16, "mips:16", FALSE, NN(I_mips16)),
N (64, 64, bfd_mach_mips5, "mips:mips5", FALSE, NN(I_mips5)),
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_mips_sb1, "mips:sb1", FALSE, 0),
};
diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c
new file mode 100644
index 00000000000..c7d283b63bb
--- /dev/null
+++ b/bfd/cpu-msp430.c
@@ -0,0 +1,107 @@
+/* BFD library support routines for the MSP architecture.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+static const bfd_arch_info_type *compatible
+ PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+
+#define N(addr_bits, machine, print, default, next) \
+{ \
+ 16, /* 16 bits in a word. */ \
+ addr_bits, /* Bits in an address. */ \
+ 8, /* 8 bits in a byte. */ \
+ bfd_arch_msp430, \
+ machine, /* Machine number. */ \
+ "msp430", /* Architecture name. */ \
+ print, /* Printable name. */ \
+ 1, /* Section align power. */ \
+ default, /* The default machine. */ \
+ compatible, \
+ bfd_default_scan, \
+ next \
+}
+
+static const bfd_arch_info_type arch_info_struct[] =
+{
+ /* msp430x11x. */
+ N (16, bfd_mach_msp11, "msp:11", FALSE, & arch_info_struct[1]),
+
+ /* msp430x12x. */
+ N (16, bfd_mach_msp12, "msp:12", FALSE, & arch_info_struct[2]),
+
+ /* msp430x13x. */
+ N (16, bfd_mach_msp13, "msp:13", FALSE, & arch_info_struct[3]),
+
+ /* msp430x14x. */
+ N (16, bfd_mach_msp14, "msp:14", FALSE, & arch_info_struct[4]),
+
+ /* msp430x31x. */
+ N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[5]),
+
+ /* msp430x32x. */
+ N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[6]),
+
+ /* msp430x33x. */
+ N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[7]),
+
+ /* msp430x41x. */
+ N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[8]),
+
+ /* msp430x43x. */
+ N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[9]),
+
+ /* msp430x44x. */
+ N (16, bfd_mach_msp43, "msp:44", FALSE, & arch_info_struct[10]),
+
+ /* msp430x15x. */
+ N (16, bfd_mach_msp15, "msp:15", FALSE, & arch_info_struct[11]),
+
+ /* msp430x16x. */
+ N (16, bfd_mach_msp16, "msp:16", FALSE, & arch_info_struct[12]),
+
+ /* msp430x11x1. */
+ N (16, bfd_mach_msp110, "msp:110", FALSE, NULL)
+
+};
+
+const bfd_arch_info_type bfd_msp430_arch =
+ N (16, bfd_mach_msp14, "msp:14", TRUE, & arch_info_struct[0]);
+
+/* This routine is provided two arch_infos and works out which MSP
+ machine which would be compatible with both and returns a pointer
+ to its info structure. */
+
+static const bfd_arch_info_type *
+compatible (a,b)
+ const bfd_arch_info_type * a;
+ const bfd_arch_info_type * b;
+{
+ /* If a & b are for different architectures we can do nothing. */
+ if (a->arch != b->arch)
+ return NULL;
+
+ if (a->mach <= b->mach)
+ return b;
+
+ return a;
+}
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index 3331c27cc38..9d9087ff2d3 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -1,23 +1,23 @@
/* BFD library support routines for the Hitachi-SH architecture.
- Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002
+ Copyright 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"
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if 0
/* This routine is provided two arch_infos and returns whether
- they'd be compatible */
+ they'd be compatible. */
static const bfd_arch_info_type *
compatible (a,b)
@@ -33,20 +33,19 @@ compatible (a,b)
const bfd_arch_info_type *b;
{
if (a->arch != b->arch || a->mach != b->mach)
- return NULL;
+ return NULL;
return a;
}
#endif
#define SH_NEXT &arch_info_struct[0]
#define SH2_NEXT &arch_info_struct[1]
-#define SH_DSP_NEXT &arch_info_struct[2]
-#define SH3_NEXT &arch_info_struct[3]
-#define SH3_DSP_NEXT &arch_info_struct[4]
-#define SH3E_NEXT &arch_info_struct[5]
-#define SH4_NEXT NULL
-#undef SH4_NEXT
-#define SH4_NEXT &arch_info_struct[6]
+#define SH2E_NEXT &arch_info_struct[2]
+#define SH_DSP_NEXT &arch_info_struct[3]
+#define SH3_NEXT &arch_info_struct[4]
+#define SH3_DSP_NEXT &arch_info_struct[5]
+#define SH3E_NEXT &arch_info_struct[6]
+#define SH4_NEXT &arch_info_struct[7]
#define SH64_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
@@ -70,6 +69,20 @@ static const bfd_arch_info_type arch_info_struct[] =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_sh,
+ bfd_mach_sh2e,
+ "sh", /* arch_name */
+ "sh2e", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH2E_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
bfd_mach_sh_dsp,
"sh", /* arch_name */
"sh-dsp", /* printable name */
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 752752f3e68..1ba7d56a6e4 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1,6 +1,6 @@
/* Generic ECOFF (Extended-COFF) routines.
- Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+ 2002, 2003 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -81,6 +81,10 @@ static asection bfd_debug_section =
"*DEBUG*", 0, 0, NULL, 0, 0, 0,
/* linker_mark, linker_has_input, gc_mark, segment_mark, */
0, 0, 0, 0,
+ /* sec_info_type, use_rela_p, has_tls_reloc, flag11, flag12, */
+ 0, 0, 0, 0, 0,
+ /* flag13, flag14, flag15, flag16, flag20, flag24, */
+ 0, 0, 0, 0, 0, 0,
/* vma, lma, _cooked_size, _raw_size, */
0, 0, 0, 0,
/* output_offset, output_section, alignment_power, */
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 8e5e024edc1..2e5587cf798 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1,6 +1,6 @@
/* BFD back-end data structures for ELF files.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -80,6 +80,8 @@ typedef struct
} elf_symbol_type;
struct elf_strtab_hash;
+struct got_entry;
+struct plt_entry;
/* ELF linker hash table entries. */
@@ -146,23 +148,23 @@ struct elf_link_hash_entry
/* If this symbol requires an entry in the global offset table, the
processor specific backend uses this field to track usage and
- final offset. We use a union and two names primarily to document
- the intent of any particular piece of code. The field should be
- used as a count until size_dynamic_sections, at which point the
- contents of the .got is fixed. Afterward, if this field is -1,
- then the symbol does not require a global offset table entry. */
- union
+ final offset. Two schemes are supported: The first assumes that
+ a symbol may only have one GOT entry, and uses REFCOUNT until
+ size_dynamic_sections, at which point the contents of the .got is
+ fixed. Afterward, if OFFSET is -1, then the symbol does not
+ require a global offset table entry. The second scheme allows
+ multiple GOT entries per symbol, managed via a linked list
+ pointed to by GLIST. */
+ union gotplt_union
{
bfd_signed_vma refcount;
bfd_vma offset;
+ struct got_entry *glist;
+ struct plt_entry *plist;
} got;
/* Same, but tracks a procedure linkage table entry. */
- union
- {
- bfd_signed_vma refcount;
- bfd_vma offset;
- } plt;
+ union gotplt_union plt;
/* Symbol size. */
bfd_size_type size;
@@ -229,16 +231,6 @@ struct elf_link_loaded_list
bfd *abfd;
};
-enum elf_link_info_type
-{
- ELF_INFO_TYPE_NONE,
- ELF_INFO_TYPE_STABS,
- ELF_INFO_TYPE_MERGE,
- ELF_INFO_TYPE_EH_FRAME,
- ELF_INFO_TYPE_JUST_SYMS,
- ELF_INFO_TYPE_LAST
-};
-
/* Structures used by the eh_frame optimization code. */
struct cie_header
{
@@ -333,9 +325,13 @@ struct elf_link_hash_table
/* The value to use when initialising got.refcount/offset and
plt.refcount/offset in an elf_link_hash_entry. Set to zero when
- the values are refcounts. Set to -1 in size_dynamic_sections
- when the values may be offsets. */
- bfd_signed_vma init_refcount;
+ the values are refcounts. Set to init_offset in
+ size_dynamic_sections when the values may be offsets. */
+ union gotplt_union init_refcount;
+
+ /* The value to use for got.refcount/offset and plt.refcount/offset
+ when the values may be offsets. Normally (bfd_vma) -1. */
+ union gotplt_union init_offset;
/* The number of symbols found in the link which must be put into
the .dynsym section. */
@@ -941,13 +937,6 @@ struct bfd_elf_section_data
/* The number of relocations currently assigned to REL_HDR2. */
unsigned int rel_count2;
- /* A pointer to a linked list tracking dynamic relocs copied for
- local symbols. */
- PTR local_dynrel;
-
- /* A pointer to the bfd section used for dynamic relocs. */
- asection *sreloc;
-
/* The ELF section number of this section. Only used for an output
file. */
int this_idx;
@@ -960,6 +949,12 @@ struct bfd_elf_section_data
REL_HDR2 if any. Only used for an output file. */
int rel_idx2;
+ /* Used by the backend linker when generating a shared library to
+ record the dynamic symbol index for a section symbol
+ corresponding to this section. A value of 0 means that there is
+ no dynamic symbol for this section. */
+ int dynindx;
+
/* Used by the backend linker to store the symbol hash table entries
associated with relocs against global symbols. */
struct elf_link_hash_entry **rel_hashes;
@@ -969,17 +964,12 @@ struct bfd_elf_section_data
pointer may be NULL. It is used by the backend linker. */
Elf_Internal_Rela *relocs;
- /* Used by the backend linker when generating a shared library to
- record the dynamic symbol index for a section symbol
- corresponding to this section. A value of 0 means that there is
- no dynamic symbol for this section. */
- long dynindx;
-
- /* A pointer used for various section optimizations. */
- PTR sec_info;
+ /* A pointer to a linked list tracking dynamic relocs copied for
+ local symbols. */
+ PTR local_dynrel;
- /* Type of that information. */
- enum elf_link_info_type sec_info_type;
+ /* A pointer to the bfd section used for dynamic relocs. */
+ asection *sreloc;
union {
/* Group name, if this section is a member of a group. */
@@ -993,28 +983,21 @@ struct bfd_elf_section_data
the linker. */
asection *next_in_group;
- /* A pointer available for the processor specific ELF backend. */
- PTR tdata;
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Nonzero when a group is COMDAT. */
- unsigned int linkonce_p:1;
+ /* A pointer used for various section optimizations. */
+ PTR sec_info;
};
#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
#define elf_group_name(sec) (elf_section_data(sec)->group.name)
#define elf_group_id(sec) (elf_section_data(sec)->group.id)
#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
-#define elf_linkonce_p(sec) (elf_section_data(sec)->linkonce_p)
/* Return TRUE if section has been discarded. */
-#define elf_discarded_section(sec) \
- (!bfd_is_abs_section(sec) \
- && bfd_is_abs_section((sec)->output_section) \
- && elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
- && elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+#define elf_discarded_section(sec) \
+ (!bfd_is_abs_section (sec) \
+ && bfd_is_abs_section ((sec)->output_section) \
+ && sec->sec_info_type != ELF_INFO_TYPE_MERGE \
+ && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
#define get_elf_backend_data(abfd) \
((struct elf_backend_data *) (abfd)->xvec->backend_data)
@@ -1122,17 +1105,14 @@ struct elf_obj_tdata
minus the sh_info field of the symbol table header. */
struct elf_link_hash_entry **sym_hashes;
- /* A mapping from local symbols to offsets into the global offset
- table, used when linking. This is indexed by the symbol index.
- Like for the globals, we use a union and two names primarily to
- document the intent of any particular piece of code. The field
- should be used as a count until size_dynamic_sections, at which
- point the contents of the .got is fixed. Afterward, if an entry
- is -1, then the symbol does not require a global offset table entry. */
+ /* Track usage and final offsets of GOT entries for local symbols.
+ This array is indexed by symbol index. Elements are used
+ identically to "got" in struct elf_link_hash_entry. */
union
{
bfd_signed_vma *refcounts;
bfd_vma *offsets;
+ struct got_entry **ents;
} local_got;
/* A mapping from local symbols to offsets into the various linker
@@ -1239,6 +1219,7 @@ struct elf_obj_tdata
#define elf_sym_hashes(bfd) (elf_tdata(bfd) -> sym_hashes)
#define elf_local_got_refcounts(bfd) (elf_tdata(bfd) -> local_got.refcounts)
#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets)
+#define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents)
#define elf_local_ptr_offsets(bfd) (elf_tdata(bfd) -> linker_section_pointers)
#define elf_dt_name(bfd) (elf_tdata(bfd) -> dt_name)
#define elf_dt_soname(bfd) (elf_tdata(bfd) -> dt_soname)
@@ -1276,6 +1257,8 @@ extern char *bfd_elf_get_str_section
extern Elf_Internal_Sym *bfd_elf_get_elf_syms
PARAMS ((bfd *, Elf_Internal_Shdr *, size_t, size_t,
Elf_Internal_Sym *, PTR, Elf_External_Sym_Shndx *));
+extern const char *bfd_elf_local_sym_name
+ PARAMS ((bfd *, Elf_Internal_Sym *));
extern bfd_boolean _bfd_elf_copy_private_bfd_data
PARAMS ((bfd *, bfd *));
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 7c126743d94..77640748da9 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1,5 +1,5 @@
/* .eh_frame section optimization.
- 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.
@@ -33,7 +33,7 @@ static bfd_signed_vma read_signed_leb128
static int get_DW_EH_PE_width
PARAMS ((int, int));
static bfd_vma read_value
- PARAMS ((bfd *, bfd_byte *, int));
+ PARAMS ((bfd *, bfd_byte *, int, int));
static void write_value
PARAMS ((bfd *, bfd_byte *, bfd_vma, int));
static int cie_compare
@@ -141,22 +141,42 @@ int get_DW_EH_PE_width (encoding, ptr_size)
return 0;
}
+#define get_DW_EH_PE_signed(encoding) (((encoding) & DW_EH_PE_signed) != 0)
+
/* Read a width sized value from memory. */
static bfd_vma
-read_value (abfd, buf, width)
+read_value (abfd, buf, width, is_signed)
bfd *abfd;
bfd_byte *buf;
int width;
+ int is_signed;
{
bfd_vma value;
switch (width)
{
- case 2: value = bfd_get_16 (abfd, buf); break;
- case 4: value = bfd_get_32 (abfd, buf); break;
- case 8: value = bfd_get_64 (abfd, buf); break;
- default: BFD_FAIL (); return 0;
+ case 2:
+ if (is_signed)
+ value = bfd_get_signed_16 (abfd, buf);
+ else
+ value = bfd_get_16 (abfd, buf);
+ break;
+ case 4:
+ if (is_signed)
+ value = bfd_get_signed_32 (abfd, buf);
+ else
+ value = bfd_get_32 (abfd, buf);
+ break;
+ case 8:
+ if (is_signed)
+ value = bfd_get_signed_64 (abfd, buf);
+ else
+ value = bfd_get_64 (abfd, buf);
+ break;
+ default:
+ BFD_FAIL ();
+ return 0;
}
return value;
@@ -605,7 +625,7 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec,
}
elf_section_data (sec)->sec_info = sec_info;
- elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_EH_FRAME;
+ sec->sec_info_type = ELF_INFO_TYPE_EH_FRAME;
/* Ok, now we can assign new offsets. */
offset = 0;
@@ -758,7 +778,7 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
struct eh_frame_sec_info *sec_info;
unsigned int lo, hi, mid;
- if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
return offset;
sec_info = (struct eh_frame_sec_info *)
elf_section_data (sec)->sec_info;
@@ -828,7 +848,7 @@ _bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
ptr_size = (elf_elfheader (sec->owner)->e_ident[EI_CLASS]
== ELFCLASS64) ? 8 : 4;
- if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
return bfd_set_section_contents (abfd, sec->output_section,
contents,
(file_ptr) sec->output_offset,
@@ -925,7 +945,9 @@ _bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
{
bfd_vma value;
- value = read_value (abfd, buf, per_width);
+ value = read_value (abfd, buf, per_width,
+ get_DW_EH_PE_signed
+ (per_encoding));
value += (sec_info->entry[i].offset
- sec_info->entry[i].new_offset);
write_value (abfd, buf, value, per_width);
@@ -961,7 +983,9 @@ _bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
buf += 4;
width = get_DW_EH_PE_width (sec_info->entry[i].fde_encoding,
ptr_size);
- address = value = read_value (abfd, buf, width);
+ address = value = read_value (abfd, buf, width,
+ get_DW_EH_PE_signed
+ (sec_info->entry[i].fde_encoding));
if (value)
{
switch (sec_info->entry[i].fde_encoding & 0xf0)
@@ -1005,7 +1029,9 @@ _bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
buf += sec_info->entry[i].lsda_offset;
width = get_DW_EH_PE_width (sec_info->entry[i].lsda_encoding,
ptr_size);
- value = read_value (abfd, buf, width);
+ value = read_value (abfd, buf, width,
+ get_DW_EH_PE_signed
+ (sec_info->entry[i].lsda_encoding));
if (value)
{
if ((sec_info->entry[i].lsda_encoding & 0xf0)
diff --git a/bfd/elf.c b/bfd/elf.c
index 45c7d753cb3..e4b90cf971a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1,6 +1,6 @@
/* ELF executable support for BFD.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -476,6 +476,23 @@ bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
return intsym_buf;
}
+/* Look up a symbol name. */
+const char *
+bfd_elf_local_sym_name (abfd, isym)
+ bfd *abfd;
+ Elf_Internal_Sym *isym;
+{
+ unsigned int iname = isym->st_name;
+ unsigned int shindex = elf_tdata (abfd)->symtab_hdr.sh_link;
+ if (iname == 0 && ELF_ST_TYPE (isym->st_info) == STT_SECTION)
+ {
+ iname = elf_elfsections (abfd)[isym->st_shndx]->sh_name;
+ shindex = elf_elfheader (abfd)->e_shstrndx;
+ }
+
+ return bfd_elf_string_from_elf_section (abfd, shindex, iname);
+}
+
/* Elf_Internal_Shdr->contents is an array of these for SHT_GROUP
sections. The first element is the flags, the rest are section
pointers. */
@@ -497,8 +514,6 @@ group_signature (abfd, ghdr)
unsigned char esym[sizeof (Elf64_External_Sym)];
Elf_External_Sym_Shndx eshndx;
Elf_Internal_Sym isym;
- unsigned int iname;
- unsigned int shindex;
/* First we need to ensure the symbol table is available. */
if (! bfd_section_from_shdr (abfd, ghdr->sh_link))
@@ -510,16 +525,7 @@ group_signature (abfd, ghdr)
&isym, esym, &eshndx) == NULL)
return NULL;
- /* Look up the symbol name. */
- iname = isym.st_name;
- shindex = hdr->sh_link;
- if (iname == 0 && ELF_ST_TYPE (isym.st_info) == STT_SECTION)
- {
- iname = elf_elfsections (abfd)[isym.st_shndx]->sh_name;
- shindex = elf_elfheader (abfd)->e_shstrndx;
- }
-
- return bfd_elf_string_from_elf_section (abfd, shindex, iname);
+ return bfd_elf_local_sym_name (abfd, &isym);
}
/* Set next_in_group list pointer, and group name for NEWSECT. */
@@ -969,11 +975,8 @@ merge_sections_remove_hook (abfd, sec)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
- struct bfd_elf_section_data *sec_data;
-
- sec_data = elf_section_data (sec);
- BFD_ASSERT (sec_data->sec_info_type == ELF_INFO_TYPE_MERGE);
- sec_data->sec_info_type = ELF_INFO_TYPE_NONE;
+ BFD_ASSERT (sec->sec_info_type == ELF_INFO_TYPE_MERGE);
+ sec->sec_info_type = ELF_INFO_TYPE_NONE;
}
/* Finish SHF_MERGE section merging. */
@@ -1001,7 +1004,7 @@ _bfd_elf_link_just_syms (sec, info)
if (!is_elf_hash_table (info))
return;
- elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_JUST_SYMS;
+ sec->sec_info_type = ELF_INFO_TYPE_JUST_SYMS;
}
/* Copy the program header and other data from one object module to
@@ -1423,8 +1426,8 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
ret->vtable_entries_size = 0;
ret->vtable_entries_used = NULL;
ret->vtable_parent = NULL;
- ret->got.refcount = htab->init_refcount;
- ret->plt.refcount = htab->init_refcount;
+ ret->got = htab->init_refcount;
+ ret->plt = htab->init_refcount;
ret->size = 0;
ret->type = STT_NOTYPE;
ret->other = 0;
@@ -1499,7 +1502,7 @@ _bfd_elf_link_hash_hide_symbol (info, h, force_local)
struct elf_link_hash_entry *h;
bfd_boolean force_local;
{
- h->plt.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (info)->init_offset;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
if (force_local)
{
@@ -1529,8 +1532,9 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->dynobj = NULL;
/* Make sure can_refcount is extended to the width and signedness of
init_refcount before we subtract one from it. */
- table->init_refcount = get_elf_backend_data (abfd)->can_refcount;
- --table->init_refcount;
+ table->init_refcount.refcount = get_elf_backend_data (abfd)->can_refcount;
+ table->init_refcount.refcount -= 1;
+ table->init_offset.offset = -(bfd_vma) 1;
/* The first dynamic symbol is a dummy. */
table->dynsymcount = 1;
table->dynstr = NULL;
@@ -2007,8 +2011,7 @@ bfd_section_from_shdr (abfd, shindex)
/* In the section to which the relocations apply, mark whether
its relocations are of the REL or RELA variety. */
if (hdr->sh_size != 0)
- elf_section_data (target_sect)->use_rela_p
- = (hdr->sh_type == SHT_RELA);
+ target_sect->use_rela_p = hdr->sh_type == SHT_RELA;
abfd->flags |= HAS_RELOC;
return TRUE;
}
@@ -2136,16 +2139,19 @@ _bfd_elf_new_section_hook (abfd, sec)
asection *sec;
{
struct bfd_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
- sdata = (struct bfd_elf_section_data *) bfd_zalloc (abfd, amt);
- if (!sdata)
- return FALSE;
- sec->used_by_bfd = (PTR) sdata;
+ sdata = (struct bfd_elf_section_data *) sec->used_by_bfd;
+ if (sdata == NULL)
+ {
+ bfd_size_type amt = sizeof (*sdata);
+ sdata = (struct bfd_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+ }
/* Indicate whether or not this section should use RELA relocations. */
- sdata->use_rela_p
- = get_elf_backend_data (abfd)->default_use_rela_p;
+ sec->use_rela_p = get_elf_backend_data (abfd)->default_use_rela_p;
return TRUE;
}
@@ -2503,7 +2509,7 @@ elf_fake_sections (abfd, asect, failedptrarg)
&& !_bfd_elf_init_reloc_shdr (abfd,
&elf_section_data (asect)->rel_hdr,
asect,
- elf_section_data (asect)->use_rela_p))
+ asect->use_rela_p))
*failedptr = TRUE;
}
@@ -3518,6 +3524,7 @@ elf_sort_sections (arg1, arg2)
{
const asection *sec1 = *(const asection **) arg1;
const asection *sec2 = *(const asection **) arg2;
+ bfd_size_type size1, size2;
/* Sort by LMA first, since this is the address used to
place the section into a segment. */
@@ -3535,7 +3542,7 @@ elf_sort_sections (arg1, arg2)
/* Put !SEC_LOAD sections after SEC_LOAD ones. */
-#define TOEND(x) (((x)->flags & SEC_LOAD) == 0)
+#define TOEND(x) (((x)->flags & (SEC_LOAD|SEC_THREAD_LOCAL)) == 0)
if (TOEND (sec1))
{
@@ -3557,9 +3564,12 @@ elf_sort_sections (arg1, arg2)
/* Sort by size, to put zero sized sections
before others at the same address. */
- if (sec1->_raw_size < sec2->_raw_size)
+ size1 = (sec1->flags & SEC_LOAD) ? sec1->_raw_size : 0;
+ size2 = (sec2->flags & SEC_LOAD) ? sec2->_raw_size : 0;
+
+ if (size1 < size2)
return -1;
- if (sec1->_raw_size > sec2->_raw_size)
+ if (size1 > size2)
return 1;
return sec1->target_index - sec2->target_index;
@@ -3840,9 +3850,15 @@ assign_file_positions_for_segments (abfd)
bfd_vma adjust = sec->lma - (p->p_paddr + p->p_memsz);
p->p_memsz += adjust;
- off += adjust;
- voff += adjust;
- if ((flags & SEC_LOAD) != 0)
+ if (p->p_type == PT_LOAD
+ || (p->p_type == PT_NOTE
+ && bfd_get_format (abfd) == bfd_core))
+ {
+ off += adjust;
+ voff += adjust;
+ }
+ if ((flags & SEC_LOAD) != 0
+ || (flags & SEC_THREAD_LOCAL) != 0)
p->p_filesz += adjust;
}
@@ -3899,7 +3915,9 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
|| (flags & SEC_HAS_CONTENTS) != 0)
off += sec->_raw_size;
- if ((flags & SEC_ALLOC) != 0)
+ if ((flags & SEC_ALLOC) != 0
+ && ((flags & SEC_LOAD) != 0
+ || (flags & SEC_THREAD_LOCAL) == 0))
voff += sec->_raw_size;
}
@@ -3926,6 +3944,9 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
}
else
{
+ if ((sec->flags & SEC_LOAD) != 0
+ || (sec->flags & SEC_THREAD_LOCAL) == 0
+ || p->p_type == PT_TLS)
p->p_memsz += sec->_raw_size;
if ((flags & SEC_LOAD) != 0)
@@ -4569,18 +4590,23 @@ copy_private_bfd_data (ibfd, obfd)
(start + (segment->p_memsz > segment->p_filesz \
? segment->p_memsz : segment->p_filesz))
+#define SECTION_SIZE(section, segment) \
+ (((section->flags & (SEC_HAS_CONTENTS | SEC_THREAD_LOCAL)) \
+ != SEC_THREAD_LOCAL || segment->p_type == PT_TLS) \
+ ? section->_raw_size : 0)
+
/* Returns TRUE if the given section is contained within
the given segment. VMA addresses are compared. */
#define IS_CONTAINED_BY_VMA(section, segment) \
(section->vma >= segment->p_vaddr \
- && (section->vma + section->_raw_size \
+ && (section->vma + SECTION_SIZE (section, segment) \
<= (SEGMENT_END (segment, segment->p_vaddr))))
/* Returns TRUE if the given section is contained within
the given segment. LMA addresses are compared. */
#define IS_CONTAINED_BY_LMA(section, segment, base) \
(section->lma >= base \
- && (section->lma + section->_raw_size \
+ && (section->lma + SECTION_SIZE (section, segment) \
<= SEGMENT_END (segment, base)))
/* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */
@@ -4612,7 +4638,9 @@ copy_private_bfd_data (ibfd, obfd)
if that is set for the segment and the VMA otherwise,
2. It is an allocated segment,
3. There is an output section associated with it,
- 4. The section has not already been allocated to a previous segment. */
+ 4. The section has not already been allocated to a previous segment.
+ 5. PT_TLS segment includes only SHF_TLS sections.
+ 6. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */
#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
((((segment->p_paddr \
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
@@ -4620,6 +4648,11 @@ copy_private_bfd_data (ibfd, obfd)
&& (section->flags & SEC_ALLOC) != 0) \
|| IS_COREFILE_NOTE (segment, section)) \
&& section->output_section != NULL \
+ && (segment->p_type != PT_TLS \
+ || (section->flags & SEC_THREAD_LOCAL)) \
+ && (segment->p_type == PT_LOAD \
+ || segment->p_type == PT_TLS \
+ || (section->flags & SEC_THREAD_LOCAL) == 0) \
&& ! section->segment_mark)
/* Returns TRUE iff seg1 starts after the end of seg2. */
@@ -5097,6 +5130,7 @@ copy_private_bfd_data (ibfd, obfd)
#endif
#undef SEGMENT_END
+#undef SECTION_SIZE
#undef IS_CONTAINED_BY_VMA
#undef IS_CONTAINED_BY_LMA
#undef IS_COREFILE_NOTE
@@ -5158,8 +5192,7 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
elf_next_in_group (osec) = elf_next_in_group (isec);
elf_group_name (osec) = elf_group_name (isec);
- elf_section_data (osec)->use_rela_p
- = elf_section_data (isec)->use_rela_p;
+ osec->use_rela_p = isec->use_rela_p;
return TRUE;
}
@@ -5276,7 +5309,7 @@ swap_out_syms (abfd, sttp, relocatable_p)
symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
}
- /* now generate the data (for "contents") */
+ /* Now generate the data (for "contents"). */
{
/* Fill in zeroth symbol and swap it out. */
Elf_Internal_Sym sym;
@@ -5342,6 +5375,7 @@ swap_out_syms (abfd, sttp, relocatable_p)
value += sec->output_offset;
sec = sec->output_section;
}
+
/* Don't add in the section vma for relocatable output. */
if (! relocatable_p)
value += sec->vma;
@@ -5393,7 +5427,16 @@ swap_out_syms (abfd, sttp, relocatable_p)
section of a symbol to be a section that is
actually in the output file. */
sec2 = bfd_get_section_by_name (abfd, sec->name);
- BFD_ASSERT (sec2 != 0);
+ if (sec2 == NULL)
+ {
+ _bfd_error_handler (_("\
+Unable to find equivalent output section for symbol '%s' from section '%s'"),
+ syms[idx]->name ? syms[idx]->name : "<Local sym>",
+ sec->name);
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+
shndx = _bfd_elf_section_from_bfd_section (abfd, sec2);
BFD_ASSERT (shndx != -1);
}
@@ -5414,7 +5457,7 @@ swap_out_syms (abfd, sttp, relocatable_p)
if (syms[idx]->section->flags & SEC_THREAD_LOCAL)
type = STT_TLS;
- /* Processor-specific types */
+ /* Processor-specific types. */
if (type_ptr != NULL
&& bed->elf_backend_get_symbol_type)
type = ((*bed->elf_backend_get_symbol_type)
@@ -7304,7 +7347,7 @@ _bfd_elf_rela_local_sym (abfd, sym, sec, rel)
+ sym->st_value);
if ((sec->flags & SEC_MERGE)
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
- && elf_section_data (sec)->sec_info_type == ELF_INFO_TYPE_MERGE)
+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE)
{
asection *msec;
@@ -7329,7 +7372,7 @@ _bfd_elf_rel_local_sym (abfd, sym, psec, addend)
{
asection *sec = *psec;
- if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE)
+ if (sec->sec_info_type != ELF_INFO_TYPE_MERGE)
return sym->st_value + addend;
return _bfd_merged_section_offset (abfd, psec,
@@ -7347,7 +7390,7 @@ _bfd_elf_section_offset (abfd, info, sec, offset)
struct bfd_elf_section_data *sec_data;
sec_data = elf_section_data (sec);
- switch (sec_data->sec_info_type)
+ switch (sec->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
return _bfd_stab_section_offset (abfd,
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index f8c88b15583..2646f3dc4ed 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3416,15 +3416,14 @@ final_link_relocate (input_section, contents, rel, value, htab, sym_sec, h)
case R_PARISC_DPREL14R:
case R_PARISC_DPREL14F:
/* For all the DP relative relocations, we need to examine the symbol's
- section. If it's a code section, then "data pointer relative" makes
- no sense. In that case we don't adjust the "value", and for 21 bit
- addil instructions, we change the source addend register from %dp to
- %r0. This situation commonly arises when a variable's "constness"
+ section. If it has no section or if it's a code section, then
+ "data pointer relative" makes no sense. In that case we don't
+ adjust the "value", and for 21 bit addil instructions, we change the
+ source addend register from %dp to %r0. This situation commonly
+ arises for undefined weak symbols and when a variable's "constness"
is declared differently from the way the variable is defined. For
instance: "extern int foo" with foo defined as "const int foo". */
- if (sym_sec == NULL)
- break;
- if ((sym_sec->flags & SEC_CODE) != 0)
+ if (sym_sec == NULL || (sym_sec->flags & SEC_CODE) != 0)
{
if ((insn & ((0x3f << 26) | (0x1f << 21)))
== (((int) OP_ADDIL << 26) | (27 << 21)))
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 9c94887b4bf..69292da7f16 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1,22 +1,22 @@
/* Intel 80386/80486-specific support for 32-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
-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"
@@ -41,9 +41,9 @@ static struct bfd_hash_entry *link_hash_newfunc
static struct bfd_link_hash_table *elf_i386_link_hash_table_create
PARAMS ((bfd *));
static bfd_boolean create_got_section
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf_i386_create_dynamic_sections
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static void elf_i386_copy_indirect_symbol
PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
@@ -51,9 +51,9 @@ static int elf_i386_tls_transition
PARAMS ((struct bfd_link_info *, int, int));
static bfd_boolean elf_i386_mkobject
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_boolean elf_i386_object_p
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_boolean elf_i386_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -88,7 +88,7 @@ static enum elf_reloc_type_class elf_i386_reloc_type_class
static bfd_boolean elf_i386_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-#define USE_REL 1 /* 386 uses REL relocations instead of RELA */
+#define USE_REL 1 /* 386 uses REL relocations instead of RELA. */
#include "elf/i386.h"
@@ -3423,11 +3423,8 @@ elf_i386_post_process_headers (abfd, link_info)
}
#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers elf_i386_post_process_headers
-
-#define elf32_bed elf32_i386_fbsd_bed
+#define elf_backend_post_process_headers elf_i386_post_process_headers
+#undef elf32_bed
+#define elf32_bed elf32_i386_fbsd_bed
#include "elf32-target.h"
-
-#undef elf_backend_post_process_headers
-#undef elf32_bed
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index dd2bb97f61f..cd2b970daad 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1,5 +1,5 @@
/* Ubicom IP2xxx specific support for 32-bit ELF
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,143 +33,151 @@ struct misc
Elf_Internal_Sym * isymbuf;
};
+struct ip2k_opcode
+{
+ unsigned short opcode;
+ unsigned short mask;
+};
+
/* Prototypes. */
static reloc_howto_type *ip2k_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void ip2k_info_to_howto_rela
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static asection * ip2k_elf_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean ip2k_elf_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
+static int ip2k_is_opcode
+ PARAMS ((bfd_byte *, const struct ip2k_opcode *));
static bfd_vma symbol_value
PARAMS ((bfd *, Elf_Internal_Shdr *, Elf_Internal_Sym *,
Elf_Internal_Rela *));
+static void ip2k_get_mem
+ PARAMS ((bfd *, bfd_byte *, int, bfd_byte *));
+static bfd_vma ip2k_nominal_page_bits
+ PARAMS ((bfd *, asection *, bfd_vma, bfd_byte *));
+static bfd_boolean ip2k_test_page_insn
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *, struct misc *));
+static bfd_boolean ip2k_delete_page_insn
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_boolean *, struct misc *));
+static int ip2k_is_switch_table_128
+ PARAMS ((bfd *, asection *, bfd_vma, bfd_byte *));
+static bfd_boolean ip2k_relax_switch_table_128
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_boolean *, struct misc *));
+static int ip2k_is_switch_table_256
+ PARAMS ((bfd *, asection *, bfd_vma, bfd_byte *));
+static bfd_boolean ip2k_relax_switch_table_256
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_boolean *, struct misc *));
+static bfd_boolean ip2k_elf_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+static bfd_boolean ip2k_elf_relax_section_page
+ PARAMS ((bfd *, asection *, bfd_boolean *, struct misc *, unsigned long, unsigned long));
static void adjust_all_relocations
PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, int, int));
static bfd_boolean ip2k_elf_relax_delete_bytes
PARAMS ((bfd *, asection *, bfd_vma, int));
-static bfd_boolean ip2k_elf_relax_add_bytes
- PARAMS ((bfd *, asection *, bfd_vma, const bfd_byte *, int, int));
-static bfd_boolean add_page_insn
- PARAMS ((bfd *, asection *, Elf_Internal_Rela *, struct misc *));
-static bfd_boolean ip2k_elf_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean relax_switch_dispatch_tables_pass1
- PARAMS ((bfd *, asection *, bfd_vma, struct misc *));
-static bfd_boolean unrelax_dispatch_table_entries
- PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, bfd_boolean *, struct misc *));
-static bfd_boolean unrelax_switch_dispatch_tables_passN
- PARAMS ((bfd *, asection *, bfd_vma, bfd_boolean *, struct misc *));
-static bfd_boolean is_switch_128_dispatch_table_p
- PARAMS ((bfd *, bfd_vma, bfd_boolean, struct misc *));
-static bfd_boolean is_switch_256_dispatch_table_p
- PARAMS ((bfd *, bfd_vma, bfd_boolean, struct misc *));
-static bfd_boolean ip2k_elf_relax_section_pass1
- PARAMS ((bfd *, asection *, bfd_boolean *, struct misc *));
-static bfd_boolean ip2k_elf_relax_section_passN
- PARAMS ((bfd *, asection *, bfd_boolean *, bfd_boolean *, struct misc *));
+static void ip2k_info_to_howto_rela
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
static bfd_reloc_status_type ip2k_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, bfd_vma));
static bfd_boolean ip2k_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static asection *ip2k_elf_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static bfd_boolean ip2k_elf_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
-#define IS_OPCODE(CODE0,CODE1,OPCODE) \
- ((CODE0) == (OPCODE)[0] && (CODE1) == (OPCODE)[1])
-
-#define PAGE_INSN_0 0x00
-#define PAGE_INSN_1 0x10
+static bfd_boolean ip2k_relaxed = FALSE;
-static const bfd_byte page_opcode[] =
+static const struct ip2k_opcode ip2k_page_opcode[] =
{
- PAGE_INSN_0, PAGE_INSN_1
+ {0x0010, 0xFFF8}, /* page */
+ {0x0000, 0x0000},
};
-#define IS_PAGE_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, page_opcode)
-
-#define JMP_INSN_0 0xE0
-#define JMP_INSN_1 0x00
+#define IS_PAGE_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_page_opcode)
-static const bfd_byte jmp_opcode[] =
+static const struct ip2k_opcode ip2k_jmp_opcode[] =
{
- JMP_INSN_0, JMP_INSN_1
+ {0xE000, 0xE000}, /* jmp */
+ {0x0000, 0x0000},
};
-#define IS_JMP_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, jmp_opcode)
+#define IS_JMP_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_jmp_opcode)
-#define CALL_INSN_0 0xC0
-#define CALL_INSN_1 0x00
-
-static const bfd_byte call_opcode[] =
+static const struct ip2k_opcode ip2k_call_opcode[] =
{
- CALL_INSN_0, CALL_INSN_1
+ {0xC000, 0xE000}, /* call */
+ {0x0000, 0x0000},
};
-#define IS_CALL_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, call_opcode)
-
-#define ADD_PCL_W_INSN_0 0x1E
-#define ADD_PCL_W_INSN_1 0x09
+#define IS_CALL_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_call_opcode)
-static const bfd_byte add_pcl_w_opcode[] =
+static const struct ip2k_opcode ip2k_snc_opcode[] =
{
- ADD_PCL_W_INSN_0, ADD_PCL_W_INSN_1
+ {0xA00B, 0xFFFF}, /* snc */
+ {0x0000, 0x0000},
};
-#define IS_ADD_PCL_W_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, add_pcl_w_opcode)
-
-#define ADD_W_WREG_INSN_0 0x1C
-#define ADD_W_WREG_INSN_1 0x0A
+#define IS_SNC_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_snc_opcode)
-static const bfd_byte add_w_wreg_opcode[] =
+static const struct ip2k_opcode ip2k_inc_1sp_opcode[] =
{
- ADD_W_WREG_INSN_0, ADD_W_WREG_INSN_1
+ {0x2B81, 0xFFFF}, /* inc 1(SP) */
+ {0x0000, 0x0000},
};
-#define IS_ADD_W_WREG_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, add_w_wreg_opcode)
+#define IS_INC_1SP_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_inc_1sp_opcode)
-#define SNC_INSN_0 0xA0
-#define SNC_INSN_1 0x0B
-
-static const bfd_byte snc_opcode[] =
+static const struct ip2k_opcode ip2k_add_2sp_w_opcode[] =
{
- SNC_INSN_0, SNC_INSN_1
+ {0x1F82, 0xFFFF}, /* add 2(SP),w */
+ {0x0000, 0x0000},
};
-#define IS_SNC_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, snc_opcode)
-
-#define INC_1_SP_INSN_0 0x2B
-#define INC_1_SP_INSN_1 0x81
+#define IS_ADD_2SP_W_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_add_2sp_w_opcode)
-static const bfd_byte inc_1_sp_opcode[] =
+static const struct ip2k_opcode ip2k_add_w_wreg_opcode[] =
{
- INC_1_SP_INSN_0, INC_1_SP_INSN_1
+ {0x1C0A, 0xFFFF}, /* add w,wreg */
+ {0x1E0A, 0xFFFF}, /* add wreg,w */
+ {0x0000, 0x0000},
};
-#define IS_INC_1_SP_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, inc_1_sp_opcode)
+#define IS_ADD_W_WREG_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_add_w_wreg_opcode)
+
+static const struct ip2k_opcode ip2k_add_pcl_w_opcode[] =
+{
+ {0x1E09, 0xFFFF}, /* add pcl,w */
+ {0x0000, 0x0000},
+};
-#define ADD_2_SP_W_INSN_0 0x1F
-#define ADD_2_SP_W_INSN_1 0x82
+#define IS_ADD_PCL_W_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_add_pcl_w_opcode)
-static const bfd_byte add_2_sp_w_opcode[] =
+static const struct ip2k_opcode ip2k_skip_opcodes[] =
{
- ADD_2_SP_W_INSN_0, ADD_2_SP_W_INSN_1
+ {0xB000, 0xF000}, /* sb */
+ {0xA000, 0xF000}, /* snb */
+ {0x7600, 0xFE00}, /* cse/csne #lit */
+ {0x5800, 0xFC00}, /* incsnz */
+ {0x4C00, 0xFC00}, /* decsnz */
+ {0x4000, 0xFC00}, /* cse/csne */
+ {0x3C00, 0xFC00}, /* incsz */
+ {0x2C00, 0xFC00}, /* decsz */
+ {0x0000, 0x0000},
};
-#define IS_ADD_2_SP_W_OPCODE(CODE0,CODE1) \
- IS_OPCODE (CODE0, CODE1, add_2_sp_w_opcode)
+#define IS_SKIP_OPCODE(code) \
+ ip2k_is_opcode (code, ip2k_skip_opcodes)
-/* Relocation tables. */
+/* Relocation tables. */
static reloc_howto_type ip2k_elf_howto_table [] =
{
#define IP2K_HOWTO(t,rs,s,bs,pr,bp,name,sm,dm) \
@@ -187,7 +195,7 @@ static reloc_howto_type ip2k_elf_howto_table [] =
dm, /* dst_mask */ \
pr) /* pcrel_offset */
- /* This reloc does nothing. */
+ /* This reloc does nothing. */
IP2K_HOWTO (R_IP2K_NONE, 0,2,32, FALSE, 0, "R_IP2K_NONE", 0, 0),
/* A 16 bit absolute relocation. */
IP2K_HOWTO (R_IP2K_16, 0,1,16, FALSE, 0, "R_IP2K_16", 0, 0xffff),
@@ -219,7 +227,7 @@ static reloc_howto_type ip2k_elf_howto_table [] =
};
-/* Map BFD reloc types to IP2K ELF reloc types. */
+/* Map BFD reloc types to IP2K ELF reloc types. */
static reloc_howto_type *
ip2k_reloc_type_lookup (abfd, code)
bfd * abfd ATTRIBUTE_UNUSED;
@@ -228,7 +236,7 @@ ip2k_reloc_type_lookup (abfd, code)
/* Note that the ip2k_elf_howto_table is indxed by the R_
constants. Thus, the order that the howto records appear in the
table *must* match the order of the relocation types defined in
- include/elf/ip2k.h. */
+ include/elf/ip2k.h. */
switch (code)
{
@@ -263,13 +271,42 @@ ip2k_reloc_type_lookup (abfd, code)
case BFD_RELOC_IP2K_EX8DATA:
return &ip2k_elf_howto_table[ (int) R_IP2K_EX8DATA];
default:
- /* Pacify gcc -Wall. */
+ /* Pacify gcc -Wall. */
return NULL;
}
return NULL;
}
-#define PAGENO(ABSADDR) ((ABSADDR) & 0x1C000)
+static void
+ip2k_get_mem (abfd, addr, length, ptr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_byte *addr;
+ int length;
+ bfd_byte *ptr;
+{
+ while (length --)
+ * ptr ++ = bfd_get_8 (abfd, addr ++);
+}
+
+static bfd_boolean
+ip2k_is_opcode (code, opcodes)
+ bfd_byte *code;
+ const struct ip2k_opcode *opcodes;
+{
+ unsigned short insn = (code[0] << 8) | code[1];
+
+ while (opcodes->mask != 0)
+ {
+ if ((insn & opcodes->mask) == opcodes->opcode)
+ return TRUE;
+
+ opcodes ++;
+ }
+
+ return FALSE;
+}
+
+#define PAGENO(ABSADDR) ((ABSADDR) & 0xFFFFC000)
#define BASEADDR(SEC) ((SEC)->output_section->vma + (SEC)->output_offset)
#define UNDEFINED_SYMBOL (~(bfd_vma)0)
@@ -317,6 +354,115 @@ symbol_value (abfd, symtab_hdr, isymbuf, irel)
}
}
+/* Returns the expected page state for the given instruction not including
+ the effect of page instructions. */
+
+static bfd_vma
+ip2k_nominal_page_bits (abfd, sec, addr, contents)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ bfd_vma addr;
+ bfd_byte *contents;
+{
+ bfd_vma page = PAGENO (BASEADDR (sec) + addr);
+
+ /* Check if section flows into this page. If not then the page
+ bits are assumed to match the PC. This will be true unless
+ the user has a page instruction without a call/jump, in which
+ case they are on their own. */
+ if (PAGENO (BASEADDR (sec)) == page)
+ return page;
+
+ /* Section flows across page boundary. The page bits should match
+ the PC unless there is a possible flow from the previous page,
+ in which case it is not possible to determine the value of the
+ page bits. */
+ while (PAGENO (BASEADDR (sec) + addr - 2) == page)
+ {
+ bfd_byte code[2];
+
+ addr -= 2;
+ ip2k_get_mem (abfd, contents + addr, 2, code);
+ if (!IS_PAGE_OPCODE (code))
+ continue;
+
+ /* Found a page instruction, check if jump table. */
+ if (ip2k_is_switch_table_128 (abfd, sec, addr, contents) != -1)
+ /* Jump table => page is conditional. */
+ continue;
+
+ if (ip2k_is_switch_table_256 (abfd, sec, addr, contents) != -1)
+ /* Jump table => page is conditional. */
+ continue;
+
+ /* Found a page instruction, check if conditional. */
+ if (addr >= 2)
+ {
+ ip2k_get_mem (abfd, contents + addr - 2, 2, code);
+ if (IS_SKIP_OPCODE (code))
+ /* Page is conditional. */
+ continue;
+ }
+
+ /* Unconditional page instruction => page bits should be correct. */
+ return page;
+ }
+
+ /* Flow from previous page => page bits are impossible to determine. */
+ return 0;
+}
+
+static bfd_boolean
+ip2k_test_page_insn (abfd, sec, irel, misc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ Elf_Internal_Rela *irel;
+ struct misc *misc;
+{
+ bfd_vma symval;
+
+ /* Get the value of the symbol referred to by the reloc. */
+ symval = symbol_value (abfd, misc->symtab_hdr, misc->isymbuf, irel);
+ if (symval == UNDEFINED_SYMBOL)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ return FALSE;
+
+ /* Test if we can delete this page instruction. */
+ if (PAGENO (symval + irel->r_addend) !=
+ ip2k_nominal_page_bits (abfd, sec, irel->r_offset, misc->contents))
+ return FALSE;
+
+ return TRUE;
+}
+
+static bfd_boolean
+ip2k_delete_page_insn (abfd, sec, irel, again, misc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ Elf_Internal_Rela *irel;
+ bfd_boolean *again;
+ struct misc *misc;
+{
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = misc->irelbase;
+ elf_section_data (sec)->this_hdr.contents = misc->contents;
+ misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_IP2K_NONE);
+
+ /* Delete the PAGE insn. */
+ if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 2))
+ return FALSE;
+
+ /* Modified => will need to iterate relaxation again. */
+ *again = TRUE;
+
+ return TRUE;
+}
+
/* Determine if the instruction sequence matches that for
the prologue of a switch dispatch table with fewer than
128 entries.
@@ -346,48 +492,116 @@ symbol_value (abfd, symtab_hdr, isymbuf, irel)
...
jmp $nnnN */
-static bfd_boolean
-is_switch_128_dispatch_table_p (abfd, addr, relaxed, misc)
+static int
+ip2k_is_switch_table_128 (abfd, sec, addr, contents)
bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
bfd_vma addr;
- bfd_boolean relaxed;
+ bfd_byte *contents;
+{
+ bfd_byte code[4];
+ int index = 0;
+
+ /* Check current page-jmp. */
+ if (addr + 4 > sec->_cooked_size)
+ return -1;
+
+ ip2k_get_mem (abfd, contents + addr, 4, code);
+
+ if ((! IS_PAGE_OPCODE (code + 0))
+ || (! IS_JMP_OPCODE (code + 2)))
+ return -1;
+
+ /* Search back. */
+ while (1)
+ {
+ if (addr < 4)
+ return -1;
+
+ /* Check previous 2 instructions. */
+ ip2k_get_mem (abfd, contents + addr - 4, 4, code);
+ if ((IS_ADD_W_WREG_OPCODE (code + 0))
+ && (IS_ADD_PCL_W_OPCODE (code + 2)))
+ return index;
+
+ if ((! IS_PAGE_OPCODE (code + 0))
+ || (! IS_JMP_OPCODE (code + 2)))
+ return -1;
+
+ index++;
+ addr -= 4;
+ }
+}
+
+static bfd_boolean
+ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ Elf_Internal_Rela *irel;
+ bfd_boolean *again;
struct misc *misc;
{
- bfd_byte code0, code1;
+ Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
+ Elf_Internal_Rela *ireltest = irel;
+ bfd_byte code[4];
+ bfd_vma addr;
+
+ /* Test all page instructions. */
+ addr = irel->r_offset;
+ while (1)
+ {
+ if (addr + 4 > sec->_cooked_size)
+ break;
- if (addr < (3 * 2))
- return FALSE;
+ ip2k_get_mem (abfd, misc->contents + addr, 4, code);
+ if ((! IS_PAGE_OPCODE (code + 0))
+ || (! IS_JMP_OPCODE (code + 2)))
+ break;
- code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+ /* Validate relocation entry (every entry should have a matching
+ relocation entry). */
+ if (ireltest >= irelend)
+ {
+ _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
+ return FALSE;
+ }
- /* Is it ADD PCL,W */
- if (! IS_ADD_PCL_W_OPCODE (code0, code1))
- return FALSE;
+ if (ireltest->r_offset != addr)
+ {
+ _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
+ return FALSE;
+ }
- code0 = bfd_get_8 (abfd, misc->contents + addr - 4);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 3);
+ if (! ip2k_test_page_insn (abfd, sec, ireltest, misc))
+ /* Un-removable page insn => nothing can be done. */
+ return TRUE;
- if (relaxed)
- /* Is it ADD W,WREG */
- return ! IS_ADD_W_WREG_OPCODE (code0, code1);
+ addr += 4;
+ ireltest += 2;
+ }
- else
+ /* Relaxable. Adjust table header. */
+ ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 4, code);
+ if ((! IS_ADD_W_WREG_OPCODE (code + 0))
+ || (! IS_ADD_PCL_W_OPCODE (code + 2)))
{
- /* Is it ADD W,WREG */
- if (! IS_ADD_W_WREG_OPCODE (code0, code1))
- return FALSE;
+ _bfd_error_handler (_("ip2k relaxer: switch table header corrupt."));
+ return FALSE;
+ }
+
+ if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset - 4, 2))
+ return FALSE;
- code0 = bfd_get_8 (abfd, misc->contents + addr - 6);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 5);
+ *again = TRUE;
- /* Is it JMP $nnnn */
- if (! IS_JMP_OPCODE (code0, code1))
- return FALSE;
+ /* Delete all page instructions in table. */
+ while (irel < ireltest)
+ {
+ if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
+ return FALSE;
+ irel += 2;
}
- /* It looks like we've found the prologue for
- a 1-127 entry switch dispatch table. */
return TRUE;
}
@@ -431,353 +645,155 @@ is_switch_128_dispatch_table_p (abfd, addr, relaxed, misc)
...
jmp $nnnN */
-static bfd_boolean
-is_switch_256_dispatch_table_p (abfd, addr, relaxed, misc)
+static int
+ip2k_is_switch_table_256 (abfd, sec, addr, contents)
bfd *abfd ATTRIBUTE_UNUSED;
- bfd_vma addr;
- bfd_boolean relaxed;
- struct misc *misc;
-{
- bfd_byte code0, code1;
-
- if (addr < (8 * 2))
- return FALSE;
-
- code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
-
- /* Is it INC 1(SP). */
- if (! IS_INC_1_SP_OPCODE (code0, code1))
- return FALSE;
-
- code0 = bfd_get_8 (abfd, misc->contents + addr - 4);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 3);
-
- /* Is it SNC. */
- if (! IS_SNC_OPCODE (code0, code1))
- return FALSE;
-
- code0 = bfd_get_8 (abfd, misc->contents + addr - 6);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 5);
-
- /* Is it ADD 2(SP),W. */
- if (! IS_ADD_2_SP_W_OPCODE (code0, code1))
- return FALSE;
-
- code0 = bfd_get_8 (abfd, misc->contents + addr - 8);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 7);
-
- if (relaxed)
- /* Is it INC 1(SP). */
- return ! IS_INC_1_SP_OPCODE (code0, code1);
-
- else
- {
- /* Is it INC 1(SP). */
- if (! IS_INC_1_SP_OPCODE (code0, code1))
- return FALSE;
-
- code0 = bfd_get_8 (abfd, misc->contents + addr - 10);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 9);
-
- /* Is it SNC. */
- if (! IS_SNC_OPCODE (code0, code1))
- return FALSE;
-
- code0 = bfd_get_8 (abfd, misc->contents + addr - 12);
- code1 = bfd_get_8 (abfd, misc->contents + addr - 11);
-
- /* Is it ADD W,WREG. */
- if (! IS_ADD_W_WREG_OPCODE (code0, code1))
- return FALSE;
- }
-
- /* It looks like we've found the prologue for
- a 128-255 entry switch dispatch table. */
- return TRUE;
-}
-
-static bfd_boolean
-relax_switch_dispatch_tables_pass1 (abfd, sec, addr, misc)
- bfd *abfd;
asection *sec;
bfd_vma addr;
- struct misc *misc;
+ bfd_byte *contents;
{
- if (addr + 3 < sec->_cooked_size)
+ bfd_byte code[16];
+ int index = 0;
+
+ /* Check current page-jmp. */
+ if (addr + 4 > sec->_cooked_size)
+ return -1;
+
+ ip2k_get_mem (abfd, contents + addr, 4, code);
+ if ((! IS_PAGE_OPCODE (code + 0))
+ || (! IS_JMP_OPCODE (code + 2)))
+ return -1;
+
+ /* Search back. */
+ while (1)
{
- bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr + 2);
- bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr + 3);
-
- if (IS_JMP_OPCODE (code0, code1)
- && is_switch_128_dispatch_table_p (abfd, addr, FALSE, misc))
- {
- /* Delete ADD W,WREG from prologue. */
- ip2k_elf_relax_delete_bytes (abfd, sec, addr - (2 * 2), (1 * 2));
- return TRUE;
- }
-
- if (IS_JMP_OPCODE (code0, code1)
- && is_switch_256_dispatch_table_p (abfd, addr, FALSE, misc))
- {
- /* Delete ADD W,WREG; SNC ; INC 1(SP) from prologue. */
- ip2k_elf_relax_delete_bytes (abfd, sec, addr - 6 * 2, 3 * 2);
- return TRUE;
- }
+ if (addr < 16)
+ return -1;
+
+ /* Check previous 8 instructions. */
+ ip2k_get_mem (abfd, contents + addr - 16, 16, code);
+ if ((IS_ADD_W_WREG_OPCODE (code + 0))
+ && (IS_SNC_OPCODE (code + 2))
+ && (IS_INC_1SP_OPCODE (code + 4))
+ && (IS_ADD_2SP_W_OPCODE (code + 6))
+ && (IS_SNC_OPCODE (code + 8))
+ && (IS_INC_1SP_OPCODE (code + 10))
+ && (IS_PAGE_OPCODE (code + 12))
+ && (IS_JMP_OPCODE (code + 14)))
+ return index;
+
+ if ((IS_ADD_W_WREG_OPCODE (code + 2))
+ && (IS_SNC_OPCODE (code + 4))
+ && (IS_INC_1SP_OPCODE (code + 6))
+ && (IS_ADD_2SP_W_OPCODE (code + 8))
+ && (IS_SNC_OPCODE (code + 10))
+ && (IS_INC_1SP_OPCODE (code + 12))
+ && (IS_JMP_OPCODE (code + 14)))
+ return index;
+
+ if ((! IS_PAGE_OPCODE (code + 0))
+ || (! IS_JMP_OPCODE (code + 2)))
+ return -1;
+
+ index++;
+ addr -= 4;
}
-
- return TRUE;
}
static bfd_boolean
-unrelax_dispatch_table_entries (abfd, sec, first, last, changed, misc)
- bfd *abfd;
+ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc)
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
- bfd_vma first;
- bfd_vma last;
- bfd_boolean *changed;
+ Elf_Internal_Rela *irel;
+ bfd_boolean *again;
struct misc *misc;
{
- bfd_vma addr = first;
-
- while (addr < last)
+ Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
+ Elf_Internal_Rela *ireltest = irel;
+ bfd_byte code[12];
+ bfd_vma addr;
+
+ /* Test all page instructions. */
+ addr = irel->r_offset;
+
+ while (1)
{
- bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr);
- bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr + 1);
-
- /* We are only expecting to find PAGE or JMP insns
- in the dispatch table. If we find anything else
- something has gone wrong failed the relaxation
- which will cause the link to be aborted. */
-
- if (IS_PAGE_OPCODE (code0, code1))
- /* Skip the PAGE and JMP insns. */
- addr += 4;
- else if (IS_JMP_OPCODE (code0, code1))
- {
- Elf_Internal_Rela * irelend = misc->irelbase
- + sec->reloc_count;
- Elf_Internal_Rela * irel;
-
- /* Find the relocation entry. */
- for (irel = misc->irelbase; irel < irelend; irel++)
- {
- if (irel->r_offset == addr
- && ELF32_R_TYPE (irel->r_info) == R_IP2K_ADDR16CJP)
- {
- if (! add_page_insn (abfd, sec, irel, misc))
- /* Something has gone wrong. */
- return FALSE;
-
- *changed = TRUE;
- break;
- }
- }
-
- /* If we fell off the end something has gone wrong. */
- if (irel >= irelend)
- /* Something has gone wrong. */
- return FALSE;
-
- /* Skip the PAGE and JMP isns. */
- addr += 4;
- /* Acount for the new PAGE insn. */
- last += 2;
- }
- else
- /* Something has gone wrong. */
- return FALSE;
- }
+ if (addr + 4 > sec->_cooked_size)
+ break;
- return TRUE;
-}
+ ip2k_get_mem (abfd, misc->contents + addr, 4, code);
-static bfd_boolean
-unrelax_switch_dispatch_tables_passN (abfd, sec, addr, changed, misc)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- bfd_boolean *changed;
- struct misc *misc;
-{
- if (2 <= addr && (addr + 3) < sec->_cooked_size)
- {
- bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
- bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+ if ((! IS_PAGE_OPCODE (code + 0))
+ || (! IS_JMP_OPCODE (code + 2)))
+ break;
- if (IS_PAGE_OPCODE (code0, code1))
- {
- addr -= 2;
- code0 = bfd_get_8 (abfd, misc->contents + addr + 2);
- code1 = bfd_get_8 (abfd, misc->contents + addr + 3);
- }
- else
- {
- code0 = bfd_get_8 (abfd, misc->contents + addr);
- code1 = bfd_get_8 (abfd, misc->contents + addr + 1);
- }
-
- if (IS_JMP_OPCODE (code0, code1)
- && is_switch_128_dispatch_table_p (abfd, addr, TRUE, misc))
+ /* Validate relocation entry (every entry should have a matching
+ relocation entry). */
+ if (ireltest >= irelend)
{
- bfd_vma first = addr;
- bfd_vma last = first;
- bfd_boolean relaxed = TRUE;
-
- /* On the final pass we must check if *all* entries in the
- dispatch table are relaxed. If *any* are not relaxed
- then we must unrelax *all* the entries in the dispach
- table and also unrelax the dispatch table prologue. */
-
- /* Find the last entry in the dispach table. */
- while (last < sec->_cooked_size)
- {
- code0 = bfd_get_8 (abfd, misc->contents + last);
- code1 = bfd_get_8 (abfd, misc->contents + last + 1);
-
- if (IS_PAGE_OPCODE (code0, code1))
- relaxed = FALSE;
- else if (! IS_JMP_OPCODE (code0, code1))
- break;
-
- last += 2;
- }
-
- /* We should have found the end of the dispatch table
- before reaching the end of the section. If we've have
- reached the end then fail the relaxation which will
- cause the link to be aborted. */
- if (last >= sec->_cooked_size)
- /* Something has gone wrong. */
- return FALSE;
-
- /* If we found an unrelaxed entry then
- unlrelax all the switch table entries. */
- if (! relaxed )
- {
- if (! unrelax_dispatch_table_entries (abfd, sec, first,
- last, changed, misc))
- /* Something has gone wrong. */
- return FALSE;
-
- if (! is_switch_128_dispatch_table_p (abfd, addr, TRUE, misc))
- /* Something has gone wrong. */
- return FALSE;
-
- /* Unrelax the prologue. */
-
- /* Insert an ADD W,WREG insnstruction. */
- if (! ip2k_elf_relax_add_bytes (abfd, sec,
- addr - 2,
- add_w_wreg_opcode,
- sizeof (add_w_wreg_opcode),
- 0))
- /* Something has gone wrong. */
- return FALSE;
- }
-
- return TRUE;
+ _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
+ return FALSE;
}
- if (IS_JMP_OPCODE (code0, code1)
- && is_switch_256_dispatch_table_p (abfd, addr, TRUE, misc))
+ if (ireltest->r_offset != addr)
{
- bfd_vma first = addr;
- bfd_vma last;
- bfd_boolean relaxed = TRUE;
-
- /* On the final pass we must check if *all* entries in the
- dispatch table are relaxed. If *any* are not relaxed
- then we must unrelax *all* the entries in the dispach
- table and also unrelax the dispatch table prologue. */
-
- /* Note the 1st PAGE/JMP instructions are part of the
- prologue and can safely be relaxed. */
-
- code0 = bfd_get_8 (abfd, misc->contents + first);
- code1 = bfd_get_8 (abfd, misc->contents + first + 1);
-
- if (IS_PAGE_OPCODE (code0, code1))
- {
- first += 2;
- code0 = bfd_get_8 (abfd, misc->contents + first);
- code1 = bfd_get_8 (abfd, misc->contents + first + 1);
- }
-
- if (! IS_JMP_OPCODE (code0, code1))
- /* Something has gone wrong. */
- return FALSE;
-
- first += 2;
- last = first;
-
- /* Find the last entry in the dispach table. */
- while (last < sec->_cooked_size)
- {
- code0 = bfd_get_8 (abfd, misc->contents + last);
- code1 = bfd_get_8 (abfd, misc->contents + last + 1);
-
- if (IS_PAGE_OPCODE (code0, code1))
- relaxed = FALSE;
- else if (! IS_JMP_OPCODE (code0, code1))
- break;
-
- last += 2;
- }
-
- /* We should have found the end of the dispatch table
- before reaching the end of the section. If we have
- reached the end of the section then fail the
- relaxation. */
- if (last >= sec->_cooked_size)
- return FALSE;
-
- /* If we found an unrelaxed entry then
- unrelax all the switch table entries. */
- if (! relaxed)
- {
- if (! unrelax_dispatch_table_entries (abfd, sec, first,
- last, changed, misc))
- return FALSE;
+ _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
+ return FALSE;
+ }
- if (! is_switch_256_dispatch_table_p (abfd, addr, TRUE, misc))
- return FALSE;
+ if (!ip2k_test_page_insn (abfd, sec, ireltest, misc))
+ /* Un-removable page insn => nothing can be done. */
+ return TRUE;
- /* Unrelax the prologue. */
+ addr += 4;
+ ireltest += 2;
+ }
- /* Insert an INC 1(SP) insnstruction. */
- if (! ip2k_elf_relax_add_bytes (abfd, sec,
- addr - 6,
- inc_1_sp_opcode,
- sizeof (inc_1_sp_opcode),
- 0))
- return FALSE;
+ /* Relaxable. Adjust table header. */
+ ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 2, code);
+ if (IS_PAGE_OPCODE (code))
+ addr = irel->r_offset - 16;
+ else
+ addr = irel->r_offset - 14;
+
+ ip2k_get_mem (abfd, misc->contents + addr, 12, code);
+ if ((!IS_ADD_W_WREG_OPCODE (code + 0))
+ || (!IS_SNC_OPCODE (code + 2))
+ || (!IS_INC_1SP_OPCODE (code + 4))
+ || (!IS_ADD_2SP_W_OPCODE (code + 6))
+ || (!IS_SNC_OPCODE (code + 8))
+ || (!IS_INC_1SP_OPCODE (code + 10)))
+ {
+ _bfd_error_handler (_("ip2k relaxer: switch table header corrupt."));
+ return FALSE;
+ }
- /* Insert an SNC insnstruction. */
- if (! ip2k_elf_relax_add_bytes (abfd, sec,
- addr - 6,
- snc_opcode,
- sizeof (snc_opcode),
- 0))
- return FALSE;
+ /* Delete first 3 opcodes. */
+ if (!ip2k_elf_relax_delete_bytes (abfd, sec, addr + 0, 6))
+ return FALSE;
- /* Insert an ADD W,WREG insnstruction. */
- if (! ip2k_elf_relax_add_bytes (abfd, sec,
- addr - 6,
- add_w_wreg_opcode,
- sizeof (add_w_wreg_opcode),
- 0))
- return FALSE;
- }
+ *again = TRUE;
- return TRUE;
- }
+ /* Delete all page instructions in table. */
+ while (irel < ireltest)
+ {
+ if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
+ return FALSE;
+ irel += 2;
}
return TRUE;
}
-/* This function handles relaxing for the ip2k. */
+/* This function handles relaxing for the ip2k.
+
+ Principle: Start with the first page and remove page instructions that
+ are not require on this first page. By removing page instructions more
+ code will fit into this page - repeat until nothing more can be achieved
+ for this page. Move on to the next page.
+
+ Processing the pages one at a time from the lowest page allows a removal
+ only policy to be used - pages can be removed but are never reinserted. */
static bfd_boolean
ip2k_elf_relax_section (abfd, sec, link_info, again)
@@ -791,10 +807,12 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
bfd_byte *contents = NULL;
Elf_Internal_Sym *isymbuf = NULL;
static asection * first_section = NULL;
- static asection * last_section = NULL;
- static bfd_boolean changed = FALSE;
- static bfd_boolean final_pass = FALSE;
+ static unsigned long search_addr;
+ static unsigned long page_start = 0;
+ static unsigned long page_end = 0;
static unsigned int pass = 0;
+ static bfd_boolean new_pass = FALSE;
+ static bfd_boolean changed = FALSE;
struct misc misc;
asection *stab;
@@ -802,21 +820,17 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
*again = FALSE;
if (first_section == NULL)
- first_section = sec;
+ {
+ ip2k_relaxed = TRUE;
+ first_section = sec;
+ }
if (first_section == sec)
{
- changed = FALSE;
pass++;
+ new_pass = TRUE;
}
- /* If we make too many passes then it's a sign that
- something is wrong and we fail the relaxation.
- Note if everything is working correctly then the
- relaxation should converge reasonably quickly. */
- if (pass == 4096)
- return FALSE;
-
/* We don't have to do anything for a relocatable link,
if this section does not have relocs, or if this is
not a code section. */
@@ -826,9 +840,6 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
|| (sec->flags & SEC_CODE) == 0)
return TRUE;
- if (pass == 1)
- last_section = sec;
-
/* If this is the first time we have been called
for this section, initialise the cooked size. */
if (sec->_cooked_size == 0)
@@ -892,58 +903,50 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
misc.contents = contents;
/* This is where all the relaxation actually get done. */
-
- if (pass == 1)
+ if ((pass == 1) || (new_pass && !changed))
{
- /* On the first pass we remove *all* page instructions and
- relax the prolog for switch dispatch tables. This gets
- us to the starting point for subsequent passes where
- we add page instructions back in as needed. */
+ /* On the first pass we simply search for the lowest page that
+ we havn't relaxed yet. Note that the pass count is reset
+ each time a page is complete in order to move on to the next page.
+ If we can't find any more pages then we are finished. */
+ if (new_pass)
+ {
+ pass = 1;
+ new_pass = FALSE;
+ changed = TRUE; /* Pre-initialize to break out of pass 1. */
+ search_addr = 0xFFFFFFFF;
+ }
- if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, &misc))
- goto error_return;
+ if ((BASEADDR (sec) + sec->_cooked_size < search_addr)
+ && (BASEADDR (sec) + sec->_cooked_size > page_end))
+ {
+ if (BASEADDR (sec) <= page_end)
+ search_addr = page_end + 1;
+ else
+ search_addr = BASEADDR (sec);
- changed |= *again;
+ /* Found a page => more work to do. */
+ *again = TRUE;
+ }
}
else
{
- /* Add page instructions back in as needed but we ignore
- the issue with sections (functions) crossing a page
- boundary until we have converged to an approximate
- solution (i.e. nothing has changed on this relaxation
- pass) and we then know roughly where the page boundaries
- will end up.
-
- After we have have converged to an approximate solution
- we set the final pass flag and continue relaxing. On these
- final passes if a section (function) cross page boundary
- we will add *all* the page instructions back into such
- sections.
-
- After adding *all* page instructions back into a section
- which crosses a page bounbdary we reset the final pass flag
- so the we will again interate until we find a new approximate
- solution which is closer to the final solution. */
-
- if (! ip2k_elf_relax_section_passN (abfd, sec, again, &final_pass,
- &misc))
- goto error_return;
-
- changed |= *again;
+ if (new_pass)
+ {
+ new_pass = FALSE;
+ changed = FALSE;
+ page_start = PAGENO (search_addr);
+ page_end = page_start | 0x00003FFF;
+ }
- /* If nothing has changed on this relaxation
- pass restart the final relaxaton pass. */
- if (! changed && last_section == sec)
+ /* Only process sections in range. */
+ if ((BASEADDR (sec) + sec->_cooked_size >= page_start)
+ && (BASEADDR (sec) <= page_end))
{
- /* If this was the final pass and we didn't reset
- the final pass flag then we are done, otherwise
- do another final pass. */
- if (! final_pass)
- {
- final_pass = TRUE;
- *again = TRUE;
- }
+ if (!ip2k_elf_relax_section_page (abfd, sec, &changed, &misc, page_start, page_end))
+ return FALSE;
}
+ *again = TRUE;
}
/* Perform some house keeping after relaxing the section. */
@@ -988,172 +991,72 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
return FALSE;
}
-/* This function handles relaxation during the first pass. */
+/* This function handles relaxation of a section in a specific page. */
static bfd_boolean
-ip2k_elf_relax_section_pass1 (abfd, sec, again, misc)
+ip2k_elf_relax_section_page (abfd, sec, again, misc, page_start, page_end)
bfd *abfd;
asection *sec;
bfd_boolean *again;
- struct misc * misc;
+ struct misc *misc;
+ unsigned long page_start;
+ unsigned long page_end;
{
Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
Elf_Internal_Rela *irel;
-
+ int switch_table_128;
+ int switch_table_256;
+
/* Walk thru the section looking for relaxation opertunities. */
for (irel = misc->irelbase; irel < irelend; irel++)
{
- if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_PAGE3)
- {
- bfd_byte code0 = bfd_get_8 (abfd,
- misc->contents + irel->r_offset);
- bfd_byte code1 = bfd_get_8 (abfd,
- misc->contents + irel->r_offset + 1);
-
- /* Verify that this is the PAGE opcode. */
- if (IS_PAGE_OPCODE (code0, code1))
- {
- /* Note that we've changed the relocs, section contents, etc. */
- elf_section_data (sec)->relocs = misc->irelbase;
- elf_section_data (sec)->this_hdr.contents = misc->contents;
- misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
-
- /* Handle switch dispatch tables/prologues. */
- if (! relax_switch_dispatch_tables_pass1 (abfd, sec,
- irel->r_offset, misc))
- return FALSE;
-
- /* Fix the relocation's type. */
- irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
- R_IP2K_NONE);
-
- /* Delete the PAGE insn. */
- if (! ip2k_elf_relax_delete_bytes (abfd, sec,
- irel->r_offset,
- sizeof (page_opcode)))
- return FALSE;
-
- /* That will change things, so, we should relax again.
- Note that this is not required, and it may be slow. */
- *again = TRUE;
- }
- }
- }
+ if (ELF32_R_TYPE (irel->r_info) != (int) R_IP2K_PAGE3)
+ /* Ignore non page instructions. */
+ continue;
- return TRUE;
-}
+ if (BASEADDR (sec) + irel->r_offset < page_start)
+ /* Ignore page instructions on earlier page - they have
+ already been processed. Remember that there is code flow
+ that crosses a page boundary. */
+ continue;
-/* This function handles relaxation for 2nd and subsequent passes. */
+ if (BASEADDR (sec) + irel->r_offset > page_end)
+ /* Flow beyond end of page => nothing more to do for this page. */
+ return TRUE;
-static bfd_boolean
-ip2k_elf_relax_section_passN (abfd, sec, again, final_pass, misc)
- bfd *abfd;
- asection *sec;
- bfd_boolean *again;
- bfd_boolean *final_pass;
- struct misc * misc;
-{
- Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
- Elf_Internal_Rela *irel;
- bfd_boolean add_all;
+ /* Detect switch tables. */
+ switch_table_128 = ip2k_is_switch_table_128 (abfd, sec, irel->r_offset, misc->contents);
+ switch_table_256 = ip2k_is_switch_table_256 (abfd, sec, irel->r_offset, misc->contents);
- /* If we are on the final relaxation pass and the section crosses
- then set a flag to indicate that *all* page instructions need
- to be added back into this section. */
- if (*final_pass)
- {
- add_all = (PAGENO (BASEADDR (sec))
- != PAGENO (BASEADDR (sec) + sec->_cooked_size));
+ if ((switch_table_128 > 0) || (switch_table_256 > 0))
+ /* If the index is greater than 0 then it has already been processed. */
+ continue;
- /* If this section crosses a page boundary set the crossed
- page boundary flag. */
- if (add_all)
- sec->userdata = sec;
- else
+ if (switch_table_128 == 0)
{
- /* If the section had previously crossed a page boundary
- but on this pass does not then reset crossed page
- boundary flag and rerun the 1st relaxation pass on
- this section. */
- if (sec->userdata)
- {
- sec->userdata = NULL;
- if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, misc))
- return FALSE;
- }
+ if (!ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc))
+ return FALSE;
+
+ continue;
}
- }
- else
- add_all = FALSE;
- /* Walk thru the section looking for call/jmp
- instructions which need a page instruction. */
- for (irel = misc->irelbase; irel < irelend; irel++)
- {
- if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_ADDR16CJP)
- {
- /* Get the value of the symbol referred to by the reloc. */
- bfd_vma symval = symbol_value (abfd, misc->symtab_hdr, misc->isymbuf,
- irel);
- bfd_byte code0, code1;
-
- if (symval == UNDEFINED_SYMBOL)
- {
- /* This appears to be a reference to an undefined
- symbol. Just ignore it--it will be caught by the
- regular reloc processing. */
- continue;
- }
-
- /* For simplicity of coding, we are going to modify the section
- contents, the section relocs, and the BFD symbol table. We
- must tell the rest of the code not to free up this
- information. It would be possible to instead create a table
- of changes which have to be made, as is done in coff-mips.c;
- that would be more work, but would require less memory when
- the linker is run. */
-
- /* Get the opcode. */
- code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset);
- code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset + 1);
-
- if (IS_JMP_OPCODE (code0, code1) || IS_CALL_OPCODE (code0, code1))
- {
- if (*final_pass)
- {
- if (! unrelax_switch_dispatch_tables_passN (abfd, sec,
- irel->r_offset,
- again, misc))
- return FALSE;
-
- if (*again)
- add_all = FALSE;
- }
-
- code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset - 2);
- code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset - 1);
-
- if (! IS_PAGE_OPCODE (code0, code1))
- {
- bfd_vma value = symval + irel->r_addend;
- bfd_vma addr = BASEADDR (sec) + irel->r_offset;
-
- if (add_all || PAGENO (addr) != PAGENO (value))
- {
- if (! add_page_insn (abfd, sec, irel, misc))
- return FALSE;
-
- /* That will have changed things, so, we must relax again. */
- *again = TRUE;
- }
- }
- }
- }
- }
+ if (switch_table_256 == 0)
+ {
+ if (!ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc))
+ return FALSE;
+
+ continue;
+ }
- /* If anything changed reset the final pass flag. */
- if (*again)
- *final_pass = FALSE;
+ /* Simple relax. */
+ if (ip2k_test_page_insn (abfd, sec, irel, misc))
+ {
+ if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
+ return FALSE;
+
+ continue;
+ }
+ }
return TRUE;
}
@@ -1186,6 +1089,7 @@ adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
struct elf_link_hash_entry **sym_hashes;
struct elf_link_hash_entry **end_hashes;
unsigned int symcount;
+ asection *stab;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
@@ -1228,6 +1132,132 @@ adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
irel->r_offset += count;
}
+ /* Now fix the stab relocations. */
+ stab = bfd_get_section_by_name (abfd, ".stab");
+ if (stab)
+ {
+ bfd_byte *stabcontents, *stabend, *stabp;
+
+ irelbase = elf_section_data (stab)->relocs;
+ irelend = irelbase + stab->reloc_count;
+
+ /* Pull out the contents of the stab section. */
+ if (elf_section_data (stab)->this_hdr.contents != NULL)
+ stabcontents = elf_section_data (stab)->this_hdr.contents;
+ else
+ {
+ stabcontents = (bfd_byte *) bfd_alloc (abfd, stab->_raw_size);
+ if (stabcontents == NULL)
+ return;
+
+ if (! bfd_get_section_contents (abfd, stab, stabcontents,
+ (file_ptr) 0, stab->_raw_size))
+ return;
+
+ /* We need to remember this. */
+ elf_section_data (stab)->this_hdr.contents = stabcontents;
+ }
+
+ stabend = stabcontents + stab->_raw_size;
+
+ for (irel = irelbase; irel < irelend; irel++)
+ {
+ if (ELF32_R_TYPE (irel->r_info) != R_IP2K_NONE)
+ {
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ {
+ asection *sym_sec;
+
+ /* A local symbol. */
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+
+ if (sym_sec == sec)
+ {
+ const char *name;
+ unsigned long strx;
+ unsigned char type, other;
+ unsigned short desc;
+ bfd_vma value;
+ bfd_vma baseaddr = BASEADDR (sec);
+ bfd_vma symval = BASEADDR (sym_sec) + isym->st_value
+ + irel->r_addend;
+
+ if ((baseaddr + addr) <= symval
+ && symval <= (baseaddr + endaddr))
+ irel->r_addend += count;
+
+ /* Go hunt up a function and fix its line info if needed. */
+ stabp = stabcontents + irel->r_offset - 8;
+
+ /* Go pullout the stab entry. */
+ strx = bfd_h_get_32 (abfd, stabp + STRDXOFF);
+ type = bfd_h_get_8 (abfd, stabp + TYPEOFF);
+ other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
+ desc = bfd_h_get_16 (abfd, stabp + DESCOFF);
+ value = bfd_h_get_32 (abfd, stabp + VALOFF);
+
+ name = bfd_get_stab_name (type);
+
+ if (strcmp (name, "FUN") == 0)
+ {
+ int function_adjusted = 0;
+
+ if (symval > (baseaddr + addr))
+ /* Not in this function. */
+ continue;
+
+ /* Hey we got a function hit. */
+ stabp += STABSIZE;
+ for (;stabp < stabend; stabp += STABSIZE)
+ {
+ /* Go pullout the stab entry. */
+ strx = bfd_h_get_32 (abfd, stabp + STRDXOFF);
+ type = bfd_h_get_8 (abfd, stabp + TYPEOFF);
+ other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
+ desc = bfd_h_get_16 (abfd, stabp + DESCOFF);
+ value = bfd_h_get_32 (abfd, stabp + VALOFF);
+
+ name = bfd_get_stab_name (type);
+
+ if (strcmp (name, "FUN") == 0)
+ {
+ /* Hit another function entry. */
+ if (function_adjusted)
+ {
+ /* Adjust the value. */
+ value += count;
+
+ /* We need to put it back. */
+ bfd_h_put_32 (abfd, value,stabp + VALOFF);
+ }
+
+ /* And then bale out. */
+ break;
+ }
+
+ if (strcmp (name, "SLINE") == 0)
+ {
+ /* Got a line entry. */
+ if ((baseaddr + addr) <= (symval + value))
+ {
+ /* Adjust the line entry. */
+ value += count;
+
+ /* We need to put it back. */
+ bfd_h_put_32 (abfd, value,stabp + VALOFF);
+ function_adjusted = 1;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
/* When adding an instruction back it is sometimes necessary to move any
global or local symbol that was referencing the first instruction of
the moved block to refer to the first instruction of the inserted block.
@@ -1254,103 +1284,20 @@ adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
for (; sym_hashes < end_hashes; sym_hashes++)
{
struct elf_link_hash_entry *sym_hash = *sym_hashes;
+
if ((sym_hash->root.type == bfd_link_hash_defined
|| sym_hash->root.type == bfd_link_hash_defweak)
&& sym_hash->root.u.def.section == sec)
{
if (addr <= sym_hash->root.u.def.value
&& sym_hash->root.u.def.value < endaddr)
- {
- sym_hash->root.u.def.value += count;
- }
+ sym_hash->root.u.def.value += count;
}
}
return;
}
-static bfd_boolean
-add_page_insn (abfd, sec, irel, misc)
- bfd *abfd;
- asection *sec;
- Elf_Internal_Rela *irel;
- struct misc *misc;
-{
- /* Note that we've changed the relocs, section contents, etc. */
- elf_section_data (sec)->relocs = misc->irelbase;
- elf_section_data (sec)->this_hdr.contents = misc->contents;
- misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
-
- /* Add the PAGE insn. */
- if (! ip2k_elf_relax_add_bytes (abfd, sec, irel->r_offset,
- page_opcode,
- sizeof (page_opcode),
- sizeof (page_opcode)))
- return FALSE;
- else
- {
- Elf_Internal_Rela * jrel = irel - 1;
-
- /* Add relocation for PAGE insn added. */
- if (ELF32_R_TYPE (jrel->r_info) != R_IP2K_NONE)
- {
- bfd_byte code0, code1;
- char *msg = NULL;
-
- /* Get the opcode. */
- code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset);
- code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset + 1);
-
- if (IS_JMP_OPCODE (code0, code1))
- msg = "\tJMP instruction missing a preceeding PAGE instruction in %s\n\n";
-
- else if (IS_CALL_OPCODE (code0, code1))
- msg = "\tCALL instruction missing a preceeding PAGE instruction in %s\n\n";
-
- if (msg)
- {
- fprintf (stderr, "\n\t *** LINKER RELAXATION failure ***\n");
- fprintf (stderr, msg, sec->owner->filename);
- }
-
- return FALSE;
- }
-
- jrel->r_addend = irel->r_addend;
- jrel->r_offset = irel->r_offset - sizeof (page_opcode);
- jrel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
- R_IP2K_PAGE3);
- }
-
- return TRUE;
-}
-
-/* Insert bytes into a section while relaxing. */
-
-static bfd_boolean
-ip2k_elf_relax_add_bytes (abfd, sec, addr, bytes, count, noadj)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- const bfd_byte *bytes;
- int count;
- int noadj;
-{
- bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
- bfd_vma endaddr = sec->_cooked_size;
-
- /* Make room to insert the bytes. */
- memmove (contents + addr + count, contents + addr, endaddr - addr);
-
- /* Insert the bytes into the section. */
- memcpy (contents + addr, bytes, count);
-
- sec->_cooked_size += count;
-
- adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj);
- return TRUE;
-}
-
/* Delete some bytes from a section while relaxing. */
static bfd_boolean
@@ -1410,8 +1357,9 @@ ip2k_final_link_relocate (howto, input_bfd, input_section, contents, rel,
Elf_Internal_Rela * rel;
bfd_vma relocation;
{
- bfd_reloc_status_type r = bfd_reloc_ok;
+ static bfd_vma page_addr = 0;
+ bfd_reloc_status_type r = bfd_reloc_ok;
switch (howto->type)
{
/* Handle data space relocations. */
@@ -1429,8 +1377,45 @@ ip2k_final_link_relocate (howto, input_bfd, input_section, contents, rel,
break;
/* Handle insn space relocations. */
- case R_IP2K_ADDR16CJP:
case R_IP2K_PAGE3:
+ page_addr = BASEADDR (input_section) + rel->r_offset;
+ if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
+ relocation &= ~IP2K_INSN_MASK;
+ else
+ r = bfd_reloc_notsupported;
+ break;
+
+ case R_IP2K_ADDR16CJP:
+ if (BASEADDR (input_section) + rel->r_offset != page_addr + 2)
+ {
+ /* No preceeding page instruction, verify that it isn't needed. */
+ if (PAGENO (relocation + rel->r_addend) !=
+ ip2k_nominal_page_bits (input_bfd, input_section,
+ rel->r_offset, contents))
+ _bfd_error_handler (_("ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."),
+ BASEADDR (input_section) + rel->r_offset,
+ relocation + rel->r_addend);
+ }
+ else if (ip2k_relaxed)
+ {
+ /* Preceeding page instruction. Verify that the page instruction is
+ really needed. One reason for the relaxation to miss a page is if
+ the section is not marked as executable. */
+ if (!ip2k_is_switch_table_128 (input_bfd, input_section, rel->r_offset - 2, contents) &&
+ !ip2k_is_switch_table_256 (input_bfd, input_section, rel->r_offset - 2, contents) &&
+ (PAGENO (relocation + rel->r_addend) ==
+ ip2k_nominal_page_bits (input_bfd, input_section,
+ rel->r_offset - 2, contents)))
+ _bfd_error_handler (_("ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."),
+ page_addr,
+ relocation + rel->r_addend);
+ }
+ if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
+ relocation &= ~IP2K_INSN_MASK;
+ else
+ r = bfd_reloc_notsupported;
+ break;
+
case R_IP2K_LO8INSN:
case R_IP2K_HI8INSN:
case R_IP2K_PC_SKIP:
@@ -1561,10 +1546,10 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sec = h->root.u.def.section;
relocation = h->root.u.def.value + BASEADDR (sec);
}
+
else if (h->root.type == bfd_link_hash_undefweak)
- {
- relocation = 0;
- }
+ relocation = 0;
+
else
{
if (! ((*info->callbacks->undefined_symbol)
@@ -1668,9 +1653,7 @@ ip2k_elf_gc_mark_hook (sec, info, rel, h, sym)
&& ELF_ST_BIND (sym->st_info) != STB_LOCAL)
&& ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
&& sym->st_shndx != SHN_COMMON))
- {
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- }
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
}
return NULL;
}
@@ -1682,21 +1665,17 @@ ip2k_elf_gc_sweep_hook (abfd, info, sec, relocs)
asection *sec ATTRIBUTE_UNUSED;
const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
- /* we don't use got and plt entries for ip2k */
+ /* We don't use got and plt entries for ip2k. */
return TRUE;
}
-
-/* -------------------------------------------------------------------- */
-
-
#define TARGET_BIG_SYM bfd_elf32_ip2k_vec
#define TARGET_BIG_NAME "elf32-ip2k"
#define ELF_ARCH bfd_arch_ip2k
#define ELF_MACHINE_CODE EM_IP2K
#define ELF_MACHINE_ALT1 EM_IP2K_OLD
-#define ELF_MAXPAGESIZE 1 /* No pages on the IP2K */
+#define ELF_MAXPAGESIZE 1 /* No pages on the IP2K. */
#define elf_info_to_howto_rel NULL
#define elf_info_to_howto ip2k_info_to_howto_rela
@@ -1705,12 +1684,10 @@ ip2k_elf_gc_sweep_hook (abfd, info, sec, relocs)
#define elf_backend_rela_normal 1
#define elf_backend_gc_mark_hook ip2k_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook ip2k_elf_gc_sweep_hook
-
#define elf_backend_relocate_section ip2k_elf_relocate_section
#define elf_symbol_leading_char '_'
#define bfd_elf32_bfd_reloc_type_lookup ip2k_reloc_type_lookup
#define bfd_elf32_bfd_relax_section ip2k_elf_relax_section
-
#include "elf32-target.h"
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
new file mode 100644
index 00000000000..c4261bf7492
--- /dev/null
+++ b/bfd/elf32-iq2000.c
@@ -0,0 +1,974 @@
+/* IQ2000-specific support for 32-bit ELF.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/iq2000.h"
+
+/* Forward declarations. */
+
+/* Private relocation functions. */
+static bfd_reloc_status_type iq2000_elf_relocate_hi16 PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
+static reloc_howto_type * iq2000_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
+static void iq2000_info_to_howto_rela PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+static bfd_boolean iq2000_elf_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static bfd_reloc_status_type iq2000_final_link_relocate PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma));
+static bfd_boolean iq2000_elf_gc_sweep_hook PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
+static asection * iq2000_elf_gc_mark_hook PARAMS ((asection *sec, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static reloc_howto_type * iq2000_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
+static int elf32_iq2000_machine PARAMS ((bfd *));
+static bfd_boolean iq2000_elf_object_p PARAMS ((bfd *));
+static bfd_boolean iq2000_elf_set_private_flags PARAMS ((bfd *, flagword));
+static bfd_boolean iq2000_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *));
+static bfd_boolean iq2000_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+static bfd_boolean iq2000_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
+static bfd_boolean iq2000_elf_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
+static bfd_reloc_status_type iq2000_elf_howto_hi16_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+
+
+static reloc_howto_type iq2000_elf_howto_table [] =
+{
+ /* This reloc does nothing. */
+
+ HOWTO (R_IQ2000_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 16 bit absolute relocation. */
+ HOWTO (R_IQ2000_16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 32 bit absolute relocation. */
+ HOWTO (R_IQ2000_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 31, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_32", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x7fffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 26 bit branch address. */
+ HOWTO (R_IQ2000_26, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ /* This needs complex overflow
+ detection, because the upper four
+ bits must match the PC. */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_26", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x03ffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 16 bit PC relative reference. */
+ HOWTO (R_IQ2000_PC16, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_PC16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* high 16 bits of symbol value. */
+ HOWTO (R_IQ2000_HI16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 15, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ iq2000_elf_howto_hi16_reloc, /* special_function */
+ "R_IQ2000_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000, /* src_mask */
+ 0x7fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Low 16 bits of symbol value. */
+ HOWTO (R_IQ2000_LO16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_LO16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 16-bit jump offset. */
+ HOWTO (R_IQ2000_OFFSET_16, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_OFFSET_16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 21-bit jump offset. */
+ HOWTO (R_IQ2000_OFFSET_21, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 21, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_OFFSET_21", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000, /* src_mask */
+ 0x1fffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* unsigned high 16 bits of value. */
+ HOWTO (R_IQ2000_OFFSET_21, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_UHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000, /* src_mask */
+ 0x7fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 32 bit absolute debug relocation. */
+ HOWTO (R_IQ2000_32_DEBUG, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_IQ2000_32", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+};
+
+/* GNU extension to record C++ vtable hierarchy. */
+static reloc_howto_type iq2000_elf_vtinherit_howto =
+ HOWTO (R_IQ2000_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_IQ2000_GNU_VTINHERIT", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE); /* pcrel_offset */
+
+/* GNU extension to record C++ vtable member usage. */
+static reloc_howto_type iq2000_elf_vtentry_howto =
+ HOWTO (R_IQ2000_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 */
+ NULL, /* special_function */
+ "R_IQ2000_GNU_VTENTRY", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE); /* pcrel_offset */
+
+
+/* Map BFD reloc types to IQ2000 ELF reloc types. */
+
+struct iq2000_reloc_map
+{
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned int iq2000_reloc_val;
+};
+
+static const struct iq2000_reloc_map iq2000_reloc_map [] =
+{
+ { BFD_RELOC_NONE, R_IQ2000_NONE },
+ { BFD_RELOC_16, R_IQ2000_16 },
+ { BFD_RELOC_32, R_IQ2000_32 },
+ { BFD_RELOC_MIPS_JMP, R_IQ2000_26 },
+ { BFD_RELOC_16_PCREL_S2, R_IQ2000_PC16 },
+ { BFD_RELOC_HI16, R_IQ2000_HI16 },
+ { BFD_RELOC_LO16, R_IQ2000_LO16 },
+ { BFD_RELOC_IQ2000_OFFSET_16,R_IQ2000_OFFSET_16 },
+ { BFD_RELOC_IQ2000_OFFSET_21,R_IQ2000_OFFSET_21 },
+ { BFD_RELOC_IQ2000_UHI16, R_IQ2000_UHI16 },
+ { BFD_RELOC_VTABLE_INHERIT, R_IQ2000_GNU_VTINHERIT },
+ { BFD_RELOC_VTABLE_ENTRY, R_IQ2000_GNU_VTENTRY },
+};
+
+static bfd_reloc_status_type
+iq2000_elf_howto_hi16_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ bfd_reloc_status_type ret;
+ bfd_vma relocation;
+
+ /* If we're relocating, and this an external symbol, we don't want
+ to change anything. */
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && reloc_entry->addend == 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+
+ /* if %lo will have sign-extension, compensate by add 0x10000 to hi portion */
+ if (relocation & 0x8000)
+ reloc_entry->addend += 0x10000;
+
+ /* Now do the reloc in the usual way. */
+ ret = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+
+ /* put it back the way it was */
+ if (relocation & 0x8000)
+ reloc_entry->addend -= 0x10000;
+
+ return ret;
+}
+
+static bfd_reloc_status_type
+iq2000_elf_relocate_hi16 (input_bfd, relhi, contents, value)
+ bfd *input_bfd;
+ Elf_Internal_Rela *relhi;
+ bfd_byte *contents;
+ bfd_vma value;
+{
+ bfd_vma insn;
+
+ insn = bfd_get_32 (input_bfd, contents + relhi->r_offset);
+
+ value += relhi->r_addend;
+ value &= 0x7fffffff; /* mask off top-bit which is Harvard mask bit */
+
+ /* if top-bit of %lo value is on, this means that %lo will
+ sign-propagate and so we compensate by adding 1 to %hi value */
+ if (value & 0x8000)
+ value += 0x10000;
+
+ value >>= 16;
+ insn = ((insn & ~0xFFFF) | value);
+
+ bfd_put_32 (input_bfd, insn, contents + relhi->r_offset);
+ return bfd_reloc_ok;
+}
+
+static reloc_howto_type *
+iq2000_reloc_type_lookup (abfd, code)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ /* Note that the iq2000_elf_howto_table is indxed by the R_
+ constants. Thus, the order that the howto records appear in the
+ table *must* match the order of the relocation types defined in
+ include/elf/iq2000.h. */
+
+ switch (code)
+ {
+ case BFD_RELOC_NONE:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_NONE];
+ case BFD_RELOC_16:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_16];
+ case BFD_RELOC_32:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_32];
+ case BFD_RELOC_MIPS_JMP:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_26];
+ case BFD_RELOC_IQ2000_OFFSET_16:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_OFFSET_16];
+ case BFD_RELOC_IQ2000_OFFSET_21:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_OFFSET_21];
+ case BFD_RELOC_16_PCREL_S2:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_PC16];
+ case BFD_RELOC_HI16:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_HI16];
+ case BFD_RELOC_IQ2000_UHI16:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_UHI16];
+ case BFD_RELOC_LO16:
+ return &iq2000_elf_howto_table[ (int) R_IQ2000_LO16];
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &iq2000_elf_vtinherit_howto;
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &iq2000_elf_vtentry_howto;
+ default:
+ /* Pacify gcc -Wall. */
+ return NULL;
+ }
+ return NULL;
+}
+
+
+/* Perform a single relocation. By default we use the standard BFD
+ routines. */
+
+static bfd_reloc_status_type
+iq2000_final_link_relocate (howto, input_bfd, input_section, contents, rel, relocation)
+ reloc_howto_type * howto;
+ bfd * input_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ Elf_Internal_Rela * rel;
+ bfd_vma relocation;
+{
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend);
+}
+
+/* Set the howto pointer for a IQ2000 ELF reloc. */
+
+static void
+iq2000_info_to_howto_rela (abfd, cache_ptr, dst)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ arelent * cache_ptr;
+ Elf_Internal_Rela * dst;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (dst->r_info);
+ switch (r_type)
+ {
+ case R_IQ2000_GNU_VTINHERIT:
+ cache_ptr->howto = & iq2000_elf_vtinherit_howto;
+ break;
+
+ case R_IQ2000_GNU_VTENTRY:
+ cache_ptr->howto = & iq2000_elf_vtentry_howto;
+ break;
+
+ default:
+ cache_ptr->howto = & iq2000_elf_howto_table [r_type];
+ break;
+ }
+}
+
+/* Look through the relocs for a section during the first phase.
+ Since we don't do .gots or .plts, we just need to consider the
+ virtual table relocs for gc. */
+
+static bfd_boolean
+iq2000_elf_check_relocs (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *rel_end;
+
+ if (info->relocateable)
+ 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(Elf32_External_Sym);
+ if (!elf_bad_symtab (abfd))
+ sym_hashes_end -= symtab_hdr->sh_info;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ struct elf_link_hash_entry *h;
+ unsigned long r_symndx;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_IQ2000_GNU_VTINHERIT:
+ if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ return FALSE;
+ break;
+
+ /* This relocation describes which C++ vtable entries are actually
+ used. Record for later use during GC. */
+ case R_IQ2000_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return FALSE;
+ break;
+
+ case R_IQ2000_32:
+ /* For debug section, change to special harvard-aware relocations */
+ if (memcmp (sec->name, ".debug", 6) == 0
+ || memcmp (sec->name, ".stab", 5) == 0
+ || memcmp (sec->name, ".eh_frame", 9) == 0)
+ rel->r_info = ELF32_R_INFO (ELF32_R_SYM (rel->r_info), R_IQ2000_32_DEBUG);
+ break;
+ }
+ }
+ return TRUE;
+}
+
+
+/* Relocate a IQ2000 ELF section.
+ There is some attempt to make this function usable for many architectures,
+ both USE_REL and USE_RELA ['twould be nice if such a critter existed],
+ if only to serve as a learning tool.
+
+ The RELOCATE_SECTION function is called by the new ELF backend linker
+ to handle the relocations for a section.
+
+ The relocs are always passed as Rela structures; if the section
+ actually uses Rel structures, the r_addend field will always be
+ zero.
+
+ This function is responsible for adjusting the section contents as
+ necessary, and (if using Rela relocs and generating a relocateable
+ output file) adjusting the reloc addend as necessary.
+
+ This function does not have to worry about setting the reloc
+ address or the reloc symbol index.
+
+ LOCAL_SYMS is a pointer to the swapped in local symbols.
+
+ LOCAL_SECTIONS is an array giving the section in the input file
+ corresponding to the st_shndx field of each local symbol.
+
+ The global hash table entry for the global symbols can be found
+ via elf_sym_hashes (input_bfd).
+
+ When generating relocateable output, this function must handle
+ STB_LOCAL/STT_SECTION symbols specially. The output symbol is
+ going to be the section symbol corresponding to the output
+ section, which means that the addend must be adjusted
+ accordingly. */
+
+static bfd_boolean
+iq2000_elf_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;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ Elf_Internal_Rela * rel;
+ Elf_Internal_Rela * relend;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ relend = relocs + input_section->reloc_count;
+
+ for (rel = relocs; rel < relend; rel ++)
+ {
+ reloc_howto_type * howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym * sym;
+ asection * sec;
+ struct elf_link_hash_entry * h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ const char * name = NULL;
+ int r_type;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ if ( r_type == R_IQ2000_GNU_VTINHERIT
+ || r_type == R_IQ2000_GNU_VTENTRY)
+ continue;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ /* This is a final link. */
+ howto = iq2000_elf_howto_table + ELF32_R_TYPE (rel->r_info);
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections [r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+
+ name = bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name);
+ name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+#ifdef DEBUG
+ fprintf (stderr, "local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n",
+ sec->name, name, sym->st_name,
+ sec->output_section->vma, sec->output_offset,
+ sym->st_value, rel->r_addend);
+#endif
+ }
+ else
+ {
+ h = sym_hashes [r_symndx];
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ name = h->root.root.string;
+
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+#ifdef DEBUG
+ fprintf (stderr,
+ "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n",
+ sec->name, name, h->root.u.def.value,
+ sec->output_section->vma, sec->output_offset, relocation);
+#endif
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ {
+#ifdef DEBUG
+ fprintf (stderr, "undefined: sec: %s, name: %s\n",
+ sec->name, name);
+#endif
+ relocation = 0;
+ }
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined))))
+ return FALSE;
+#ifdef DEBUG
+ fprintf (stderr, "unknown: name: %s\n", name);
+#endif
+ relocation = 0;
+ }
+ }
+
+ switch (r_type)
+ {
+ case R_IQ2000_HI16:
+ r = iq2000_elf_relocate_hi16 (input_bfd, rel, contents, relocation);
+ break;
+
+ case R_IQ2000_PC16:
+ rel->r_addend -= 4;
+ /* Fall through. */
+
+ default:
+ r = iq2000_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel, relocation);
+ break;
+ }
+
+ if (r != bfd_reloc_ok)
+ {
+ const char * msg = (const char *) NULL;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ r = info->callbacks->reloc_overflow
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset);
+ break;
+
+ case bfd_reloc_undefined:
+ r = info->callbacks->undefined_symbol
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ break;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ break;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous relocation");
+ break;
+
+ default:
+ msg = _("internal error: unknown error");
+ break;
+ }
+
+ if (msg)
+ r = info->callbacks->warning
+ (info, msg, name, input_bfd, input_section, rel->r_offset);
+
+ if (! r)
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+
+/* Update the got entry reference counts for the section being
+ removed. */
+
+static bfd_boolean
+iq2000_elf_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;
+{
+ return TRUE;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+iq2000_elf_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;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_IQ2000_GNU_VTINHERIT:
+ case R_IQ2000_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+
+/* Return the MACH for an e_flags value. */
+
+static int
+elf32_iq2000_machine (abfd)
+ bfd *abfd;
+{
+ switch (elf_elfheader (abfd)->e_flags & EF_IQ2000_CPU_MASK)
+ {
+ case EF_IQ2000_CPU_IQ2000: return bfd_mach_iq2000;
+ case EF_IQ2000_CPU_IQ10: return bfd_mach_iq10;
+ }
+
+ return bfd_mach_iq2000;
+}
+
+
+/* Function to set the ELF flag bits. */
+
+static bfd_boolean
+iq2000_elf_set_private_flags (abfd, flags)
+ bfd *abfd;
+ flagword flags;
+{
+ elf_elfheader (abfd)->e_flags = flags;
+ elf_flags_init (abfd) = TRUE;
+ return TRUE;
+}
+
+/* Copy backend specific data from one object module to another. */
+
+static bfd_boolean
+iq2000_elf_copy_private_bfd_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ BFD_ASSERT (!elf_flags_init (obfd)
+ || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
+
+ elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+ elf_flags_init (obfd) = TRUE;
+ return TRUE;
+}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking. */
+
+static bfd_boolean
+iq2000_elf_merge_private_bfd_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ flagword old_flags, old_partial;
+ flagword new_flags, new_partial;
+ bfd_boolean error = FALSE;
+ char new_opt[80];
+ char old_opt[80];
+
+ new_opt[0] = old_opt[0] = '\0';
+ new_flags = elf_elfheader (ibfd)->e_flags;
+ old_flags = elf_elfheader (obfd)->e_flags;
+
+#ifdef DEBUG
+ (*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
+ old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
+ bfd_get_filename (ibfd));
+#endif
+
+ if (!elf_flags_init (obfd))
+ {
+ /* First call, no flags set. */
+ elf_flags_init (obfd) = TRUE;
+ elf_elfheader (obfd)->e_flags = new_flags;
+ }
+
+ else if (new_flags == old_flags)
+ /* Compatible flags are ok. */
+ ;
+
+ else /* Possibly incompatible flags. */
+ {
+ /* Warn if different cpu is used (allow a specific cpu to override
+ the generic cpu). */
+ new_partial = (new_flags & EF_IQ2000_CPU_MASK);
+ old_partial = (old_flags & EF_IQ2000_CPU_MASK);
+ if (new_partial == old_partial)
+ ;
+
+ else
+ {
+ switch (new_partial)
+ {
+ default: strcat (new_opt, " -m2000"); break;
+ case EF_IQ2000_CPU_IQ2000: strcat (new_opt, " -m2000"); break;
+ case EF_IQ2000_CPU_IQ10: strcat (new_opt, " -m10"); break;
+ }
+
+ switch (old_partial)
+ {
+ default: strcat (old_opt, " -m2000"); break;
+ case EF_IQ2000_CPU_IQ2000: strcat (old_opt, " -m2000"); break;
+ case EF_IQ2000_CPU_IQ10: strcat (old_opt, " -m10"); break;
+ }
+ }
+
+ /* Print out any mismatches from above. */
+ if (new_opt[0])
+ {
+ error = TRUE;
+ (*_bfd_error_handler)
+ (_("%s: compiled with %s and linked with modules compiled with %s"),
+ bfd_get_filename (ibfd), new_opt, old_opt);
+ }
+
+ new_flags &= ~ EF_IQ2000_ALL_FLAGS;
+ old_flags &= ~ EF_IQ2000_ALL_FLAGS;
+
+ /* Warn about any other mismatches. */
+ if (new_flags != old_flags)
+ {
+ error = TRUE;
+ (*_bfd_error_handler)
+ (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ }
+ }
+
+ if (error)
+ bfd_set_error (bfd_error_bad_value);
+
+ return !error;
+}
+
+
+static bfd_boolean
+iq2000_elf_print_private_bfd_data (abfd, ptr)
+ bfd *abfd;
+ PTR ptr;
+{
+ FILE *file = (FILE *) ptr;
+ flagword flags;
+
+ BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+ /* Print normal ELF private data. */
+ _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+ flags = elf_elfheader (abfd)->e_flags;
+ fprintf (file, _("private flags = 0x%lx:"), (long)flags);
+
+ switch (flags & EF_IQ2000_CPU_MASK)
+ {
+ default: break;
+ case EF_IQ2000_CPU_IQ2000: fprintf (file, " -m2000"); break;
+ case EF_IQ2000_CPU_IQ10: fprintf (file, " -m10"); break;
+ }
+
+ fputc ('\n', file);
+}
+
+static
+bfd_boolean
+iq2000_elf_object_p (abfd)
+ bfd *abfd;
+{
+ /* Irix 5 and 6 is broken. Object file symbol tables are not always
+ sorted correctly such that local symbols precede global symbols,
+ and the sh_info field in the symbol table is not always right. */
+ elf_bad_symtab (abfd) = TRUE;
+
+ bfd_default_set_arch_mach (abfd, bfd_arch_iq2000,
+ elf32_iq2000_machine (abfd));
+ return TRUE;
+}
+
+
+#define ELF_ARCH bfd_arch_iq2000
+#define ELF_MACHINE_CODE EM_IQ2000
+#define ELF_MAXPAGESIZE 0x1000
+
+#define TARGET_BIG_SYM bfd_elf32_iq2000_vec
+#define TARGET_BIG_NAME "elf32-iq2000"
+
+#define elf_info_to_howto_rel NULL
+#define elf_info_to_howto iq2000_info_to_howto_rela
+#define elf_backend_relocate_section iq2000_elf_relocate_section
+#define elf_backend_gc_mark_hook iq2000_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook iq2000_elf_gc_sweep_hook
+#define elf_backend_check_relocs iq2000_elf_check_relocs
+#define elf_backend_object_p iq2000_elf_object_p
+#define elf_backend_rela_normal 1
+
+#define elf_backend_can_gc_sections 1
+
+#define bfd_elf32_bfd_reloc_type_lookup iq2000_reloc_type_lookup
+#define bfd_elf32_bfd_set_private_flags iq2000_elf_set_private_flags
+#define bfd_elf32_bfd_copy_private_bfd_data iq2000_elf_copy_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data iq2000_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_print_private_bfd_data iq2000_elf_print_private_bfd_data
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 0875d88bd71..81c484ba5c3 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1,5 +1,5 @@
/* Motorola 68k series support for 32-bit ELF
- Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -46,6 +46,8 @@ static bfd_boolean elf_m68k_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static bfd_boolean elf_m68k_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean elf_m68k_discard_copies
+ PARAMS ((struct elf_link_hash_entry *, PTR));
static bfd_boolean elf_m68k_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -272,6 +274,8 @@ struct elf_m68k_link_hash_entry
struct elf_m68k_pcrel_relocs_copied *pcrel_relocs_copied;
};
+#define elf_m68k_hash_entry(ent) ((struct elf_m68k_link_hash_entry *) (ent))
+
/* m68k ELF linker hash table. */
struct elf_m68k_link_hash_table
@@ -282,19 +286,6 @@ struct elf_m68k_link_hash_table
struct sym_sec_cache sym_sec;
};
-/* Declare this now that the above structures are defined. */
-
-static bfd_boolean elf_m68k_discard_copies
- PARAMS ((struct elf_m68k_link_hash_entry *, PTR));
-
-/* Traverse an m68k ELF linker hash table. */
-
-#define elf_m68k_link_hash_traverse(table, func, info) \
- (elf_link_hash_traverse \
- (&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
- (info)))
-
/* Get the m68k ELF linker hash table from a link_info structure. */
#define elf_m68k_hash_table(p) \
@@ -308,28 +299,22 @@ elf_m68k_link_hash_newfunc (entry, table, string)
struct bfd_hash_table *table;
const char *string;
{
- struct elf_m68k_link_hash_entry *ret =
- (struct elf_m68k_link_hash_entry *) entry;
+ struct bfd_hash_entry *ret = entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct elf_m68k_link_hash_entry *) NULL)
- ret = ((struct elf_m68k_link_hash_entry *)
- bfd_hash_allocate (table,
- sizeof (struct elf_m68k_link_hash_entry)));
- if (ret == (struct elf_m68k_link_hash_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table,
+ sizeof (struct elf_m68k_link_hash_entry));
+ if (ret == NULL)
+ return ret;
/* Call the allocation method of the superclass. */
- ret = ((struct elf_m68k_link_hash_entry *)
- _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
- table, string));
- if (ret != (struct elf_m68k_link_hash_entry *) NULL)
- {
- ret->pcrel_relocs_copied = NULL;
- }
+ ret = _bfd_elf_link_hash_newfunc (ret, table, string);
+ if (ret != NULL)
+ elf_m68k_hash_entry (ret)->pcrel_relocs_copied = NULL;
- return (struct bfd_hash_entry *) ret;
+ return ret;
}
/* Create an m68k ELF linker hash table. */
@@ -689,10 +674,16 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
|| !bfd_set_section_alignment (dynobj, sreloc, 2))
return FALSE;
}
- if (sec->flags & SEC_READONLY)
- info->flags |= DF_TEXTREL;
}
+ if (sec->flags & SEC_READONLY
+ /* Don't set DF_TEXTREL yet for PC relative
+ relocations, they might be discarded later. */
+ && !(ELF32_R_TYPE (rel->r_info) == R_68K_PC8
+ || ELF32_R_TYPE (rel->r_info) == R_68K_PC16
+ || ELF32_R_TYPE (rel->r_info) == R_68K_PC32))
+ info->flags |= DF_TEXTREL;
+
sreloc->_raw_size += sizeof (Elf32_External_Rela);
/* We count the number of PC relative relocations we have
@@ -713,7 +704,7 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
struct elf_m68k_link_hash_entry *eh
- = (struct elf_m68k_link_hash_entry *) h;
+ = elf_m68k_hash_entry (h);
head = &eh->pcrel_relocs_copied;
}
else
@@ -1154,9 +1145,9 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
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)
- elf_m68k_link_hash_traverse (elf_m68k_hash_table (info),
- elf_m68k_discard_copies,
- (PTR) info);
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_m68k_discard_copies,
+ (PTR) info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
@@ -1282,32 +1273,53 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
return TRUE;
}
-/* This function is called via elf_m68k_link_hash_traverse if we are
+/* This function is called via elf_link_hash_traverse if we are
creating a shared object. In the -Bsymbolic case it discards the
space allocated to copy PC relative relocs against symbols which
- are defined in regular objects. For the normal shared case, if
+ are defined in regular objects. For the normal shared case, it
discards space for pc-relative relocs that have become local due to
symbol visibility changes. We allocated space for them in the
check_relocs routine, but we won't fill them in in the
- relocate_section routine. */
+ relocate_section routine.
+
+ We also check whether any of the remaining relocations apply
+ against a readonly section, and set the DF_TEXTREL flag in this
+ case. */
static bfd_boolean
elf_m68k_discard_copies (h, inf)
- struct elf_m68k_link_hash_entry *h;
+ struct elf_link_hash_entry *h;
PTR inf;
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
struct elf_m68k_pcrel_relocs_copied *s;
- if (h->root.root.type == bfd_link_hash_warning)
- h = (struct elf_m68k_link_hash_entry *) h->root.root.u.i.link;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
|| (!info->symbolic
- && (h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0))
- return TRUE;
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0))
+ {
+ if ((info->flags & DF_TEXTREL) == 0)
+ {
+ /* Look for relocations against read-only sections. */
+ for (s = elf_m68k_hash_entry (h)->pcrel_relocs_copied;
+ s != NULL;
+ s = s->next)
+ if ((s->section->flags & SEC_READONLY) != 0)
+ {
+ info->flags |= DF_TEXTREL;
+ break;
+ }
+ }
+
+ return TRUE;
+ }
- for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
+ for (s = elf_m68k_hash_entry (h)->pcrel_relocs_copied;
+ s != NULL;
+ s = s->next)
s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
return TRUE;
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 485bd2cc2ff..1399f003128 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 32-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -1917,6 +1917,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define bfd_elf32_bfd_is_local_label_name \
mips_elf_is_local_label_name
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
+#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf32_bfd_get_relocated_section_contents \
_bfd_elf_mips_get_relocated_section_contents
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
new file mode 100644
index 00000000000..694a30f1198
--- /dev/null
+++ b/bfd/elf32-msp430.c
@@ -0,0 +1,720 @@
+/* MSP430-specific support for 32-bit ELF
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libiberty.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/msp430.h"
+
+static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+
+static void msp430_info_to_howto_rela
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+
+static asection *elf32_msp430_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
+static bfd_boolean elf32_msp430_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+
+static bfd_boolean elf32_msp430_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+
+static bfd_reloc_status_type msp430_final_link_relocate
+ PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, bfd_vma));
+
+static bfd_boolean elf32_msp430_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+
+static void bfd_elf_msp430_final_write_processing
+ PARAMS ((bfd *, bfd_boolean));
+
+static bfd_boolean elf32_msp430_object_p
+ PARAMS ((bfd *));
+
+static void elf32_msp430_post_process_headers
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+/* Use RELA instead of REL. */
+#undef USE_REL
+
+static reloc_howto_type elf_msp430_howto_table[] =
+{
+ HOWTO (R_MSP430_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MSP430_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 13 bit PC relative relocation. */
+ HOWTO (R_MSP430_10_PCREL, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 10, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_13_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0xfff, /* src_mask */
+ 0xfff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 16 bit absolute relocation. */
+ HOWTO (R_MSP430_16, /* 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_MSP430_16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 16 bit absolute relocation for command address. */
+ HOWTO (R_MSP430_16_PCREL, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_16_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 16 bit absolute relocation, byte operations. */
+ HOWTO (R_MSP430_16_BYTE, /* 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_MSP430_16_BYTE", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 16 bit absolute relocation for command address. */
+ HOWTO (R_MSP430_16_PCREL_BYTE,/* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MSP430_16_PCREL_BYTE", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE) /* pcrel_offset */
+};
+
+/* Map BFD reloc types to MSP430 ELF reloc types. */
+
+struct msp430_reloc_map
+{
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned int elf_reloc_val;
+};
+
+static const struct msp430_reloc_map msp430_reloc_map[] =
+ {
+ {BFD_RELOC_NONE, R_MSP430_NONE},
+ {BFD_RELOC_32, R_MSP430_32},
+ {BFD_RELOC_MSP430_10_PCREL, R_MSP430_10_PCREL},
+ {BFD_RELOC_16, R_MSP430_16_BYTE},
+ {BFD_RELOC_MSP430_16_PCREL, R_MSP430_16_PCREL},
+ {BFD_RELOC_MSP430_16, R_MSP430_16},
+ {BFD_RELOC_MSP430_16_PCREL_BYTE, R_MSP430_16_PCREL_BYTE},
+ {BFD_RELOC_MSP430_16_BYTE, R_MSP430_16_BYTE}
+ };
+
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (msp430_reloc_map); i++)
+ if (msp430_reloc_map[i].bfd_reloc_val == code)
+ return &elf_msp430_howto_table[msp430_reloc_map[i].elf_reloc_val];
+
+ return NULL;
+}
+
+/* Set the howto pointer for an MSP430 ELF reloc. */
+
+static void
+msp430_info_to_howto_rela (abfd, cache_ptr, dst)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr;
+ Elf_Internal_Rela *dst;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (dst->r_info);
+ BFD_ASSERT (r_type < (unsigned int) R_MSP430_max);
+ cache_ptr->howto = &elf_msp430_howto_table[r_type];
+}
+
+static asection *
+elf32_msp430_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+static bfd_boolean
+elf32_msp430_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ /* We don't use got and plt entries for msp430. */
+ return TRUE;
+}
+
+/* Look through the relocs for a section during the first phase.
+ Since we don't do .gots or .plts, we just need to consider the
+ virtual table relocs for gc. */
+
+static bfd_boolean
+elf32_msp430_check_relocs (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+
+ if (info->relocateable)
+ 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 (Elf32_External_Sym);
+ if (!elf_bad_symtab (abfd))
+ sym_hashes_end -= symtab_hdr->sh_info;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ struct elf_link_hash_entry *h;
+ unsigned long r_symndx;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ }
+
+ return TRUE;
+}
+
+/* Perform a single relocation. By default we use the standard BFD
+ routines, but a few relocs, we have to do them ourselves. */
+
+static bfd_reloc_status_type
+msp430_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel, relocation)
+ reloc_howto_type *howto;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *rel;
+ bfd_vma relocation;
+{
+ bfd_reloc_status_type r = bfd_reloc_ok;
+ bfd_vma x;
+ bfd_signed_vma srel;
+
+ switch (howto->type)
+ {
+ case R_MSP430_10_PCREL:
+ contents += rel->r_offset;
+ srel = (bfd_signed_vma) relocation;
+ srel += rel->r_addend;
+ srel -= rel->r_offset;
+ srel -= 2; /* Branch instructions add 2 to the PC... */
+ srel -= (input_section->output_section->vma +
+ input_section->output_offset);
+
+ if (srel & 1)
+ return bfd_reloc_outofrange;
+
+ /* MSP430 addresses commands as words. */
+ srel >>= 1;
+
+ /* Check for an overflow. */
+ if (srel < -512 || srel > 511)
+ return bfd_reloc_overflow;
+
+ x = bfd_get_16 (input_bfd, contents);
+ x = (x & 0xfc00) | (srel & 0x3ff);
+ bfd_put_16 (input_bfd, x, contents);
+ break;
+
+ case R_MSP430_16_PCREL:
+ contents += rel->r_offset;
+ srel = (bfd_signed_vma) relocation;
+ srel += rel->r_addend;
+ srel -= rel->r_offset;
+ /* Only branch instructions add 2 to the PC... */
+ srel -= (input_section->output_section->vma +
+ input_section->output_offset);
+
+ if (srel & 1)
+ return bfd_reloc_outofrange;
+
+ bfd_put_16 (input_bfd, srel & 0xffff, contents);
+ break;
+
+ case R_MSP430_16_PCREL_BYTE:
+ contents += rel->r_offset;
+ srel = (bfd_signed_vma) relocation;
+ srel += rel->r_addend;
+ srel -= rel->r_offset;
+ /* Only branch instructions add 2 to the PC... */
+ srel -= (input_section->output_section->vma +
+ input_section->output_offset);
+
+ bfd_put_16 (input_bfd, srel & 0xffff, contents);
+ break;
+
+ case R_MSP430_16_BYTE:
+ contents += rel->r_offset;
+ srel = (bfd_signed_vma) relocation;
+ srel += rel->r_addend;
+ bfd_put_16 (input_bfd, srel & 0xffff, contents);
+ break;
+
+ case R_MSP430_16:
+ contents += rel->r_offset;
+ srel = (bfd_signed_vma) relocation;
+ srel += rel->r_addend;
+
+ if (srel & 1)
+ return bfd_reloc_notsupported;
+
+ bfd_put_16 (input_bfd, srel & 0xffff, contents);
+ break;
+
+ default:
+ r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend);
+ }
+
+ return r;
+}
+
+/* Relocate an MSP430 ELF section. */
+
+static bfd_boolean
+elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ relend = relocs + input_section->reloc_count;
+
+ for (rel = relocs; rel < relend; rel++)
+ {
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ const char *name = NULL;
+ int r_type;
+
+ /* This is a final link. */
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ howto = elf_msp430_howto_table + ELF32_R_TYPE (rel->r_info);
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+
+ name = bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name);
+ name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+ }
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ name = h->root.root.string;
+
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma + sec->output_offset);
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ {
+ relocation = 0;
+ }
+ else
+ {
+ if (!((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset, TRUE)))
+ return FALSE;
+ relocation = 0;
+ }
+ }
+
+ r = msp430_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel, relocation);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char *msg = (const char *) NULL;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ r = info->callbacks->reloc_overflow
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset);
+ break;
+
+ case bfd_reloc_undefined:
+ r = info->callbacks->undefined_symbol
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ break;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ break;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous relocation");
+ break;
+
+ default:
+ msg = _("internal error: unknown error");
+ break;
+ }
+
+ if (msg)
+ r = info->callbacks->warning
+ (info, msg, name, input_bfd, input_section, rel->r_offset);
+
+ if (!r)
+ return FALSE;
+ }
+
+ }
+
+ return TRUE;
+}
+
+/* The final processing done just before writing out a MSP430 ELF object
+ file. This gets the MSP430 architecture right based on the machine
+ number. */
+
+static void
+bfd_elf_msp430_final_write_processing (abfd, linker)
+ bfd *abfd;
+ bfd_boolean linker ATTRIBUTE_UNUSED;
+{
+ unsigned long val;
+
+ switch (bfd_get_mach (abfd))
+ {
+ default:
+ case bfd_mach_msp12:
+ val = E_MSP430_MACH_MSP430x12;
+ break;
+
+ case bfd_mach_msp110:
+ val = E_MSP430_MACH_MSP430x11x1;
+ break;
+
+ case bfd_mach_msp11:
+ val = E_MSP430_MACH_MSP430x11;
+ break;
+
+ case bfd_mach_msp13:
+ val = E_MSP430_MACH_MSP430x13;
+ break;
+
+ case bfd_mach_msp14:
+ val = E_MSP430_MACH_MSP430x14;
+ break;
+
+ case bfd_mach_msp41:
+ val = E_MSP430_MACH_MSP430x41;
+ break;
+
+ case bfd_mach_msp43:
+ val = E_MSP430_MACH_MSP430x43;
+ break;
+
+ case bfd_mach_msp44:
+ val = E_MSP430_MACH_MSP430x44;
+ break;
+
+ case bfd_mach_msp31:
+ val = E_MSP430_MACH_MSP430x31;
+ break;
+
+ case bfd_mach_msp32:
+ val = E_MSP430_MACH_MSP430x32;
+ break;
+
+ case bfd_mach_msp33:
+ val = E_MSP430_MACH_MSP430x33;
+ break;
+
+ case bfd_mach_msp15:
+ val = E_MSP430_MACH_MSP430x15;
+ break;
+
+ case bfd_mach_msp16:
+ val = E_MSP430_MACH_MSP430x16;
+ break;
+ }
+
+ elf_elfheader (abfd)->e_machine = EM_MSP430;
+ elf_elfheader (abfd)->e_flags &= ~EF_MSP430_MACH;
+ elf_elfheader (abfd)->e_flags |= val;
+}
+
+/* Set the right machine number. */
+
+static bfd_boolean
+elf32_msp430_object_p (abfd)
+ bfd *abfd;
+{
+ int e_set = bfd_mach_msp14;
+
+ if (elf_elfheader (abfd)->e_machine == EM_MSP430
+ || elf_elfheader (abfd)->e_machine == EM_MSP430_OLD)
+ {
+ int e_mach = elf_elfheader (abfd)->e_flags & EF_MSP430_MACH;
+
+ switch (e_mach)
+ {
+ default:
+ case E_MSP430_MACH_MSP430x12:
+ e_set = bfd_mach_msp12;
+ break;
+
+ case E_MSP430_MACH_MSP430x11:
+ e_set = bfd_mach_msp11;
+ break;
+
+ case E_MSP430_MACH_MSP430x11x1:
+ e_set = bfd_mach_msp110;
+ break;
+
+ case E_MSP430_MACH_MSP430x13:
+ e_set = bfd_mach_msp13;
+ break;
+
+ case E_MSP430_MACH_MSP430x14:
+ e_set = bfd_mach_msp14;
+ break;
+
+ case E_MSP430_MACH_MSP430x41:
+ e_set = bfd_mach_msp41;
+ break;
+
+ case E_MSP430_MACH_MSP430x31:
+ e_set = bfd_mach_msp31;
+ break;
+
+ case E_MSP430_MACH_MSP430x32:
+ e_set = bfd_mach_msp32;
+ break;
+
+ case E_MSP430_MACH_MSP430x33:
+ e_set = bfd_mach_msp33;
+ break;
+
+ case E_MSP430_MACH_MSP430x43:
+ e_set = bfd_mach_msp43;
+ break;
+
+ case E_MSP430_MACH_MSP430x44:
+ e_set = bfd_mach_msp44;
+ break;
+
+ case E_MSP430_MACH_MSP430x15:
+ e_set = bfd_mach_msp15;
+ break;
+
+ case E_MSP430_MACH_MSP430x16:
+ e_set = bfd_mach_msp16;
+ break;
+ }
+ }
+
+ return bfd_default_set_arch_mach (abfd, bfd_arch_msp430, e_set);
+}
+
+static void
+elf32_msp430_post_process_headers (abfd, link_info)
+ bfd *abfd;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Ehdr *i_ehdrp; /* ELF file header, internal form. */
+
+ i_ehdrp = elf_elfheader (abfd);
+
+#ifndef ELFOSABI_STANDALONE
+#define ELFOSABI_STANDALONE 255
+#endif
+
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_STANDALONE;
+}
+
+
+#define ELF_ARCH bfd_arch_msp430
+#define ELF_MACHINE_CODE EM_MSP430
+#define ELF_MACHINE_ALT1 EM_MSP430_OLD
+#define ELF_MAXPAGESIZE 1
+
+#define TARGET_LITTLE_SYM bfd_elf32_msp430_vec
+#define TARGET_LITTLE_NAME "elf32-msp430"
+
+#define elf_info_to_howto msp430_info_to_howto_rela
+#define elf_info_to_howto_rel NULL
+#define elf_backend_relocate_section elf32_msp430_relocate_section
+#define elf_backend_gc_mark_hook elf32_msp430_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_msp430_gc_sweep_hook
+#define elf_backend_check_relocs elf32_msp430_check_relocs
+#define elf_backend_can_gc_sections 1
+#define elf_backend_final_write_processing bfd_elf_msp430_final_write_processing
+#define elf_backend_object_p elf32_msp430_object_p
+#define elf_backend_post_process_headers elf32_msp430_post_process_headers
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 2406c6751b5..acd9d841b7a 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1,5 +1,5 @@
/* PowerPC-specific support for 32-bit ELF
- 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.
@@ -33,6 +33,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* RELA relocations are used here. */
+static struct bfd_hash_entry *ppc_elf_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
+ const char *string));
+static struct bfd_link_hash_table *ppc_elf_link_hash_table_create
+ PARAMS ((bfd *abfd));
+static void ppc_elf_copy_indirect_symbol
+ PARAMS ((struct elf_backend_data *bed, struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind));
static reloc_howto_type *ppc_elf_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
static void ppc_elf_info_to_howto
@@ -77,6 +85,10 @@ static bfd_boolean ppc_elf_gc_sweep_hook
const Elf_Internal_Rela *relocs));
static bfd_boolean ppc_elf_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static bfd_boolean allocate_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+static bfd_boolean readonly_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
static bfd_boolean ppc_elf_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean ppc_elf_relocate_section
@@ -134,6 +146,149 @@ static bfd_boolean ppc_elf_grok_psinfo
|| ELF_ST_VISIBILITY (H->other) != STV_DEFAULT) \
&& (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+/* The PPC linker needs to keep track of the number of relocs that it
+ decides to copy as dynamic relocs in check_relocs for each symbol.
+ This is so that it can later discard them if they are found to be
+ unnecessary. We store the information in a field extending the
+ regular ELF linker hash table. */
+
+struct ppc_elf_dyn_relocs
+{
+ struct ppc_elf_dyn_relocs *next;
+
+ /* The input section of the reloc. */
+ asection *sec;
+
+ /* Total number of relocs copied for the input section. */
+ bfd_size_type count;
+};
+
+/* PPC ELF linker hash entry. */
+
+struct ppc_elf_link_hash_entry
+{
+ struct elf_link_hash_entry root;
+
+ /* Track dynamic relocs copied for this symbol. */
+ struct ppc_elf_dyn_relocs *dyn_relocs;
+};
+
+#define ppc_elf_hash_entry(ent) ((struct ppc_elf_link_hash_entry *) (ent))
+
+/* PPC ELF linker hash table. */
+
+struct ppc_elf_link_hash_table
+{
+ struct elf_link_hash_table root;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
+};
+
+/* Get the PPC ELF linker hash table from a link_info structure. */
+
+#define ppc_elf_hash_table(p) \
+ ((struct ppc_elf_link_hash_table *) (p)->hash)
+
+/* Create an entry in a PPC ELF linker hash table. */
+
+static struct bfd_hash_entry *
+ppc_elf_link_hash_newfunc (entry, table, string)
+ 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. */
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table,
+ sizeof (struct ppc_elf_link_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
+
+ /* Call the allocation method of the superclass. */
+ entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+ if (entry != NULL)
+ ppc_elf_hash_entry (entry)->dyn_relocs = NULL;
+
+ return entry;
+}
+
+/* Create a PPC ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+ppc_elf_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct ppc_elf_link_hash_table *ret;
+
+ ret = ((struct ppc_elf_link_hash_table *)
+ bfd_malloc (sizeof (struct ppc_elf_link_hash_table)));
+ if (ret == NULL)
+ return NULL;
+
+ if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
+ ppc_elf_link_hash_newfunc))
+ {
+ free (ret);
+ return NULL;
+ }
+
+ ret->sym_sec.abfd = NULL;
+
+ return &ret->root.root;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry. */
+
+static void
+ppc_elf_copy_indirect_symbol (bed, dir, ind)
+ struct elf_backend_data *bed;
+ struct elf_link_hash_entry *dir, *ind;
+{
+ struct ppc_elf_link_hash_entry *edir, *eind;
+
+ edir = (struct ppc_elf_link_hash_entry *) dir;
+ eind = (struct ppc_elf_link_hash_entry *) ind;
+
+ if (eind->dyn_relocs != NULL)
+ {
+ if (edir->dyn_relocs != NULL)
+ {
+ struct ppc_elf_dyn_relocs **pp;
+ struct ppc_elf_dyn_relocs *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->dyn_relocs; (p = *pp) != NULL; )
+ {
+ struct ppc_elf_dyn_relocs *q;
+
+ for (q = edir->dyn_relocs; q != NULL; q = q->next)
+ if (q->sec == p->sec)
+ {
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->dyn_relocs;
+ }
+
+ edir->dyn_relocs = eind->dyn_relocs;
+ eind->dyn_relocs = NULL;
+ }
+
+ _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+}
+
static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max];
static reloc_howto_type ppc_elf_howto_raw[] = {
@@ -1903,6 +2058,65 @@ ppc_elf_adjust_dynamic_symbol (info, h)
return TRUE;
}
+/* Allocate space in associated reloc sections for dynamic relocs. */
+
+static bfd_boolean
+allocate_dynrelocs (h, info)
+ struct elf_link_hash_entry *h;
+ PTR info ATTRIBUTE_UNUSED;
+{
+ struct ppc_elf_dyn_relocs *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;
+
+ for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *sreloc = elf_section_data (p->sec)->sreloc;
+ sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ }
+
+ return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static bfd_boolean
+readonly_dynrelocs (h, info)
+ struct elf_link_hash_entry *h;
+ PTR info;
+{
+ struct ppc_elf_dyn_relocs *p;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *s = p->sec->output_section;
+
+ if (s != NULL
+ && ((s->flags & (SEC_READONLY | SEC_ALLOC))
+ == (SEC_READONLY | SEC_ALLOC)))
+ {
+ ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@@ -1914,6 +2128,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
asection *s;
bfd_boolean plt;
bfd_boolean relocs;
+ bfd *ibfd;
#ifdef DEBUG
fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
@@ -1953,6 +2168,45 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
}
}
+ /* Allocate space for local sym dynamic relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ continue;
+
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ {
+ struct ppc_elf_dyn_relocs *p;
+
+ for (p = ((struct ppc_elf_dyn_relocs *)
+ elf_section_data (s)->local_dynrel);
+ p != NULL;
+ p = p->next)
+ {
+ if (!bfd_is_abs_section (p->sec)
+ && bfd_is_abs_section (p->sec->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)
+ {
+ elf_section_data (p->sec)->sreloc->_raw_size
+ += p->count * sizeof (Elf32_External_Rela);
+ if ((p->sec->output_section->flags
+ & (SEC_READONLY | SEC_ALLOC))
+ == (SEC_READONLY | SEC_ALLOC))
+ info->flags |= DF_TEXTREL;
+ }
+ }
+ }
+ }
+
+ /* Allocate space for global sym dynamic relocs. */
+ elf_link_hash_traverse (elf_hash_table (info), allocate_dynrelocs, NULL);
+
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
@@ -2064,11 +2318,16 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
return FALSE;
}
+ /* If any dynamic relocs apply to a read-only section, then we
+ need a DT_TEXTREL entry. */
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (elf_hash_table (info), readonly_dynrelocs,
+ (PTR) info);
+
if ((info->flags & DF_TEXTREL) != 0)
{
if (!add_dynamic_entry (DT_TEXTREL, 0))
return FALSE;
- info->flags |= DF_TEXTREL;
}
}
#undef add_dynamic_entry
@@ -2403,6 +2662,9 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
default:
if (info->shared)
{
+ struct ppc_elf_dyn_relocs *p;
+ struct ppc_elf_dyn_relocs **head;
+
#ifdef DEBUG
fprintf (stderr, "ppc_elf_check_relocs need to create relocation for %s\n",
(h && h->root.root.string) ? h->root.root.string : "<unknown>");
@@ -2437,18 +2699,46 @@ ppc_elf_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_Rela);
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
+ {
+ head = &ppc_elf_hash_entry (h)->dyn_relocs;
+ }
+ 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, &ppc_elf_hash_table (info)->sym_sec,
+ sec, r_symndx));
+ if (s == NULL)
+ return FALSE;
+
+ head = ((struct ppc_elf_dyn_relocs **)
+ &elf_section_data (s)->local_dynrel);
+ }
+
+ p = *head;
+ if (p == NULL || p->sec != sec)
+ {
+ p = ((struct ppc_elf_dyn_relocs *)
+ bfd_alloc (elf_hash_table (info)->dynobj, sizeof *p));
+ if (p == NULL)
+ return FALSE;
+ p->next = *head;
+ *head = p;
+ p->sec = sec;
+ p->count = 0;
+ }
- /* FIXME: We should here do what the m68k and i386
- backends do: if the reloc is pc-relative, record it
- in case it turns out that the reloc is unnecessary
- because the symbol is forced local by versioning or
- we are linking with -Bdynamic. Fortunately this
- case is not frequent. */
+ p->count++;
}
break;
@@ -2514,6 +2804,8 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
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);
@@ -2552,9 +2844,26 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
if (h->plt.refcount > 0)
h->plt.refcount--;
}
- break;
+ /* Fall through */
default:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct ppc_elf_dyn_relocs **pp, *p;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ for (pp = &ppc_elf_hash_entry (h)->dyn_relocs;
+ (p = *pp) != NULL;
+ pp = &p->next)
+ if (p->sec == sec)
+ {
+ if (--p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
break;
}
@@ -3414,6 +3723,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = sgot->output_offset + off - 4;
}
+ if (r_type == R_PPC_GOT16_HA)
+ addend += ((relocation + addend) & 0x8000) << 1;
break;
/* Indirect .sdata relocation */
@@ -3946,7 +4257,7 @@ ppc_elf_begin_write_processing (abfd, link_info)
unsigned long datum;
char * ptr;
-
+
asec = bfd_get_section_by_name (ibfd, APUINFO_SECTION_NAME);
if (asec == NULL)
continue;
@@ -3957,7 +4268,7 @@ ppc_elf_begin_write_processing (abfd, link_info)
error_message = _("corrupt or empty %s section in %s");
goto fail;
}
-
+
if (bfd_seek (ibfd, asec->filepos, SEEK_SET) != 0
|| (bfd_bread (buffer + offset, length, ibfd) != length))
{
@@ -4011,7 +4322,7 @@ ppc_elf_begin_write_processing (abfd, link_info)
if (! bfd_set_section_size (abfd, asec, output_section_size))
ibfd = abfd,
error_message = _("warning: unable to set size of %s section in %s");
-
+
fail:
free (buffer);
@@ -4071,7 +4382,7 @@ ppc_elf_final_write_processing (abfd, linker)
bfd_put_32 (abfd, num_entries, buffer + 4);
bfd_put_32 (abfd, 0x2, buffer + 8);
strcpy (buffer + 12, APUINFO_LABEL);
-
+
length = 20;
for (i = 0; i < num_entries; i++)
{
@@ -4081,10 +4392,10 @@ ppc_elf_final_write_processing (abfd, linker)
if (length != asec->_raw_size)
_bfd_error_handler (_("failed to compute new APUinfo section."));
-
+
if (! bfd_set_section_contents (abfd, asec, buffer, (file_ptr) 0, length))
_bfd_error_handler (_("failed to install new APUinfo section."));
-
+
free (buffer);
apuinfo_list_finish ();
@@ -4120,6 +4431,7 @@ ppc_elf_final_write_processing (abfd, linker)
#define bfd_elf32_bfd_reloc_type_lookup ppc_elf_reloc_type_lookup
#define bfd_elf32_bfd_set_private_flags ppc_elf_set_private_flags
#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link
+#define bfd_elf32_bfd_link_hash_table_create ppc_elf_link_hash_table_create
#define elf_backend_object_p ppc_elf_object_p
#define elf_backend_gc_mark_hook ppc_elf_gc_mark_hook
@@ -4128,6 +4440,7 @@ ppc_elf_final_write_processing (abfd, linker)
#define elf_backend_relocate_section ppc_elf_relocate_section
#define elf_backend_create_dynamic_sections ppc_elf_create_dynamic_sections
#define elf_backend_check_relocs ppc_elf_check_relocs
+#define elf_backend_copy_indirect_symbol ppc_elf_copy_indirect_symbol
#define elf_backend_adjust_dynamic_symbol ppc_elf_adjust_dynamic_symbol
#define elf_backend_add_symbol_hook ppc_elf_add_symbol_hook
#define elf_backend_size_dynamic_sections ppc_elf_size_dynamic_sections
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index d9859b821d0..e8d94afd1c0 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -51,6 +51,9 @@ static asection *elf_s390_gc_mark_hook
static bfd_boolean elf_s390_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+struct elf_s390_link_hash_entry;
+static void elf_s390_adjust_gotplt
+ PARAMS ((struct elf_s390_link_hash_entry *));
static bfd_boolean elf_s390_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static bfd_boolean allocate_dynrelocs
@@ -69,10 +72,22 @@ static enum elf_reloc_type_class elf_s390_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
static bfd_boolean elf_s390_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean elf_s390_mkobject
+ PARAMS ((bfd *));
static bfd_boolean elf_s390_object_p
PARAMS ((bfd *));
static bfd_boolean elf_s390_grok_prstatus
PARAMS ((bfd *, Elf_Internal_Note *));
+static int elf_s390_tls_transition
+ PARAMS ((struct bfd_link_info *, int, int));
+static bfd_reloc_status_type s390_tls_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_vma dtpoff_base
+ PARAMS ((struct bfd_link_info *));
+static bfd_vma tpoff
+ PARAMS ((struct bfd_link_info *, bfd_vma));
+static void invalid_tls_insn
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *));
#include "elf/s390.h"
@@ -94,28 +109,105 @@ static reloc_howto_type elf_howto_table[] =
0, /* dst_mask */
FALSE), /* pcrel_offset */
- HOWTO(R_390_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_8", FALSE, 0,0x000000ff, FALSE),
- HOWTO(R_390_12, 0, 1, 12, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_12", FALSE, 0,0x00000fff, FALSE),
- HOWTO(R_390_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_16", FALSE, 0,0x0000ffff, FALSE),
- HOWTO(R_390_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_32", FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_GOT12, 0, 1, 12, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_GOT12", FALSE, 0,0x00000fff, FALSE),
- HOWTO(R_390_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT32", FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_COPY, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_COPY", FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GLOB_DAT",FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_JMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_JMP_SLOT",FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_RELATIVE, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_RELATIVE",FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_GOTOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTOFF", FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_GOTPC, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPC", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_GOT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT16", FALSE, 0,0x0000ffff, FALSE),
- HOWTO(R_390_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16", FALSE, 0,0x0000ffff, TRUE),
- HOWTO(R_390_PC16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16DBL", FALSE, 0,0x0000ffff, TRUE),
- HOWTO(R_390_PLT16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT16DBL", FALSE, 0,0x0000ffff, TRUE),
- HOWTO(R_390_PC32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32DBL", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_PLT32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32DBL", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_GOTPCDBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPCDBL", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_GOTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTENT", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_8", FALSE, 0,0x000000ff, FALSE),
+ HOWTO(R_390_12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_12", FALSE, 0,0x00000fff, FALSE),
+ HOWTO(R_390_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC32", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_GOT12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_GOT12", FALSE, 0,0x00000fff, FALSE),
+ HOWTO(R_390_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOT32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT32", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_COPY, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_COPY", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GLOB_DAT", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_JMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_JMP_SLOT", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_RELATIVE, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_RELATIVE", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_GOTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTOFF32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_GOTPC, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPC", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_GOT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOT16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC16", FALSE, 0,0x0000ffff, TRUE),
+ HOWTO(R_390_PC16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC16DBL", FALSE, 0,0x0000ffff, TRUE),
+ HOWTO(R_390_PLT16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT16DBL", FALSE, 0,0x0000ffff, TRUE),
+ HOWTO(R_390_PC32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC32DBL", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_PLT32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT32DBL", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_GOTPCDBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPCDBL", FALSE, 0,0xffffffff, TRUE),
+ EMPTY_HOWTO (R_390_64), /* Empty entry for R_390_64. */
+ EMPTY_HOWTO (R_390_PC64), /* Empty entry for R_390_PC64. */
+ EMPTY_HOWTO (R_390_GOT64), /* Empty entry for R_390_GOT64. */
+ EMPTY_HOWTO (R_390_PLT64), /* Empty entry for R_390_PLT64. */
+ HOWTO(R_390_GOTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTENT", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_GOTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTOFF16", FALSE, 0,0x0000ffff, FALSE),
+ EMPTY_HOWTO (R_390_GOTOFF64), /* Empty entry for R_390_GOTOFF64. */
+ HOWTO(R_390_GOTPLT12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_GOTPLT12", FALSE, 0,0x00000fff, FALSE),
+ HOWTO(R_390_GOTPLT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLT16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_GOTPLT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLT32", FALSE, 0,0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_GOTPLT64), /* Empty entry for R_390_GOTPLT64. */
+ HOWTO(R_390_GOTPLTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLTENT",FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_PLTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLTOFF16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_PLTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLTOFF32", FALSE, 0,0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_PLTOFF64), /* Empty entry for R_390_PLTOFF64. */
+ HOWTO(R_390_TLS_LOAD, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ s390_tls_reloc, "R_390_TLS_LOAD", FALSE, 0, 0, FALSE),
+ HOWTO(R_390_TLS_GDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ s390_tls_reloc, "R_390_TLS_GDCALL", FALSE, 0, 0, FALSE),
+ HOWTO(R_390_TLS_LDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ s390_tls_reloc, "R_390_TLS_LDCALL", FALSE, 0, 0, FALSE),
+ HOWTO(R_390_TLS_GD32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_GD32", FALSE, 0, 0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_GD64), /* Empty entry for R_390_TLS_GD64. */
+ HOWTO(R_390_TLS_GOTIE12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_TLS_GOTIE12", FALSE, 0, 0x00000fff, FALSE),
+ HOWTO(R_390_TLS_GOTIE32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_GOTIE32", FALSE, 0, 0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_GOTIE64), /* Empty entry for R_390_TLS_GOTIE64. */
+ HOWTO(R_390_TLS_LDM32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_LDM32", FALSE, 0, 0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_LDM64), /* Empty entry for R_390_TLS_LDM64. */
+ HOWTO(R_390_TLS_IE32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_IE32", FALSE, 0, 0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_IE64), /* Empty entry for R_390_TLS_IE64. */
+ HOWTO(R_390_TLS_IEENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_IEENT", FALSE, 0, 0xffffffff, TRUE),
+ HOWTO(R_390_TLS_LE32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_LE32", FALSE, 0, 0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_LE64), /* Empty entry for R_390_TLS_LE64. */
+ HOWTO(R_390_TLS_LDO32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_LDO32", FALSE, 0, 0xffffffff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_LDO64), /* Empty entry for R_390_TLS_LDO64. */
+ HOWTO(R_390_TLS_DTPMOD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_DTPMOD", FALSE, 0, 0xffffffff, FALSE),
+ HOWTO(R_390_TLS_DTPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", FALSE, 0, 0xffffffff, FALSE),
+ HOWTO(R_390_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_TPOFF", FALSE, 0, 0xffffffff, FALSE),
};
/* GNU extension to record C++ vtable hierarchy. */
@@ -160,7 +252,7 @@ elf_s390_reloc_type_lookup (abfd, code)
case BFD_RELOC_390_RELATIVE:
return &elf_howto_table[(int) R_390_RELATIVE];
case BFD_RELOC_32_GOTOFF:
- return &elf_howto_table[(int) R_390_GOTOFF];
+ return &elf_howto_table[(int) R_390_GOTOFF32];
case BFD_RELOC_390_GOTPC:
return &elf_howto_table[(int) R_390_GOTPC];
case BFD_RELOC_390_GOT16:
@@ -179,6 +271,48 @@ elf_s390_reloc_type_lookup (abfd, code)
return &elf_howto_table[(int) R_390_GOTPCDBL];
case BFD_RELOC_390_GOTENT:
return &elf_howto_table[(int) R_390_GOTENT];
+ case BFD_RELOC_16_GOTOFF:
+ return &elf_howto_table[(int) R_390_GOTOFF16];
+ case BFD_RELOC_390_GOTPLT12:
+ return &elf_howto_table[(int) R_390_GOTPLT12];
+ case BFD_RELOC_390_GOTPLT16:
+ return &elf_howto_table[(int) R_390_GOTPLT16];
+ case BFD_RELOC_390_GOTPLT32:
+ return &elf_howto_table[(int) R_390_GOTPLT32];
+ case BFD_RELOC_390_GOTPLTENT:
+ return &elf_howto_table[(int) R_390_GOTPLTENT];
+ case BFD_RELOC_390_PLTOFF16:
+ return &elf_howto_table[(int) R_390_PLTOFF16];
+ case BFD_RELOC_390_PLTOFF32:
+ return &elf_howto_table[(int) R_390_PLTOFF32];
+ case BFD_RELOC_390_TLS_LOAD:
+ return &elf_howto_table[(int) R_390_TLS_LOAD];
+ case BFD_RELOC_390_TLS_GDCALL:
+ return &elf_howto_table[(int) R_390_TLS_GDCALL];
+ case BFD_RELOC_390_TLS_LDCALL:
+ return &elf_howto_table[(int) R_390_TLS_LDCALL];
+ case BFD_RELOC_390_TLS_GD32:
+ return &elf_howto_table[(int) R_390_TLS_GD32];
+ case BFD_RELOC_390_TLS_GOTIE12:
+ return &elf_howto_table[(int) R_390_TLS_GOTIE12];
+ case BFD_RELOC_390_TLS_GOTIE32:
+ return &elf_howto_table[(int) R_390_TLS_GOTIE32];
+ case BFD_RELOC_390_TLS_LDM32:
+ return &elf_howto_table[(int) R_390_TLS_LDM32];
+ case BFD_RELOC_390_TLS_IE32:
+ return &elf_howto_table[(int) R_390_TLS_IE32];
+ case BFD_RELOC_390_TLS_IEENT:
+ return &elf_howto_table[(int) R_390_TLS_IEENT];
+ case BFD_RELOC_390_TLS_LE32:
+ return &elf_howto_table[(int) R_390_TLS_LE32];
+ case BFD_RELOC_390_TLS_LDO32:
+ return &elf_howto_table[(int) R_390_TLS_LDO32];
+ case BFD_RELOC_390_TLS_DTPMOD:
+ return &elf_howto_table[(int) R_390_TLS_DTPMOD];
+ case BFD_RELOC_390_TLS_DTPOFF:
+ return &elf_howto_table[(int) R_390_TLS_DTPOFF];
+ case BFD_RELOC_390_TLS_TPOFF:
+ return &elf_howto_table[(int) R_390_TLS_TPOFF];
case BFD_RELOC_VTABLE_INHERIT:
return &elf32_s390_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
@@ -214,6 +348,23 @@ elf_s390_info_to_howto (abfd, cache_ptr, dst)
}
}
+/* A relocation function which doesn't do anything. */
+static bfd_reloc_status_type
+s390_tls_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;
+{
+ if (output_bfd)
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+}
+
static bfd_boolean
elf_s390_is_local_label_name (abfd, name)
bfd *abfd;
@@ -413,8 +564,62 @@ struct elf_s390_link_hash_entry
/* Track dynamic relocs copied for this symbol. */
struct elf_s390_dyn_relocs *dyn_relocs;
+
+ /* Number of GOTPLT references for a function. */
+ bfd_signed_vma gotplt_refcount;
+
+#define GOT_UNKNOWN 0
+#define GOT_NORMAL 1
+#define GOT_TLS_GD 2
+#define GOT_TLS_IE 3
+#define GOT_TLS_IE_NLT 4
+ unsigned char tls_type;
+};
+
+#define elf_s390_hash_entry(ent) \
+ ((struct elf_s390_link_hash_entry *)(ent))
+
+struct elf_s390_obj_tdata
+{
+ struct elf_obj_tdata root;
+
+ /* tls_type for each local got entry. */
+ char *local_got_tls_type;
};
+#define elf_s390_tdata(abfd) \
+ ((struct elf_s390_obj_tdata *) (abfd)->tdata.any)
+
+#define elf_s390_local_got_tls_type(abfd) \
+ (elf_s390_tdata (abfd)->local_got_tls_type)
+
+static bfd_boolean
+elf_s390_mkobject (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ return TRUE;
+}
+
+static bfd_boolean
+elf_s390_object_p (abfd)
+ bfd *abfd;
+{
+ /* Allocate our special target data. */
+ struct elf_s390_obj_tdata *new_tdata;
+ bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
+ new_tdata = bfd_zalloc (abfd, amt);
+ if (new_tdata == NULL)
+ return FALSE;
+ new_tdata->root = *abfd->tdata.elf_obj_data;
+ abfd->tdata.any = new_tdata;
+ /* Set the right machine number for an s390 elf32 file. */
+ return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_31);
+}
+
/* s390 ELF linker hash table. */
struct elf_s390_link_hash_table
@@ -430,6 +635,11 @@ struct elf_s390_link_hash_table
asection *sdynbss;
asection *srelbss;
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tls_ldm_got;
+
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
};
@@ -465,6 +675,8 @@ link_hash_newfunc (entry, table, string)
eh = (struct elf_s390_link_hash_entry *) entry;
eh->dyn_relocs = NULL;
+ eh->gotplt_refcount = 0;
+ eh->tls_type = GOT_UNKNOWN;
}
return entry;
@@ -496,6 +708,7 @@ elf_s390_link_hash_table_create (abfd)
ret->srelplt = NULL;
ret->sdynbss = NULL;
ret->srelbss = NULL;
+ ret->tls_ldm_got.refcount = 0;
ret->sym_sec.abfd = NULL;
return &ret->elf.root;
@@ -608,9 +821,43 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
eind->dyn_relocs = NULL;
}
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
+
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
+static int
+elf_s390_tls_transition (info, r_type, is_local)
+ struct bfd_link_info *info;
+ int r_type;
+ int is_local;
+{
+ if (info->shared)
+ return r_type;
+
+ switch (r_type)
+ {
+ case R_390_TLS_GD32:
+ case R_390_TLS_IE32:
+ if (is_local)
+ return R_390_TLS_LE32;
+ return R_390_TLS_IE32;
+ case R_390_TLS_GOTIE32:
+ if (is_local)
+ return R_390_TLS_LE32;
+ return R_390_TLS_GOTIE32;
+ case R_390_TLS_LDM32:
+ return R_390_TLS_LE32;
+ }
+
+ return r_type;
+}
+
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
table. */
@@ -628,6 +875,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
asection *sreloc;
+ bfd_signed_vma *local_got_refcounts;
+ int tls_type, old_tls_type;
if (info->relocateable)
return TRUE;
@@ -635,12 +884,14 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
htab = elf_s390_hash_table (info);
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
sreloc = NULL;
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
+ unsigned int r_type;
unsigned long r_symndx;
struct elf_link_hash_entry *h;
@@ -659,40 +910,45 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- switch (ELF32_R_TYPE (rel->r_info))
+ /* Create got section and local_got_refcounts array if they
+ are needed. */
+ r_type = elf_s390_tls_transition (info,
+ ELF32_R_TYPE (rel->r_info),
+ h == NULL);
+ switch (r_type)
{
case R_390_GOT12:
- case R_390_GOT16:
+ case R_390_GOT16:
case R_390_GOT32:
case R_390_GOTENT:
- /* This symbol requires a global offset table entry. */
- if (h != NULL)
- {
- h->got.refcount += 1;
- }
- else
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLTENT:
+ case R_390_TLS_GD32:
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_GOTIE32:
+ case R_390_TLS_IEENT:
+ case R_390_TLS_IE32:
+ case R_390_TLS_LDM32:
+ if (h == NULL
+ && local_got_refcounts == 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);
+ bfd_size_type size;
+
+ size = symtab_hdr->sh_info;
+ size *= (sizeof (bfd_signed_vma) + sizeof(char));
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_zalloc (abfd, size));
if (local_got_refcounts == NULL)
- {
- bfd_size_type size;
-
- size = symtab_hdr->sh_info;
- size *= sizeof (bfd_signed_vma);
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
- if (local_got_refcounts == NULL)
- return FALSE;
- elf_local_got_refcounts (abfd) = local_got_refcounts;
- }
- local_got_refcounts[r_symndx] += 1;
+ return FALSE;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ elf_s390_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + symtab_hdr->sh_info);
}
- /* Fall through */
-
- case R_390_GOTOFF:
+ /* Fall through. */
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
case R_390_GOTPC:
case R_390_GOTPCDBL:
if (htab->sgot == NULL)
@@ -702,11 +958,22 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (!create_got_section (htab->elf.dynobj, info))
return FALSE;
}
+ }
+
+ switch (r_type)
+ {
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ /* Got is created, nothing to be done. */
break;
case R_390_PLT16DBL:
case R_390_PLT32DBL:
case R_390_PLT32:
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
/* 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
@@ -716,13 +983,118 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
/* If this is a local symbol, we resolve it directly without
creating a procedure linkage table entry. */
- if (h == NULL)
- continue;
+ if (h != NULL)
+ {
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount += 1;
+ }
+ break;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- h->plt.refcount += 1;
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLTENT:
+ /* This symbol requires either a procedure linkage table entry
+ or an entry in the local got. We actually build the entry
+ in adjust_dynamic_symbol because whether this is really a
+ global reference can change and with it the fact if we have
+ to create a plt entry or a local got entry. To be able to
+ make a once global symbol a local one we have to keep track
+ of the number of gotplt references that exist for this
+ symbol. */
+ if (h != NULL)
+ {
+ ((struct elf_s390_link_hash_entry *) h)->gotplt_refcount++;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount += 1;
+ }
+ else
+ local_got_refcounts[r_symndx] += 1;
break;
+ case R_390_TLS_LDM32:
+ htab->tls_ldm_got.refcount += 1;
+ break;
+
+ case R_390_TLS_IE32:
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_GOTIE32:
+ case R_390_TLS_IEENT:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOTENT:
+ case R_390_TLS_GD32:
+ /* This symbol requires a global offset table entry. */
+ switch (r_type)
+ {
+ default:
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOTENT:
+ tls_type = GOT_NORMAL;
+ break;
+ case R_390_TLS_GD32:
+ tls_type = GOT_TLS_GD;
+ break;
+ case R_390_TLS_IE32:
+ case R_390_TLS_GOTIE32:
+ tls_type = GOT_TLS_IE;
+ break;
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_IEENT:
+ tls_type = GOT_TLS_IE_NLT;
+ break;
+ }
+
+ if (h != NULL)
+ {
+ h->got.refcount += 1;
+ old_tls_type = elf_s390_hash_entry(h)->tls_type;
+ }
+ else
+ {
+ local_got_refcounts[r_symndx] += 1;
+ old_tls_type = elf_s390_local_got_tls_type (abfd) [r_symndx];
+ }
+ /* If a TLS symbol is accessed using IE at least once,
+ there is no point to use dynamic model for it. */
+ if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN)
+ {
+ if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: `%s' accessed both as normal and thread local symbol"),
+ bfd_archive_filename (abfd), h->root.root.string);
+ return FALSE;
+ }
+ if (old_tls_type > tls_type)
+ tls_type = old_tls_type;
+ }
+
+ if (old_tls_type != tls_type)
+ {
+ if (h != NULL)
+ elf_s390_hash_entry (h)->tls_type = tls_type;
+ else
+ elf_s390_local_got_tls_type (abfd) [r_symndx] = tls_type;
+ }
+
+ if (r_type != R_390_TLS_IE32)
+ break;
+ /* Fall through */
+
+ case R_390_TLS_LE32:
+ if (!info->shared)
+ break;
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
case R_390_8:
case R_390_16:
case R_390_32:
@@ -955,6 +1327,7 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
unsigned long r_symndx;
+ int r_type;
struct elf_link_hash_entry *h;
elf_section_data (sec)->local_dynrel = NULL;
@@ -965,86 +1338,153 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_390_GOT12:
- case R_390_GOT16:
- case R_390_GOT32:
- case R_390_GOTOFF:
- case R_390_GOTPC:
- case R_390_GOTPCDBL:
- case R_390_GOTENT:
- 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;
+ {
+ r_symndx = ELF32_R_SYM (rel->r_info);
- case R_390_8:
- case R_390_12:
- case R_390_16:
- case R_390_32:
- case R_390_PC16:
- case R_390_PC16DBL:
- case R_390_PC32DBL:
- case R_390_PC32:
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- struct elf_s390_link_hash_entry *eh;
- struct elf_s390_dyn_relocs **pp;
- struct elf_s390_dyn_relocs *p;
-
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- if (!info->shared && h->plt.refcount > 0)
- h->plt.refcount -= 1;
-
- eh = (struct elf_s390_link_hash_entry *) h;
-
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
- if (p->sec == sec)
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ r_type = elf_s390_tls_transition (info,
+ ELF32_R_TYPE (rel->r_info),
+ r_symndx >= symtab_hdr->sh_info);
+ switch (r_type)
+ {
+ case R_390_TLS_LDM32:
+ if (elf_s390_hash_table (info)->tls_ldm_got.refcount > 0)
+ elf_s390_hash_table (info)->tls_ldm_got.refcount -= 1;
+ break;
+
+ case R_390_TLS_GD32:
+ case R_390_TLS_IE32:
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_GOTIE32:
+ case R_390_TLS_IEENT:
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ case R_390_GOTENT:
+ if (h != NULL)
+ {
+ 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;
+ }
+ if (r_type != R_390_TLS_IE32)
+ break;
+ /* Fall through */
+
+ case R_390_TLS_LE32:
+ if (!info->shared)
+ break;
+ /* Fall through */
+
+ case R_390_8:
+ case R_390_12:
+ case R_390_16:
+ case R_390_32:
+ case R_390_PC16:
+ case R_390_PC16DBL:
+ case R_390_PC32DBL:
+ case R_390_PC32:
+ if (h != NULL)
+ {
+ struct elf_s390_link_hash_entry *eh;
+ struct elf_s390_dyn_relocs **pp;
+ struct elf_s390_dyn_relocs *p;
+
+ if (!info->shared && h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+
+ eh = (struct elf_s390_link_hash_entry *) h;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ if (ELF32_R_TYPE (rel->r_info) == R_390_PC16
+ || ELF32_R_TYPE (rel->r_info) == R_390_PC16DBL
+ || ELF32_R_TYPE (rel->r_info) == R_390_PC32DBL
+ || ELF32_R_TYPE (rel->r_info) == R_390_PC32)
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32DBL:
+ case R_390_PLT32:
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ if (h != NULL)
+ {
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ break;
+
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLTENT:
+ if (h != NULL)
+ {
+ if (h->plt.refcount > 0)
{
- if (ELF32_R_TYPE (rel->r_info) == R_390_PC16
- || ELF32_R_TYPE (rel->r_info) == R_390_PC16DBL
- || ELF32_R_TYPE (rel->r_info) == R_390_PC32DBL
- || ELF32_R_TYPE (rel->r_info) == R_390_PC32)
- p->pc_count -= 1;
- p->count -= 1;
- if (p->count == 0)
- *pp = p->next;
- break;
+ ((struct elf_s390_link_hash_entry *) h)->gotplt_refcount--;
+ h->plt.refcount -= 1;
}
- }
- break;
-
- case R_390_PLT16DBL:
- case R_390_PLT32DBL:
- case R_390_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;
+ }
+ else if (local_got_refcounts != NULL)
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx] -= 1;
+ }
+ break;
- default:
- break;
- }
+ default:
+ break;
+ }
+ }
return TRUE;
}
+/* Make sure we emit a GOT entry if the symbol was supposed to have a PLT
+ entry but we found we will not create any. Called when we find we will
+ not have any PLT for this symbol, by for example
+ elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link,
+ or elf_s390_size_dynamic_sections if no dynamic sections will be
+ created (we're only linking static objects). */
+
+static void
+elf_s390_adjust_gotplt (h)
+ struct elf_s390_link_hash_entry *h;
+{
+ if (h->elf.root.type == bfd_link_hash_warning)
+ h = (struct elf_s390_link_hash_entry *) h->elf.root.u.i.link;
+
+ if (h->gotplt_refcount <= 0)
+ return;
+
+ /* We simply add the number of gotplt references to the number
+ * of got references for this symbol. */
+ h->elf.got.refcount += h->gotplt_refcount;
+ h->gotplt_refcount = -1;
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -1082,6 +1522,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
linkage table, and we can just do a PC32 reloc instead. */
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
return TRUE;
@@ -1218,6 +1659,9 @@ allocate_dynrelocs (h, inf)
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;
@@ -1272,18 +1716,41 @@ allocate_dynrelocs (h, inf)
{
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
}
else
{
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
- if (h->got.refcount > 0)
+ /* If R_390_TLS_{IE32,GOTIE32,GOTIE12,IEENT} symbol is now local to
+ the binary, we can optimize a bit. IE32 and GOTIE32 get converted
+ to R_390_TLS_LE32 requiring no TLS entry. For GOTIE12 and IEENT
+ we can save the dynamic TLS relocation. */
+ if (h->got.refcount > 0
+ && !info->shared
+ && h->dynindx == -1
+ && elf_s390_hash_entry(h)->tls_type >= GOT_TLS_IE)
{
+ if (elf_s390_hash_entry(h)->tls_type == GOT_TLS_IE_NLT)
+ /* For the GOTIE access without a literal pool entry the offset has
+ to be stored somewhere. The immediate value in the instruction
+ is not bit enough so the value is stored in the got. */
+ {
+ h->got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += GOT_ENTRY_SIZE;
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+ }
+ else if (h->got.refcount > 0)
+ {
asection *s;
bfd_boolean dyn;
+ int tls_type = elf_s390_hash_entry(h)->tls_type;
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
@@ -1297,8 +1764,18 @@ allocate_dynrelocs (h, inf)
s = htab->sgot;
h->got.offset = s->_raw_size;
s->_raw_size += GOT_ENTRY_SIZE;
+ /* R_390_TLS_GD32 needs 2 consecutive GOT slots. */
+ if (tls_type == GOT_TLS_GD)
+ s->_raw_size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ /* R_390_TLS_IE32 needs one dynamic relocation,
+ R_390_TLS_GD32 needs one if local symbol and two if global. */
+ if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ || tls_type >= GOT_TLS_IE)
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ else if (tls_type == GOT_TLS_GD)
+ htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
}
else
@@ -1444,6 +1921,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
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 *srela;
@@ -1485,14 +1963,17 @@ elf_s390_size_dynamic_sections (output_bfd, info)
symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
locsymcount = symtab_hdr->sh_info;
end_local_got = local_got + locsymcount;
+ local_tls_type = elf_s390_local_got_tls_type (ibfd);
s = htab->sgot;
srela = htab->srelgot;
- for (; local_got < end_local_got; ++local_got)
+ for (; local_got < end_local_got; ++local_got, ++local_tls_type)
{
if (*local_got > 0)
{
*local_got = s->_raw_size;
s->_raw_size += GOT_ENTRY_SIZE;
+ if (*local_tls_type == GOT_TLS_GD)
+ s->_raw_size += GOT_ENTRY_SIZE;
if (info->shared)
srela->_raw_size += sizeof (Elf32_External_Rela);
}
@@ -1501,6 +1982,17 @@ elf_s390_size_dynamic_sections (output_bfd, info)
}
}
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ /* Allocate 2 got entries and 1 dynamic reloc for R_390_TLS_LDM32
+ relocs. */
+ htab->tls_ldm_got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ htab->tls_ldm_got.offset = -1;
+
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
@@ -1611,6 +2103,58 @@ elf_s390_size_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Return the base VMA address which should be subtracted from real addresses
+ when resolving @dtpoff relocation.
+ This is PT_TLS segment p_vaddr. */
+
+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)
+ return 0;
+ return elf_hash_table (info)->tls_segment->start;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+static bfd_vma
+tpoff (info, address)
+ struct bfd_link_info *info;
+ bfd_vma address;
+{
+ struct elf_link_tls_segment *tls_segment
+ = elf_hash_table (info)->tls_segment;
+
+ /* If tls_segment is NULL, we should have signalled an error already. */
+ if (tls_segment == NULL)
+ return 0;
+ return (align_power (tls_segment->size, tls_segment->align)
+ + tls_segment->start - address);
+}
+
+/* Complain if TLS instruction relocation is against an invalid
+ instruction. */
+
+static void
+invalid_tls_insn (input_bfd, input_section, rel)
+ bfd *input_bfd;
+ asection *input_section;
+ Elf_Internal_Rela *rel;
+{
+ reloc_howto_type *howto;
+
+ howto = elf_howto_table + ELF32_R_TYPE (rel->r_info);
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): invalid instruction for TLS relocation %s"),
+ bfd_archive_filename (input_bfd),
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset,
+ howto->name);
+}
+
/* Relocate a 390 ELF section. */
static bfd_boolean
@@ -1644,7 +2188,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
relend = relocs + input_section->reloc_count;
for (; rel < relend; rel++)
{
- int r_type;
+ unsigned int r_type;
reloc_howto_type *howto;
unsigned long r_symndx;
struct elf_link_hash_entry *h;
@@ -1654,12 +2198,13 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_reloc_status_type r;
+ int tls_type;
r_type = ELF32_R_TYPE (rel->r_info);
if (r_type == (int) R_390_GNU_VTINHERIT
|| r_type == (int) R_390_GNU_VTENTRY)
continue;
- if (r_type < 0 || r_type >= (int) R_390_max)
+ if (r_type >= (int) R_390_max)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1667,6 +2212,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
howto = elf_howto_table + r_type;
r_symndx = ELF32_R_SYM (rel->r_info);
+
+ /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -1723,6 +2270,39 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
switch (r_type)
{
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLTENT:
+ /* There are three cases for a GOTPLT relocation. 1) The
+ relocation is against the jump slot entry of a plt that
+ will get emitted to the output file. 2) The relocation
+ is against the jump slot of a plt entry that has been
+ removed. elf_s390_adjust_gotplt has created a GOT entry
+ as replacement. 3) The relocation is against a local symbol.
+ Cases 2) and 3) are the same as the GOT relocation code
+ so we just have to test for case 1 and fall through for
+ the other two. */
+ if (h != NULL && h->plt.offset != (bfd_vma) -1)
+ {
+ bfd_vma plt_index;
+
+ /* Calc. index no.
+ Current offset - size first entry / entry size. */
+ plt_index = (h->plt.offset - PLT_FIRST_ENTRY_SIZE) /
+ PLT_ENTRY_SIZE;
+
+ /* Offset in GOT is PLT index plus GOT headers(3) times 4,
+ addr & GOT addr. */
+ relocation = (plt_index + 3) * GOT_ENTRY_SIZE;
+ unresolved_reloc = FALSE;
+
+ if (r_type == R_390_GOTPLTENT)
+ relocation += htab->sgot->output_section->vma;
+ break;
+ }
+ /* Fall through. */
+
case R_390_GOT12:
case R_390_GOT16:
case R_390_GOT32:
@@ -1821,12 +2401,14 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
* between the start of the GOT and the symbols entry. We
* add the vma of the GOT to get the correct value.
*/
- if (r_type == R_390_GOTENT)
+ if ( r_type == R_390_GOTENT
+ || r_type == R_390_GOTPLTENT)
relocation += htab->sgot->output_section->vma;
break;
- case R_390_GOTOFF:
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
/* Relocation is relative to the start of the global offset
table. */
@@ -1871,6 +2453,28 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
unresolved_reloc = FALSE;
break;
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table relative to the start of the GOT. */
+
+ /* For local symbols or if we didn't make a PLT entry for
+ this symbol resolve the symbol directly. */
+ if ( h == NULL
+ || h->plt.offset == (bfd_vma) -1
+ || htab->splt == NULL)
+ {
+ relocation -= htab->sgot->output_section->vma;
+ break;
+ }
+
+ relocation = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset
+ - htab->sgot->output_section->vma);
+ unresolved_reloc = FALSE;
+ break;
+
case R_390_8:
case R_390_16:
case R_390_32:
@@ -1969,6 +2573,330 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
}
break;
+ /* Relocations for tls literal pool entries. */
+ case R_390_TLS_IE32:
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ asection *sreloc;
+ bfd_byte *loc;
+
+ outrel.r_offset = rel->r_offset
+ + input_section->output_section->vma
+ + input_section->output_offset;
+ outrel.r_info = ELF32_R_INFO (0, R_390_RELATIVE);
+ sreloc = elf_section_data (input_section)->sreloc;
+ if (sreloc == NULL)
+ abort ();
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
+ }
+ /* Fall through */
+
+ case R_390_TLS_GD32:
+ case R_390_TLS_GOTIE32:
+ r_type = elf_s390_tls_transition (info, r_type, h == NULL);
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf_s390_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ {
+ tls_type = elf_s390_hash_entry(h)->tls_type;
+ if (!info->shared && h->dynindx == -1 && tls_type >= GOT_TLS_IE)
+ r_type = R_390_TLS_LE32;
+ }
+ if (r_type == R_390_TLS_GD32 && tls_type >= GOT_TLS_IE)
+ r_type = R_390_TLS_IE32;
+
+ if (r_type == R_390_TLS_LE32)
+ {
+ /* This relocation gets optimized away by the local exec
+ access optimization. */
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_32 (output_bfd, -tpoff (info, relocation),
+ contents + rel->r_offset);
+ continue;
+ }
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ if (h != NULL)
+ off = h->got.offset;
+ else
+ {
+ if (local_got_offsets == NULL)
+ abort ();
+
+ off = local_got_offsets[r_symndx];
+ }
+
+ emit_tls_relocs:
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+ int dr_type, indx;
+
+ if (htab->srelgot == NULL)
+ abort ();
+
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off);
+
+ indx = h && h->dynindx != -1 ? h->dynindx : 0;
+ if (r_type == R_390_TLS_GD32)
+ dr_type = R_390_TLS_DTPMOD;
+ else
+ dr_type = R_390_TLS_TPOFF;
+ if (dr_type == R_390_TLS_TPOFF && indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ outrel.r_info = ELF32_R_INFO (indx, dr_type);
+ loc = htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++
+ * sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+
+ if (r_type == R_390_TLS_GD32)
+ {
+ if (indx == 0)
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_32 (output_bfd,
+ relocation - dtpoff_base (info),
+ htab->sgot->contents + off + GOT_ENTRY_SIZE);
+ }
+ else
+ {
+ outrel.r_info = ELF32_R_INFO (indx, R_390_TLS_DTPOFF);
+ outrel.r_offset += GOT_ENTRY_SIZE;
+ outrel.r_addend = 0;
+ htab->srelgot->reloc_count++;
+ loc += sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+ }
+ }
+
+ if (h != NULL)
+ h->got.offset |= 1;
+ else
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ if (off >= (bfd_vma) -2)
+ abort ();
+ if (r_type == ELF32_R_TYPE (rel->r_info))
+ {
+ relocation = htab->sgot->output_offset + off;
+ if (r_type == R_390_TLS_IE32 || r_type == R_390_TLS_IEENT)
+ relocation += htab->sgot->output_section->vma;
+ unresolved_reloc = FALSE;
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, htab->sgot->output_offset + off,
+ contents + rel->r_offset);
+ continue;
+ }
+ break;
+
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_IEENT:
+ if (h == NULL)
+ {
+ if (local_got_offsets == NULL)
+ abort();
+ off = local_got_offsets[r_symndx];
+ if (info->shared)
+ goto emit_tls_relocs;
+ }
+ else
+ {
+ off = h->got.offset;
+ tls_type = elf_s390_hash_entry(h)->tls_type;
+ if (info->shared || h->dynindx != -1 || tls_type < GOT_TLS_IE)
+ goto emit_tls_relocs;
+ }
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_32 (output_bfd, -tpoff (info, relocation),
+ htab->sgot->contents + off);
+ relocation = htab->sgot->output_offset + off;
+ if (r_type == R_390_TLS_IEENT)
+ relocation += htab->sgot->output_section->vma;
+ unresolved_reloc = FALSE;
+ break;
+
+ case R_390_TLS_LDM32:
+ if (! info->shared)
+ /* The literal pool entry this relocation refers to gets ignored
+ by the optimized code of the local exec model. Do nothing
+ and the value will turn out zero. */
+ continue;
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ off = htab->tls_ldm_got.offset;
+ if (off & 1)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+
+ if (htab->srelgot == NULL)
+ abort ();
+
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off);
+
+ bfd_put_32 (output_bfd, 0,
+ htab->sgot->contents + off + GOT_ENTRY_SIZE);
+ outrel.r_info = ELF32_R_INFO (0, R_390_TLS_DTPMOD);
+ outrel.r_addend = 0;
+ loc = htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++
+ * sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+ htab->tls_ldm_got.offset |= 1;
+ }
+ relocation = htab->sgot->output_offset + off;
+ unresolved_reloc = FALSE;
+ break;
+
+ case R_390_TLS_LE32:
+ if (info->shared)
+ {
+ /* Linking a shared library with non-fpic code requires
+ a R_390_TLS_TPOFF relocation. */
+ Elf_Internal_Rela outrel;
+ asection *sreloc;
+ bfd_byte *loc;
+ int indx;
+
+ outrel.r_offset = rel->r_offset
+ + input_section->output_section->vma
+ + input_section->output_offset;
+ if (h != NULL && h->dynindx != -1)
+ indx = h->dynindx;
+ else
+ indx = 0;
+ outrel.r_info = ELF32_R_INFO (indx, R_390_TLS_TPOFF);
+ if (indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ sreloc = elf_section_data (input_section)->sreloc;
+ if (sreloc == NULL)
+ abort ();
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+ }
+ else
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_32 (output_bfd, -tpoff (info, relocation),
+ contents + rel->r_offset);
+ }
+ continue;
+
+ case R_390_TLS_LDO32:
+ if (info->shared || (input_section->flags & SEC_CODE) == 0)
+ relocation -= dtpoff_base (info);
+ else
+ /* When converting LDO to LE, we must negate. */
+ relocation = -tpoff (info, relocation);
+ break;
+
+ /* Relocations for tls instructions. */
+ case R_390_TLS_LOAD:
+ case R_390_TLS_GDCALL:
+ case R_390_TLS_LDCALL:
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf_s390_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ tls_type = elf_s390_hash_entry(h)->tls_type;
+
+ if (tls_type == GOT_TLS_GD)
+ continue;
+
+ if (r_type == R_390_TLS_LOAD)
+ {
+ if (!info->shared && (h == NULL || h->dynindx == -1))
+ {
+ /* IE->LE transition. Four valid cases:
+ l %rx,0(0,%ry) -> lr %rx,%ry + bcr 0,0
+ l %rx,0(%ry,0) -> lr %rx,%ry + bcr 0,0
+ l %rx,0(%ry,%r12) -> lr %rx,%ry + bcr 0,0
+ l %rx,0(%r12,%ry) -> lr %rx,%ry + bcr 0,0 */
+ unsigned int insn, ry;
+
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ ry = 0;
+ if ((insn & 0xff00f000) == 0x58000000)
+ /* l %rx,0(%ry,0) -> lr %rx,%ry + bcr 0,0 */
+ ry = (insn & 0x000f0000);
+ else if ((insn & 0xff0f0000) == 0x58000000)
+ /* l %rx,0(0,%ry) -> lr %rx,%ry + bcr 0,0 */
+ ry = (insn & 0x0000f000) << 4;
+ else if ((insn & 0xff00f000) == 0x5800c000)
+ /* l %rx,0(%ry,%r12) -> lr %rx,%ry + bcr 0,0 */
+ ry = (insn & 0x000f0000);
+ else if ((insn & 0xff0f0000) == 0x580c0000)
+ /* l %rx,0(%r12,%ry) -> lr %rx,%ry + bcr 0,0 */
+ ry = (insn & 0x0000f000) << 4;
+ else
+ invalid_tls_insn (input_bfd, input_section, rel);
+ insn = 0x18000700 | (insn & 0x00f00000) | ry;
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+ }
+ }
+ else if (r_type == R_390_TLS_GDCALL)
+ {
+ unsigned int insn;
+
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((insn & 0xff000fff) != 0x4d000000)
+ invalid_tls_insn (input_bfd, input_section, rel);
+ if (!info->shared && (h == NULL || h->dynindx == -1))
+ /* GD->LE transition.
+ bas %r14,0(%rx,%r13) -> bc 0,0 */
+ insn = 0x47000000;
+ else
+ /* GD->IE transition.
+ bas %r14,0(%rx,%r13) -> l %r2,0(%r2,%r12) */
+ insn = 0x5822c000;
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+ }
+ else if (r_type == R_390_TLS_LDCALL)
+ {
+ if (!info->shared)
+ {
+ unsigned int insn;
+
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((insn & 0xff000fff) != 0x4d000000)
+ invalid_tls_insn (input_bfd, input_section, rel);
+ /* LD->LE transition.
+ bas %r14,0(%rx,%r13) -> bc 0,0 */
+ insn = 0x47000000;
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+ }
+ }
+ continue;
+
default:
break;
}
@@ -2183,7 +3111,10 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got.offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1
+ && elf_s390_hash_entry(h)->tls_type != GOT_TLS_GD
+ && elf_s390_hash_entry(h)->tls_type != GOT_TLS_IE
+ && elf_s390_hash_entry(h)->tls_type != GOT_TLS_IE_NLT)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -2400,13 +3331,6 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
}
static bfd_boolean
-elf_s390_object_p (abfd)
- bfd *abfd;
-{
- return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_31);
-}
-
-static bfd_boolean
elf_s390_grok_prstatus (abfd, note)
bfd * abfd;
Elf_Internal_Note * note;
@@ -2473,6 +3397,7 @@ elf_s390_grok_prstatus (abfd, note)
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_grok_prstatus elf_s390_grok_prstatus
+#define bfd_elf32_mkobject elf_s390_mkobject
#define elf_backend_object_p elf_s390_object_p
#include "elf32-target.h"
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 96cd77831a8..f0e01772ec3 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -1,23 +1,23 @@
/* Hitachi SH specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, 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"
@@ -62,9 +62,9 @@ static void sh_elf_copy_indirect_symbol
static int sh_elf_optimized_tls_reloc
PARAMS ((struct bfd_link_info *, int, int));
static bfd_boolean sh_elf_mkobject
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_boolean sh_elf_object_p
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_boolean sh_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -85,7 +85,7 @@ static bfd_reloc_status_type sh_elf_reloc_loop
PARAMS ((int, bfd *, asection *, bfd_byte *, bfd_vma, asection *,
bfd_vma, bfd_vma));
static bfd_boolean create_got_section
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean sh_elf_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_vma dtpoff_base
@@ -6724,6 +6724,9 @@ sh_elf_set_mach_from_flags (abfd)
case EF_SH2:
bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh2);
break;
+ case EF_SH2E:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh2e);
+ break;
case EF_SH_DSP:
bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh_dsp);
break;
@@ -7328,7 +7331,7 @@ sh_elf_reloc_type_class (rela)
}
}
-/* Support for Linux core dump NOTE sections */
+/* Support for Linux core dump NOTE sections. */
static bfd_boolean
elf32_shlin_grok_prstatus (abfd, note)
bfd *abfd;
@@ -7462,12 +7465,11 @@ elf32_shlin_grok_psinfo (abfd, note)
#define ELF_MAXPAGESIZE 0x10000
#undef elf_symbol_leading_char
#define elf_symbol_leading_char 0
-
+#undef elf32_bed
#define elf32_bed elf32_sh_nbsd_bed
#include "elf32-target.h"
-#undef elf32_bed
/* Linux support. */
#undef TARGET_BIG_SYM
@@ -7483,13 +7485,9 @@ elf32_shlin_grok_psinfo (abfd, note)
#define elf_backend_grok_prstatus elf32_shlin_grok_prstatus
#undef elf_backend_grok_psinfo
#define elf_backend_grok_psinfo elf32_shlin_grok_psinfo
-
+#undef elf32_bed
#define elf32_bed elf32_sh_lin_bed
#include "elf32-target.h"
-#undef elf_backend_grok_prstatus
-#undef elf_backend_grok_psinfo
-#undef elf32_bed
-
#endif /* INCLUDE_SHMEDIA */
diff --git a/bfd/elf32-sh64-com.c b/bfd/elf32-sh64-com.c
index d89d7c7fc5d..107e50490bb 100644
--- a/bfd/elf32-sh64-com.c
+++ b/bfd/elf32-sh64-com.c
@@ -1,5 +1,5 @@
/* Hitachi SH64-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,6 +24,7 @@
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/sh.h"
+#include "elf32-sh64.h"
#include "../opcodes/sh64-opc.h"
static bfd_boolean sh64_address_in_cranges
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index a6638e9b2bf..13953e6461e 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -1,5 +1,5 @@
/* Hitachi SH64-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,6 +23,7 @@
#include "sysdep.h"
#include "elf-bfd.h"
#include "../opcodes/sh64-opc.h"
+#include "elf32-sh64.h"
/* Add a suffix for datalabel indirection symbols. It must not match any
other symbols; user symbols with or without version or other
@@ -37,6 +38,8 @@ struct sh64_find_section_vma_data
bfd_vma addr;
};
+static bfd_boolean sh64_elf_new_section_hook
+ PARAMS ((bfd *, asection *));
static bfd_boolean sh64_elf_copy_private_data
PARAMS ((bfd *, bfd *));
static bfd_boolean sh64_elf_merge_private_data
@@ -85,6 +88,8 @@ static void sh64_find_section_for_address
#define elf_backend_final_write_processing sh64_elf_final_write_processing
#define elf_backend_section_from_shdr sh64_backend_section_from_shdr
+#define bfd_elf32_new_section_hook sh64_elf_new_section_hook
+
/* For objcopy, we need to set up sh64_elf_section_data (asection *) from
incoming section flags. This is otherwise done in sh64elf.em when
linking or tc-sh64.c when assembling. */
@@ -100,6 +105,24 @@ static void sh64_find_section_for_address
#define INCLUDE_SHMEDIA
#include "elf32-sh.c"
+/* Tack some extra info on struct bfd_elf_section_data. */
+
+static bfd_boolean
+sh64_elf_new_section_hook (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct _sh64_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = (struct _sh64_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
+
/* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections, and pass
through SHT_SH5_CR_SORTED on a sorted .cranges section. */
@@ -109,9 +132,9 @@ sh64_elf_fake_sections (output_bfd, elf_section_hdr, asect)
Elf_Internal_Shdr *elf_section_hdr;
asection *asect;
{
- if (sh64_elf_section_data (asect) != NULL)
+ if (sh64_elf_section_data (asect)->sh64_info != NULL)
elf_section_hdr->sh_flags
- |= sh64_elf_section_data (asect)->contents_flags;
+ |= sh64_elf_section_data (asect)->sh64_info->contents_flags;
/* If this section has the SEC_SORT_ENTRIES flag set, it is a sorted
.cranges section passing through objcopy. */
@@ -300,7 +323,7 @@ sh64_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
if (! _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec))
return FALSE;
- sh64_sec_data = sh64_elf_section_data (isec);
+ sh64_sec_data = sh64_elf_section_data (isec)->sh64_info;
if (sh64_sec_data == NULL)
{
sh64_sec_data = bfd_zmalloc (sizeof (struct sh64_section_data));
@@ -312,7 +335,7 @@ sh64_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
= (elf_section_data (isec)->this_hdr.sh_flags
& (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
- sh64_elf_section_data (osec) = sh64_sec_data;
+ sh64_elf_section_data (osec)->sh64_info = sh64_sec_data;
}
return TRUE;
@@ -656,7 +679,7 @@ sh64_elf_final_write_processing (abfd, linker)
&& cranges != NULL
&& elf_elfheader (abfd)->e_type != ET_EXEC
&& (ld_generated_cranges_size
- = sh64_elf_section_data (cranges)->cranges_growth) != 0)
+ = sh64_elf_section_data (cranges)->sh64_info->cranges_growth) != 0)
{
bfd_vma incoming_cranges_size
= ((cranges->_cooked_size != 0
@@ -765,13 +788,11 @@ sh64_elf_final_write_processing (abfd, linker)
#define ELF_MAXPAGESIZE 0x10000
#undef elf_symbol_leading_char
#define elf_symbol_leading_char 0
-
+#undef elf32_bed
#define elf32_bed elf32_sh64_nbsd_bed
#include "elf32-target.h"
-#undef elf32_bed
-
/* Linux support. */
#undef TARGET_BIG_SYM
#define TARGET_BIG_SYM bfd_elf32_sh64blin_vec
@@ -781,9 +802,8 @@ sh64_elf_final_write_processing (abfd, linker)
#define TARGET_LITTLE_SYM bfd_elf32_sh64lin_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-sh64-linux"
-
+#undef elf32_bed
#define elf32_bed elf32_sh64_lin_bed
#include "elf32-target.h"
-#undef elf32_bed
diff --git a/bfd/elf32-sh64.h b/bfd/elf32-sh64.h
new file mode 100644
index 00000000000..87af05bc2c4
--- /dev/null
+++ b/bfd/elf32-sh64.h
@@ -0,0 +1,83 @@
+/* SH ELF support for BFD.
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef ELF32_SH64_H
+#define ELF32_SH64_H
+
+#define SH64_CRANGES_SECTION_NAME ".cranges"
+enum sh64_elf_cr_type {
+ CRT_NONE = 0,
+ CRT_DATA = 1,
+ CRT_SH5_ISA16 = 2,
+ CRT_SH5_ISA32 = 3
+};
+
+/* The official definition is this:
+
+ typedef struct {
+ Elf32_Addr cr_addr;
+ Elf32_Word cr_size;
+ Elf32_Half cr_type;
+ } Elf32_CRange;
+
+ but we have no use for that exact type. Instead we use this struct for
+ the internal representation. */
+typedef struct {
+ bfd_vma cr_addr;
+ bfd_size_type cr_size;
+ enum sh64_elf_cr_type cr_type;
+} sh64_elf_crange;
+
+#define SH64_CRANGE_SIZE (4 + 4 + 2)
+#define SH64_CRANGE_CR_ADDR_OFFSET 0
+#define SH64_CRANGE_CR_SIZE_OFFSET 4
+#define SH64_CRANGE_CR_TYPE_OFFSET (4 + 4)
+
+/* Get the contents type of an arbitrary address, or return CRT_NONE. */
+extern enum sh64_elf_cr_type sh64_get_contents_type
+ PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
+
+/* Simpler interface.
+ FIXME: This seems redundant now that we export the interface above. */
+extern bfd_boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
+
+extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
+
+struct sh64_section_data
+{
+ flagword contents_flags;
+
+ /* Only used in the cranges section, but we don't have an official
+ backend-specific bfd field. */
+ bfd_size_type cranges_growth;
+};
+
+struct _sh64_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ struct sh64_section_data *sh64_info;
+};
+
+#define sh64_elf_section_data(sec) \
+ ((struct _sh64_elf_section_data *) elf_section_data (sec))
+
+#endif /* ELF32_SH64_H */
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 07137baef33..1c22100e1bb 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1,6 +1,6 @@
/* SPARC-specific support for 32-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -35,10 +35,20 @@ static bfd_boolean elf32_sparc_check_relocs
const Elf_Internal_Rela *));
static bfd_boolean elf32_sparc_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static bfd_boolean allocate_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+static bfd_boolean readonly_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
static bfd_boolean elf32_sparc_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean elf32_sparc_new_section_hook
+ PARAMS ((bfd *, asection *));
static bfd_boolean elf32_sparc_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+static bfd_vma dtpoff_base
+ PARAMS ((struct bfd_link_info *));
+static bfd_vma tpoff
+ PARAMS ((struct bfd_link_info *, bfd_vma));
static bfd_boolean elf32_sparc_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -49,6 +59,22 @@ static bfd_boolean elf32_sparc_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf32_sparc_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
+static struct bfd_hash_entry *link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct bfd_link_hash_table *elf32_sparc_link_hash_table_create
+ PARAMS ((bfd *));
+static bfd_boolean create_got_section PARAMS ((bfd *,
+ struct bfd_link_info *));
+static bfd_boolean elf32_sparc_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static void elf32_sparc_copy_indirect_symbol
+ PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ struct elf_link_hash_entry *));
+static int elf32_sparc_tls_transition
+ PARAMS ((struct bfd_link_info *, bfd *, int, int));
+
+static bfd_boolean elf32_sparc_mkobject
+ PARAMS ((bfd *));
static bfd_boolean elf32_sparc_object_p
PARAMS ((bfd *));
static void elf32_sparc_final_write_processing
@@ -68,6 +94,10 @@ static bfd_reloc_status_type sparc_elf_notsupported_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type sparc_elf_wdisp16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type sparc_elf_hix22_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type sparc_elf_lox10_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
reloc_howto_type _bfd_sparc_elf_howto_table[] =
{
@@ -131,12 +161,37 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_UA64, 0,0, 0,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_UA64", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_REV32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",FALSE,0,0x003fffff, FALSE),
+ HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",FALSE,0,0x000003ff, FALSE),
+ HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",FALSE,0,0x003fffff, FALSE),
+ HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",FALSE,0,0x000003ff, FALSE),
+ HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_TLS_DTPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPOFF64",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",FALSE,0,0x00000000,TRUE)
};
static reloc_howto_type elf32_sparc_vtinherit_howto =
HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,FALSE,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", FALSE,0, 0, FALSE);
static reloc_howto_type elf32_sparc_vtentry_howto =
HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,FALSE,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", FALSE,0,0, FALSE);
+static reloc_howto_type elf32_sparc_rev32_howto =
+ HOWTO(R_SPARC_REV32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", FALSE,0,0xffffffff,TRUE);
struct elf_reloc_map {
bfd_reloc_code_real_type bfd_reloc_val;
@@ -188,9 +243,33 @@ static const struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_7, R_SPARC_7 },
{ BFD_RELOC_SPARC_5, R_SPARC_5 },
{ BFD_RELOC_SPARC_6, R_SPARC_6 },
- { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 },
+ { BFD_RELOC_SPARC_TLS_GD_HI22, R_SPARC_TLS_GD_HI22 },
+ { BFD_RELOC_SPARC_TLS_GD_LO10, R_SPARC_TLS_GD_LO10 },
+ { BFD_RELOC_SPARC_TLS_GD_ADD, R_SPARC_TLS_GD_ADD },
+ { BFD_RELOC_SPARC_TLS_GD_CALL, R_SPARC_TLS_GD_CALL },
+ { BFD_RELOC_SPARC_TLS_LDM_HI22, R_SPARC_TLS_LDM_HI22 },
+ { BFD_RELOC_SPARC_TLS_LDM_LO10, R_SPARC_TLS_LDM_LO10 },
+ { BFD_RELOC_SPARC_TLS_LDM_ADD, R_SPARC_TLS_LDM_ADD },
+ { BFD_RELOC_SPARC_TLS_LDM_CALL, R_SPARC_TLS_LDM_CALL },
+ { BFD_RELOC_SPARC_TLS_LDO_HIX22, R_SPARC_TLS_LDO_HIX22 },
+ { BFD_RELOC_SPARC_TLS_LDO_LOX10, R_SPARC_TLS_LDO_LOX10 },
+ { BFD_RELOC_SPARC_TLS_LDO_ADD, R_SPARC_TLS_LDO_ADD },
+ { BFD_RELOC_SPARC_TLS_IE_HI22, R_SPARC_TLS_IE_HI22 },
+ { BFD_RELOC_SPARC_TLS_IE_LO10, R_SPARC_TLS_IE_LO10 },
+ { BFD_RELOC_SPARC_TLS_IE_LD, R_SPARC_TLS_IE_LD },
+ { BFD_RELOC_SPARC_TLS_IE_LDX, R_SPARC_TLS_IE_LDX },
+ { BFD_RELOC_SPARC_TLS_IE_ADD, R_SPARC_TLS_IE_ADD },
+ { BFD_RELOC_SPARC_TLS_LE_HIX22, R_SPARC_TLS_LE_HIX22 },
+ { BFD_RELOC_SPARC_TLS_LE_LOX10, R_SPARC_TLS_LE_LOX10 },
+ { BFD_RELOC_SPARC_TLS_DTPMOD32, R_SPARC_TLS_DTPMOD32 },
+ { BFD_RELOC_SPARC_TLS_DTPMOD64, R_SPARC_TLS_DTPMOD64 },
+ { BFD_RELOC_SPARC_TLS_DTPOFF32, R_SPARC_TLS_DTPOFF32 },
+ { BFD_RELOC_SPARC_TLS_DTPOFF64, R_SPARC_TLS_DTPOFF64 },
+ { BFD_RELOC_SPARC_TLS_TPOFF32, R_SPARC_TLS_TPOFF32 },
+ { BFD_RELOC_SPARC_TLS_TPOFF64, R_SPARC_TLS_TPOFF64 },
{ BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT },
{ BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY },
+ { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 }
};
static reloc_howto_type *
@@ -208,6 +287,9 @@ elf32_sparc_reloc_type_lookup (abfd, code)
case BFD_RELOC_VTABLE_ENTRY:
return &elf32_sparc_vtentry_howto;
+ case BFD_RELOC_SPARC_REV32:
+ return &elf32_sparc_rev32_howto;
+
default:
for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct elf_reloc_map); i++)
{
@@ -238,6 +320,10 @@ elf32_sparc_info_to_howto (abfd, cache_ptr, dst)
cache_ptr->howto = &elf32_sparc_vtentry_howto;
break;
+ case R_SPARC_REV32:
+ cache_ptr->howto = &elf32_sparc_rev32_howto;
+ break;
+
default:
BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_SPARC_max_std);
cache_ptr->howto = &_bfd_sparc_elf_howto_table[ELF32_R_TYPE(dst->r_info)];
@@ -320,6 +406,98 @@ sparc_elf_wdisp16_reloc (abfd,
else
return bfd_reloc_ok;
}
+
+/* Handle the HIX22 reloc. */
+
+static bfd_reloc_status_type
+sparc_elf_hix22_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ bfd_vma relocation;
+ bfd_vma insn;
+
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ if (output_bfd != NULL)
+ return bfd_reloc_continue;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ relocation = (symbol->value
+ + symbol->section->output_section->vma
+ + symbol->section->output_offset);
+ relocation += reloc_entry->addend;
+ insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+
+ insn = (insn &~ (bfd_vma) 0x3fffff) | (((~relocation) >> 10) & 0x3fffff);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+
+ return bfd_reloc_ok;
+}
+
+/* Handle the LOX10 reloc. */
+
+static bfd_reloc_status_type
+sparc_elf_lox10_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ bfd_vma relocation;
+ bfd_vma insn;
+
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ if (output_bfd != NULL)
+ return bfd_reloc_continue;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ relocation = (symbol->value
+ + symbol->section->output_section->vma
+ + symbol->section->output_offset);
+ relocation += reloc_entry->addend;
+ insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+
+ insn = (insn &~ (bfd_vma) 0x1fff) | 0x1c00 | (relocation & 0x3ff);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+
+ return bfd_reloc_ok;
+}
/* Functions for the SPARC ELF linker. */
@@ -348,6 +526,319 @@ sparc_elf_wdisp16_reloc (abfd,
/* nop. */
#define PLT_ENTRY_WORD2 SPARC_NOP
+/* The SPARC linker needs to keep track of the number of relocs that it
+ decides to copy as dynamic relocs in check_relocs for each symbol.
+ This is so that it can later discard them if they are found to be
+ unnecessary. We store the information in a field extending the
+ regular ELF linker hash table. */
+
+struct elf32_sparc_dyn_relocs
+{
+ struct elf32_sparc_dyn_relocs *next;
+
+ /* The input section of the reloc. */
+ asection *sec;
+
+ /* Total number of relocs copied for the input section. */
+ bfd_size_type count;
+
+ /* Number of pc-relative relocs copied for the input section. */
+ bfd_size_type pc_count;
+};
+
+/* SPARC ELF linker hash entry. */
+
+struct elf32_sparc_link_hash_entry
+{
+ struct elf_link_hash_entry elf;
+
+ /* Track dynamic relocs copied for this symbol. */
+ struct elf32_sparc_dyn_relocs *dyn_relocs;
+
+#define GOT_UNKNOWN 0
+#define GOT_NORMAL 1
+#define GOT_TLS_GD 2
+#define GOT_TLS_IE 3
+ unsigned char tls_type;
+};
+
+#define elf32_sparc_hash_entry(ent) ((struct elf32_sparc_link_hash_entry *)(ent))
+
+struct elf32_sparc_obj_tdata
+{
+ struct elf_obj_tdata root;
+
+ /* tls_type for each local got entry. */
+ char *local_got_tls_type;
+
+ /* TRUE if TLS GD relocs has been seen for this object. */
+ bfd_boolean has_tlsgd;
+};
+
+#define elf32_sparc_tdata(abfd) \
+ ((struct elf32_sparc_obj_tdata *) (abfd)->tdata.any)
+
+#define elf32_sparc_local_got_tls_type(abfd) \
+ (elf32_sparc_tdata (abfd)->local_got_tls_type)
+
+static bfd_boolean
+elf32_sparc_mkobject (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt = sizeof (struct elf32_sparc_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ return TRUE;
+}
+
+/* SPARC ELF linker hash table. */
+
+struct elf32_sparc_link_hash_table
+{
+ struct elf_link_hash_table elf;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *sgot;
+ asection *srelgot;
+ asection *splt;
+ asection *srelplt;
+ asection *sdynbss;
+ asection *srelbss;
+
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tls_ldm_got;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
+};
+
+/* Get the SPARC ELF linker hash table from a link_info structure. */
+
+#define elf32_sparc_hash_table(p) \
+ ((struct elf32_sparc_link_hash_table *) ((p)->hash))
+
+/* Create an entry in an i386 ELF linker hash table. */
+
+static struct bfd_hash_entry *
+link_hash_newfunc (entry, table, string)
+ 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. */
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table,
+ sizeof (struct elf32_sparc_link_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
+
+ /* Call the allocation method of the superclass. */
+ entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+ if (entry != NULL)
+ {
+ struct elf32_sparc_link_hash_entry *eh;
+
+ eh = (struct elf32_sparc_link_hash_entry *) entry;
+ eh->dyn_relocs = NULL;
+ eh->tls_type = GOT_UNKNOWN;
+ }
+
+ return entry;
+}
+
+/* Create a SPARC ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+elf32_sparc_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct elf32_sparc_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct elf32_sparc_link_hash_table);
+
+ ret = (struct elf32_sparc_link_hash_table *) bfd_malloc (amt);
+ if (ret == NULL)
+ return NULL;
+
+ if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
+ {
+ free (ret);
+ return NULL;
+ }
+
+ ret->sgot = NULL;
+ ret->srelgot = NULL;
+ ret->splt = NULL;
+ ret->srelplt = NULL;
+ ret->sdynbss = NULL;
+ ret->srelbss = NULL;
+ ret->tls_ldm_got.refcount = 0;
+ ret->sym_sec.abfd = NULL;
+
+ return &ret->elf.root;
+}
+
+/* Create .got and .rela.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_sparc_link_hash_table *htab;
+
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return FALSE;
+
+ htab = elf32_sparc_hash_table (info);
+ htab->sgot = bfd_get_section_by_name (dynobj, ".got");
+ if (!htab->sgot)
+ abort ();
+
+ htab->srelgot = bfd_make_section (dynobj, ".rela.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, .rela.plt, .got, .rela.got, .dynbss, and
+ .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
+ hash table. */
+
+static bfd_boolean
+elf32_sparc_create_dynamic_sections (dynobj, info)
+ bfd *dynobj;
+ struct bfd_link_info *info;
+{
+ struct elf32_sparc_link_hash_table *htab;
+
+ htab = elf32_sparc_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, ".rela.plt");
+ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ if (!info->shared)
+ htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.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_sparc_copy_indirect_symbol (bed, dir, ind)
+ struct elf_backend_data *bed;
+ struct elf_link_hash_entry *dir, *ind;
+{
+ struct elf32_sparc_link_hash_entry *edir, *eind;
+
+ edir = (struct elf32_sparc_link_hash_entry *) dir;
+ eind = (struct elf32_sparc_link_hash_entry *) ind;
+
+ if (eind->dyn_relocs != NULL)
+ {
+ if (edir->dyn_relocs != NULL)
+ {
+ struct elf32_sparc_dyn_relocs **pp;
+ struct elf32_sparc_dyn_relocs *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->dyn_relocs; (p = *pp) != NULL; )
+ {
+ struct elf32_sparc_dyn_relocs *q;
+
+ for (q = edir->dyn_relocs; q != NULL; q = q->next)
+ if (q->sec == p->sec)
+ {
+ q->pc_count += p->pc_count;
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->dyn_relocs;
+ }
+
+ edir->dyn_relocs = eind->dyn_relocs;
+ eind->dyn_relocs = NULL;
+ }
+
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
+ _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+}
+
+static int
+elf32_sparc_tls_transition (info, abfd, r_type, is_local)
+ struct bfd_link_info *info;
+ bfd *abfd;
+ int r_type;
+ int is_local;
+{
+ if (r_type == R_SPARC_TLS_GD_HI22
+ && ! elf32_sparc_tdata (abfd)->has_tlsgd)
+ r_type = R_SPARC_REV32;
+
+ if (info->shared)
+ return r_type;
+
+ switch (r_type)
+ {
+ case R_SPARC_TLS_GD_HI22:
+ if (is_local)
+ return R_SPARC_TLS_LE_HIX22;
+ return R_SPARC_TLS_IE_HI22;
+ case R_SPARC_TLS_GD_LO10:
+ if (is_local)
+ return R_SPARC_TLS_LE_LOX10;
+ return R_SPARC_TLS_IE_LO10;
+ case R_SPARC_TLS_IE_HI22:
+ if (is_local)
+ return R_SPARC_TLS_LE_HIX22;
+ return r_type;
+ case R_SPARC_TLS_IE_LO10:
+ if (is_local)
+ return R_SPARC_TLS_LE_LOX10;
+ return r_type;
+ case R_SPARC_TLS_LDM_HI22:
+ return R_SPARC_TLS_LE_HIX22;
+ case R_SPARC_TLS_LDM_LO10:
+ return R_SPARC_TLS_LE_LOX10;
+ }
+
+ return r_type;
+}
+
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
table. */
@@ -359,143 +850,201 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
asection *sec;
const Elf_Internal_Rela *relocs;
{
- bfd *dynobj;
+ struct elf32_sparc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
bfd_vma *local_got_offsets;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- asection *sgot;
- asection *srelgot;
asection *sreloc;
+ bfd_boolean checked_tlsgd = FALSE;
if (info->relocateable)
return TRUE;
- dynobj = elf_hash_table (info)->dynobj;
+ htab = elf32_sparc_hash_table (info);
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
local_got_offsets = elf_local_got_offsets (abfd);
- sgot = NULL;
- srelgot = NULL;
sreloc = NULL;
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
+ unsigned int r_type;
unsigned long r_symndx;
struct elf_link_hash_entry *h;
r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+ {
+ (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
+ bfd_archive_filename (abfd),
+ r_symndx);
+ return FALSE;
+ }
+
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- switch (ELF32_R_TYPE (rel->r_info))
+ /* Compatibility with old R_SPARC_REV32 reloc conflicting
+ with R_SPARC_TLS_GD_HI22. */
+ if (! checked_tlsgd)
+ switch (r_type)
+ {
+ case R_SPARC_TLS_GD_HI22:
+ {
+ const Elf_Internal_Rela *relt;
+
+ for (relt = rel + 1; relt < rel_end; relt++)
+ if (ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_LO10
+ || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_ADD
+ || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_CALL)
+ break;
+ checked_tlsgd = TRUE;
+ elf32_sparc_tdata (abfd)->has_tlsgd = relt < rel_end;
+ }
+ break;
+ case R_SPARC_TLS_GD_LO10:
+ case R_SPARC_TLS_GD_ADD:
+ case R_SPARC_TLS_GD_CALL:
+ checked_tlsgd = TRUE;
+ elf32_sparc_tdata (abfd)->has_tlsgd = TRUE;
+ break;
+ }
+
+ r_type = elf32_sparc_tls_transition (info, abfd, r_type, h == NULL);
+ switch (r_type)
{
+ case R_SPARC_TLS_LDM_HI22:
+ case R_SPARC_TLS_LDM_LO10:
+ htab->tls_ldm_got.refcount += 1;
+ break;
+
+ case R_SPARC_TLS_LE_HIX22:
+ case R_SPARC_TLS_LE_LOX10:
+ if (info->shared)
+ goto r_sparc_plt32;
+ break;
+
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
case R_SPARC_GOT10:
case R_SPARC_GOT13:
case R_SPARC_GOT22:
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_GD_LO10:
/* This symbol requires a global offset table entry. */
+ {
+ int tls_type, old_tls_type;
- if (dynobj == NULL)
- {
- /* Create the .got section. */
- elf_hash_table (info)->dynobj = dynobj = abfd;
- if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
- }
+ switch (r_type)
+ {
+ default:
+ case R_SPARC_GOT10:
+ case R_SPARC_GOT13:
+ case R_SPARC_GOT22:
+ tls_type = GOT_NORMAL;
+ break;
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_GD_LO10:
+ tls_type = GOT_TLS_GD;
+ break;
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ tls_type = GOT_TLS_IE;
+ break;
+ }
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- }
+ if (h != NULL)
+ {
+ h->got.refcount += 1;
+ old_tls_type = elf32_sparc_hash_entry(h)->tls_type;
+ }
+ else
+ {
+ bfd_signed_vma *local_got_refcounts;
- if (srelgot == NULL
- && (h != NULL || info->shared))
- {
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- if (srelgot == NULL)
- {
- srelgot = bfd_make_section (dynobj, ".rela.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;
- }
- }
+ /* 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;
- 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;
+ size = symtab_hdr->sh_info;
+ 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_refcounts (abfd) = local_got_refcounts;
+ elf32_sparc_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+ }
+ local_got_refcounts[r_symndx] += 1;
+ old_tls_type = elf32_sparc_local_got_tls_type (abfd) [r_symndx];
+ }
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ /* If a TLS symbol is accessed using IE at least once,
+ there is no point to use dynamic model for it. */
+ if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
+ && (old_tls_type != GOT_TLS_GD
+ || tls_type != GOT_TLS_IE))
+ {
+ if (old_tls_type == GOT_TLS_IE && tls_type == GOT_TLS_GD)
+ tls_type = old_tls_type;
+ else
+ {
+ (*_bfd_error_handler)
+ (_("%s: `%s' accessed both as normal and thread local symbol"),
+ bfd_archive_filename (abfd),
+ h ? h->root.root.string : "<local>");
return FALSE;
- }
+ }
+ }
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
- }
- else
- {
- /* This is a global offset table entry for a local
- symbol. */
- if (local_got_offsets == NULL)
- {
- bfd_size_type size;
- register unsigned int i;
+ if (old_tls_type != tls_type)
+ {
+ if (h != NULL)
+ elf32_sparc_hash_entry (h)->tls_type = tls_type;
+ else
+ elf32_sparc_local_got_tls_type (abfd) [r_symndx] = tls_type;
+ }
+ }
- size = symtab_hdr->sh_info;
- size *= sizeof (bfd_vma);
- local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
- if (local_got_offsets == 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;
- }
- 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 (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ if (!create_got_section (htab->elf.dynobj, info))
+ return FALSE;
+ break;
- if (info->shared)
- {
- /* If we are generating a shared object, we need to
- output a R_SPARC_RELATIVE reloc so that the
- dynamic linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf32_External_Rela);
- }
+ case R_SPARC_TLS_GD_CALL:
+ case R_SPARC_TLS_LDM_CALL:
+ if (info->shared)
+ {
+ /* These are basically R_SPARC_TLS_WPLT30 relocs against
+ __tls_get_addr. */
+ struct bfd_link_hash_entry *bh = NULL;
+ if (! _bfd_generic_link_add_one_symbol (info, abfd,
+ "__tls_get_addr", 0,
+ bfd_und_section_ptr, 0,
+ NULL, FALSE, FALSE,
+ &bh))
+ return FALSE;
+ h = (struct elf_link_hash_entry *) bh;
}
-
- sgot->_raw_size += 4;
-
- /* If the .got section is more than 0x1000 bytes, we add
- 0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
- bit relocations have a greater chance of working. */
- if (sgot->_raw_size >= 0x1000
- && elf_hash_table (info)->hgot->root.u.def.value == 0)
- elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
-
- break;
+ else
+ break;
+ /* Fall through */
case R_SPARC_PLT32:
case R_SPARC_WPLT30:
@@ -511,22 +1060,16 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
reloc for a local symbol if you assemble a call from
one section to another when using -K pic. We treat
it as WDISP30. */
- if (ELF32_R_TYPE (rel->r_info) != R_SPARC_WPLT30)
+ if (ELF32_R_TYPE (rel->r_info) == R_SPARC_PLT32)
goto r_sparc_plt32;
break;
}
- /* 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;
- }
-
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- if (ELF32_R_TYPE (rel->r_info) != R_SPARC_WPLT30)
+ if (ELF32_R_TYPE (rel->r_info) == R_SPARC_PLT32)
goto r_sparc_plt32;
+ h->plt.refcount += 1;
break;
case R_SPARC_PC10:
@@ -538,6 +1081,7 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
&& strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
break;
/* Fall through. */
+
case R_SPARC_DISP8:
case R_SPARC_DISP16:
case R_SPARC_DISP32:
@@ -545,23 +1089,6 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_WDISP22:
case R_SPARC_WDISP19:
case R_SPARC_WDISP16:
- if (h != NULL)
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
-
- /* If we are linking with -Bsymbolic, we do not need to copy
- a PC relative reloc against a global symbol which is
- defined in an object we are including in the link (i.e.,
- DEF_REGULAR is set). FIXME: At this point we have not
- seen all the input files, so it is possible that
- DEF_REGULAR is not set now but will be set later (it is
- never cleared). This needs to be handled as in
- elf32-i386.c. */
- if (h == NULL
- || (info->symbolic
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0))
- break;
- /* Fall through. */
case R_SPARC_8:
case R_SPARC_16:
case R_SPARC_32:
@@ -575,14 +1102,59 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
r_sparc_plt32:
- if (info->shared && (sec->flags & SEC_ALLOC))
+ if (h != NULL && !info->shared)
+ {
+ /* 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
+ into the shared library. However, if we are linking with
+ -Bsymbolic, we do not need to copy a reloc against a
+ global symbol which is defined in an object we are
+ including in the link (i.e., DEF_REGULAR is set). At
+ this point we have not seen all the input files, so it is
+ possible that DEF_REGULAR is not set now but will be set
+ later (it is never cleared). In case of a weak definition,
+ DEF_REGULAR may be cleared later by a strong definition in
+ a shared library. We account for that possibility below by
+ storing information in the relocs_copied field of the hash
+ table entry. A similar situation occurs when creating
+ shared libraries and symbol visibility changes render the
+ symbol local.
+
+ If on the other hand, we are creating an executable, we
+ may need to keep relocations for symbols satisfied by a
+ dynamic library if we manage to avoid copy relocs for the
+ symbol. */
+ if ((info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && (! _bfd_sparc_elf_howto_table[r_type].pc_relative
+ || (h != NULL
+ && (! info->symbolic
+ || h->root.type == bfd_link_hash_defweak
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || (!info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && h != NULL
+ && (h->root.type == bfd_link_hash_defweak
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)))
{
+ struct elf32_sparc_dyn_relocs *p;
+ struct elf32_sparc_dyn_relocs **head;
+
/* When creating a shared object, we must copy these
relocs into the output file. We create a reloc
section in dynobj and make room for the reloc. */
if (sreloc == NULL)
{
const char *name;
+ bfd *dynobj;
name = (bfd_elf_string_from_elf_section
(abfd,
@@ -595,6 +1167,10 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ dynobj = htab->elf.dynobj;
+
sreloc = bfd_get_section_by_name (dynobj, name);
if (sreloc == NULL)
{
@@ -610,11 +1186,47 @@ elf32_sparc_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_Rela);
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
+ head = &((struct elf32_sparc_link_hash_entry *) h)->dyn_relocs;
+ 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_sparc_dyn_relocs **)
+ &elf_section_data (s)->local_dynrel);
+ }
+
+ p = *head;
+ if (p == NULL || p->sec != sec)
+ {
+ bfd_size_type amt = sizeof *p;
+ p = ((struct elf32_sparc_dyn_relocs *)
+ bfd_alloc (htab->elf.dynobj, amt));
+ if (p == NULL)
+ return FALSE;
+ p->next = *head;
+ *head = p;
+ p->sec = sec;
+ p->count = 0;
+ p->pc_count = 0;
+ }
+
+ p->count += 1;
+ if (_bfd_sparc_elf_howto_table[r_type].pc_relative)
+ p->pc_count += 1;
}
break;
@@ -688,6 +1300,7 @@ elf32_sparc_gc_sweep_hook (abfd, info, sec, relocs)
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
unsigned long r_symndx;
+ int r_type;
struct elf_link_hash_entry *h;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -696,8 +1309,80 @@ elf32_sparc_gc_sweep_hook (abfd, info, sec, relocs)
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
- switch (ELF32_R_TYPE (rel->r_info))
+ switch ((r_type = elf32_sparc_tls_transition (info, abfd,
+ ELF32_R_TYPE (rel->r_info),
+ ELF32_R_SYM (rel->r_info)
+ >= symtab_hdr->sh_info)))
{
+ case R_SPARC_TLS_LDM_HI22:
+ case R_SPARC_TLS_LDM_LO10:
+ if (elf32_sparc_hash_table (info)->tls_ldm_got.refcount > 0)
+ elf32_sparc_hash_table (info)->tls_ldm_got.refcount -= 1;
+ break;
+
+ case R_SPARC_TLS_LE_HIX22:
+ case R_SPARC_TLS_LE_LOX10:
+ if (info->shared)
+ goto r_sparc_plt32;
+ break;
+
+ case R_SPARC_PC10:
+ case R_SPARC_PC22:
+ if ((r_symndx = ELF32_R_SYM (rel->r_info)) >= symtab_hdr->sh_info
+ && strcmp (sym_hashes[r_symndx
+ - symtab_hdr->sh_info]->root.root.string,
+ "_GLOBAL_OFFSET_TABLE_") == 0)
+ break;
+ /* Fall through. */
+
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ case R_SPARC_WDISP30:
+ case R_SPARC_WDISP22:
+ case R_SPARC_WDISP19:
+ case R_SPARC_WDISP16:
+ case R_SPARC_8:
+ case R_SPARC_16:
+ case R_SPARC_32:
+ case R_SPARC_HI22:
+ case R_SPARC_22:
+ case R_SPARC_13:
+ case R_SPARC_LO10:
+ case R_SPARC_UA16:
+ case R_SPARC_UA32:
+ r_sparc_plt32:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct elf32_sparc_link_hash_entry *eh;
+ struct elf32_sparc_dyn_relocs **pp;
+ struct elf32_sparc_dyn_relocs *p;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ if (! info->shared)
+ --h->plt.refcount;
+
+ eh = (struct elf32_sparc_link_hash_entry *) h;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ if (_bfd_sparc_elf_howto_table[r_type].pc_relative)
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_GD_LO10:
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
case R_SPARC_GOT10:
case R_SPARC_GOT13:
case R_SPARC_GOT22:
@@ -727,6 +1412,8 @@ elf32_sparc_gc_sweep_hook (abfd, info, sec, relocs)
if (h->plt.refcount > 0)
h->plt.refcount--;
}
+ if (r_type == R_SPARC_PLT32)
+ goto r_sparc_plt32;
break;
default:
@@ -747,14 +1434,16 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
{
- bfd *dynobj;
+ struct elf32_sparc_link_hash_table *htab;
+ struct elf32_sparc_link_hash_entry * eh;
+ struct elf32_sparc_dyn_relocs *p;
asection *s;
unsigned int power_of_two;
- dynobj = elf_hash_table (info)->dynobj;
+ htab = elf32_sparc_hash_table (info);
/* Make sure we know what is going on here. */
- BFD_ASSERT (dynobj != NULL
+ BFD_ASSERT (htab->elf.dynobj != NULL
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
|| h->weakdef != NULL
|| ((h->elf_link_hash_flags
@@ -778,64 +1467,26 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->flags & SEC_CODE) != 0))
{
- if (! elf_hash_table (info)->dynamic_sections_created
- || ((!info->shared || info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0))
+ if (h->plt.refcount <= 0
+ || (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
+ && h->root.type != bfd_link_hash_undefweak
+ && h->root.type != bfd_link_hash_undefined))
{
/* This case can occur if we saw a WPLT30 reloc in an input
- file, but none of the input files were dynamic objects.
- Or, when linking the main application or a -Bsymbolic
- shared library against PIC code. Or when a global symbol
- has been made private, e.g. via versioning.
-
- In these cases we know what value the symbol will resolve
- to, so we don't actually need to build a procedure linkage
- table, and we can just do a WDISP30 reloc instead. */
-
+ 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 WDISP30 reloc instead. */
+ h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- return TRUE;
}
- s = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (s != NULL);
-
- /* The first four entries in .plt are reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = 4 * PLT_ENTRY_SIZE;
-
- /* The procedure linkage table has a maximum size. */
- if (s->_raw_size >= 0x400000)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* 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 .rela.plt section. */
-
- s = bfd_get_section_by_name (dynobj, ".rela.plt");
- BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rela);
-
return TRUE;
}
+ else
+ 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
@@ -864,6 +1515,22 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
return TRUE;
+ eh = (struct elf32_sparc_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
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -874,20 +1541,13 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
both the dynamic object and the regular object will refer to the
same memory location for the variable. */
- s = bfd_get_section_by_name (dynobj, ".dynbss");
- BFD_ASSERT (s != NULL);
-
/* We must generate a R_SPARC_COPY reloc to tell the dynamic linker
to copy the initial value out of the dynamic object and into the
runtime process image. We need to remember the offset into the
.rel.bss section we are going to use. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- asection *srel;
-
- srel = bfd_get_section_by_name (dynobj, ".rela.bss");
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -898,6 +1558,7 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
+ s = htab->sdynbss;
s->_raw_size = BFD_ALIGN (s->_raw_size,
(bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
@@ -916,6 +1577,247 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
return TRUE;
}
+/* This is the condition under which finish_dynamic_symbol will be called
+ from elflink.h. If elflink.h doesn't call our finish_dynamic_symbol
+ routine, we'll need to do something about initializing any .plt and .got
+ entries in relocate_section. */
+#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, INFO, H) \
+ ((DYN) \
+ && ((INFO)->shared \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \
+ && ((H)->dynindx != -1 \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
+
+/* 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_sparc_link_hash_table *htab;
+ struct elf32_sparc_link_hash_entry *eh;
+ struct elf32_sparc_dyn_relocs *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_sparc_hash_table (info);
+
+ if (htab->elf.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 (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
+ {
+ asection *s = htab->splt;
+
+ /* The first four entries in .plt are reserved. */
+ if (s->_raw_size == 0)
+ s->_raw_size = 4 * PLT_ENTRY_SIZE;
+
+ /* The procedure linkage table has a maximum size. */
+ if (s->_raw_size >= 0x400000)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ 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 .rela.plt section. */
+ htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ 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 R_SPARC_TLS_IE_{HI22,LO10} symbol is now local to the binary,
+ make it a R_SPARC_TLS_LE_{HI22,LO10} requiring no TLS entry. */
+ if (h->got.refcount > 0
+ && !info->shared
+ && h->dynindx == -1
+ && elf32_sparc_hash_entry(h)->tls_type == GOT_TLS_IE)
+ h->got.offset = (bfd_vma) -1;
+ else if (h->got.refcount > 0)
+ {
+ asection *s;
+ bfd_boolean dyn;
+ int tls_type = elf32_sparc_hash_entry(h)->tls_type;
+
+ /* 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;
+ /* R_SPARC_TLS_GD_HI{22,LO10} needs 2 consecutive GOT slots. */
+ if (tls_type == GOT_TLS_GD)
+ s->_raw_size += 4;
+ dyn = htab->elf.dynamic_sections_created;
+ /* R_SPARC_TLS_IE_{HI22,LO10} needs one dynamic relocation,
+ R_SPARC_TLS_GD_{HI22,LO10} needs one if local symbol and two if
+ global. */
+ if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ || tls_type == GOT_TLS_IE)
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ else if (tls_type == GOT_TLS_GD)
+ htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
+ eh = (struct elf32_sparc_link_hash_entry *) h;
+ if (eh->dyn_relocs == 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)
+ {
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
+ || info->symbolic))
+ {
+ struct elf32_sparc_dyn_relocs **pp;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+ {
+ p->count -= p->pc_count;
+ p->pc_count = 0;
+ if (p->count == 0)
+ *pp = p->next;
+ else
+ pp = &p->next;
+ }
+ }
+ }
+ 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->elf.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->dyn_relocs = NULL;
+
+ keep: ;
+ }
+
+ /* Finally, allocate space. */
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *sreloc = elf_section_data (p->sec)->sreloc;
+ sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ }
+
+ return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static bfd_boolean
+readonly_dynrelocs (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct elf32_sparc_link_hash_entry *eh;
+ struct elf32_sparc_dyn_relocs *p;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ eh = (struct elf32_sparc_link_hash_entry *) h;
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *s = p->sec->output_section;
+
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ {
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ info->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@@ -923,11 +1825,13 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
+ struct elf32_sparc_link_hash_table *htab;
bfd *dynobj;
asection *s;
- bfd_boolean relplt;
+ bfd *ibfd;
- dynobj = elf_hash_table (info)->dynobj;
+ htab = elf32_sparc_hash_table (info);
+ dynobj = htab->elf.dynobj;
BFD_ASSERT (dynobj != NULL);
if (elf_hash_table (info)->dynamic_sections_created)
@@ -940,33 +1844,113 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
+ }
- /* Make space for the trailing nop in .plt. */
- s = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (s != NULL);
- if (s->_raw_size > 0)
- s->_raw_size += 4;
+ /* Set up .got offsets for local syms, and space for local dynamic
+ relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ 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_sparc_dyn_relocs *p;
+
+ for (p = *((struct elf32_sparc_dyn_relocs **)
+ &elf_section_data (s)->local_dynrel);
+ p != NULL;
+ p = p->next)
+ {
+ if (!bfd_is_abs_section (p->sec)
+ && bfd_is_abs_section (p->sec->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->sec)->sreloc;
+ srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ if ((p->sec->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;
+ local_tls_type = elf32_sparc_local_got_tls_type (ibfd);
+ 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 (*local_tls_type == GOT_TLS_GD)
+ s->_raw_size += 4;
+ if (info->shared
+ || *local_tls_type == GOT_TLS_GD
+ || *local_tls_type == GOT_TLS_IE)
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
+ }
+
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ /* Allocate 2 got entries and 1 dynamic reloc for
+ R_SPARC_TLS_LDM_{HI22,LO10} relocs. */
+ htab->tls_ldm_got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += 8;
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
}
else
+ htab->tls_ldm_got.offset = -1;
+
+ /* Allocate global sym .plt and .got entries, and space for global
+ sym dynamic relocs. */
+ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
{
- /* We may have created entries in the .rela.got section.
- However, if we are not creating the dynamic sections, we will
- not actually use these entries. Reset the size of .rela.got,
- which will cause it to get stripped from the output file
- below. */
- s = bfd_get_section_by_name (dynobj, ".rela.got");
- if (s != NULL)
- s->_raw_size = 0;
+ /* Make space for the trailing nop in .plt. */
+ if (htab->splt->_raw_size > 0)
+ htab->splt->_raw_size += 4;
+
+ /* If the .got section is more than 0x1000 bytes, we add
+ 0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
+ bit relocations have a greater chance of working. */
+ if (htab->sgot->_raw_size >= 0x1000
+ && elf_hash_table (info)->hgot->root.u.def.value == 0)
+ elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
}
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
- relplt = FALSE;
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
+ bfd_boolean strip = FALSE;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -975,8 +1959,6 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strncmp (name, ".rela", 5) == 0)
{
if (s->_raw_size == 0)
@@ -994,16 +1976,12 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
}
else
{
- if (strcmp (name, ".rela.plt") == 0)
- relplt = TRUE;
-
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
s->reloc_count = 0;
}
}
- else if (strcmp (name, ".plt") != 0
- && strcmp (name, ".got") != 0)
+ else if (s != htab->splt && s != htab->sgot)
{
/* It's not one of our sections, so don't allocate space. */
continue;
@@ -1042,7 +2020,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (relplt)
+ if (htab->srelplt->_raw_size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -1056,6 +2034,12 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
|| !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
return FALSE;
+ /* If any dynamic relocs apply to a read-only section,
+ then we need a DT_TEXTREL entry. */
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
+ (PTR) info);
+
if (info->flags & DF_TEXTREL)
{
if (!add_dynamic_entry (DT_TEXTREL, 0))
@@ -1067,8 +2051,30 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
return TRUE;
}
-#define SET_SEC_DO_RELAX(section) do { elf_section_data(section)->tdata = (void *)1; } while (0)
-#define SEC_DO_RELAX(section) (elf_section_data(section)->tdata == (void *)1)
+struct elf32_sparc_section_data
+{
+ struct bfd_elf_section_data elf;
+ unsigned int do_relax;
+};
+
+#define sec_do_relax(sec) \
+ ((struct elf32_sparc_section_data *) elf_section_data (sec))->do_relax
+
+static bfd_boolean
+elf32_sparc_new_section_hook (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct elf32_sparc_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = (struct elf32_sparc_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
static bfd_boolean
elf32_sparc_relax_section (abfd, section, link_info, again)
@@ -1078,20 +2084,41 @@ elf32_sparc_relax_section (abfd, section, link_info, again)
bfd_boolean *again;
{
*again = FALSE;
- SET_SEC_DO_RELAX (section);
+ sec_do_relax (section) = 1;
return TRUE;
}
-/* This is the condition under which finish_dynamic_symbol will be called
- from elflink.h. If elflink.h doesn't call our finish_dynamic_symbol
- routine, we'll need to do something about initializing any .plt and .got
- entries in relocate_section. */
-#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, INFO, H) \
- ((DYN) \
- && ((INFO)->shared \
- || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \
- && ((H)->dynindx != -1 \
- || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
+/* Return the base VMA address which should be subtracted from real addresses
+ when resolving @dtpoff relocation.
+ This is PT_TLS segment p_vaddr. */
+
+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)
+ return 0;
+ return elf_hash_table (info)->tls_segment->start;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+static bfd_vma
+tpoff (info, address)
+ struct bfd_link_info *info;
+ bfd_vma address;
+{
+ struct elf_link_tls_segment *tls_segment
+ = elf_hash_table (info)->tls_segment;
+
+ /* If tls_segment is NULL, we should have signalled an error already. */
+ if (tls_segment == NULL)
+ return 0;
+ return -(align_power (tls_segment->size, tls_segment->align)
+ + tls_segment->start - address);
+}
/* Relocate a SPARC ELF section. */
@@ -1107,13 +2134,11 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Sym *local_syms;
asection **local_sections;
{
- bfd *dynobj;
+ struct elf32_sparc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
bfd_vma *local_got_offsets;
bfd_vma got_base;
- asection *sgot;
- asection *splt;
asection *sreloc;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
@@ -1121,7 +2146,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocateable)
return TRUE;
- dynobj = elf_hash_table (info)->dynobj;
+ htab = elf32_sparc_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
local_got_offsets = elf_local_got_offsets (input_bfd);
@@ -1131,15 +2156,13 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
else
got_base = elf_hash_table (info)->hgot->root.u.def.value;
- sgot = NULL;
- splt = NULL;
- sreloc = NULL;
+ sreloc = elf_section_data (input_section)->sreloc;
rel = relocs;
relend = relocs + input_section->reloc_count;
for (; rel < relend; rel++)
{
- int r_type;
+ int r_type, tls_type;
reloc_howto_type *howto;
unsigned long r_symndx;
struct elf_link_hash_entry *h;
@@ -1223,11 +2246,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_GOT22:
/* Relocation is to the entry for this symbol in the global
offset table. */
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- }
+ if (htab->sgot == NULL)
+ abort ();
if (h != NULL)
{
@@ -1261,7 +2281,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
bfd_put_32 (output_bfd, relocation,
- sgot->contents + off);
+ htab->sgot->contents + off);
h->got.offset |= 1;
}
}
@@ -1291,11 +2311,11 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
/* We need to generate a R_SPARC_RELATIVE reloc
for the dynamic linker. */
- s = bfd_get_section_by_name (dynobj, ".rela.got");
+ s = htab->srelgot;
BFD_ASSERT (s != NULL);
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ off);
outrel.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
outrel.r_addend = relocation;
@@ -1305,11 +2325,12 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
}
- bfd_put_32 (output_bfd, relocation, sgot->contents + off);
+ bfd_put_32 (output_bfd, relocation,
+ htab->sgot->contents + off);
local_got_offsets[r_symndx] |= 1;
}
}
- relocation = sgot->output_offset + off - got_base;
+ relocation = htab->sgot->output_offset + off - got_base;
break;
case R_SPARC_PLT32:
@@ -1320,6 +2341,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
}
/* Fall through. */
case R_SPARC_WPLT30:
+ r_sparc_wplt30:
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
@@ -1338,14 +2360,11 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
- if (splt == NULL)
- {
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL);
- }
+ if (htab->splt == NULL)
+ abort ();
- relocation = (splt->output_section->vma
- + splt->output_offset
+ relocation = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ h->plt.offset);
unresolved_reloc = FALSE;
if (r_type == R_SPARC_PLT32)
@@ -1369,12 +2388,6 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_WDISP22:
case R_SPARC_WDISP19:
case R_SPARC_WDISP16:
- if (h == NULL
- || (info->symbolic
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0))
- break;
- /* Fall through. */
case R_SPARC_8:
case R_SPARC_16:
case R_SPARC_32:
@@ -1385,9 +2398,30 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_UA16:
case R_SPARC_UA32:
r_sparc_plt32:
- if (info->shared
- && r_symndx != 0
- && (input_section->flags & SEC_ALLOC))
+ /* r_symndx will be zero only for relocs against symbols
+ from removed linkonce sections, or sections discarded by
+ a linker script. */
+ if (r_symndx == 0
+ || (input_section->flags & SEC_ALLOC) == 0)
+ break;
+
+ if ((info->shared
+ && (! howto->pc_relative
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || (!info->shared
+ && h != NULL
+ && h->dynindx != -1
+ && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
+ && (((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ || h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined)))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
@@ -1397,25 +2431,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
are copied into the output file to be resolved at run
time. */
- if (sreloc == NULL)
- {
- const char *name;
-
- name = (bfd_elf_string_from_elf_section
- (input_bfd,
- elf_elfheader (input_bfd)->e_shstrndx,
- elf_section_data (input_section)->rel_hdr.sh_name));
- if (name == NULL)
- return FALSE;
-
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- && strcmp (bfd_get_section_name (input_bfd,
- input_section),
- name + 5) == 0);
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- BFD_ASSERT (sreloc != NULL);
- }
+ BFD_ASSERT (sreloc != NULL);
skip = FALSE;
@@ -1487,7 +2503,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
long indx;
if (is_plt)
- sec = splt;
+ sec = htab->splt;
else if (h == NULL)
sec = local_sections[r_symndx];
else
@@ -1540,6 +2556,330 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
}
break;
+ case R_SPARC_TLS_GD_HI22:
+ if (! elf32_sparc_tdata (input_bfd)->has_tlsgd)
+ {
+ /* R_SPARC_REV32 used the same reloc number as
+ R_SPARC_TLS_GD_HI22. */
+ r_type = R_SPARC_REV32;
+ break;
+ }
+ /* Fall through */
+
+ case R_SPARC_TLS_GD_LO10:
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ r_type = elf32_sparc_tls_transition (info, input_bfd, r_type,
+ h == NULL);
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf32_sparc_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ {
+ tls_type = elf32_sparc_hash_entry(h)->tls_type;
+ if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_IE_HI22:
+ r_type = R_SPARC_TLS_LE_HIX22;
+ break;
+ default:
+ r_type = R_SPARC_TLS_LE_LOX10;
+ break;
+ }
+ }
+ if (tls_type == GOT_TLS_IE)
+ switch (r_type)
+ {
+ case R_SPARC_TLS_GD_HI22:
+ r_type = R_SPARC_TLS_IE_HI22;
+ break;
+ case R_SPARC_TLS_GD_LO10:
+ r_type = R_SPARC_TLS_IE_LO10;
+ break;
+ }
+
+ if (r_type == R_SPARC_TLS_LE_HIX22)
+ {
+ relocation = tpoff (info, relocation);
+ break;
+ }
+ if (r_type == R_SPARC_TLS_LE_LOX10)
+ {
+ /* Change add into xor. */
+ relocation = tpoff (info, relocation);
+ bfd_put_32 (output_bfd, (bfd_get_32 (input_bfd,
+ contents + rel->r_offset)
+ | 0x80182000), contents + rel->r_offset);
+ break;
+ }
+
+ if (h != NULL)
+ {
+ off = h->got.offset;
+ h->got.offset |= 1;
+ }
+ else
+ {
+ BFD_ASSERT (local_got_offsets != NULL);
+ off = local_got_offsets[r_symndx];
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ r_sparc_tlsldm:
+ if (htab->sgot == NULL)
+ abort ();
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ Elf32_External_Rela *loc;
+ int dr_type, indx;
+
+ if (htab->srelgot == NULL)
+ abort ();
+
+ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off);
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off);
+ indx = h && h->dynindx != -1 ? h->dynindx : 0;
+ if (r_type == R_SPARC_TLS_IE_HI22
+ || r_type == R_SPARC_TLS_IE_LO10)
+ dr_type = R_SPARC_TLS_TPOFF32;
+ else
+ dr_type = R_SPARC_TLS_DTPMOD32;
+ if (dr_type == R_SPARC_TLS_TPOFF32 && indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ outrel.r_info = ELF32_R_INFO (indx, dr_type);
+ loc = (Elf32_External_Rela *) htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (bfd_byte *) loc);
+
+ if (r_type == R_SPARC_TLS_GD_HI22
+ || r_type == R_SPARC_TLS_GD_LO10)
+ {
+ if (indx == 0)
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_32 (output_bfd,
+ relocation - dtpoff_base (info),
+ htab->sgot->contents + off + 4);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, 0,
+ htab->sgot->contents + off + 4);
+ outrel.r_info = ELF32_R_INFO (indx,
+ R_SPARC_TLS_DTPOFF32);
+ outrel.r_offset += 4;
+ htab->srelgot->reloc_count++;
+ loc++;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (bfd_byte *) loc);
+ }
+ }
+ else if (dr_type == R_SPARC_TLS_DTPMOD32)
+ {
+ bfd_put_32 (output_bfd, 0,
+ htab->sgot->contents + off + 4);
+ }
+ }
+
+ if (off >= (bfd_vma) -2)
+ abort ();
+
+ relocation = htab->sgot->output_offset + off - got_base;
+ unresolved_reloc = FALSE;
+ howto = _bfd_sparc_elf_howto_table + r_type;
+ break;
+
+ case R_SPARC_TLS_LDM_HI22:
+ case R_SPARC_TLS_LDM_LO10:
+ if (! info->shared)
+ {
+ bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
+ continue;
+ }
+ off = htab->tls_ldm_got.offset;
+ htab->tls_ldm_got.offset |= 1;
+ goto r_sparc_tlsldm;
+
+ case R_SPARC_TLS_LDO_HIX22:
+ case R_SPARC_TLS_LDO_LOX10:
+ if (info->shared)
+ relocation -= dtpoff_base (info);
+ else
+ relocation = tpoff (info, relocation);
+ break;
+
+ case R_SPARC_TLS_LE_HIX22:
+ case R_SPARC_TLS_LE_LOX10:
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ bfd_boolean skip, relocate = FALSE;
+
+ BFD_ASSERT (sreloc != NULL);
+ skip = FALSE;
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = TRUE;
+ else if (outrel.r_offset == (bfd_vma) -2)
+ skip = TRUE, relocate = TRUE;
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+ if (skip)
+ memset (&outrel, 0, sizeof outrel);
+ else
+ {
+ outrel.r_info = ELF32_R_INFO (0, r_type);
+ outrel.r_addend = relocation - dtpoff_base (info)
+ + rel->r_addend;
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (bfd_byte *) (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+ continue;
+ }
+ relocation = tpoff (info, relocation);
+ break;
+
+ case R_SPARC_TLS_LDM_CALL:
+ if (! info->shared)
+ {
+ /* mov %g0, %o0 */
+ bfd_put_32 (output_bfd, 0x90100000, contents + rel->r_offset);
+ continue;
+ }
+ /* Fall through */
+
+ case R_SPARC_TLS_GD_CALL:
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf32_sparc_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ tls_type = elf32_sparc_hash_entry(h)->tls_type;
+ if (! info->shared
+ || (r_type == R_SPARC_TLS_GD_CALL && tls_type == GOT_TLS_IE))
+ {
+ bfd_vma insn;
+
+ if (!info->shared && (h == NULL || h->dynindx == -1))
+ {
+ /* GD -> LE */
+ bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
+ continue;
+ }
+
+ /* GD -> IE */
+ if (rel + 1 < relend
+ && ELF32_R_TYPE (rel[1].r_info) == R_SPARC_TLS_GD_ADD
+ && rel[1].r_offset == rel->r_offset + 4
+ && ELF32_R_SYM (rel[1].r_info) == r_symndx
+ && (((insn = bfd_get_32 (input_bfd,
+ contents + rel[1].r_offset))
+ >> 25) & 0x1f) == 8)
+ {
+ /* We have
+ call __tls_get_addr, %tgd_call(foo)
+ add %reg1, %reg2, %o0, %tgd_add(foo)
+ and change it into IE:
+ ld [%reg1 + %reg2], %o0, %tie_ld(foo)
+ add %g7, %o0, %o0, %tie_add(foo).
+ add is 0x80000000 | (rd << 25) | (rs1 << 14) | rs2,
+ ld is 0xc0000000 | (rd << 25) | (rs1 << 14) | rs2. */
+ bfd_put_32 (output_bfd, insn | 0xc0000000,
+ contents + rel->r_offset);
+ bfd_put_32 (output_bfd, 0x9001c008,
+ contents + rel->r_offset + 4);
+ rel++;
+ continue;
+ }
+
+ bfd_put_32 (output_bfd, 0x9001c008, contents + rel->r_offset);
+ continue;
+ }
+
+ h = (struct elf_link_hash_entry *)
+ bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE,
+ FALSE, TRUE);
+ BFD_ASSERT (h != NULL);
+ r_type = R_SPARC_WPLT30;
+ howto = _bfd_sparc_elf_howto_table + r_type;
+ goto r_sparc_wplt30;
+
+ case R_SPARC_TLS_GD_ADD:
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf32_sparc_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ tls_type = elf32_sparc_hash_entry(h)->tls_type;
+ if (! info->shared || tls_type == GOT_TLS_IE)
+ {
+ /* add %reg1, %reg2, %reg3, %tgd_add(foo)
+ changed into IE:
+ ld [%reg1 + %reg2], %reg3, %tie_ld(foo)
+ or LE:
+ add %g7, %reg2, %reg3. */
+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((h != NULL && h->dynindx != -1) || info->shared)
+ relocation = insn | 0xc0000000;
+ else
+ relocation = (insn & ~0x7c000) | 0x1c000;
+ bfd_put_32 (output_bfd, relocation, contents + rel->r_offset);
+ }
+ continue;
+
+ case R_SPARC_TLS_LDM_ADD:
+ if (! info->shared)
+ bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
+ continue;
+
+ case R_SPARC_TLS_LDO_ADD:
+ if (! info->shared)
+ {
+ /* Change rs1 into %g7. */
+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ insn = (insn & ~0x7c000) | 0x1c000;
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+ }
+ continue;
+
+ case R_SPARC_TLS_IE_LD:
+ case R_SPARC_TLS_IE_LDX:
+ if (! info->shared && (h == NULL || h->dynindx == -1))
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ int rs2 = insn & 0x1f;
+ int rd = (insn >> 25) & 0x1f;
+
+ if (rs2 == rd)
+ relocation = SPARC_NOP;
+ else
+ relocation = 0x80100000 | (insn & 0x3e00001f);
+ bfd_put_32 (output_bfd, relocation, contents + rel->r_offset);
+ }
+ continue;
+
+ case R_SPARC_TLS_IE_ADD:
+ /* Totally useless relocation. */
+ continue;
+
+ case R_SPARC_TLS_DTPOFF32:
+ relocation -= dtpoff_base (info);
+ break;
+
default:
break;
}
@@ -1589,8 +2929,35 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_putl32 (/*input_bfd,*/ x, contents + rel->r_offset);
r = bfd_reloc_ok;
}
+ else if (r_type == R_SPARC_TLS_LDO_HIX22
+ || r_type == R_SPARC_TLS_LE_HIX22)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ relocation = relocation ^ 0xffffffff;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ }
+ else if (r_type == R_SPARC_TLS_LDO_LOX10
+ || r_type == R_SPARC_TLS_LE_LOX10)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ relocation = (relocation & 0x3ff) | 0x1c00;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x1fff) | relocation;
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+
+ r = bfd_reloc_ok;
+ }
else if ((r_type == R_SPARC_WDISP30 || r_type == R_SPARC_WPLT30)
- && SEC_DO_RELAX (input_section)
+ && sec_do_relax (input_section)
&& rel->r_offset + 4 < input_section->_raw_size)
{
#define G0 0
@@ -1731,8 +3098,10 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
Elf_Internal_Sym *sym;
{
bfd *dynobj;
-
- dynobj = elf_hash_table (info)->dynobj;
+ struct elf32_sparc_link_hash_table *htab;
+
+ htab = elf32_sparc_hash_table (info);
+ dynobj = htab->elf.dynobj;
if (h->plt.offset != (bfd_vma) -1)
{
@@ -1746,8 +3115,8 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
BFD_ASSERT (h->dynindx != -1);
- splt = bfd_get_section_by_name (dynobj, ".plt");
- srela = bfd_get_section_by_name (dynobj, ".rela.plt");
+ splt = htab->splt;
+ srela = htab->srelplt;
BFD_ASSERT (splt != NULL && srela != NULL);
/* Fill in the entry in the procedure linkage table. */
@@ -1786,7 +3155,9 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got.offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1
+ && elf32_sparc_hash_entry(h)->tls_type != GOT_TLS_GD
+ && elf32_sparc_hash_entry(h)->tls_type != GOT_TLS_IE)
{
asection *sgot;
asection *srela;
@@ -1796,8 +3167,8 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
/* This symbol has an entry in the global offset table. Set it
up. */
- sgot = bfd_get_section_by_name (dynobj, ".got");
- srela = bfd_get_section_by_name (dynobj, ".rela.got");
+ sgot = htab->sgot;
+ srela = htab->srelgot;
BFD_ASSERT (sgot != NULL && srela != NULL);
rela.r_offset = (sgot->output_section->vma
@@ -1873,9 +3244,10 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
{
bfd *dynobj;
asection *sdyn;
- asection *sgot;
-
- dynobj = elf_hash_table (info)->dynobj;
+ struct elf32_sparc_link_hash_table *htab;
+
+ htab = elf32_sparc_hash_table (info);
+ dynobj = htab->elf.dynobj;
sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
@@ -1943,19 +3315,18 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
/* Set the first entry in the global offset table to the address of
the dynamic section. */
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- if (sgot->_raw_size > 0)
+ if (htab->sgot && htab->sgot->_raw_size > 0)
{
if (sdyn == NULL)
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgot->contents);
else
bfd_put_32 (output_bfd,
sdyn->output_section->vma + sdyn->output_offset,
- sgot->contents);
+ htab->sgot->contents);
}
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+ if (htab->sgot)
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
return TRUE;
}
@@ -2024,6 +3395,15 @@ static bfd_boolean
elf32_sparc_object_p (abfd)
bfd *abfd;
{
+ /* Allocate our special target data. */
+ struct elf32_sparc_obj_tdata *new_tdata;
+ bfd_size_type amt = sizeof (struct elf32_sparc_obj_tdata);
+ new_tdata = bfd_zalloc (abfd, amt);
+ if (new_tdata == NULL)
+ return FALSE;
+ new_tdata->root = *abfd->tdata.elf_obj_data;
+ abfd->tdata.any = new_tdata;
+
if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS)
{
if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
@@ -2108,10 +3488,15 @@ elf32_sparc_reloc_type_class (rela)
#define ELF_MAXPAGESIZE 0x10000
#define bfd_elf32_bfd_reloc_type_lookup elf32_sparc_reloc_type_lookup
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf32_sparc_link_hash_table_create
#define bfd_elf32_bfd_relax_section elf32_sparc_relax_section
+#define bfd_elf32_new_section_hook elf32_sparc_new_section_hook
#define elf_info_to_howto elf32_sparc_info_to_howto
+#define elf_backend_copy_indirect_symbol \
+ elf32_sparc_copy_indirect_symbol
#define elf_backend_create_dynamic_sections \
- _bfd_elf_create_dynamic_sections
+ elf32_sparc_create_dynamic_sections
#define elf_backend_check_relocs elf32_sparc_check_relocs
#define elf_backend_adjust_dynamic_symbol \
elf32_sparc_adjust_dynamic_symbol
@@ -2124,6 +3509,7 @@ elf32_sparc_reloc_type_class (rela)
elf32_sparc_finish_dynamic_sections
#define bfd_elf32_bfd_merge_private_bfd_data \
elf32_sparc_merge_private_bfd_data
+#define bfd_elf32_mkobject elf32_sparc_mkobject
#define elf_backend_object_p elf32_sparc_object_p
#define elf_backend_final_write_processing \
elf32_sparc_final_write_processing
@@ -2132,6 +3518,7 @@ elf32_sparc_reloc_type_class (rela)
#define elf_backend_reloc_type_class elf32_sparc_reloc_type_class
#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index df0d7ca405b..c09e9de2135 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -174,7 +174,7 @@ static reloc_howto_type xstormy16_elf_howto_table [] =
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_XSTORMY16_REL_12", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0x0fff, /* dst_mask */
TRUE), /* pcrel_offset */
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index ac9822ac98d..aa592fae17d 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1,23 +1,23 @@
/* Alpha specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
-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. */
/* We need a published ABI spec for this. Until one comes out, don't
assume this'll remain unchanged forever. */
@@ -48,60 +48,60 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ecoffswap.h"
static int alpha_elf_dynamic_symbol_p
- PARAMS((struct elf_link_hash_entry *, struct bfd_link_info *));
+ PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *));
static struct bfd_hash_entry * elf64_alpha_link_hash_newfunc
- PARAMS((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
static struct bfd_link_hash_table * elf64_alpha_bfd_link_hash_table_create
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_reloc_status_type elf64_alpha_reloc_nil
- PARAMS((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type elf64_alpha_reloc_bad
- PARAMS((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type elf64_alpha_do_reloc_gpdisp
- PARAMS((bfd *, bfd_vma, bfd_byte *, bfd_byte *));
+ PARAMS ((bfd *, bfd_vma, bfd_byte *, bfd_byte *));
static bfd_reloc_status_type elf64_alpha_reloc_gpdisp
- PARAMS((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static reloc_howto_type * elf64_alpha_bfd_reloc_type_lookup
- PARAMS((bfd *, bfd_reloc_code_real_type));
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
static void elf64_alpha_info_to_howto
- PARAMS((bfd *, arelent *, Elf_Internal_Rela *));
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
static bfd_boolean elf64_alpha_mkobject
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_boolean elf64_alpha_object_p
- PARAMS((bfd *));
+ PARAMS ((bfd *));
static bfd_boolean elf64_alpha_section_from_shdr
- PARAMS((bfd *, Elf_Internal_Shdr *, const char *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static bfd_boolean elf64_alpha_section_flags
- PARAMS((flagword *, Elf_Internal_Shdr *));
+ PARAMS ((flagword *, Elf_Internal_Shdr *));
static bfd_boolean elf64_alpha_fake_sections
- PARAMS((bfd *, Elf_Internal_Shdr *, asection *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
static bfd_boolean elf64_alpha_create_got_section
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf64_alpha_create_dynamic_sections
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf64_alpha_read_ecoff_info
- PARAMS((bfd *, asection *, struct ecoff_debug_info *));
+ PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
static bfd_boolean elf64_alpha_is_local_label_name
- PARAMS((bfd *, const char *));
+ PARAMS ((bfd *, const char *));
static bfd_boolean elf64_alpha_find_nearest_line
- PARAMS((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
#if defined(__STDC__) || defined(ALMOST_STDC)
struct alpha_elf_link_hash_entry;
#endif
static bfd_boolean elf64_alpha_output_extsym
- PARAMS((struct alpha_elf_link_hash_entry *, PTR));
+ PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
static bfd_boolean elf64_alpha_can_merge_gots
- PARAMS((bfd *, bfd *));
+ PARAMS ((bfd *, bfd *));
static void elf64_alpha_merge_gots
- PARAMS((bfd *, bfd *));
+ PARAMS ((bfd *, bfd *));
static bfd_boolean elf64_alpha_calc_got_offsets_for_symbol
PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
static void elf64_alpha_calc_got_offsets
@@ -129,27 +129,30 @@ static struct alpha_elf_got_entry *get_got_entry
PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long,
unsigned long, bfd_vma));
static bfd_boolean elf64_alpha_check_relocs
- PARAMS((bfd *, struct bfd_link_info *, asection *sec,
+ PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
const Elf_Internal_Rela *));
static bfd_boolean elf64_alpha_adjust_dynamic_symbol
- PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static bfd_boolean elf64_alpha_size_dynamic_sections
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
+static void elf64_alpha_emit_dynrel
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, asection *,
+ bfd_vma, long, long, bfd_vma));
static bfd_boolean elf64_alpha_relocate_section_r
- PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static bfd_boolean elf64_alpha_relocate_section
- PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static bfd_boolean elf64_alpha_finish_dynamic_symbol
- PARAMS((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
static bfd_boolean elf64_alpha_finish_dynamic_sections
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf64_alpha_final_link
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf64_alpha_merge_ind_symbols
- PARAMS((struct alpha_elf_link_hash_entry *, PTR));
+ PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs
PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int));
static enum elf_reloc_type_class elf64_alpha_reloc_type_class
@@ -174,19 +177,24 @@ struct alpha_elf_link_hash_entry
#define ALPHA_ELF_LINK_HASH_LU_TLSLDM 0x20
#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x38
#define ALPHA_ELF_LINK_HASH_TLS_IE 0x40
+#define ALPHA_ELF_LINK_HASH_PLT_LOC 0x80
+
+ /* Used to undo the localization of a plt symbol. */
+ asection *plt_old_section;
+ bfd_vma plt_old_value;
/* Used to implement multiple .got subsections. */
struct alpha_elf_got_entry
{
struct alpha_elf_got_entry *next;
- /* which .got subsection? */
+ /* Which .got subsection? */
bfd *gotobj;
- /* the addend in effect for this entry. */
+ /* The addend in effect for this entry. */
bfd_vma addend;
- /* the .got offset for this entry. */
+ /* The .got offset for this entry. */
int got_offset;
/* How many references to this entry? */
@@ -205,22 +213,22 @@ struct alpha_elf_link_hash_entry
unsigned char reloc_xlated;
} *got_entries;
- /* used to count non-got, non-plt relocations for delayed sizing
+ /* Used to count non-got, non-plt relocations for delayed sizing
of relocation sections. */
struct alpha_elf_reloc_entry
{
struct alpha_elf_reloc_entry *next;
- /* which .reloc section? */
+ /* Which .reloc section? */
asection *srel;
- /* what kind of relocation? */
+ /* What kind of relocation? */
unsigned int rtype;
- /* is this against read-only section? */
+ /* Is this against read-only section? */
unsigned int reltext : 1;
- /* how many did we find? */
+ /* How many did we find? */
unsigned long count;
} *reloc_entries;
};
@@ -1638,6 +1646,17 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset);
info->changed_contents = TRUE;
+ /* Reduce the use count on this got entry by one, possibly
+ eliminating it. */
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (r_type);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
+
+ /* Smash the existing GOT relocation for its 16-bit immediate pair. */
switch (r_type)
{
case R_ALPHA_LITERAL:
@@ -1657,16 +1676,6 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type);
info->changed_relocs = TRUE;
- /* Reduce the use count on this got entry by one, possibly
- eliminating it. */
- if (--info->gotent->use_count == 0)
- {
- int sz = alpha_got_entry_size (r_type);
- alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
- if (!info->h)
- alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
- }
-
/* ??? Search forward through this basic block looking for insns
that use the target register. Stop after an insn modifying the
register is seen, or after a branch or call.
@@ -1748,15 +1757,11 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
bfd_byte *pos[5];
unsigned int insn;
Elf_Internal_Rela *gpdisp, *hint;
- bfd_boolean dynamic, use_gottprel;
+ bfd_boolean dynamic, use_gottprel, pos1_unusable;
+ unsigned long new_symndx;
dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info);
- /* ??? For LD relaxation, we need a symbol referencing the beginning
- of the TLS segment. */
- if (!is_gd)
- return TRUE;
-
/* If a TLS symbol is accessed using IE at least once, there is no point
to use dynamic model for it. */
if (is_gd && info->h && (info->h->flags & ALPHA_ELF_LINK_HASH_TLS_IE))
@@ -1793,15 +1798,20 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
pos[2] = info->contents + irel[2].r_offset;
pos[3] = info->contents + gpdisp->r_offset;
pos[4] = pos[3] + gpdisp->r_addend;
+ pos1_unusable = FALSE;
- /* Only positions 0 and 1 are allowed to be out of order. */
- if (pos[1] < pos[0])
+ /* Generally, the positions are not allowed to be out of order, lest the
+ modified insn sequence have different register lifetimes. We can make
+ an exception when pos 1 is adjacent to pos 0. */
+ if (pos[1] + 4 == pos[0])
{
bfd_byte *tmp = pos[0];
pos[0] = pos[1];
pos[1] = tmp;
}
- if (pos[1] >= pos[2] || pos[2] >= pos[3] || pos[3] >= pos[4])
+ else if (pos[1] < pos[0])
+ pos1_unusable = TRUE;
+ if (pos[1] >= pos[2] || pos[2] >= pos[3])
return TRUE;
/* Reduce the use count on the LITERAL relocation. Do this before we
@@ -1857,6 +1867,7 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
as appropriate. */
use_gottprel = FALSE;
+ new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : 0;
switch (!dynamic && !info->link_info->shared)
{
case 1:
@@ -1875,13 +1886,13 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
irel[0].r_offset = pos[0] - info->contents;
- irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_TPREL16);
+ irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPREL16);
irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
break;
}
else if (disp >= -(bfd_signed_vma) 0x80000000
- && disp < (bfd_signed_vma) 0x7fff8000)
+ && disp < (bfd_signed_vma) 0x7fff8000
+ && !pos1_unusable)
{
insn = (OP_LDAH << 26) | (16 << 21) | (31 << 16);
bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
@@ -1889,11 +1900,9 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
bfd_put_32 (info->abfd, (bfd_vma) insn, pos[1]);
irel[0].r_offset = pos[0] - info->contents;
- irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_TPRELHI);
+ irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPRELHI);
irel[1].r_offset = pos[1] - info->contents;
- irel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_TPRELLO);
+ irel[1].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPRELLO);
break;
}
}
@@ -1907,8 +1916,7 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
irel[0].r_offset = pos[0] - info->contents;
- irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_GOTTPREL);
+ irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_GOTTPREL);
irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
break;
}
@@ -2111,6 +2119,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
bfd_vma symval;
struct alpha_elf_got_entry *gotent;
unsigned long r_type = ELF64_R_TYPE (irel->r_info);
+ unsigned long r_symndx = ELF64_R_SYM (irel->r_info);
/* Early exit for unhandled or unrelaxable relocations. */
switch (r_type)
@@ -2121,14 +2130,20 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
case R_ALPHA_GOTDTPREL:
case R_ALPHA_GOTTPREL:
case R_ALPHA_TLSGD:
+ break;
+
case R_ALPHA_TLSLDM:
+ /* The symbol for a TLSLDM reloc is ignored. Collapse the
+ reloc to the 0 symbol so that they all match. */
+ r_symndx = 0;
break;
+
default:
continue;
}
/* Get the value of the symbol referred to by the reloc. */
- if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ if (r_symndx < symtab_hdr->sh_info)
{
/* A local symbol. */
Elf_Internal_Sym *isym;
@@ -2145,27 +2160,44 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
goto error_return;
}
- isym = isymbuf + ELF64_R_SYM (irel->r_info);
- if (isym->st_shndx == SHN_UNDEF)
- continue;
- else if (isym->st_shndx == SHN_ABS)
- info.tsec = bfd_abs_section_ptr;
- else if (isym->st_shndx == SHN_COMMON)
- info.tsec = bfd_com_section_ptr;
+ isym = isymbuf + r_symndx;
+
+ /* Given the symbol for a TLSLDM reloc is ignored, this also
+ means forcing the symbol value to the tp base. */
+ if (r_type == R_ALPHA_TLSLDM)
+ {
+ info.tsec = bfd_abs_section_ptr;
+ symval = alpha_get_tprel_base (info.tls_segment);
+ }
else
- info.tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ {
+ symval = isym->st_value;
+ if (isym->st_shndx == SHN_UNDEF)
+ continue;
+ else if (isym->st_shndx == SHN_ABS)
+ info.tsec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ info.tsec = bfd_com_section_ptr;
+ else
+ info.tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ }
info.h = NULL;
info.other = isym->st_other;
- info.first_gotent = &local_got_entries[ELF64_R_SYM(irel->r_info)];
- symval = isym->st_value;
+ if (local_got_entries)
+ info.first_gotent = &local_got_entries[r_symndx];
+ else
+ {
+ info.first_gotent = &info.gotent;
+ info.gotent = NULL;
+ }
}
else
{
unsigned long indx;
struct alpha_elf_link_hash_entry *h;
- indx = ELF64_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ indx = r_symndx - symtab_hdr->sh_info;
h = alpha_elf_sym_hashes (abfd)[indx];
BFD_ASSERT (h != NULL);
@@ -2181,13 +2213,23 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
/* If the symbol isn't defined in the current module, again
we can't do anything. */
if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- continue;
+ {
+ /* Except for TLSGD relocs, which can sometimes be
+ relaxed to GOTTPREL relocs. */
+ if (r_type != R_ALPHA_TLSGD)
+ continue;
+ info.tsec = bfd_abs_section_ptr;
+ symval = 0;
+ }
+ else
+ {
+ info.tsec = h->root.root.u.def.section;
+ symval = h->root.root.u.def.value;
+ }
info.h = h;
- info.tsec = h->root.root.u.def.section;
info.other = h->root.other;
info.first_gotent = &h->got_entries;
- symval = h->root.root.u.def.value;
}
/* Search for the got entry to be used by this relocation. */
@@ -3105,8 +3147,15 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
need = NEED_DYNREL;
break;
- case R_ALPHA_TLSGD:
case R_ALPHA_TLSLDM:
+ /* The symbol for a TLSLDM reloc is ignored. Collapse the
+ reloc to the 0 symbol so that they all match. */
+ r_symndx = 0;
+ h = 0;
+ maybe_dynamic = FALSE;
+ /* FALLTHRU */
+
+ case R_ALPHA_TLSGD:
case R_ALPHA_GOTDTPREL:
need = NEED_GOT | NEED_GOT_ENTRY;
break;
@@ -3308,6 +3357,9 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
if (! info->shared
&& h->root.type != bfd_link_hash_defweak)
{
+ ah->plt_old_section = h->root.u.def.section;
+ ah->plt_old_value = h->root.u.def.value;
+ ah->flags |= ALPHA_ELF_LINK_HASH_PLT_LOC;
h->root.u.def.section = s;
h->root.u.def.value = h->plt.offset;
}
@@ -3789,6 +3841,14 @@ elf64_alpha_size_plt_section_1 (h, data)
{
h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->root.plt.offset = -1;
+
+ /* Undo the definition frobbing begun in adjust_dynamic_symbol. */
+ if (h->flags & ALPHA_ELF_LINK_HASH_PLT_LOC)
+ {
+ h->root.root.u.def.section = h->plt_old_section;
+ h->root.root.u.def.value = h->plt_old_value;
+ h->flags &= ~ALPHA_ELF_LINK_HASH_PLT_LOC;
+ }
}
return TRUE;
@@ -3842,18 +3902,16 @@ alpha_dynamic_entries_for_reloc (r_type, dynamic, shared)
case R_ALPHA_TLSLDM:
return shared;
case R_ALPHA_LITERAL:
+ case R_ALPHA_GOTTPREL:
return dynamic || shared;
case R_ALPHA_GOTDTPREL:
- case R_ALPHA_GOTTPREL:
return dynamic;
/* May appear in data sections. */
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
- return dynamic || shared;
- case R_ALPHA_SREL64:
case R_ALPHA_TPREL64:
- return dynamic;
+ return dynamic || shared;
/* Everything else is illegal. We'll issue an error during
relocate_section. */
@@ -4147,6 +4205,38 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Emit a dynamic relocation for (DYNINDX, RTYPE, ADDEND) at (SEC, OFFSET)
+ into the next available slot in SREL. */
+
+static void
+elf64_alpha_emit_dynrel (abfd, info, sec, srel, offset, dynindx, rtype, addend)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec, *srel;
+ bfd_vma offset, addend;
+ long dynindx, rtype;
+{
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+
+ BFD_ASSERT (srel != NULL);
+
+ outrel.r_info = ELF64_R_INFO (dynindx, rtype);
+ outrel.r_addend = addend;
+
+ offset = _bfd_elf_section_offset (abfd, info, sec, offset);
+ if ((offset | 1) != (bfd_vma) -1)
+ outrel.r_offset = sec->output_section->vma + sec->output_offset + offset;
+ else
+ memset (&outrel, 0, sizeof (outrel));
+
+ loc = srel->contents;
+ loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
+ <= srel->_cooked_size);
+}
+
/* Relocate an Alpha ELF section for a relocatable link.
We don't have to change anything unless the reloc is against a section
@@ -4322,12 +4412,29 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
howto = elf64_alpha_howto_table + r_type;
r_symndx = ELF64_R_SYM(rel->r_info);
+ /* The symbol for a TLSLDM reloc is ignored. Collapse the
+ reloc to the 0 symbol so that they all match. */
+ if (r_type == R_ALPHA_TLSLDM)
+ r_symndx = 0;
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ /* If this is a tp-relative relocation against sym 0,
+ this is hackery from relax_section. Force the value to
+ be the tls base. */
+ if (r_symndx == 0
+ && (r_type == R_ALPHA_TLSLDM
+ || r_type == R_ALPHA_GOTTPREL
+ || r_type == R_ALPHA_TPREL64
+ || r_type == R_ALPHA_TPRELHI
+ || r_type == R_ALPHA_TPRELLO
+ || r_type == R_ALPHA_TPREL16))
+ value = tp_base;
+
if (local_got_entries)
gotent = local_got_entries[r_symndx];
else
@@ -4337,8 +4444,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
unless it has been done already. */
if ((sec->flags & SEC_MERGE)
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
- && (elf_section_data (sec)->sec_info_type
- == ELF_INFO_TYPE_MERGE)
+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE
&& gotent
&& !gotent->reloc_xlated)
{
@@ -4464,25 +4570,9 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
RELATIVE reloc, otherwise it will be handled in
finish_dynamic_symbol. */
if (info->shared && !dynamic_symbol_p)
- {
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- BFD_ASSERT(srelgot != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE);
- outrel.r_addend = value;
-
- loc = srelgot->contents;
- loc += srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela)
- * srelgot->reloc_count
- <= srelgot->_cooked_size);
- }
+ elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
+ gotent->got_offset, 0,
+ R_ALPHA_RELATIVE, value);
}
value = (sgot->output_section->vma
@@ -4607,8 +4697,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case R_ALPHA_DTPREL64:
case R_ALPHA_TPREL64:
{
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
+ long dynindx, dyntype = r_type;
+ bfd_vma dynaddend;
/* Careful here to remember RELATIVE relocations for global
variables for symbolic shared objects. */
@@ -4616,8 +4706,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
BFD_ASSERT(h->root.dynindx != -1);
- outrel.r_info = ELF64_R_INFO (h->root.dynindx, r_type);
- outrel.r_addend = addend;
+ dynindx = h->root.dynindx;
+ dynaddend = addend;
addend = 0, value = 0;
}
else if (r_type == R_ALPHA_DTPREL64)
@@ -4629,8 +4719,13 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
else if (r_type == R_ALPHA_TPREL64)
{
BFD_ASSERT(tls_segment != NULL);
- value -= dtp_base;
- goto default_reloc;
+ if (!info->shared)
+ {
+ value -= tp_base;
+ goto default_reloc;
+ }
+ dynindx = 0;
+ dynaddend = value - dtp_base;
}
else if (info->shared
&& r_symndx != 0
@@ -4644,28 +4739,16 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
h->root.root.root.string);
ret_val = FALSE;
}
- outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE);
- outrel.r_addend = value;
+ dynindx = 0;
+ dyntype = R_ALPHA_RELATIVE;
+ dynaddend = value;
}
else
goto default_reloc;
- BFD_ASSERT(srel != NULL);
-
- outrel.r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset);
- if ((outrel.r_offset | 1) != (bfd_vma) -1)
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- else
- memset (&outrel, 0, sizeof outrel);
-
- loc = srel->contents;
- loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ elf64_alpha_emit_dynrel (output_bfd, info, input_section,
+ srel, rel->r_offset, dynindx,
+ dyntype, dynaddend);
}
goto default_reloc;
@@ -4707,26 +4790,9 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
DTPMOD64 reloc, otherwise it will be handled in
finish_dynamic_symbol. */
if (info->shared && !dynamic_symbol_p)
- {
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- BFD_ASSERT(srelgot != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- /* ??? Proper dynindx here. */
- outrel.r_info = ELF64_R_INFO (0, R_ALPHA_DTPMOD64);
- outrel.r_addend = 0;
-
- loc = srelgot->contents;
- loc += srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela)
- * srelgot->reloc_count
- <= srelgot->_cooked_size);
- }
+ elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
+ gotent->got_offset, 0,
+ R_ALPHA_DTPMOD64, 0);
if (dynamic_symbol_p || r_type == R_ALPHA_TLSLDM)
value = 0;
@@ -4800,7 +4866,18 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
BFD_ASSERT(tls_segment != NULL);
- value -= (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
+ if (r_type == R_ALPHA_GOTDTPREL)
+ value -= dtp_base;
+ else if (!info->shared)
+ value -= tp_base;
+ else
+ {
+ elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
+ gotent->got_offset, 0,
+ R_ALPHA_TPREL64,
+ value - dtp_base);
+ value = 0;
+ }
}
bfd_put_64 (output_bfd, value,
sgot->contents + gotent->got_offset);
@@ -4957,19 +5034,9 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
sgot->contents + gotent->got_offset);
if (info->shared)
- {
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
- outrel.r_addend = plt_addr;
-
- loc = srel->contents;
- loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
- }
+ elf64_alpha_emit_dynrel (output_bfd, info, sgot, srel,
+ gotent->got_offset, 0,
+ R_ALPHA_RELATIVE, plt_addr);
gotent = gotent->next;
}
@@ -4980,8 +5047,6 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
{
/* Fill in the dynamic relocations for this symbol's .got entries. */
asection *srel;
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
struct alpha_elf_got_entry *gotent;
srel = bfd_get_section_by_name (dynobj, ".rela.got");
@@ -4992,15 +5057,12 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
gotent = gotent->next)
{
asection *sgot;
- int r_type;
+ long r_type;
if (gotent->use_count == 0)
continue;
sgot = alpha_elf_tdata (gotent->gotobj)->got;
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
r_type = gotent->reloc_type;
switch (r_type)
@@ -5022,25 +5084,14 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
abort ();
}
- outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
- outrel.r_addend = gotent->addend;
-
- loc = srel->contents;
- loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ elf64_alpha_emit_dynrel (output_bfd, info, sgot, srel,
+ gotent->got_offset, h->dynindx,
+ r_type, gotent->addend);
if (gotent->reloc_type == R_ALPHA_TLSGD)
- {
- outrel.r_offset += 8;
- outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_DTPREL64);
-
- loc = srel->contents;
- loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- }
-
- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ elf64_alpha_emit_dynrel (output_bfd, info, sgot, srel,
+ gotent->got_offset + 8, h->dynindx,
+ R_ALPHA_DTPREL64, gotent->addend);
}
}
@@ -5137,8 +5188,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
bfd_put_64 (output_bfd, (bfd_vma) 0, splt->contents + 16);
bfd_put_64 (output_bfd, (bfd_vma) 0, splt->contents + 24);
- elf_section_data (splt->output_section)->this_hdr.sh_entsize =
- PLT_HEADER_SIZE;
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 0;
}
}
@@ -5617,6 +5667,7 @@ elf64_alpha_fbsd_post_process_headers (abfd, link_info)
#define elf_backend_post_process_headers \
elf64_alpha_fbsd_post_process_headers
+#undef elf64_bed
#define elf64_bed elf64_alpha_fbsd_bed
#include "elf64-target.h"
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 50fcfbabf19..d29f2862ea6 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1,5 +1,5 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
@@ -2746,6 +2746,7 @@ const struct elf_size_info mips_elf64_size_info =
MIPS-specific function only applies to IRIX5, which had no 64-bit
ABI. */
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
+#define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook
#define bfd_elf64_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf64_bfd_get_relocated_section_contents \
_bfd_elf_mips_get_relocated_section_contents
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 3cca228eade..bcf99626571 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -1,5 +1,5 @@
/* MMIX-specific support for 64-bit ELF.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -41,8 +41,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
_bfd_abort (__FILE__, __LINE__, \
"bad case for " #x)
+struct _mmix_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ union
+ {
+ struct bpo_reloc_section_info *reloc;
+ struct bpo_greg_section_info *greg;
+ } bpo;
+};
+
+#define mmix_elf_section_data(sec) \
+ ((struct _mmix_elf_section_data *) elf_section_data (sec))
+
/* For each section containing a base-plus-offset (BPO) reloc, we attach
- this struct as elf_section_data (section)->tdata, which is otherwise
+ this struct as mmix_elf_section_data (section)->bpo, which is otherwise
NULL. */
struct bpo_reloc_section_info
{
@@ -83,7 +96,7 @@ struct bpo_reloc_request
bfd_boolean valid;
};
-/* We attach this as elf_section_data (sec)->tdata in the linker-allocated
+/* We attach this as mmix_elf_section_data (sec)->bpo in the linker-allocated
greg contents section (MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME),
which is linked into the register contents section
(MMIX_REG_CONTENTS_SECTION_NAME). This section is created by the
@@ -135,6 +148,9 @@ static void mmix_info_to_howto_rela
static int mmix_elf_sort_relocs PARAMS ((const PTR, const PTR));
+static bfd_boolean mmix_elf_new_section_hook
+ PARAMS ((bfd *, asection *));
+
static bfd_boolean mmix_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -795,6 +811,22 @@ bfd_elf64_bfd_reloc_type_lookup (abfd, code)
return NULL;
}
+static bfd_boolean
+mmix_elf_new_section_hook (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct _mmix_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = (struct _mmix_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
+
/* This function performs the actual bitfiddling and sanity check for a
final relocation. Each relocation gets its *worst*-case expansion
@@ -983,13 +1015,11 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
case R_MMIX_BASE_PLUS_OFFSET:
{
struct bpo_reloc_section_info *bpodata
- = (struct bpo_reloc_section_info *)
- elf_section_data (isec)->tdata;
+ = mmix_elf_section_data (isec)->bpo.reloc;
asection *bpo_greg_section
= bpodata->bpo_greg_section;
struct bpo_greg_section_info *gregdata
- = (struct bpo_greg_section_info *)
- elf_section_data (bpo_greg_section)->tdata;
+ = mmix_elf_section_data (bpo_greg_section)->bpo.greg;
size_t bpo_index
= gregdata->bpo_reloc_indexes[bpodata->bpo_index++];
@@ -1573,8 +1603,7 @@ mmix_elf_gc_sweep_hook (abfd, info, sec, relocs)
const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
struct bpo_reloc_section_info *bpodata
- = (struct bpo_reloc_section_info *)
- elf_section_data (sec)->tdata;
+ = mmix_elf_section_data (sec)->bpo.reloc;
asection *allocated_gregs_section;
/* If no bpodata here, we have nothing to do. */
@@ -1583,9 +1612,7 @@ mmix_elf_gc_sweep_hook (abfd, info, sec, relocs)
allocated_gregs_section = bpodata->bpo_greg_section;
- ((struct bpo_greg_section_info *)
- elf_section_data (allocated_gregs_section)->tdata)
- ->n_bpo_relocs
+ mmix_elf_section_data (allocated_gregs_section)->bpo.greg->n_bpo_relocs
-= bpodata->n_bpo_relocs_this_section;
return TRUE;
@@ -1698,10 +1725,12 @@ mmix_elf_check_common_relocs (abfd, info, sec, relocs)
bfd_zalloc (bpo_greg_owner, sizeof (struct bpo_greg_section_info));
if (gregdata == NULL)
return FALSE;
- elf_section_data (allocated_gregs_section)->tdata = gregdata;
+ mmix_elf_section_data (allocated_gregs_section)->bpo.greg
+ = gregdata;
}
else if (gregdata == NULL)
- gregdata = elf_section_data (allocated_gregs_section)->tdata;
+ gregdata
+ = mmix_elf_section_data (allocated_gregs_section)->bpo.greg;
/* Get ourselves some auxiliary info for the BPO-relocs. */
if (bpodata == NULL)
@@ -1714,7 +1743,7 @@ mmix_elf_check_common_relocs (abfd, info, sec, relocs)
* (sec->reloc_count + 1));
if (bpodata == NULL)
return FALSE;
- elf_section_data (sec)->tdata = bpodata;
+ mmix_elf_section_data (sec)->bpo.reloc = bpodata;
bpodata->first_base_plus_offset_reloc
= bpodata->bpo_index
= gregdata->n_max_bpo_relocs;
@@ -2084,8 +2113,7 @@ _bfd_mmix_prepare_linker_allocated_gregs (abfd, info)
return TRUE;
/* We use the target-data handle in the ELF section data. */
- gregdata = (struct bpo_greg_section_info *)
- elf_section_data (bpo_gregs_section)->tdata;
+ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg;
if (gregdata == NULL)
return FALSE;
@@ -2163,8 +2191,7 @@ _bfd_mmix_finalize_linker_allocated_gregs (abfd, link_info)
/* We use the target-data handle in the ELF section data. */
- gregdata = (struct bpo_greg_section_info *)
- elf_section_data (bpo_gregs_section)->tdata;
+ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg;
if (gregdata == NULL)
return FALSE;
@@ -2260,8 +2287,7 @@ mmix_dump_bpo_gregs (link_info, pf)
if (bpo_gregs_section == NULL)
return;
- gregdata = (struct bpo_greg_section_info *)
- elf_section_data (bpo_gregs_section)->tdata;
+ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg;
if (gregdata == NULL)
return;
@@ -2313,8 +2339,7 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
asection *bpo_gregs_section = NULL;
struct bpo_greg_section_info *gregdata;
struct bpo_reloc_section_info *bpodata
- = (struct bpo_reloc_section_info *)
- elf_section_data (sec)->tdata;
+ = mmix_elf_section_data (sec)->bpo.reloc;
size_t bpono;
bfd *bpo_greg_owner;
Elf_Internal_Sym *isymbuf = NULL;
@@ -2343,8 +2368,7 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
bpo_greg_owner = (bfd *) link_info->base_file;
bpo_gregs_section = bpodata->bpo_greg_section;
- gregdata = (struct bpo_greg_section_info *)
- elf_section_data (bpo_gregs_section)->tdata;
+ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg;
bpono = bpodata->first_base_plus_offset_reloc;
@@ -2560,6 +2584,7 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
#define elf_backend_section_from_bfd_section \
mmix_elf_section_from_bfd_section
+#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
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 57918839767..b86bb858caf 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -1,5 +1,5 @@
/* PowerPC64-specific support for 64-bit ELF.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 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.
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
-#include "elf/ppc.h"
+#include "elf/ppc64.h"
#include "elf64-ppc.h"
static void ppc_howto_init
@@ -56,6 +56,8 @@ static bfd_boolean ppc64_elf_object_p
PARAMS ((bfd *));
static bfd_boolean ppc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
+static bfd_boolean ppc64_elf_new_section_hook
+ PARAMS ((bfd *, asection *));
/* The name of the dynamic interpreter. This is put in the .interp
@@ -69,7 +71,11 @@ static bfd_boolean ppc64_elf_merge_private_bfd_data
#define PLT_INITIAL_ENTRY_SIZE PLT_ENTRY_SIZE
/* TOC base pointers offset from start of TOC. */
-#define TOC_BASE_OFF (0x8000)
+#define TOC_BASE_OFF 0x8000
+
+/* Offset of tp and dtp pointers from start of TLS block. */
+#define TP_OFFSET 0x7000
+#define DTP_OFFSET 0x8000
/* .plt call stub instructions. */
#define ADDIS_R12_R2 0x3d820000 /* addis %r12,%r2,xxx@ha */
@@ -126,14 +132,14 @@ static bfd_boolean ppc64_elf_merge_private_bfd_data
#define ONES(n) (((bfd_vma) 1 << ((n) - 1) << 1) - 1)
/* Relocation HOWTO's. */
-static reloc_howto_type *ppc64_elf_howto_table[(int) R_PPC_max];
+static reloc_howto_type *ppc64_elf_howto_table[(int) R_PPC64_max];
static reloc_howto_type ppc64_elf_howto_raw[] = {
/* This reloc does nothing. */
HOWTO (R_PPC64_NONE, /* type */
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
@@ -667,9 +673,8 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Like R_PPC64_REL24 without touching the two least significant
- bits. Should have been named R_PPC64_REL30! */
- HOWTO (R_PPC64_ADDR30, /* type */
+ /* Like R_PPC64_REL24 without touching the two least significant bits. */
+ HOWTO (R_PPC64_REL30, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
30, /* bitsize */
@@ -677,7 +682,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_PPC64_ADDR30", /* name */
+ "R_PPC64_REL30", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0xfffffffc, /* dst_mask */
@@ -1151,6 +1156,616 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
+ /* Marker reloc for TLS. */
+ HOWTO (R_PPC64_TLS,
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_TLS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Computes the load module index of the load module that contains the
+ definition of its TLS sym. */
+ HOWTO (R_PPC64_DTPMOD64,
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPMOD64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ONES (64), /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Computes a dtv-relative displacement, the difference between the value
+ of sym+add and the base address of the thread-local storage block that
+ contains the definition of sym, minus 0x8000. */
+ HOWTO (R_PPC64_DTPREL64,
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ONES (64), /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 16 bit dtprel reloc. */
+ HOWTO (R_PPC64_DTPREL16,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16, but no overflow. */
+ HOWTO (R_PPC64_DTPREL16_LO,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_LO, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_DTPREL16_HI,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_DTPREL16_HA,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_HI, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_DTPREL16_HIGHER,
+ 32, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_HIGHER", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_HIGHER, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_DTPREL16_HIGHERA,
+ 32, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_HIGHERA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_HIGHER, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_DTPREL16_HIGHEST,
+ 48, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_HIGHEST", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_HIGHEST, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_DTPREL16_HIGHESTA,
+ 48, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_HIGHESTA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16, but for insns with a DS field. */
+ HOWTO (R_PPC64_DTPREL16_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like DTPREL16_DS, but no overflow. */
+ HOWTO (R_PPC64_DTPREL16_LO_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_DTPREL16_LO_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Computes a tp-relative displacement, the difference between the value of
+ sym+add and the value of the thread pointer (r13). */
+ HOWTO (R_PPC64_TPREL64,
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ONES (64), /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A 16 bit tprel reloc. */
+ HOWTO (R_PPC64_TPREL16,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16, but no overflow. */
+ HOWTO (R_PPC64_TPREL16_LO,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_LO, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_TPREL16_HI,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_TPREL16_HA,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_HI, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_TPREL16_HIGHER,
+ 32, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_HIGHER", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_HIGHER, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_TPREL16_HIGHERA,
+ 32, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_HIGHERA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_HIGHER, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_TPREL16_HIGHEST,
+ 48, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_HIGHEST", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_HIGHEST, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_TPREL16_HIGHESTA,
+ 48, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_HIGHESTA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16, but for insns with a DS field. */
+ HOWTO (R_PPC64_TPREL16_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like TPREL16_DS, but no overflow. */
+ HOWTO (R_PPC64_TPREL16_LO_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_TPREL16_LO_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Allocates two contiguous entries in the GOT to hold a tls_index structure,
+ with values (sym+add)@dtpmod and (sym+add)@dtprel, and computes the offset
+ to the first entry relative to the TOC base (r2). */
+ HOWTO (R_PPC64_GOT_TLSGD16,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSGD16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TLSGD16, but no overflow. */
+ HOWTO (R_PPC64_GOT_TLSGD16_LO,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSGD16_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TLSGD16_LO, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_GOT_TLSGD16_HI,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSGD16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TLSGD16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_GOT_TLSGD16_HA,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSGD16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Allocates two contiguous entries in the GOT to hold a tls_index structure,
+ with values (sym+add)@dtpmod and zero, and computes the offset to the
+ first entry relative to the TOC base (r2). */
+ HOWTO (R_PPC64_GOT_TLSLD16,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSLD16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TLSLD16, but no overflow. */
+ HOWTO (R_PPC64_GOT_TLSLD16_LO,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSLD16_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TLSLD16_LO, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_GOT_TLSLD16_HI,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSLD16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TLSLD16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_GOT_TLSLD16_HA,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TLSLD16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Allocates an entry in the GOT with value (sym+add)@dtprel, and computes
+ the offset to the entry relative to the TOC base (r2). */
+ HOWTO (R_PPC64_GOT_DTPREL16_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_DTPREL16_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_DTPREL16_DS, but no overflow. */
+ HOWTO (R_PPC64_GOT_DTPREL16_LO_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_DTPREL16_LO_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_DTPREL16_LO_DS, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_GOT_DTPREL16_HI,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_DTPREL16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_DTPREL16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_GOT_DTPREL16_HA,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_DTPREL16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Allocates an entry in the GOT with value (sym+add)@tprel, and computes the
+ offset to the entry relative to the TOC base (r2). */
+ HOWTO (R_PPC64_GOT_TPREL16_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TPREL16_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TPREL16_DS, but no overflow. */
+ HOWTO (R_PPC64_GOT_TPREL16_LO_DS,
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TPREL16_LO_DS", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TPREL16_LO_DS, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_GOT_TPREL16_HI,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TPREL16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Like GOT_TPREL16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_GOT_TPREL16_HA,
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_unhandled_reloc, /* special_function */
+ "R_PPC64_GOT_TPREL16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_PPC64_GNU_VTINHERIT, /* type */
0, /* rightshift */
@@ -1207,7 +1822,7 @@ ppc64_elf_reloc_type_lookup (abfd, code)
bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
- enum elf_ppc_reloc_type ppc_reloc = R_PPC_NONE;
+ enum elf_ppc64_reloc_type r = R_PPC64_NONE;
if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
/* Initialize howto table if needed. */
@@ -1218,131 +1833,211 @@ ppc64_elf_reloc_type_lookup (abfd, code)
default:
return (reloc_howto_type *) NULL;
- case BFD_RELOC_NONE: ppc_reloc = R_PPC64_NONE;
+ case BFD_RELOC_NONE: r = R_PPC64_NONE;
+ break;
+ case BFD_RELOC_32: r = R_PPC64_ADDR32;
+ break;
+ case BFD_RELOC_PPC_BA26: r = R_PPC64_ADDR24;
break;
- case BFD_RELOC_32: ppc_reloc = R_PPC64_ADDR32;
+ case BFD_RELOC_16: r = R_PPC64_ADDR16;
break;
- case BFD_RELOC_PPC_BA26: ppc_reloc = R_PPC64_ADDR24;
+ case BFD_RELOC_LO16: r = R_PPC64_ADDR16_LO;
break;
- case BFD_RELOC_16: ppc_reloc = R_PPC64_ADDR16;
+ case BFD_RELOC_HI16: r = R_PPC64_ADDR16_HI;
break;
- case BFD_RELOC_LO16: ppc_reloc = R_PPC64_ADDR16_LO;
+ case BFD_RELOC_HI16_S: r = R_PPC64_ADDR16_HA;
break;
- case BFD_RELOC_HI16: ppc_reloc = R_PPC64_ADDR16_HI;
+ case BFD_RELOC_PPC_BA16: r = R_PPC64_ADDR14;
break;
- case BFD_RELOC_HI16_S: ppc_reloc = R_PPC64_ADDR16_HA;
+ case BFD_RELOC_PPC_BA16_BRTAKEN: r = R_PPC64_ADDR14_BRTAKEN;
break;
- case BFD_RELOC_PPC_BA16: ppc_reloc = R_PPC64_ADDR14;
+ case BFD_RELOC_PPC_BA16_BRNTAKEN: r = R_PPC64_ADDR14_BRNTAKEN;
break;
- case BFD_RELOC_PPC_BA16_BRTAKEN: ppc_reloc = R_PPC64_ADDR14_BRTAKEN;
+ case BFD_RELOC_PPC_B26: r = R_PPC64_REL24;
break;
- case BFD_RELOC_PPC_BA16_BRNTAKEN: ppc_reloc = R_PPC64_ADDR14_BRNTAKEN;
+ case BFD_RELOC_PPC_B16: r = R_PPC64_REL14;
break;
- case BFD_RELOC_PPC_B26: ppc_reloc = R_PPC64_REL24;
+ case BFD_RELOC_PPC_B16_BRTAKEN: r = R_PPC64_REL14_BRTAKEN;
break;
- case BFD_RELOC_PPC_B16: ppc_reloc = R_PPC64_REL14;
+ case BFD_RELOC_PPC_B16_BRNTAKEN: r = R_PPC64_REL14_BRNTAKEN;
break;
- case BFD_RELOC_PPC_B16_BRTAKEN: ppc_reloc = R_PPC64_REL14_BRTAKEN;
+ case BFD_RELOC_16_GOTOFF: r = R_PPC64_GOT16;
break;
- case BFD_RELOC_PPC_B16_BRNTAKEN: ppc_reloc = R_PPC64_REL14_BRNTAKEN;
+ case BFD_RELOC_LO16_GOTOFF: r = R_PPC64_GOT16_LO;
break;
- case BFD_RELOC_16_GOTOFF: ppc_reloc = R_PPC64_GOT16;
+ case BFD_RELOC_HI16_GOTOFF: r = R_PPC64_GOT16_HI;
break;
- case BFD_RELOC_LO16_GOTOFF: ppc_reloc = R_PPC64_GOT16_LO;
+ case BFD_RELOC_HI16_S_GOTOFF: r = R_PPC64_GOT16_HA;
break;
- case BFD_RELOC_HI16_GOTOFF: ppc_reloc = R_PPC64_GOT16_HI;
+ case BFD_RELOC_PPC_COPY: r = R_PPC64_COPY;
break;
- case BFD_RELOC_HI16_S_GOTOFF: ppc_reloc = R_PPC64_GOT16_HA;
+ case BFD_RELOC_PPC_GLOB_DAT: r = R_PPC64_GLOB_DAT;
break;
- case BFD_RELOC_PPC_COPY: ppc_reloc = R_PPC64_COPY;
+ case BFD_RELOC_32_PCREL: r = R_PPC64_REL32;
break;
- case BFD_RELOC_PPC_GLOB_DAT: ppc_reloc = R_PPC64_GLOB_DAT;
+ case BFD_RELOC_32_PLTOFF: r = R_PPC64_PLT32;
break;
- case BFD_RELOC_32_PCREL: ppc_reloc = R_PPC64_REL32;
+ case BFD_RELOC_32_PLT_PCREL: r = R_PPC64_PLTREL32;
break;
- case BFD_RELOC_32_PLTOFF: ppc_reloc = R_PPC64_PLT32;
+ case BFD_RELOC_LO16_PLTOFF: r = R_PPC64_PLT16_LO;
break;
- case BFD_RELOC_32_PLT_PCREL: ppc_reloc = R_PPC64_PLTREL32;
+ case BFD_RELOC_HI16_PLTOFF: r = R_PPC64_PLT16_HI;
break;
- case BFD_RELOC_LO16_PLTOFF: ppc_reloc = R_PPC64_PLT16_LO;
+ case BFD_RELOC_HI16_S_PLTOFF: r = R_PPC64_PLT16_HA;
break;
- case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC64_PLT16_HI;
+ case BFD_RELOC_16_BASEREL: r = R_PPC64_SECTOFF;
break;
- case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC64_PLT16_HA;
+ case BFD_RELOC_LO16_BASEREL: r = R_PPC64_SECTOFF_LO;
break;
- case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC64_SECTOFF;
+ case BFD_RELOC_HI16_BASEREL: r = R_PPC64_SECTOFF_HI;
break;
- case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC64_SECTOFF_LO;
+ case BFD_RELOC_HI16_S_BASEREL: r = R_PPC64_SECTOFF_HA;
break;
- case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC64_SECTOFF_HI;
+ case BFD_RELOC_CTOR: r = R_PPC64_ADDR64;
break;
- case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC64_SECTOFF_HA;
+ case BFD_RELOC_64: r = R_PPC64_ADDR64;
break;
- case BFD_RELOC_CTOR: ppc_reloc = R_PPC64_ADDR64;
+ case BFD_RELOC_PPC64_HIGHER: r = R_PPC64_ADDR16_HIGHER;
break;
- case BFD_RELOC_64: ppc_reloc = R_PPC64_ADDR64;
+ case BFD_RELOC_PPC64_HIGHER_S: r = R_PPC64_ADDR16_HIGHERA;
break;
- case BFD_RELOC_PPC64_HIGHER: ppc_reloc = R_PPC64_ADDR16_HIGHER;
+ case BFD_RELOC_PPC64_HIGHEST: r = R_PPC64_ADDR16_HIGHEST;
break;
- case BFD_RELOC_PPC64_HIGHER_S: ppc_reloc = R_PPC64_ADDR16_HIGHERA;
+ case BFD_RELOC_PPC64_HIGHEST_S: r = R_PPC64_ADDR16_HIGHESTA;
break;
- case BFD_RELOC_PPC64_HIGHEST: ppc_reloc = R_PPC64_ADDR16_HIGHEST;
+ case BFD_RELOC_64_PCREL: r = R_PPC64_REL64;
break;
- case BFD_RELOC_PPC64_HIGHEST_S: ppc_reloc = R_PPC64_ADDR16_HIGHESTA;
+ case BFD_RELOC_64_PLTOFF: r = R_PPC64_PLT64;
break;
- case BFD_RELOC_64_PCREL: ppc_reloc = R_PPC64_REL64;
+ case BFD_RELOC_64_PLT_PCREL: r = R_PPC64_PLTREL64;
break;
- case BFD_RELOC_64_PLTOFF: ppc_reloc = R_PPC64_PLT64;
+ case BFD_RELOC_PPC_TOC16: r = R_PPC64_TOC16;
break;
- case BFD_RELOC_64_PLT_PCREL: ppc_reloc = R_PPC64_PLTREL64;
+ case BFD_RELOC_PPC64_TOC16_LO: r = R_PPC64_TOC16_LO;
break;
- case BFD_RELOC_PPC_TOC16: ppc_reloc = R_PPC64_TOC16;
+ case BFD_RELOC_PPC64_TOC16_HI: r = R_PPC64_TOC16_HI;
break;
- case BFD_RELOC_PPC64_TOC16_LO: ppc_reloc = R_PPC64_TOC16_LO;
+ case BFD_RELOC_PPC64_TOC16_HA: r = R_PPC64_TOC16_HA;
break;
- case BFD_RELOC_PPC64_TOC16_HI: ppc_reloc = R_PPC64_TOC16_HI;
+ case BFD_RELOC_PPC64_TOC: r = R_PPC64_TOC;
break;
- case BFD_RELOC_PPC64_TOC16_HA: ppc_reloc = R_PPC64_TOC16_HA;
+ case BFD_RELOC_PPC64_PLTGOT16: r = R_PPC64_PLTGOT16;
break;
- case BFD_RELOC_PPC64_TOC: ppc_reloc = R_PPC64_TOC;
+ case BFD_RELOC_PPC64_PLTGOT16_LO: r = R_PPC64_PLTGOT16_LO;
break;
- case BFD_RELOC_PPC64_PLTGOT16: ppc_reloc = R_PPC64_PLTGOT16;
+ case BFD_RELOC_PPC64_PLTGOT16_HI: r = R_PPC64_PLTGOT16_HI;
break;
- case BFD_RELOC_PPC64_PLTGOT16_LO: ppc_reloc = R_PPC64_PLTGOT16_LO;
+ case BFD_RELOC_PPC64_PLTGOT16_HA: r = R_PPC64_PLTGOT16_HA;
break;
- case BFD_RELOC_PPC64_PLTGOT16_HI: ppc_reloc = R_PPC64_PLTGOT16_HI;
+ case BFD_RELOC_PPC64_ADDR16_DS: r = R_PPC64_ADDR16_DS;
break;
- case BFD_RELOC_PPC64_PLTGOT16_HA: ppc_reloc = R_PPC64_PLTGOT16_HA;
+ case BFD_RELOC_PPC64_ADDR16_LO_DS: r = R_PPC64_ADDR16_LO_DS;
break;
- case BFD_RELOC_PPC64_ADDR16_DS: ppc_reloc = R_PPC64_ADDR16_DS;
+ case BFD_RELOC_PPC64_GOT16_DS: r = R_PPC64_GOT16_DS;
break;
- case BFD_RELOC_PPC64_ADDR16_LO_DS: ppc_reloc = R_PPC64_ADDR16_LO_DS;
+ case BFD_RELOC_PPC64_GOT16_LO_DS: r = R_PPC64_GOT16_LO_DS;
break;
- case BFD_RELOC_PPC64_GOT16_DS: ppc_reloc = R_PPC64_GOT16_DS;
+ case BFD_RELOC_PPC64_PLT16_LO_DS: r = R_PPC64_PLT16_LO_DS;
break;
- case BFD_RELOC_PPC64_GOT16_LO_DS: ppc_reloc = R_PPC64_GOT16_LO_DS;
+ case BFD_RELOC_PPC64_SECTOFF_DS: r = R_PPC64_SECTOFF_DS;
break;
- case BFD_RELOC_PPC64_PLT16_LO_DS: ppc_reloc = R_PPC64_PLT16_LO_DS;
+ case BFD_RELOC_PPC64_SECTOFF_LO_DS: r = R_PPC64_SECTOFF_LO_DS;
break;
- case BFD_RELOC_PPC64_SECTOFF_DS: ppc_reloc = R_PPC64_SECTOFF_DS;
+ case BFD_RELOC_PPC64_TOC16_DS: r = R_PPC64_TOC16_DS;
break;
- case BFD_RELOC_PPC64_SECTOFF_LO_DS: ppc_reloc = R_PPC64_SECTOFF_LO_DS;
+ case BFD_RELOC_PPC64_TOC16_LO_DS: r = R_PPC64_TOC16_LO_DS;
break;
- case BFD_RELOC_PPC64_TOC16_DS: ppc_reloc = R_PPC64_TOC16_DS;
+ case BFD_RELOC_PPC64_PLTGOT16_DS: r = R_PPC64_PLTGOT16_DS;
break;
- case BFD_RELOC_PPC64_TOC16_LO_DS: ppc_reloc = R_PPC64_TOC16_LO_DS;
+ case BFD_RELOC_PPC64_PLTGOT16_LO_DS: r = R_PPC64_PLTGOT16_LO_DS;
break;
- case BFD_RELOC_PPC64_PLTGOT16_DS: ppc_reloc = R_PPC64_PLTGOT16_DS;
+ case BFD_RELOC_PPC_TLS: r = R_PPC64_TLS;
break;
- case BFD_RELOC_PPC64_PLTGOT16_LO_DS: ppc_reloc = R_PPC64_PLTGOT16_LO_DS;
+ case BFD_RELOC_PPC_DTPMOD: r = R_PPC64_DTPMOD64;
break;
- case BFD_RELOC_VTABLE_INHERIT: ppc_reloc = R_PPC64_GNU_VTINHERIT;
+ case BFD_RELOC_PPC_TPREL16: r = R_PPC64_TPREL16;
break;
- case BFD_RELOC_VTABLE_ENTRY: ppc_reloc = R_PPC64_GNU_VTENTRY;
+ case BFD_RELOC_PPC_TPREL16_LO: r = R_PPC64_TPREL16_LO;
+ break;
+ case BFD_RELOC_PPC_TPREL16_HI: r = R_PPC64_TPREL16_HI;
+ break;
+ case BFD_RELOC_PPC_TPREL16_HA: r = R_PPC64_TPREL16_HA;
+ break;
+ case BFD_RELOC_PPC_TPREL: r = R_PPC64_TPREL64;
+ break;
+ case BFD_RELOC_PPC_DTPREL16: r = R_PPC64_DTPREL16;
+ break;
+ case BFD_RELOC_PPC_DTPREL16_LO: r = R_PPC64_DTPREL16_LO;
+ break;
+ case BFD_RELOC_PPC_DTPREL16_HI: r = R_PPC64_DTPREL16_HI;
+ break;
+ case BFD_RELOC_PPC_DTPREL16_HA: r = R_PPC64_DTPREL16_HA;
+ break;
+ case BFD_RELOC_PPC_DTPREL: r = R_PPC64_DTPREL64;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSGD16: r = R_PPC64_GOT_TLSGD16;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSGD16_LO: r = R_PPC64_GOT_TLSGD16_LO;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSGD16_HI: r = R_PPC64_GOT_TLSGD16_HI;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSGD16_HA: r = R_PPC64_GOT_TLSGD16_HA;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSLD16: r = R_PPC64_GOT_TLSLD16;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSLD16_LO: r = R_PPC64_GOT_TLSLD16_LO;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSLD16_HI: r = R_PPC64_GOT_TLSLD16_HI;
+ break;
+ case BFD_RELOC_PPC_GOT_TLSLD16_HA: r = R_PPC64_GOT_TLSLD16_HA;
+ break;
+ case BFD_RELOC_PPC_GOT_TPREL16: r = R_PPC64_GOT_TPREL16_DS;
+ break;
+ case BFD_RELOC_PPC_GOT_TPREL16_LO: r = R_PPC64_GOT_TPREL16_LO_DS;
+ break;
+ case BFD_RELOC_PPC_GOT_TPREL16_HI: r = R_PPC64_GOT_TPREL16_HI;
+ break;
+ case BFD_RELOC_PPC_GOT_TPREL16_HA: r = R_PPC64_GOT_TPREL16_HA;
+ break;
+ case BFD_RELOC_PPC_GOT_DTPREL16: r = R_PPC64_GOT_DTPREL16_DS;
+ break;
+ case BFD_RELOC_PPC_GOT_DTPREL16_LO: r = R_PPC64_GOT_DTPREL16_LO_DS;
+ break;
+ case BFD_RELOC_PPC_GOT_DTPREL16_HI: r = R_PPC64_GOT_DTPREL16_HI;
+ break;
+ case BFD_RELOC_PPC_GOT_DTPREL16_HA: r = R_PPC64_GOT_DTPREL16_HA;
+ break;
+ case BFD_RELOC_PPC64_TPREL16_DS: r = R_PPC64_TPREL16_DS;
+ break;
+ case BFD_RELOC_PPC64_TPREL16_LO_DS: r = R_PPC64_TPREL16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_TPREL16_HIGHER: r = R_PPC64_TPREL16_HIGHER;
+ break;
+ case BFD_RELOC_PPC64_TPREL16_HIGHERA: r = R_PPC64_TPREL16_HIGHERA;
+ break;
+ case BFD_RELOC_PPC64_TPREL16_HIGHEST: r = R_PPC64_TPREL16_HIGHEST;
+ break;
+ case BFD_RELOC_PPC64_TPREL16_HIGHESTA: r = R_PPC64_TPREL16_HIGHESTA;
+ break;
+ case BFD_RELOC_PPC64_DTPREL16_DS: r = R_PPC64_DTPREL16_DS;
+ break;
+ case BFD_RELOC_PPC64_DTPREL16_LO_DS: r = R_PPC64_DTPREL16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_DTPREL16_HIGHER: r = R_PPC64_DTPREL16_HIGHER;
+ break;
+ case BFD_RELOC_PPC64_DTPREL16_HIGHERA: r = R_PPC64_DTPREL16_HIGHERA;
+ break;
+ case BFD_RELOC_PPC64_DTPREL16_HIGHEST: r = R_PPC64_DTPREL16_HIGHEST;
+ break;
+ case BFD_RELOC_PPC64_DTPREL16_HIGHESTA: r = R_PPC64_DTPREL16_HIGHESTA;
+ break;
+ case BFD_RELOC_VTABLE_INHERIT: r = R_PPC64_GNU_VTINHERIT;
+ break;
+ case BFD_RELOC_VTABLE_ENTRY: r = R_PPC64_GNU_VTENTRY;
break;
}
- return ppc64_elf_howto_table[(int) ppc_reloc];
+ return ppc64_elf_howto_table[(int) r];
};
/* Set the howto pointer for a PowerPC ELF reloc. */
@@ -1365,7 +2060,7 @@ ppc64_elf_info_to_howto (abfd, cache_ptr, dst)
cache_ptr->howto = ppc64_elf_howto_table[type];
}
-/* Handle the R_PPC_ADDR16_HA and similar relocs. */
+/* Handle the R_PPC64_ADDR16_HA and similar relocs. */
static bfd_reloc_status_type
ppc64_elf_ha_reloc (abfd, reloc_entry, symbol, data,
@@ -1404,7 +2099,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data,
char **error_message;
{
long insn;
- enum elf_ppc_reloc_type r_type;
+ enum elf_ppc64_reloc_type r_type;
bfd_size_type octets;
/* Disabled until we sort out how ld should choose 'y' vs 'at'. */
bfd_boolean is_power4 = FALSE;
@@ -1419,7 +2114,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data,
octets = reloc_entry->address * bfd_octets_per_byte (abfd);
insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
insn &= ~(0x01 << 21);
- r_type = (enum elf_ppc_reloc_type) reloc_entry->howto->type;
+ r_type = (enum elf_ppc64_reloc_type) reloc_entry->howto->type;
if (r_type == R_PPC64_ADDR14_BRTAKEN
|| r_type == R_PPC64_REL14_BRTAKEN)
insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
@@ -1676,6 +2371,43 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
return TRUE;
}
+
+struct _ppc64_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+
+ /* An array with one entry for each opd function descriptor. */
+ union
+ {
+ /* Points to the function code section for local opd entries. */
+ asection **func_sec;
+ /* After editing .opd, adjust references to opd local syms. */
+ long *adjust;
+ } opd;
+
+ /* An array for toc sections, indexed by offset/8.
+ Specifies the relocation symbol index used at a given toc offset. */
+ unsigned *t_symndx;
+};
+
+#define ppc64_elf_section_data(sec) \
+ ((struct _ppc64_elf_section_data *) elf_section_data (sec))
+
+static bfd_boolean
+ppc64_elf_new_section_hook (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct _ppc64_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = (struct _ppc64_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
/* The following functions are specific to the ELF linker, while
functions above are used generally. Those named ppc64_elf_* are
@@ -1717,7 +2449,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
.
. .foo_stub:
. addis 12,2,Lfoo@toc@ha # in practice, the call stub
- . addi 12,12,Lfoo@toc@l # is slightly optimised, but
+ . addi 12,12,Lfoo@toc@l # is slightly optimized, but
. std 2,40(1) # this is the general idea
. ld 11,0(12)
. ld 2,8(12)
@@ -1765,13 +2497,44 @@ struct ppc_dyn_relocs
bfd_size_type pc_count;
};
+/* Track GOT entries needed for a given symbol. We might need more
+ than one got entry per symbol. */
+struct got_entry
+{
+ struct got_entry *next;
+
+ bfd_vma addend;
+
+ union
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } got;
+
+ char tls_type;
+};
+
+/* The same for PLT. */
+struct plt_entry
+{
+ struct plt_entry *next;
+
+ bfd_vma addend;
+
+ union
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } plt;
+};
+
/* Of those relocs that might be copied as dynamic relocs, this macro
- selects between relative and absolute types. */
+ selects those that must be copied when linking a shared library. */
-#define IS_ABSOLUTE_RELOC(RTYPE) \
+#define MUST_BE_DYN_RELOC(RTYPE) \
((RTYPE) != R_PPC64_REL32 \
&& (RTYPE) != R_PPC64_REL64 \
- && (RTYPE) != R_PPC64_ADDR30)
+ && (RTYPE) != R_PPC64_REL30)
/* Section name for stubs is the associated section name plus this
string. */
@@ -1830,6 +2593,9 @@ struct ppc_stub_hash_entry {
/* The symbol table entry, if any, that this was derived from. */
struct ppc_link_hash_entry *h;
+ /* And the reloc addend that this was derived from. */
+ bfd_vma addend;
+
/* Where this stub is being called from, or, in the case of combined
stub sections, the first input section in the group. */
asection *id_sec;
@@ -1865,6 +2631,16 @@ struct ppc_link_hash_entry
unsigned int is_func:1;
unsigned int is_func_descriptor:1;
unsigned int is_entry:1;
+
+ /* Contexts in which symbol is used in the GOT (or TOC).
+ Linker optimization will result in various transformations. */
+#define TLS_TLS 1 /* Any TLS reloc. */
+#define TLS_GD_LD 2 /* GD or LD reloc requiring 2 got slots. */
+#define TLS_LD 4 /* LD reloc. */
+#define TLS_TPREL 8 /* TPREL reloc, => IE. */
+#define TLS_DTPREL 16 /* DTPREL reloc, => LD. */
+#define TLS_EXPLICIT 32 /* Marks TOC section relocs. */
+ char tls_type;
};
/* ppc64 ELF linker hash table. */
@@ -1911,6 +2687,18 @@ struct ppc_link_hash_table
asection *sbrlt;
asection *srelbrlt;
+ /* Short-cut to first output tls section. */
+ asection *tls_sec;
+
+ /* Shortcut to .__tls_get_addr. */
+ struct elf_link_hash_entry *tls_get_addr;
+
+ /* TLS local dynamic got entry handling. */
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tlsld_got;
+
/* Set on error. */
unsigned int stub_error;
@@ -1955,6 +2743,10 @@ static bfd_boolean ppc64_elf_create_dynamic_sections
static void ppc64_elf_copy_indirect_symbol
PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
+static bfd_boolean update_local_sym_info
+ PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned long, bfd_vma, int));
+static bfd_boolean update_plt_info
+ PARAMS ((bfd *, struct ppc_link_hash_entry *, bfd_vma));
static bfd_boolean ppc64_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -1972,6 +2764,11 @@ static bfd_boolean ppc64_elf_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static void ppc64_elf_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
+static bfd_boolean get_sym_h
+ PARAMS ((struct elf_link_hash_entry **, Elf_Internal_Sym **, asection **,
+ char **, Elf_Internal_Sym **, unsigned long, bfd *));
+static bfd_boolean get_tls_type
+ PARAMS ((char **, Elf_Internal_Sym **, const Elf_Internal_Rela *, bfd *));
static bfd_boolean allocate_dynrelocs
PARAMS ((struct elf_link_hash_entry *, PTR));
static bfd_boolean readonly_dynrelocs
@@ -1980,7 +2777,7 @@ static enum elf_reloc_type_class ppc64_elf_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
static bfd_boolean ppc64_elf_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-static INLINE enum ppc_stub_type ppc_type_of_stub
+static enum ppc_stub_type ppc_type_of_stub
PARAMS ((asection *, const Elf_Internal_Rela *,
struct ppc_link_hash_entry **, bfd_vma));
static bfd_byte *build_plt_stub
@@ -2112,6 +2909,7 @@ link_hash_newfunc (entry, table, string)
eh->is_func = 0;
eh->is_func_descriptor = 0;
eh->is_entry = 0;
+ eh->tls_type = 0;
}
return entry;
@@ -2158,11 +2956,15 @@ ppc64_elf_link_hash_table_create (abfd)
htab->sfpr = NULL;
htab->sbrlt = NULL;
htab->srelbrlt = NULL;
+ htab->tls_sec = NULL;
+ htab->tlsld_got.refcount = 0;
htab->stub_error = 0;
htab->has_14bit_branch = 0;
htab->have_undefweak = 0;
htab->stub_iteration = 0;
htab->sym_sec.abfd = NULL;
+ htab->elf.init_refcount.glist = NULL;
+ htab->elf.init_offset.glist = NULL;
return &htab->elf.root;
}
@@ -2441,7 +3243,7 @@ ppc64_elf_create_dynamic_sections (dynobj, info)
static void
ppc64_elf_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ struct elf_backend_data *bed ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *dir, *ind;
{
struct ppc_link_hash_entry *edir, *eind;
@@ -2449,6 +3251,7 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
edir = (struct ppc_link_hash_entry *) dir;
eind = (struct ppc_link_hash_entry *) ind;
+ /* Copy over any dynamic relocs we may have on the indirect sym. */
if (eind->dyn_relocs != NULL)
{
if (edir->dyn_relocs != NULL)
@@ -2456,7 +3259,7 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
struct ppc_dyn_relocs **pp;
struct ppc_dyn_relocs *p;
- if (ind->root.type == bfd_link_hash_indirect)
+ if (eind->elf.root.type == bfd_link_hash_indirect)
abort ();
/* Add reloc counts against the weak sym to the strong sym
@@ -2487,7 +3290,87 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
edir->is_func_descriptor |= eind->is_func_descriptor;
edir->is_entry |= eind->is_entry;
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ /* Copy down any references that we may have already seen to the
+ symbol which just became indirect. */
+ edir->elf.elf_link_hash_flags |=
+ (eind->elf.elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_NON_GOT_REF));
+
+ /* If we were called to copy over info for a weak sym, that's all. */
+ if (eind->elf.root.type != bfd_link_hash_indirect)
+ return;
+
+ /* Copy over got entries. */
+ if (eind->elf.got.glist != NULL)
+ {
+ if (edir->elf.got.glist != NULL)
+ {
+ struct got_entry **entp;
+ struct got_entry *ent;
+
+ for (entp = &eind->elf.got.glist; (ent = *entp) != NULL; )
+ {
+ struct got_entry *dent;
+
+ for (dent = edir->elf.got.glist; dent != NULL; dent = dent->next)
+ if (dent->addend == ent->addend
+ && dent->tls_type == ent->tls_type)
+ {
+ dent->got.refcount += ent->got.refcount;
+ *entp = ent->next;
+ break;
+ }
+ if (dent == NULL)
+ entp = &ent->next;
+ }
+ *entp = edir->elf.got.glist;
+ }
+
+ edir->elf.got.glist = eind->elf.got.glist;
+ eind->elf.got.glist = NULL;
+ }
+
+ /* And plt entries. */
+ if (eind->elf.plt.plist != NULL)
+ {
+ if (edir->elf.plt.plist != NULL)
+ {
+ struct plt_entry **entp;
+ struct plt_entry *ent;
+
+ for (entp = &eind->elf.plt.plist; (ent = *entp) != NULL; )
+ {
+ struct plt_entry *dent;
+
+ for (dent = edir->elf.plt.plist; dent != NULL; dent = dent->next)
+ if (dent->addend == ent->addend)
+ {
+ dent->plt.refcount += ent->plt.refcount;
+ *entp = ent->next;
+ break;
+ }
+ if (dent == NULL)
+ entp = &ent->next;
+ }
+ *entp = edir->elf.plt.plist;
+ }
+
+ edir->elf.plt.plist = eind->elf.plt.plist;
+ eind->elf.plt.plist = NULL;
+ }
+
+ if (edir->elf.dynindx == -1)
+ {
+ edir->elf.dynindx = eind->elf.dynindx;
+ edir->elf.dynstr_index = eind->elf.dynstr_index;
+ eind->elf.dynindx = -1;
+ eind->elf.dynstr_index = 0;
+ }
+ else
+ BFD_ASSERT (eind->elf.dynindx == -1);
}
/* Set a flag, used by ppc64_elf_gc_mark_hook, on the entry symbol and
@@ -2512,6 +3395,83 @@ ppc64_elf_mark_entry_syms (info)
return TRUE;
}
+static bfd_boolean
+update_local_sym_info (abfd, symtab_hdr, r_symndx, r_addend, tls_type)
+ bfd *abfd;
+ Elf_Internal_Shdr *symtab_hdr;
+ unsigned long r_symndx;
+ bfd_vma r_addend;
+ int tls_type;
+{
+ struct got_entry **local_got_ents = elf_local_got_ents (abfd);
+ char *local_got_tls_types;
+
+ if (local_got_ents == NULL)
+ {
+ bfd_size_type size = symtab_hdr->sh_info;
+
+ size *= sizeof (*local_got_ents) + sizeof (char);
+ local_got_ents = (struct got_entry **) bfd_zalloc (abfd, size);
+ if (local_got_ents == NULL)
+ return FALSE;
+ elf_local_got_ents (abfd) = local_got_ents;
+ }
+
+ if ((tls_type & TLS_EXPLICIT) == 0)
+ {
+ struct got_entry *ent;
+
+ for (ent = local_got_ents[r_symndx]; ent != NULL; ent = ent->next)
+ if (ent->addend == r_addend && ent->tls_type == tls_type)
+ break;
+ if (ent == NULL)
+ {
+ bfd_size_type amt = sizeof (*ent);
+ ent = (struct got_entry *) bfd_alloc (abfd, amt);
+ if (ent == NULL)
+ return FALSE;
+ ent->next = local_got_ents[r_symndx];
+ ent->addend = r_addend;
+ ent->tls_type = tls_type;
+ ent->got.refcount = 0;
+ local_got_ents[r_symndx] = ent;
+ }
+ ent->got.refcount += 1;
+ }
+
+ local_got_tls_types = (char *) (local_got_ents + symtab_hdr->sh_info);
+ local_got_tls_types[r_symndx] |= tls_type;
+ return TRUE;
+}
+
+static bfd_boolean
+update_plt_info (abfd, eh, addend)
+ bfd *abfd;
+ struct ppc_link_hash_entry *eh;
+ bfd_vma addend;
+{
+ struct plt_entry *ent;
+
+ for (ent = eh->elf.plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == addend)
+ break;
+ if (ent == NULL)
+ {
+ bfd_size_type amt = sizeof (*ent);
+ ent = (struct plt_entry *) bfd_alloc (abfd, amt);
+ if (ent == NULL)
+ return FALSE;
+ ent->next = eh->elf.plt.plist;
+ ent->addend = addend;
+ ent->plt.refcount = 0;
+ eh->elf.plt.plist = ent;
+ }
+ ent->plt.refcount += 1;
+ eh->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ eh->is_func = 1;
+ return TRUE;
+}
+
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure
linkage table, and dynamic reloc sections. */
@@ -2565,7 +3525,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
opd_sym_map = (asection **) bfd_zalloc (abfd, amt);
if (opd_sym_map == NULL)
return FALSE;
- elf_section_data (sec)->tdata = opd_sym_map;
+ ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
}
if (htab->elf.dynobj == NULL)
@@ -2579,7 +3539,8 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
{
unsigned long r_symndx;
struct elf_link_hash_entry *h;
- enum elf_ppc_reloc_type r_type;
+ enum elf_ppc64_reloc_type r_type;
+ int tls_type = 0;
r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
@@ -2587,17 +3548,48 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
switch (r_type)
{
- /* GOT16 relocations */
+ case R_PPC64_GOT_TLSLD16:
+ case R_PPC64_GOT_TLSLD16_LO:
+ case R_PPC64_GOT_TLSLD16_HI:
+ case R_PPC64_GOT_TLSLD16_HA:
+ htab->tlsld_got.refcount += 1;
+ tls_type = TLS_TLS | TLS_GD_LD | TLS_LD;
+ goto dogottls;
+
+ case R_PPC64_GOT_TLSGD16:
+ case R_PPC64_GOT_TLSGD16_LO:
+ case R_PPC64_GOT_TLSGD16_HI:
+ case R_PPC64_GOT_TLSGD16_HA:
+ tls_type = TLS_TLS | TLS_GD_LD;
+ goto dogottls;
+
+ case R_PPC64_GOT_TPREL16_DS:
+ case R_PPC64_GOT_TPREL16_LO_DS:
+ case R_PPC64_GOT_TPREL16_HI:
+ case R_PPC64_GOT_TPREL16_HA:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ tls_type = TLS_TLS | TLS_TPREL;
+ goto dogottls;
+
+ case R_PPC64_GOT_DTPREL16_DS:
+ case R_PPC64_GOT_DTPREL16_LO_DS:
+ case R_PPC64_GOT_DTPREL16_HI:
+ case R_PPC64_GOT_DTPREL16_HA:
+ tls_type = TLS_TLS | TLS_DTPREL;
+ dogottls:
+ sec->has_tls_reloc = 1;
+ /* Fall thru */
+
case R_PPC64_GOT16:
case R_PPC64_GOT16_DS:
case R_PPC64_GOT16_HA:
case R_PPC64_GOT16_HI:
case R_PPC64_GOT16_LO:
case R_PPC64_GOT16_LO_DS:
-
/* This symbol requires a global offset table entry. */
if (htab->sgot == NULL
&& !create_got_section (htab->elf.dynobj, info))
@@ -2605,28 +3597,34 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- h->got.refcount += 1;
- }
- else
- {
- bfd_signed_vma *local_got_refcounts;
+ struct ppc_link_hash_entry *eh;
+ struct got_entry *ent;
- /* This is a global offset table entry for a local symbol. */
- local_got_refcounts = elf_local_got_refcounts (abfd);
- if (local_got_refcounts == NULL)
+ eh = (struct ppc_link_hash_entry *) h;
+ for (ent = eh->elf.got.glist; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend
+ && ent->tls_type == tls_type)
+ break;
+ if (ent == NULL)
{
- bfd_size_type size;
-
- size = symtab_hdr->sh_info;
- size *= sizeof (bfd_signed_vma);
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
- if (local_got_refcounts == NULL)
+ bfd_size_type amt = sizeof (*ent);
+ ent = (struct got_entry *) bfd_alloc (abfd, amt);
+ if (ent == NULL)
return FALSE;
- elf_local_got_refcounts (abfd) = local_got_refcounts;
+ ent->next = eh->elf.got.glist;
+ ent->addend = rel->r_addend;
+ ent->tls_type = tls_type;
+ ent->got.refcount = 0;
+ eh->elf.got.glist = ent;
}
- local_got_refcounts[r_symndx] += 1;
+ ent->got.refcount += 1;
+ eh->tls_type |= tls_type;
}
+ else
+ /* This is a global offset table entry for a local symbol. */
+ if (!update_local_sym_info (abfd, symtab_hdr, r_symndx,
+ rel->r_addend, tls_type))
+ return FALSE;
break;
case R_PPC64_PLT16_HA:
@@ -2646,10 +3644,10 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
-
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- h->plt.refcount += 1;
- ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ else
+ if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
+ rel->r_addend))
+ return FALSE;
break;
/* The following relocations don't need to propagate the
@@ -2667,6 +3665,16 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_TOC16_HA:
case R_PPC64_TOC16_DS:
case R_PPC64_TOC16_LO_DS:
+ case R_PPC64_DTPREL16:
+ case R_PPC64_DTPREL16_LO:
+ case R_PPC64_DTPREL16_HI:
+ case R_PPC64_DTPREL16_HA:
+ case R_PPC64_DTPREL16_DS:
+ case R_PPC64_DTPREL16_LO_DS:
+ case R_PPC64_DTPREL16_HIGHER:
+ case R_PPC64_DTPREL16_HIGHERA:
+ case R_PPC64_DTPREL16_HIGHEST:
+ case R_PPC64_DTPREL16_HIGHESTA:
break;
/* This relocation describes the C++ object vtable hierarchy.
@@ -2696,9 +3704,82 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
{
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- h->plt.refcount += 1;
- ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
+ rel->r_addend))
+ return FALSE;
+ if (h == htab->tls_get_addr)
+ sec->has_tls_reloc = 1;
+ else if (strcmp (h->root.root.string, ".__tls_get_addr") == 0)
+ {
+ htab->tls_get_addr = h;
+ sec->has_tls_reloc = 1;
+ }
+ }
+ break;
+
+ case R_PPC64_TPREL64:
+ tls_type = TLS_EXPLICIT | TLS_TLS | TLS_TPREL;
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ goto dotlstoc;
+
+ case R_PPC64_DTPMOD64:
+ if (rel + 1 < rel_end
+ && rel[1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_DTPREL64)
+ && rel[1].r_offset == rel->r_offset + 8)
+ tls_type = TLS_EXPLICIT | TLS_TLS | TLS_GD_LD;
+ else
+ tls_type = TLS_EXPLICIT | TLS_TLS | TLS_GD_LD | TLS_LD;
+ goto dotlstoc;
+
+ case R_PPC64_DTPREL64:
+ tls_type = TLS_EXPLICIT | TLS_TLS | TLS_DTPREL;
+ if (rel != relocs
+ && rel[-1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_DTPMOD64)
+ && rel[-1].r_offset == rel->r_offset - 8)
+ /* This is the second reloc of a dtpmod, dtprel pair.
+ Don't mark with TLS_DTPREL. */
+ goto dodyn;
+
+ dotlstoc:
+ sec->has_tls_reloc = 1;
+ if (h != NULL)
+ {
+ struct ppc_link_hash_entry *eh;
+ eh = (struct ppc_link_hash_entry *) h;
+ eh->tls_type |= tls_type;
+ }
+ else
+ if (!update_local_sym_info (abfd, symtab_hdr, r_symndx,
+ rel->r_addend, tls_type))
+ return FALSE;
+
+ if (ppc64_elf_section_data (sec)->t_symndx == NULL)
+ {
+ bfd_size_type amt = sec->_raw_size * sizeof (unsigned) / 8;
+ ppc64_elf_section_data (sec)->t_symndx
+ = (unsigned *) bfd_zalloc (abfd, amt);
+ if (ppc64_elf_section_data (sec)->t_symndx == NULL)
+ return FALSE;
+ }
+ BFD_ASSERT (rel->r_offset % 8 == 0);
+ ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8] = r_symndx;
+ goto dodyn;
+
+ case R_PPC64_TPREL16:
+ case R_PPC64_TPREL16_LO:
+ case R_PPC64_TPREL16_HI:
+ case R_PPC64_TPREL16_HA:
+ case R_PPC64_TPREL16_DS:
+ case R_PPC64_TPREL16_LO_DS:
+ case R_PPC64_TPREL16_HIGHER:
+ case R_PPC64_TPREL16_HIGHERA:
+ case R_PPC64_TPREL16_HIGHEST:
+ case R_PPC64_TPREL16_HIGHESTA:
+ if (info->shared)
+ {
+ info->flags |= DF_STATIC_TLS;
+ goto dodyn;
}
break;
@@ -2723,7 +3804,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
if (opd_sym_map != NULL
&& h == NULL
&& rel + 1 < rel_end
- && ((enum elf_ppc_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info)
+ && ((enum elf_ppc64_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info)
== R_PPC64_TOC))
{
asection *s;
@@ -2737,8 +3818,9 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
}
/* Fall through. */
- case R_PPC64_REL64:
+ case R_PPC64_REL30:
case R_PPC64_REL32:
+ case R_PPC64_REL64:
case R_PPC64_ADDR14:
case R_PPC64_ADDR14_BRNTAKEN:
case R_PPC64_ADDR14_BRTAKEN:
@@ -2753,7 +3835,6 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_ADDR16_LO:
case R_PPC64_ADDR16_LO_DS:
case R_PPC64_ADDR24:
- case R_PPC64_ADDR30:
case R_PPC64_ADDR32:
case R_PPC64_UADDR16:
case R_PPC64_UADDR32:
@@ -2784,9 +3865,10 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
may need to keep relocations for symbols satisfied by a
dynamic library if we manage to avoid copy relocs for the
symbol. */
+ dodyn:
if ((info->shared
&& (sec->flags & SEC_ALLOC) != 0
- && (IS_ABSOLUTE_RELOC (r_type)
+ && (MUST_BE_DYN_RELOC (r_type)
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
@@ -2884,7 +3966,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
}
p->count += 1;
- if (!IS_ABSOLUTE_RELOC (r_type))
+ if (!MUST_BE_DYN_RELOC (r_type))
p->pc_count += 1;
}
break;
@@ -2912,10 +3994,10 @@ ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
if (h != NULL)
{
- enum elf_ppc_reloc_type r_type;
+ enum elf_ppc64_reloc_type r_type;
struct ppc_link_hash_entry *fdh;
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC64_GNU_VTINHERIT:
@@ -2940,7 +4022,7 @@ ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
sections, as all functions are referenced in .opd. */
else if ((fdh->oh != NULL
&& ((struct ppc_link_hash_entry *) fdh->oh)->is_entry)
- || elf_section_data (sec)->tdata == NULL)
+ || ppc64_elf_section_data (sec)->opd.func_sec == NULL)
rsec = h->root.u.def.section;
break;
@@ -2958,10 +4040,10 @@ ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
asection **opd_sym_section;
rsec = bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- opd_sym_section = (asection **) elf_section_data (rsec)->tdata;
+ opd_sym_section = ppc64_elf_section_data (rsec)->opd.func_sec;
if (opd_sym_section != NULL)
rsec = opd_sym_section[sym->st_value / 24];
- else if (elf_section_data (sec)->tdata != NULL)
+ else if (ppc64_elf_section_data (sec)->opd.func_sec != NULL)
rsec = NULL;
}
@@ -2974,49 +4056,91 @@ ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
static bfd_boolean
ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
asection *sec;
const Elf_Internal_Rela *relocs;
{
+ struct ppc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
- bfd_signed_vma *local_got_refcounts;
+ struct got_entry **local_got_ents;
const Elf_Internal_Rela *rel, *relend;
elf_section_data (sec)->local_dynrel = NULL;
+ htab = ppc_hash_table (info);
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
- local_got_refcounts = elf_local_got_refcounts (abfd);
+ local_got_ents = elf_local_got_ents (abfd);
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
{
unsigned long r_symndx;
- enum elf_ppc_reloc_type r_type;
+ enum elf_ppc64_reloc_type r_type;
struct elf_link_hash_entry *h;
+ char tls_type = 0;
r_symndx = ELF64_R_SYM (rel->r_info);
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
switch (r_type)
{
+ case R_PPC64_GOT_TLSLD16:
+ case R_PPC64_GOT_TLSLD16_LO:
+ case R_PPC64_GOT_TLSLD16_HI:
+ case R_PPC64_GOT_TLSLD16_HA:
+ htab->tlsld_got.refcount -= 1;
+ tls_type = TLS_TLS | TLS_GD_LD | TLS_LD;
+ goto dogot;
+
+ case R_PPC64_GOT_TLSGD16:
+ case R_PPC64_GOT_TLSGD16_LO:
+ case R_PPC64_GOT_TLSGD16_HI:
+ case R_PPC64_GOT_TLSGD16_HA:
+ tls_type = TLS_TLS | TLS_GD_LD;
+ goto dogot;
+
+ case R_PPC64_GOT_TPREL16_DS:
+ case R_PPC64_GOT_TPREL16_LO_DS:
+ case R_PPC64_GOT_TPREL16_HI:
+ case R_PPC64_GOT_TPREL16_HA:
+ tls_type = TLS_TLS | TLS_TPREL;
+ goto dogot;
+
+ case R_PPC64_GOT_DTPREL16_DS:
+ case R_PPC64_GOT_DTPREL16_LO_DS:
+ case R_PPC64_GOT_DTPREL16_HI:
+ case R_PPC64_GOT_DTPREL16_HA:
+ tls_type = TLS_TLS | TLS_DTPREL;
+ goto dogot;
+
case R_PPC64_GOT16:
case R_PPC64_GOT16_DS:
case R_PPC64_GOT16_HA:
case R_PPC64_GOT16_HI:
case R_PPC64_GOT16_LO:
case R_PPC64_GOT16_LO_DS:
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- if (h->got.refcount > 0)
- h->got.refcount--;
- }
- else
- {
- if (local_got_refcounts[r_symndx] > 0)
- local_got_refcounts[r_symndx]--;
- }
+ dogot:
+ {
+ struct got_entry *ent;
+
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ ent = h->got.glist;
+ }
+ else
+ ent = local_got_ents[r_symndx];
+
+ for (; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend
+ && ent->tls_type == tls_type)
+ break;
+ if (ent == NULL)
+ abort ();
+ if (ent->got.refcount > 0)
+ ent->got.refcount -= 1;
+ }
break;
case R_PPC64_PLT16_HA:
@@ -3024,26 +4148,26 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
case R_PPC64_PLT16_LO:
case R_PPC64_PLT32:
case R_PPC64_PLT64:
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- if (h->plt.refcount > 0)
- h->plt.refcount--;
- }
- break;
-
case R_PPC64_REL14:
case R_PPC64_REL14_BRNTAKEN:
case R_PPC64_REL14_BRTAKEN:
case R_PPC64_REL24:
if (r_symndx >= symtab_hdr->sh_info)
{
+ struct plt_entry *ent;
+
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- if (h->plt.refcount > 0)
- h->plt.refcount--;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend)
+ break;
+ if (ent == NULL)
+ abort ();
+ if (ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
}
break;
+ case R_PPC64_REL30:
case R_PPC64_REL32:
case R_PPC64_REL64:
if (r_symndx >= symtab_hdr->sh_info)
@@ -3067,6 +4191,9 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
}
break;
+ case R_PPC64_DTPMOD64:
+ case R_PPC64_DTPREL64:
+ case R_PPC64_TPREL64:
case R_PPC64_ADDR14:
case R_PPC64_ADDR14_BRNTAKEN:
case R_PPC64_ADDR14_BRTAKEN:
@@ -3081,7 +4208,6 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
case R_PPC64_ADDR16_LO:
case R_PPC64_ADDR16_LO_DS:
case R_PPC64_ADDR24:
- case R_PPC64_ADDR30:
case R_PPC64_ADDR32:
case R_PPC64_ADDR64:
case R_PPC64_UADDR16:
@@ -3125,6 +4251,7 @@ func_desc_adjust (h, inf)
{
struct bfd_link_info *info;
struct ppc_link_hash_table *htab;
+ struct plt_entry *ent;
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
@@ -3144,7 +4271,10 @@ func_desc_adjust (h, inf)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR))
htab->have_undefweak = TRUE;
- if (h->plt.refcount > 0
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.refcount > 0)
+ break;
+ if (ent != NULL
&& h->root.root.string[0] == '.'
&& h->root.root.string[1] != '\0')
{
@@ -3203,7 +4333,7 @@ func_desc_adjust (h, inf)
| ELF_LINK_NON_GOT_REF));
if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
{
- fdh->plt.refcount = h->plt.refcount;
+ fdh->plt.plist = h->plt.plist;
fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
}
((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
@@ -3375,20 +4505,24 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
{
/* Clear procedure linkage table information for any symbol that
won't need a .plt entry. */
+ struct plt_entry *ent;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.refcount > 0)
+ break;
if (!((struct ppc_link_hash_entry *) h)->is_func_descriptor
- || h->plt.refcount <= 0
+ || ent == NULL
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
|| (! info->shared
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0))
{
- h->plt.offset = (bfd_vma) -1;
+ h->plt.plist = NULL;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
}
return TRUE;
}
else
- h->plt.offset = (bfd_vma) -1;
+ h->plt.plist = NULL;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
@@ -3443,8 +4577,8 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
both the dynamic object and the regular object will refer to the
same memory location for the variable. */
- /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
- copy the initial value out of the dynamic object and into the
+ /* We must generate a R_PPC64_COPY reloc to tell the dynamic linker
+ to copy the initial value out of the dynamic object and into the
runtime process image. We need to remember the offset into the
.rela.bss section we are going to use. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
@@ -3537,17 +4671,147 @@ ppc64_elf_hide_symbol (info, h, force_local)
}
}
+static bfd_boolean
+get_sym_h (hp, symp, symsecp, tlstypep, locsymsp, r_symndx, ibfd)
+ struct elf_link_hash_entry **hp;
+ Elf_Internal_Sym **symp;
+ asection **symsecp;
+ char **tlstypep;
+ Elf_Internal_Sym **locsymsp;
+ unsigned long r_symndx;
+ bfd *ibfd;
+{
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd);
+ struct elf_link_hash_entry *h;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (hp != NULL)
+ *hp = h;
+
+ if (symp != NULL)
+ *symp = NULL;
+
+ if (symsecp != NULL)
+ {
+ asection *symsec = NULL;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ symsec = h->root.u.def.section;
+ *symsecp = symsec;
+ }
+
+ if (tlstypep != NULL)
+ {
+ struct ppc_link_hash_entry *eh;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ *tlstypep = &eh->tls_type;
+ }
+ }
+ else
+ {
+ Elf_Internal_Sym *sym;
+ Elf_Internal_Sym *locsyms = *locsymsp;
+
+ if (locsyms == NULL)
+ {
+ locsyms = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (locsyms == NULL)
+ locsyms = bfd_elf_get_elf_syms (ibfd, symtab_hdr,
+ symtab_hdr->sh_info,
+ 0, NULL, NULL, NULL);
+ if (locsyms == NULL)
+ return FALSE;
+ *locsymsp = locsyms;
+ }
+ sym = locsyms + r_symndx;
+
+ if (hp != NULL)
+ *hp = NULL;
+
+ if (symp != NULL)
+ *symp = sym;
+
+ if (symsecp != NULL)
+ {
+ asection *symsec = NULL;
+ if ((sym->st_shndx != SHN_UNDEF
+ && sym->st_shndx < SHN_LORESERVE)
+ || sym->st_shndx > SHN_HIRESERVE)
+ symsec = bfd_section_from_elf_index (ibfd, sym->st_shndx);
+ *symsecp = symsec;
+ }
+
+ if (tlstypep != NULL)
+ {
+ struct got_entry **lgot_ents;
+ char *tlstype;
+
+ tlstype = NULL;
+ lgot_ents = elf_local_got_ents (ibfd);
+ if (lgot_ents != NULL)
+ {
+ char *lgot_types = (char *) (lgot_ents + symtab_hdr->sh_info);
+ tlstype = &lgot_types[r_symndx];
+ }
+ *tlstypep = tlstype;
+ }
+ }
+ return TRUE;
+}
+
+static bfd_boolean
+get_tls_type (tls_type, locsymsp, rel, ibfd)
+ char **tls_type;
+ Elf_Internal_Sym **locsymsp;
+ const Elf_Internal_Rela *rel;
+ bfd *ibfd;
+{
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ bfd_vma off;
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (!get_sym_h (&h, &sym, &sec, tls_type, locsymsp, r_symndx, ibfd))
+ return FALSE;
+
+ if ((*tls_type != NULL && **tls_type != 0)
+ || sec == NULL
+ || ppc64_elf_section_data (sec)->t_symndx == NULL)
+ return TRUE;
+
+ /* Look inside a TOC section too. */
+ if (h != NULL)
+ {
+ BFD_ASSERT (h->root.type == bfd_link_hash_defined);
+ off = h->root.u.def.value;
+ }
+ else
+ off = sym->st_value;
+ off += rel->r_addend;
+ BFD_ASSERT (off % 8 == 0);
+ r_symndx = ppc64_elf_section_data (sec)->t_symndx[off / 8];
+ return get_sym_h (&h, &sym, NULL, tls_type, locsymsp, r_symndx, ibfd);
+}
+
bfd_boolean
ppc64_elf_edit_opd (obfd, info)
bfd *obfd;
struct bfd_link_info *info;
{
bfd *ibfd;
- unsigned int bfd_indx;
- for (bfd_indx = 0, ibfd = info->input_bfds;
- ibfd != NULL;
- ibfd = ibfd->link_next, bfd_indx++)
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
asection *sec;
Elf_Internal_Rela *relstart, *rel, *relend;
@@ -3564,13 +4828,13 @@ ppc64_elf_edit_opd (obfd, info)
continue;
amt = sec->_raw_size * sizeof (long) / 24;
- adjust = (long *) elf_section_data (sec)->tdata;
+ adjust = ppc64_elf_section_data (sec)->opd.adjust;
if (adjust == NULL)
{
/* Must be a ld -r link. ie. check_relocs hasn't been
called. */
adjust = (long *) bfd_zalloc (obfd, amt);
- elf_section_data (sec)->tdata = adjust;
+ ppc64_elf_section_data (sec)->opd.adjust = adjust;
}
memset (adjust, 0, (size_t) amt);
@@ -3599,7 +4863,7 @@ ppc64_elf_edit_opd (obfd, info)
relend = relstart + sec->reloc_count;
for (rel = relstart; rel < relend; rel++)
{
- enum elf_ppc_reloc_type r_type;
+ enum elf_ppc64_reloc_type r_type;
unsigned long r_symndx;
asection *sym_sec;
struct elf_link_hash_entry *h;
@@ -3608,7 +4872,7 @@ ppc64_elf_edit_opd (obfd, info)
/* .opd contains a regular array of 24 byte entries. We're
only interested in the reloc pointing to a function entry
point. */
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
if (r_type == R_PPC64_TOC)
continue;
@@ -3623,7 +4887,7 @@ ppc64_elf_edit_opd (obfd, info)
if (rel + 1 >= relend)
continue;
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info);
if (r_type != R_PPC64_TOC)
continue;
@@ -3642,44 +4906,22 @@ ppc64_elf_edit_opd (obfd, info)
}
r_symndx = ELF64_R_SYM (rel->r_info);
- sym_sec = NULL;
- h = NULL;
- sym = NULL;
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- sym_sec = h->root.u.def.section;
- }
- else
- {
- if (local_syms == NULL)
- {
- local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
- if (local_syms == NULL)
- local_syms = bfd_elf_get_elf_syms (ibfd, symtab_hdr,
- symtab_hdr->sh_info, 0,
- NULL, NULL, NULL);
- if (local_syms == NULL)
- goto error_free_rel;
- }
- sym = local_syms + r_symndx;
- if ((sym->st_shndx != SHN_UNDEF
- && sym->st_shndx < SHN_LORESERVE)
- || sym->st_shndx > SHN_HIRESERVE)
- sym_sec = bfd_section_from_elf_index (ibfd, sym->st_shndx);
- }
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+ r_symndx, ibfd))
+ goto error_free_rel;
if (sym_sec == NULL || sym_sec->owner == NULL)
{
+ const char *sym_name;
+ if (h != NULL)
+ sym_name = h->root.root.string;
+ else
+ sym_name = bfd_elf_local_sym_name (ibfd, sym);
+
(*_bfd_error_handler)
(_("%s: undefined sym `%s' in .opd section"),
bfd_archive_filename (ibfd),
- h != NULL ? h->root.root.string : "<local symbol>");
+ sym_name);
need_edit = FALSE;
break;
}
@@ -3744,28 +4986,8 @@ ppc64_elf_edit_opd (obfd, info)
Elf_Internal_Sym *sym;
r_symndx = ELF64_R_SYM (rel->r_info);
- sym_sec = NULL;
- h = NULL;
- sym = NULL;
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- sym_sec = h->root.u.def.section;
- }
- else
- {
- sym = local_syms + r_symndx;
- if ((sym->st_shndx != SHN_UNDEF
- && sym->st_shndx < SHN_LORESERVE)
- || sym->st_shndx > SHN_HIRESERVE)
- sym_sec = bfd_section_from_elf_index (ibfd,
- sym->st_shndx);
- }
+ get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+ r_symndx, ibfd);
skip = (sym_sec->owner != ibfd
|| sym_sec->output_section == bfd_abs_section_ptr);
@@ -3888,6 +5110,326 @@ ppc64_elf_edit_opd (obfd, info)
return TRUE;
}
+/* Run through all the TLS relocs looking for optimization
+ opportunities. The linker has been hacked (see ppc64elf.em) to do
+ a preliminary section layout so that we know the TLS segment
+ offsets. We can't optimize earlier because some optimizations need
+ to know the tp offset, and we need to optimize before allocating
+ dynamic relocations. */
+
+bfd_boolean
+ppc64_elf_tls_optimize (obfd, info)
+ bfd *obfd;
+ struct bfd_link_info *info;
+{
+ asection *tls;
+ bfd *ibfd;
+ asection *sec;
+ struct ppc_link_hash_table *htab;
+
+ if (info->relocateable)
+ return TRUE;
+
+ for (tls = obfd->sections; tls != NULL; tls = tls->next)
+ if ((tls->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
+ == (SEC_THREAD_LOCAL | SEC_LOAD))
+ break;
+ if (tls == NULL)
+ return TRUE;
+
+ htab = ppc_hash_table (info);
+ htab->tls_sec = tls;
+
+ if (info->shared)
+ return TRUE;
+
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ Elf_Internal_Sym *locsyms = NULL;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section))
+ {
+ Elf_Internal_Rela *relstart, *rel, *relend;
+ int expecting_tls_get_addr;
+
+ /* Read the relocations. */
+ relstart = _bfd_elf64_link_read_relocs (ibfd, sec, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL,
+ info->keep_memory);
+ if (relstart == NULL)
+ return FALSE;
+
+ expecting_tls_get_addr = 0;
+ relend = relstart + sec->reloc_count;
+ for (rel = relstart; rel < relend; rel++)
+ {
+ enum elf_ppc64_reloc_type r_type;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sym_sec;
+ char *tls_type;
+ char tls_set, tls_clear, got_tls_type = 0;
+ bfd_vma value;
+ bfd_boolean ok_tprel;
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, &tls_type, &locsyms,
+ r_symndx, ibfd))
+ {
+ err_free_rel:
+ if (elf_section_data (sec)->relocs != relstart)
+ free (relstart);
+ if (locsyms != NULL
+ && (elf_tdata (ibfd)->symtab_hdr.contents
+ != (unsigned char *) locsyms))
+ free (locsyms);
+ return FALSE;
+ }
+
+ if (h != NULL)
+ {
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ continue;
+ value = h->root.u.def.value;
+ }
+ else
+ value = sym->st_value;
+ ok_tprel = FALSE;
+ if (sym_sec != NULL && sym_sec->output_section != NULL)
+ {
+ value += sym_sec->output_offset;
+ value += sym_sec->output_section->vma;
+ value -= htab->tls_sec->vma;
+ ok_tprel = (value + TP_OFFSET + ((bfd_vma) 1 << 31)
+ < (bfd_vma) 1 << 32);
+ }
+
+ r_type
+ = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ case R_PPC64_GOT_TLSLD16:
+ case R_PPC64_GOT_TLSLD16_LO:
+ case R_PPC64_GOT_TLSLD16_HI:
+ case R_PPC64_GOT_TLSLD16_HA:
+ htab->tlsld_got.refcount -= 1;
+ if (ok_tprel)
+ /* LD -> LE */
+ tls_set = 0;
+ else
+ /* We still need a GOT entry as the offset is
+ too big. ie. LD -> IE. */
+ tls_set = TLS_TLS | TLS_TPREL;
+ tls_clear = TLS_GD_LD;
+ got_tls_type = TLS_TLS | TLS_GD_LD | TLS_LD;
+ expecting_tls_get_addr = 1;
+ break;
+
+ case R_PPC64_GOT_TLSGD16:
+ case R_PPC64_GOT_TLSGD16_LO:
+ case R_PPC64_GOT_TLSGD16_HI:
+ case R_PPC64_GOT_TLSGD16_HA:
+ if (ok_tprel
+ && (h == NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && ((h->elf_link_hash_flags
+ & ELF_LINK_FORCED_LOCAL) != 0
+ || !info->shared
+ || info->symbolic))))
+ /* GD -> LE */
+ tls_set = 0;
+ else
+ /* GD -> IE */
+ tls_set = TLS_TLS | TLS_TPREL;
+ tls_clear = TLS_GD_LD;
+ got_tls_type = TLS_TLS | TLS_GD_LD;
+ expecting_tls_get_addr = 1;
+ break;
+
+ case R_PPC64_GOT_TPREL16_DS:
+ case R_PPC64_GOT_TPREL16_LO_DS:
+ case R_PPC64_GOT_TPREL16_HI:
+ case R_PPC64_GOT_TPREL16_HA:
+ expecting_tls_get_addr = 0;
+ if (ok_tprel)
+ {
+ /* IE -> LE */
+ tls_set = 0;
+ tls_clear = TLS_TPREL;
+ got_tls_type = TLS_TLS | TLS_TPREL;
+ break;
+ }
+ else
+ continue;
+
+ case R_PPC64_REL14:
+ case R_PPC64_REL14_BRTAKEN:
+ case R_PPC64_REL14_BRNTAKEN:
+ case R_PPC64_REL24:
+ if (h != NULL
+ && h == htab->tls_get_addr)
+ {
+ if (!expecting_tls_get_addr
+ && rel != relstart
+ && ((ELF64_R_TYPE (rel[-1].r_info)
+ == R_PPC64_TOC16)
+ || (ELF64_R_TYPE (rel[-1].r_info)
+ == R_PPC64_TOC16_LO)))
+ {
+ /* Check for toc tls entries. */
+ char *toc_tls;
+
+ if (!get_tls_type (&toc_tls, &locsyms,
+ rel - 1, ibfd))
+ goto err_free_rel;
+ if (toc_tls != NULL)
+ expecting_tls_get_addr = *toc_tls != 0;
+ }
+
+ if (expecting_tls_get_addr)
+ {
+ struct plt_entry *ent;
+ for (ent = h->plt.plist; ent; ent = ent->next)
+ if (ent->addend == 0)
+ {
+ if (ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
+ break;
+ }
+ }
+ }
+ expecting_tls_get_addr = 0;
+ continue;
+
+ case R_PPC64_TPREL64:
+ expecting_tls_get_addr = 0;
+ if (ok_tprel)
+ {
+ /* IE -> LE */
+ tls_set = TLS_EXPLICIT;
+ tls_clear = TLS_TPREL;
+ break;
+ }
+ else
+ continue;
+
+ case R_PPC64_DTPMOD64:
+ expecting_tls_get_addr = 0;
+ if ((*tls_type & TLS_LD) == 0)
+ {
+ if ((h == NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && ((h->elf_link_hash_flags
+ & ELF_LINK_FORCED_LOCAL) != 0
+ || !info->shared
+ || info->symbolic)))
+ && ok_tprel)
+ /* GD -> LE */
+ tls_set = TLS_EXPLICIT;
+ else
+ /* GD -> IE */
+ tls_set = TLS_EXPLICIT | TLS_TPREL;
+ tls_clear = TLS_GD_LD;
+ }
+ else
+ {
+ if (ok_tprel)
+ /* LD -> LE */
+ tls_set = TLS_EXPLICIT;
+ else
+ /* LD -> IE */
+ tls_set = TLS_EXPLICIT | TLS_TPREL;
+ tls_clear = TLS_GD_LD;
+ }
+ break;
+
+ default:
+ expecting_tls_get_addr = 0;
+ continue;
+ }
+
+ if ((tls_set & TLS_EXPLICIT) == 0)
+ {
+ struct got_entry *ent;
+
+ /* Adjust got entry for this reloc. */
+ if (h != NULL)
+ ent = h->got.glist;
+ else
+ ent = elf_local_got_ents (ibfd)[r_symndx];
+
+ for (; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend
+ && ent->tls_type == got_tls_type)
+ break;
+ if (ent == NULL)
+ abort ();
+
+ if (tls_set == 0)
+ {
+ /* We managed to get rid of a got entry. */
+ if (ent->got.refcount > 0)
+ ent->got.refcount -= 1;
+ }
+ else
+ ent->tls_type = tls_set;
+ }
+ else if (h != NULL)
+ {
+ struct ppc_link_hash_entry * eh;
+ struct ppc_dyn_relocs **pp;
+ struct ppc_dyn_relocs *p;
+
+ /* Adjust dynamic relocs. */
+ eh = (struct ppc_link_hash_entry *) h;
+ for (pp = &eh->dyn_relocs;
+ (p = *pp) != NULL;
+ pp = &p->next)
+ if (p->sec == sec)
+ {
+ /* If we got rid of a DTPMOD/DTPREL reloc
+ pair then we'll lose one or two dyn
+ relocs. */
+ if (tls_clear == TLS_GD_LD
+ && rel + 1 < relend
+ && (rel[1].r_info
+ == ELF64_R_INFO (r_symndx, R_PPC64_DTPREL64))
+ && rel[1].r_offset == rel->r_offset + 8)
+ p->count -= 1;
+ if (tls_set == TLS_EXPLICIT)
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+
+ *tls_type |= tls_set;
+ *tls_type &= ~tls_clear;
+ }
+
+ if (elf_section_data (sec)->relocs != relstart)
+ free (relstart);
+ }
+
+ if (locsyms != NULL
+ && (elf_tdata (ibfd)->symtab_hdr.contents
+ != (unsigned char *) locsyms))
+ {
+ if (!info->keep_memory)
+ free (locsyms);
+ else
+ elf_tdata (ibfd)->symtab_hdr.contents = (unsigned char *) locsyms;
+ }
+ }
+ return TRUE;
+}
+
/* This is the condition under which ppc64_elf_finish_dynamic_symbol
will be called from elflink.h. If elflink.h doesn't call our
finish_dynamic_symbol routine, we'll need to do something about
@@ -3912,6 +5454,7 @@ allocate_dynrelocs (h, inf)
asection *s;
struct ppc_link_hash_entry *eh;
struct ppc_dyn_relocs *p;
+ struct got_entry *gent;
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
@@ -3923,71 +5466,86 @@ allocate_dynrelocs (h, inf)
htab = ppc_hash_table (info);
if (htab->elf.dynamic_sections_created
- && h->plt.refcount > 0
- && h->dynindx != -1)
+ && h->dynindx != -1
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
{
- BFD_ASSERT (((struct ppc_link_hash_entry *) h)->is_func_descriptor);
-
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
- {
- /* If this is the first .plt entry, make room for the special
- first entry. */
- s = htab->splt;
- if (s->_raw_size == 0)
- s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
-
- h->plt.offset = s->_raw_size;
-
- /* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
-
- /* Make room for the .glink code. */
- s = htab->sglink;
- if (s->_raw_size == 0)
- s->_raw_size += GLINK_CALL_STUB_SIZE;
- /* We need bigger stubs past index 32767. */
- if (s->_raw_size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
- s->_raw_size += 4;
- s->_raw_size += 2*4;
-
- /* We also need to make an entry in the .rela.plt section. */
- s = htab->srelplt;
- s->_raw_size += sizeof (Elf64_External_Rela);
- }
- else
+ struct plt_entry *pent;
+ bfd_boolean doneone = FALSE;
+ for (pent = h->plt.plist; pent != NULL; pent = pent->next)
+ if (pent->plt.refcount > 0)
+ {
+ BFD_ASSERT (((struct ppc_link_hash_entry *) h)->is_func_descriptor);
+
+ /* If this is the first .plt entry, make room for the special
+ first entry. */
+ s = htab->splt;
+ if (s->_raw_size == 0)
+ s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
+
+ pent->plt.offset = s->_raw_size;
+
+ /* Make room for this entry. */
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* Make room for the .glink code. */
+ s = htab->sglink;
+ if (s->_raw_size == 0)
+ s->_raw_size += GLINK_CALL_STUB_SIZE;
+ /* We need bigger stubs past index 32767. */
+ if (s->_raw_size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
+ s->_raw_size += 4;
+ s->_raw_size += 2*4;
+
+ /* We also need to make an entry in the .rela.plt section. */
+ s = htab->srelplt;
+ s->_raw_size += sizeof (Elf64_External_Rela);
+ doneone = TRUE;
+ }
+ else
+ pent->plt.offset = (bfd_vma) -1;
+ if (!doneone)
{
- h->plt.offset = (bfd_vma) -1;
+ h->plt.plist = NULL;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
}
}
else
{
- h->plt.offset = (bfd_vma) -1;
+ h->plt.plist = NULL;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
}
- if (h->got.refcount > 0)
- {
- 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_elf64_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
+ for (gent = h->got.glist; gent != NULL; gent = gent->next)
+ if (gent->got.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_elf64_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
- s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 8;
- dyn = htab->elf.dynamic_sections_created;
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
- }
- else
- h->got.offset = (bfd_vma) -1;
+ if ((gent->tls_type & TLS_LD) != 0)
+ gent->got.offset = htab->tlsld_got.offset;
+ else
+ {
+ bfd_boolean dyn;
+
+ s = htab->sgot;
+ gent->got.offset = s->_raw_size;
+ s->_raw_size += (gent->tls_type & TLS_GD_LD) != 0 ? 16 : 8;
+ dyn = htab->elf.dynamic_sections_created;
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ htab->srelgot->_raw_size
+ += ((gent->tls_type & TLS_GD_LD) != 0
+ ? 2 * sizeof (Elf64_External_Rela)
+ : sizeof (Elf64_External_Rela));
+ }
+ }
+ else
+ gent->got.offset = (bfd_vma) -1;
eh = (struct ppc_link_hash_entry *) h;
if (eh->dyn_relocs == NULL)
@@ -4123,12 +5681,22 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
}
}
+ if (htab->tlsld_got.refcount > 0)
+ {
+ htab->tlsld_got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += 16;
+ if (info->shared)
+ htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ else
+ htab->tlsld_got.offset = (bfd_vma) -1;
+
/* Set up .got offsets for local syms, and space for local dynamic
relocs. */
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
- bfd_signed_vma *local_got;
- bfd_signed_vma *end_local_got;
+ struct got_entry **lgot_ents;
+ struct got_entry **end_lgot_ents;
bfd_size_type locsymcount;
Elf_Internal_Shdr *symtab_hdr;
asection *srel;
@@ -4163,26 +5731,52 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
}
}
- local_got = elf_local_got_refcounts (ibfd);
- if (!local_got)
+ lgot_ents = elf_local_got_ents (ibfd);
+ if (!lgot_ents)
continue;
symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
locsymcount = symtab_hdr->sh_info;
- end_local_got = local_got + locsymcount;
+ end_lgot_ents = lgot_ents + locsymcount;
s = htab->sgot;
srel = htab->srelgot;
- for (; local_got < end_local_got; ++local_got)
+ for (; lgot_ents < end_lgot_ents; ++lgot_ents)
{
- if (*local_got > 0)
- {
- *local_got = s->_raw_size;
- s->_raw_size += 8;
- if (info->shared)
- srel->_raw_size += sizeof (Elf64_External_Rela);
- }
- else
- *local_got = (bfd_vma) -1;
+ struct got_entry *ent;
+
+ for (ent = *lgot_ents; ent != NULL; ent = ent->next)
+ if (ent->got.refcount > 0)
+ {
+ if ((ent->tls_type & TLS_LD) != 0)
+ {
+ if (htab->tlsld_got.offset == (bfd_vma) -1)
+ {
+ htab->tlsld_got.offset = s->_raw_size;
+ s->_raw_size += 16;
+ if (info->shared)
+ srel->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ ent->got.offset = htab->tlsld_got.offset;
+ }
+ else
+ {
+ ent->got.offset = s->_raw_size;
+ if ((ent->tls_type & TLS_GD_LD) != 0)
+ {
+ s->_raw_size += 16;
+ if (info->shared)
+ srel->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ }
+ else
+ {
+ s->_raw_size += 8;
+ if (info->shared)
+ srel->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ }
+ }
+ else
+ ent->got.offset = (bfd_vma) -1;
}
}
@@ -4198,6 +5792,10 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
+ /* Reset _cooked_size since prelim layout will set it wrongly,
+ and a non-zero _cooked_size sticks. */
+ s->_cooked_size = 0;
+
if (s == htab->sbrlt || s == htab->srelbrlt)
/* These haven't been allocated yet; don't strip. */
continue;
@@ -4251,8 +5849,10 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
- but this way if it does, we get a R_PPC64_NONE reloc instead
- of garbage. */
+ but this way if it does we get a R_PPC64_NONE reloc in .rela
+ sections instead of garbage.
+ We also rely on the section contents being zero when writing
+ the GOT. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL)
return FALSE;
@@ -4334,11 +5934,16 @@ ppc_type_of_stub (input_sec, rel, hash, destination)
if (h != NULL)
{
if (h->oh != NULL
- && h->oh->plt.offset != (bfd_vma) -1
&& h->oh->dynindx != -1)
{
- *hash = (struct ppc_link_hash_entry *) h->oh;
- return ppc_stub_plt_call;
+ struct plt_entry *ent;
+ for (ent = h->oh->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend
+ && ent->plt.offset != (bfd_vma) -1)
+ {
+ *hash = (struct ppc_link_hash_entry *) h->oh;
+ return ppc_stub_plt_call;
+ }
}
if (h->elf.root.type == bfd_link_hash_undefweak
@@ -4413,6 +6018,7 @@ ppc_build_one_stub (gen_entry, in_arg)
bfd_byte *loc;
bfd_byte *p;
unsigned int indx;
+ struct plt_entry *ent;
bfd_vma off;
int size;
@@ -4524,7 +6130,13 @@ ppc_build_one_stub (gen_entry, in_arg)
}
/* Now build the stub. */
- off = stub_entry->h->elf.plt.offset;
+ off = (bfd_vma) -1;
+ for (ent = stub_entry->h->elf.plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == stub_entry->addend)
+ {
+ off = ent->plt.offset;
+ break;
+ }
if (off >= (bfd_vma) -2)
abort ();
@@ -4577,7 +6189,15 @@ ppc_size_one_stub (gen_entry, in_arg)
if (stub_entry->stub_type == ppc_stub_plt_call)
{
- off = stub_entry->h->elf.plt.offset & ~(bfd_vma) 1;
+ struct plt_entry *ent;
+ for (ent = stub_entry->h->elf.plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == stub_entry->addend)
+ {
+ off = ent->plt.offset & ~(bfd_vma) 1;
+ break;
+ }
+ if (ent == NULL)
+ abort ();
off += (htab->splt->output_offset
+ htab->splt->output_section->vma
- elf_gp (htab->splt->output_section->owner)
@@ -4908,13 +6528,15 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
bfd_vma sym_value;
bfd_vma destination;
struct ppc_link_hash_entry *hash;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
char *stub_name;
const asection *id_sec;
r_type = ELF64_R_TYPE (irela->r_info);
r_indx = ELF64_R_SYM (irela->r_info);
- if (r_type >= (unsigned int) R_PPC_max)
+ if (r_type >= (unsigned int) R_PPC64_max)
{
bfd_set_error (bfd_error_bad_value);
goto error_ret_free_internal;
@@ -4929,33 +6551,16 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
/* Now determine the call target, its name, value,
section. */
- sym_sec = NULL;
- sym_value = 0;
destination = 0;
- hash = NULL;
- if (r_indx < symtab_hdr->sh_info)
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+ r_indx, input_bfd))
+ goto error_ret_free_internal;
+ hash = (struct ppc_link_hash_entry *) h;
+
+ if (hash == NULL)
{
/* It's a local symbol. */
- Elf_Internal_Sym *sym;
- Elf_Internal_Shdr *hdr;
-
- if (local_syms == NULL)
- {
- local_syms
- = (Elf_Internal_Sym *) symtab_hdr->contents;
- if (local_syms == NULL)
- local_syms
- = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
- symtab_hdr->sh_info, 0,
- NULL, NULL, NULL);
- if (local_syms == NULL)
- goto error_ret_free_internal;
- }
- sym = local_syms + r_indx;
- hdr = elf_elfsections (input_bfd)[sym->st_shndx];
- sym_sec = hdr->bfd_section;
- if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
- sym_value = sym->st_value;
+ sym_value = sym->st_value;
destination = (sym_value + irela->r_addend
+ sym_sec->output_offset
+ sym_sec->output_section->vma);
@@ -4963,21 +6568,10 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
else
{
/* It's an external symbol. */
- int e_indx;
-
- e_indx = r_indx - symtab_hdr->sh_info;
- hash = ((struct ppc_link_hash_entry *)
- elf_sym_hashes (input_bfd)[e_indx]);
-
- while (hash->elf.root.type == bfd_link_hash_indirect
- || hash->elf.root.type == bfd_link_hash_warning)
- hash = ((struct ppc_link_hash_entry *)
- hash->elf.root.u.i.link);
-
+ sym_value = 0;
if (hash->elf.root.type == bfd_link_hash_defined
|| hash->elf.root.type == bfd_link_hash_defweak)
{
- sym_sec = hash->elf.root.u.def.section;
sym_value = hash->elf.root.u.def.value;
if (sym_sec->output_section != NULL)
destination = (sym_value + irela->r_addend
@@ -5001,6 +6595,24 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
if (stub_type == ppc_stub_none)
continue;
+ /* __tls_get_addr calls might be eliminated. */
+ if (stub_type != ppc_stub_plt_call
+ && hash != NULL
+ && &hash->elf == htab->tls_get_addr
+ && section->has_tls_reloc
+ && irela != internal_relocs)
+ {
+ /* Get tls info. */
+ char *tls_type;
+
+ if (!get_tls_type (&tls_type, &local_syms,
+ irela - 1, input_bfd))
+ goto error_ret_free_internal;
+ if (tls_type != NULL
+ && (*tls_type & (TLS_TLS | TLS_GD_LD)) == TLS_TLS)
+ continue;
+ }
+
/* Support for grouping stub sections. */
id_sec = htab->stub_group[section->id].link_sec;
@@ -5037,6 +6649,7 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
stub_entry->target_section = sym_sec;
stub_entry->stub_type = stub_type;
stub_entry->h = hash;
+ stub_entry->addend = irela->r_addend;
stub_changed = TRUE;
}
@@ -5287,7 +6900,10 @@ ppc64_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_vma *local_got_offsets;
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+ unsigned int tls_get_addr_type;
+ struct got_entry **local_got_ents;
bfd_vma TOCstart;
bfd_boolean ret = TRUE;
bfd_boolean is_opd;
@@ -5302,18 +6918,32 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
ppc_howto_init ();
htab = ppc_hash_table (info);
- local_got_offsets = elf_local_got_offsets (input_bfd);
+ if (info->shared && (htab->tlsld_got.offset & 1) == 0)
+ {
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ + htab->tlsld_got.offset);
+ outrel.r_info = ELF64_R_INFO (0, R_PPC64_DTPMOD64);
+ outrel.r_addend = 0;
+
+ loc = htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ htab->tlsld_got.offset |= 1;
+ }
+
+ local_got_ents = elf_local_got_ents (input_bfd);
TOCstart = elf_gp (output_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
- is_opd = elf_section_data (input_section)->tdata != NULL;
+ is_opd = ppc64_elf_section_data (input_section)->opd.adjust != NULL;
+ tls_get_addr_type = 0;
rel = relocs;
relend = relocs + input_section->reloc_count;
for (; rel < relend; rel++)
{
- enum elf_ppc_reloc_type r_type;
- bfd_vma offset;
+ enum elf_ppc64_reloc_type r_type;
bfd_vma addend;
bfd_reloc_status_type r;
Elf_Internal_Sym *sym;
@@ -5322,6 +6952,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry *fdh;
const char *sym_name;
unsigned long r_symndx;
+ char tls_type;
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_boolean warned;
@@ -5330,10 +6961,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma max_br_offset;
bfd_vma from;
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
r_symndx = ELF64_R_SYM (rel->r_info);
- offset = rel->r_offset;
- addend = rel->r_addend;
r = bfd_reloc_other;
sym = (Elf_Internal_Sym *) 0;
sec = (asection *) 0;
@@ -5352,17 +6981,13 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* It's a local symbol. */
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- sym_name = "<local symbol>";
-
+ sym_name = bfd_elf_local_sym_name (input_bfd, sym);
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
- /* rel may have changed, update our copy of addend. */
- addend = rel->r_addend;
-
if (elf_section_data (sec) != NULL)
{
long *opd_sym_adjust;
- opd_sym_adjust = (long *) elf_section_data (sec)->tdata;
+ opd_sym_adjust = ppc64_elf_section_data (sec)->opd.adjust;
if (opd_sym_adjust != NULL && sym->st_value % 24 == 0)
relocation += opd_sym_adjust[sym->st_value / 24];
}
@@ -5402,15 +7027,275 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
- offset, (!info->shared
- || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
+ rel->r_offset, (!info->shared
+ || info->no_undefined
+ || ELF_ST_VISIBILITY (h->other)))))
return FALSE;
warned = TRUE;
}
}
- /* First handle relocations that tweak non-addend part of insn. */
+ /* TLS optimizations. */
+ tls_type = 0;
+ if (IS_TLS_RELOC (r_type))
+ {
+ if (h != NULL)
+ tls_type = ((struct ppc_link_hash_entry *) h)->tls_type;
+ else if (local_got_ents != NULL)
+ {
+ char *lgot_types;
+ lgot_types = (char *) (local_got_ents + symtab_hdr->sh_info);
+ tls_type = lgot_types[r_symndx];
+ }
+ }
+
+ /* Ensure reloc mapping code below stays sane. */
+ if (R_PPC64_TOC16_LO_DS != R_PPC64_TOC16_DS + 1
+ || R_PPC64_TOC16_LO != R_PPC64_TOC16 + 1
+ || (R_PPC64_GOT_TLSLD16 & 3) != (R_PPC64_GOT_TLSGD16 & 3)
+ || (R_PPC64_GOT_TLSLD16_LO & 3) != (R_PPC64_GOT_TLSGD16_LO & 3)
+ || (R_PPC64_GOT_TLSLD16_HI & 3) != (R_PPC64_GOT_TLSGD16_HI & 3)
+ || (R_PPC64_GOT_TLSLD16_HA & 3) != (R_PPC64_GOT_TLSGD16_HA & 3)
+ || (R_PPC64_GOT_TLSLD16 & 3) != (R_PPC64_GOT_TPREL16_DS & 3)
+ || (R_PPC64_GOT_TLSLD16_LO & 3) != (R_PPC64_GOT_TPREL16_LO_DS & 3)
+ || (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:
+ tls_get_addr_type = 0;
+ break;
+
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ tls_get_addr_type = 0;
+ {
+ /* Check for toc tls entries. */
+ char *toc_tls;
+
+ if (!get_tls_type (&toc_tls, &local_syms, rel, input_bfd))
+ return FALSE;
+
+ if (toc_tls)
+ {
+ tls_type = *toc_tls;
+ if (r_type == R_PPC64_TOC16_DS
+ || r_type == R_PPC64_TOC16_LO_DS)
+ goto toctprel;
+ else
+ tls_get_addr_type = tls_type;
+ }
+ }
+ break;
+
+ case R_PPC64_GOT_TPREL16_DS:
+ case R_PPC64_GOT_TPREL16_LO_DS:
+ tls_get_addr_type = 0;
+ toctprel:
+ if (tls_type != 0
+ && (tls_type & TLS_TPREL) == 0)
+ {
+ bfd_vma insn;
+ insn = bfd_get_32 (output_bfd, contents + rel->r_offset - 2);
+ insn &= 31 << 21;
+ 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);
+ }
+ break;
+
+ case R_PPC64_TLS:
+ tls_get_addr_type = 0;
+ if (tls_type == 0)
+ {
+ /* Check for toc tls entries. */
+ char *toc_tls;
+
+ if (!get_tls_type (&toc_tls, &local_syms, rel, input_bfd))
+ return FALSE;
+
+ if (toc_tls)
+ tls_type = *toc_tls;
+ }
+ if (tls_type != 0
+ && (tls_type & TLS_TPREL) == 0)
+ {
+ bfd_vma insn, rtra;
+ insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
+ if ((insn & ((31 << 26) | (31 << 11)))
+ == ((31 << 26) | (13 << 11)))
+ rtra = insn & ((1 << 26) - (1 << 16));
+ else if ((insn & ((31 << 26) | (31 << 16)))
+ == ((31 << 26) | (13 << 16)))
+ rtra = (insn & (31 << 21)) | ((insn & (31 << 11)) << 5);
+ else
+ abort ();
+ if ((insn & ((1 << 11) - (1 << 1))) == 266 << 1)
+ /* add -> addi. */
+ insn = 14 << 26;
+ else if ((insn & (31 << 1)) == 23 << 1
+ && ((insn & (31 << 6)) < 14 << 6
+ || ((insn & (31 << 6)) >= 16 << 6
+ && (insn & (31 << 6)) < 24 << 6)))
+ /* load and store indexed -> dform. */
+ insn = (32 | ((insn >> 6) & 31)) << 26;
+ else if ((insn & (31 << 1)) == 21 << 1
+ && (insn & (0x1a << 6)) == 0)
+ /* ldx, ldux, stdx, stdux -> ld, ldu, std, stdu. */
+ insn = (((58 | ((insn >> 6) & 4)) << 26)
+ | ((insn >> 6) & 1));
+ else if ((insn & (31 << 1)) == 21 << 1
+ && (insn & ((1 << 11) - (1 << 1))) == 341 << 1)
+ /* lwax -> lwa. */
+ insn = (58 << 26) | 2;
+ else
+ 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;
+ }
+ break;
+
+ case R_PPC64_GOT_TLSGD16:
+ case R_PPC64_GOT_TLSGD16_LO:
+ case R_PPC64_GOT_TLSGD16_HI:
+ case R_PPC64_GOT_TLSGD16_HA:
+ case R_PPC64_GOT_TLSLD16:
+ case R_PPC64_GOT_TLSLD16_LO:
+ case R_PPC64_GOT_TLSLD16_HI:
+ case R_PPC64_GOT_TLSLD16_HA:
+ tls_get_addr_type = 0;
+ if (tls_type != 0 && (tls_type & TLS_GD_LD) == 0)
+ {
+ if (r_type == R_PPC64_GOT_TLSGD16_HI
+ || r_type == R_PPC64_GOT_TLSGD16_HA
+ || r_type == R_PPC64_GOT_TLSLD16_HI
+ || r_type == R_PPC64_GOT_TLSLD16_HA)
+ {
+ if ((tls_type & TLS_LD) != 0)
+ {
+ bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
+ r_type = R_PPC64_NONE;
+ rel->r_offset -= 2;
+ }
+ else
+ r_type = (((r_type - (R_PPC64_GOT_TLSGD16 & 3)) & 3)
+ + R_PPC64_GOT_TPREL16_DS);
+ rel->r_info = ELF64_R_INFO (r_symndx, r_type);
+ break;
+ }
+
+ /* This reloc and its instruction will be replaced so there's
+ not much point in doing anything more here. We know the
+ next reloc will be a REL24 to __tls_get_addr, and will
+ be handled below. */
+ tls_get_addr_type = tls_type;
+ continue;
+ }
+ break;
+
+ case R_PPC64_REL14:
+ case R_PPC64_REL14_BRTAKEN:
+ case R_PPC64_REL14_BRNTAKEN:
+ case R_PPC64_REL24:
+ if (h != NULL
+ && h == htab->tls_get_addr
+ && tls_get_addr_type != 0
+ && (tls_get_addr_type & TLS_GD_LD) == 0)
+ {
+ /* Replace the call. */
+ bfd_vma insn1, insn2, insn3;
+ bfd_vma offset = rel->r_offset;
+
+ insn1 = bfd_get_32 (output_bfd, contents + rel[-1].r_offset - 2);
+ insn3 = bfd_get_32 (output_bfd, contents + offset + 4);
+ if (tls_get_addr_type & TLS_TPREL)
+ {
+ /* IE */
+ insn1 &= (1 << 26) - (1 << 2);
+ insn1 |= 58 << 26; /* ld */
+ insn2 = 0x7c636a14; /* add 3,3,13 */
+ /* Fix the relocs for --emit-relocs. */
+ r_type = ELF64_R_TYPE (rel[-1].r_info);
+ if (tls_get_addr_type & TLS_EXPLICIT)
+ r_type += R_PPC64_TOC16_DS - R_PPC64_TOC16;
+ else
+ r_type = (((r_type - (R_PPC64_GOT_TLSGD16 & 3)) & 3)
+ + R_PPC64_GOT_TPREL16_DS);
+ rel[-1].r_info
+ = ELF64_R_INFO (ELF64_R_SYM (rel[-1].r_info), r_type);
+ rel->r_info = 0;
+ }
+ else
+ {
+ /* LE */
+ insn1 = 0x3c6d0000; /* addis 3,13,0 */
+ insn2 = 0x38630000; /* addi 3,3,0 */
+ if (tls_get_addr_type & TLS_LD)
+ {
+ r_symndx = 0;
+ rel[-1].r_addend = htab->tls_sec->vma + DTP_OFFSET;
+ rel->r_addend = htab->tls_sec->vma + DTP_OFFSET;
+ }
+ else
+ r_symndx = ELF64_R_SYM (rel[-1].r_info);
+ rel[-1].r_info = ELF64_R_INFO (r_symndx, R_PPC64_TPREL16_HA);
+ rel->r_info = ELF64_R_INFO (r_symndx, R_PPC64_TPREL16_LO);
+ rel->r_offset += 2;
+ }
+ if (insn3 == NOP
+ || insn3 == CROR_151515 || insn3 == CROR_313131)
+ {
+ insn3 = insn2;
+ insn2 = NOP;
+ rel->r_offset += 4;
+ }
+ bfd_put_32 (output_bfd, insn1, contents + rel[-1].r_offset - 2);
+ bfd_put_32 (output_bfd, insn2, contents + offset);
+ bfd_put_32 (output_bfd, insn3, contents + offset + 4);
+ /* Do the relocs again. */
+ rel -= 2;
+ tls_get_addr_type = 0;
+ continue;
+ }
+ tls_get_addr_type = 0;
+ break;
+
+ case R_PPC64_DTPMOD64:
+ if ((tls_type & TLS_GD_LD) == 0)
+ {
+ if ((tls_type & TLS_TPREL) != 0)
+ r_type = R_PPC64_TPREL64;
+ else
+ {
+ bfd_put_64 (output_bfd, (bfd_vma) 1,
+ contents + rel->r_offset);
+ r_type = R_PPC64_NONE;
+ }
+ rel->r_info = ELF64_R_INFO (r_symndx, r_type);
+ if ((tls_type & TLS_LD) == 0)
+ rel[1].r_info = 0;
+ }
+ break;
+
+ case R_PPC64_TPREL64:
+ if ((tls_type & TLS_TPREL) == 0)
+ {
+ r_type = R_PPC64_NONE;
+ rel->r_info = ELF64_R_INFO (r_symndx, r_type);
+ }
+ break;
+ }
+
+ /* Handle other relocations that tweak non-addend part of insn. */
insn = 0;
switch (r_type)
{
@@ -5426,7 +7311,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* Branch not taken prediction relocations. */
case R_PPC64_ADDR14_BRNTAKEN:
case R_PPC64_REL14_BRNTAKEN:
- insn |= bfd_get_32 (output_bfd, contents + offset) & ~(0x01 << 21);
+ insn |= bfd_get_32 (output_bfd,
+ contents + rel->r_offset) & ~(0x01 << 21);
if (is_power4)
{
/* Set 'a' bit. This is 0b00010 in BO field for branch
@@ -5441,16 +7327,16 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- from = (offset
+ from = (rel->r_offset
+ input_section->output_offset
+ input_section->output_section->vma);
/* Invert 'y' bit if not the default. */
- if ((bfd_signed_vma) (relocation + addend - from) < 0)
+ if ((bfd_signed_vma) (relocation + rel->r_addend - from) < 0)
insn ^= 0x01 << 21;
}
- bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
+ bfd_put_32 (output_bfd, (bfd_vma) insn, contents + rel->r_offset);
break;
case R_PPC64_REL24:
@@ -5461,20 +7347,20 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
need for a PLT entry. */
if (h != NULL
&& (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
- && fdh->plt.offset != (bfd_vma) -1
+ && fdh->plt.plist != NULL
&& (stub_entry = ppc_get_stub_entry (input_section, sec, fdh,
rel, htab)) != NULL)
{
bfd_boolean can_plt_call = 0;
- if (offset + 8 <= input_section->_cooked_size)
+ if (rel->r_offset + 8 <= input_section->_cooked_size)
{
- insn = bfd_get_32 (input_bfd, contents + offset + 4);
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
if (insn == NOP
|| insn == CROR_151515 || insn == CROR_313131)
{
bfd_put_32 (input_bfd, (bfd_vma) LD_R2_40R1,
- contents + offset + 4);
+ contents + rel->r_offset + 4);
can_plt_call = 1;
}
}
@@ -5483,7 +7369,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* If this is a plain branch rather than a branch
and link, don't require a nop. */
- insn = bfd_get_32 (input_bfd, contents + offset);
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
if ((insn & 1) == 0)
can_plt_call = 1;
}
@@ -5493,7 +7379,6 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (stub_entry->stub_offset
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
- addend = 0;
unresolved_reloc = FALSE;
}
}
@@ -5501,7 +7386,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (h != NULL
&& h->root.type == bfd_link_hash_undefweak
&& relocation == 0
- && addend == 0)
+ && rel->r_addend == 0)
{
/* Tweak calls to undefined weak functions to point at a
blr. We can thus call a weak function without first
@@ -5511,7 +7396,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (htab->sfpr->_raw_size - 4
+ htab->sfpr->output_offset
+ htab->sfpr->output_section->vma);
- from = (offset
+ from = (rel->r_offset
+ input_section->output_offset
+ input_section->output_section->vma);
@@ -5525,6 +7410,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
/* Set `addend'. */
+ tls_type = 0;
+ addend = rel->r_addend;
switch (r_type)
{
default:
@@ -5537,34 +7424,81 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
case R_PPC64_NONE:
- case R_PPC_GNU_VTINHERIT:
- case R_PPC_GNU_VTENTRY:
+ case R_PPC64_TLS:
+ case R_PPC64_GNU_VTINHERIT:
+ case R_PPC64_GNU_VTENTRY:
continue;
/* GOT16 relocations. Like an ADDR16 using the symbol's
address in the GOT as relocation value instead of the
- symbols value itself. Also, create a GOT entry for the
+ symbol's value itself. Also, create a GOT entry for the
symbol and put the symbol value there. */
+ case R_PPC64_GOT_TLSGD16:
+ case R_PPC64_GOT_TLSGD16_LO:
+ case R_PPC64_GOT_TLSGD16_HI:
+ case R_PPC64_GOT_TLSGD16_HA:
+ tls_type = TLS_TLS | TLS_GD_LD;
+ goto dogot;
+
+ case R_PPC64_GOT_TLSLD16:
+ case R_PPC64_GOT_TLSLD16_LO:
+ case R_PPC64_GOT_TLSLD16_HI:
+ case R_PPC64_GOT_TLSLD16_HA:
+ tls_type = TLS_TLS | TLS_GD_LD | TLS_LD;
+ goto dogot;
+
+ case R_PPC64_GOT_TPREL16_DS:
+ case R_PPC64_GOT_TPREL16_LO_DS:
+ case R_PPC64_GOT_TPREL16_HI:
+ case R_PPC64_GOT_TPREL16_HA:
+ tls_type = TLS_TLS | TLS_TPREL;
+ goto dogot;
+
+ case R_PPC64_GOT_DTPREL16_DS:
+ case R_PPC64_GOT_DTPREL16_LO_DS:
+ case R_PPC64_GOT_DTPREL16_HI:
+ case R_PPC64_GOT_DTPREL16_HA:
+ tls_type = TLS_TLS | TLS_DTPREL;
+ goto dogot;
+
case R_PPC64_GOT16:
case R_PPC64_GOT16_LO:
case R_PPC64_GOT16_HI:
case R_PPC64_GOT16_HA:
case R_PPC64_GOT16_DS:
case R_PPC64_GOT16_LO_DS:
+ dogot:
{
/* Relocation is to the entry for this symbol in the global
offset table. */
+ struct got_entry *ent;
bfd_vma off;
+ unsigned long indx;
if (htab->sgot == NULL)
abort ();
if (h != NULL)
+ ent = h->got.glist;
+ else
{
- bfd_boolean dyn;
+ if (local_got_ents == NULL)
+ abort ();
+ ent = local_got_ents[r_symndx];
+ }
+
+ for (; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend
+ && ent->tls_type == tls_type)
+ break;
+ if (ent == NULL)
+ abort ();
- off = h->got.offset;
- dyn = htab->elf.dynamic_sections_created;
+ off = ent->got.offset;
+ indx = 0;
+ if (h != NULL)
+ {
+ bfd_boolean dyn = htab->elf.dynamic_sections_created;
if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)
|| (info->shared
&& (info->symbolic
@@ -5573,68 +7507,87 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
& ELF_LINK_FORCED_LOCAL))
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR)))
+ /* This is actually a static link, or it is a
+ -Bsymbolic link and the symbol is defined
+ locally, or the symbol was forced to be local
+ because of a version file. */
+ ;
+ else
{
- /* This is actually a static link, or it is a
- -Bsymbolic link and the symbol is defined
- locally, or the symbol was forced to be local
- because of a version file. We must initialize
- this entry in the global offset table. Since the
- offset must always be a multiple of 8, we use the
- least significant bit to record whether we have
- initialized it already.
-
- When doing a dynamic link, we create a .rel.got
- relocation entry to initialize the value. This
- is done in the finish_dynamic_symbol routine. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off);
- h->got.offset |= 1;
- }
+ indx = h->dynindx;
+ unresolved_reloc = FALSE;
}
- else
- unresolved_reloc = FALSE;
}
+
+ /* The offset must always be a multiple of 8. We use the
+ least significant bit to record whether we have already
+ processed this entry. */
+ if ((off & 1) != 0)
+ off &= ~1;
else
{
- if (local_got_offsets == NULL)
- abort ();
-
- off = local_got_offsets[r_symndx];
-
- /* The offset must always be a multiple of 8. We use
- the least significant bit to record whether we have
- already processed this entry. */
- if ((off & 1) != 0)
- off &= ~1;
- else
+ /* Generate relocs for the dynamic linker, except in
+ the case of TLSLD where we'll use one entry per
+ module. */
+ if ((info->shared || indx != 0)
+ && ent->tls_type != (TLS_TLS | TLS_GD_LD | TLS_LD))
{
- bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off);
-
- if (info->shared)
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ + off);
+ if (ent->tls_type == (TLS_TLS | TLS_GD_LD))
{
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- /* We need to generate a R_PPC64_RELATIVE reloc
- for the dynamic linker. */
- outrel.r_offset = (htab->sgot->output_section->vma
- + htab->sgot->output_offset
- + off);
- outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
- outrel.r_addend = relocation;
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPMOD64);
+ outrel.r_addend = 0;
loc = htab->srelgot->contents;
loc += (htab->srelgot->reloc_count++
* sizeof (Elf64_External_Rela));
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPREL64);
+ outrel.r_offset += 8;
}
+ else if (ent->tls_type == (TLS_TLS | TLS_DTPREL))
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPREL64);
+ else if (ent->tls_type == (TLS_TLS | TLS_TPREL))
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_TPREL64);
+ else if (indx == 0)
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_RELATIVE);
+ else
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_GLOB_DAT);
+ outrel.r_addend = ent->addend;
+ if (indx == 0)
+ outrel.r_addend += relocation;
+ loc = htab->srelgot->contents;
+ loc += (htab->srelgot->reloc_count++
+ * sizeof (Elf64_External_Rela));
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ }
- local_got_offsets[r_symndx] |= 1;
+ /* Init the .got section contents if we're not
+ emitting a reloc. */
+ if (!(info->shared || indx != 0))
+ {
+
+ relocation += ent->addend;
+ if ((tls_type & TLS_TLS) != 0)
+ {
+ relocation -= htab->tls_sec->vma + DTP_OFFSET;
+ if ((tls_type & TLS_TPREL) != 0)
+ relocation += DTP_OFFSET - TP_OFFSET;
+ }
+
+ if ((tls_type & TLS_GD_LD) != 0)
+ {
+ if ((tls_type & TLS_LD) != 0)
+ relocation = - DTP_OFFSET;
+ bfd_put_64 (output_bfd, relocation,
+ htab->sgot->contents + off + 8);
+ relocation = 1;
+ }
+ bfd_put_64 (output_bfd, relocation,
+ htab->sgot->contents + off);
}
+ ent->got.offset |= 1;
}
if (off >= (bfd_vma) -2)
@@ -5643,7 +7596,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = htab->sgot->output_offset + off;
/* TOC base (r2) is TOC start plus 0x8000. */
- addend -= TOC_BASE_OFF;
+ addend = - TOC_BASE_OFF;
}
break;
@@ -5660,19 +7613,23 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (h == NULL)
break;
- if (h->plt.offset == (bfd_vma) -1
- || htab->splt == NULL)
+ /* It's possible that we didn't make a PLT entry for this
+ symbol. This happens when statically linking PIC code,
+ or when using -Bsymbolic. Go find a match if there is a
+ PLT entry. */
+ if (htab->splt != NULL)
{
- /* We didn't make a PLT entry for this symbol. This
- happens when statically linking PIC code, or when
- using -Bsymbolic. */
- break;
+ struct plt_entry *ent;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == rel->r_addend
+ && ent->plt.offset != (bfd_vma) -1)
+ {
+ relocation = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + ent->plt.offset);
+ unresolved_reloc = FALSE;
+ }
}
-
- relocation = (htab->splt->output_section->vma
- + htab->splt->output_offset
- + h->plt.offset);
- unresolved_reloc = FALSE;
break;
/* TOC16 relocs. We want the offset relative to the TOC base,
@@ -5705,8 +7662,49 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_REL24:
break;
+ case R_PPC64_TPREL16:
+ case R_PPC64_TPREL16_LO:
+ case R_PPC64_TPREL16_HI:
+ case R_PPC64_TPREL16_HA:
+ case R_PPC64_TPREL16_DS:
+ case R_PPC64_TPREL16_LO_DS:
+ case R_PPC64_TPREL16_HIGHER:
+ case R_PPC64_TPREL16_HIGHERA:
+ case R_PPC64_TPREL16_HIGHEST:
+ case R_PPC64_TPREL16_HIGHESTA:
+ addend -= htab->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
+ support them anyway. */
+ goto dodyn;
+ break;
+
+ case R_PPC64_DTPREL16:
+ case R_PPC64_DTPREL16_LO:
+ case R_PPC64_DTPREL16_HI:
+ case R_PPC64_DTPREL16_HA:
+ case R_PPC64_DTPREL16_DS:
+ case R_PPC64_DTPREL16_LO_DS:
+ case R_PPC64_DTPREL16_HIGHER:
+ case R_PPC64_DTPREL16_HIGHERA:
+ case R_PPC64_DTPREL16_HIGHEST:
+ case R_PPC64_DTPREL16_HIGHESTA:
+ addend -= htab->tls_sec->vma + DTP_OFFSET;
+ break;
+
+ case R_PPC64_TPREL64:
+ addend -= htab->tls_sec->vma + TP_OFFSET;
+ goto dodyn;
+
+ case R_PPC64_DTPREL64:
+ addend -= htab->tls_sec->vma + DTP_OFFSET;
+ /* Fall thru */
+
/* Relocations that may need to be propagated if this is a
dynamic object. */
+ case R_PPC64_DTPMOD64:
+ case R_PPC64_REL30:
case R_PPC64_REL32:
case R_PPC64_REL64:
case R_PPC64_ADDR14:
@@ -5723,7 +7721,6 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_ADDR16_LO:
case R_PPC64_ADDR16_LO_DS:
case R_PPC64_ADDR24:
- case R_PPC64_ADDR30:
case R_PPC64_ADDR32:
case R_PPC64_ADDR64:
case R_PPC64_UADDR16:
@@ -5732,6 +7729,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
+ dodyn:
if (r_symndx == 0)
break;
/* Fall thru. */
@@ -5744,7 +7742,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
if ((info->shared
- && (IS_ABSOLUTE_RELOC (r_type)
+ && (MUST_BE_DYN_RELOC (r_type)
|| (h != NULL
&& h->dynindx != -1
&& (! info->symbolic
@@ -5782,14 +7780,14 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
skip = TRUE, relocate = TRUE;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
- outrel.r_addend = addend;
+ outrel.r_addend = rel->r_addend;
if (skip)
memset (&outrel, 0, sizeof outrel);
else if (h != NULL
&& h->dynindx != -1
&& !is_opd
- && (!IS_ABSOLUTE_RELOC (r_type)
+ && (!MUST_BE_DYN_RELOC (r_type)
|| !info->shared
|| !info->symbolic
|| (h->elf_link_hash_flags
@@ -5801,6 +7799,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
or this is an opd section reloc which must point
at a local function. */
outrel.r_addend += relocation;
+ /* ??? why? */
relocate = TRUE;
if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
{
@@ -5903,9 +7902,25 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_ADDR16_HA:
case R_PPC64_ADDR16_HIGHERA:
case R_PPC64_ADDR16_HIGHESTA:
+ case R_PPC64_GOT16_HA:
+ case R_PPC64_PLTGOT16_HA:
case R_PPC64_PLT16_HA:
case R_PPC64_TOC16_HA:
case R_PPC64_SECTOFF_HA:
+ case R_PPC64_TPREL16_HA:
+ case R_PPC64_DTPREL16_HA:
+ case R_PPC64_GOT_TLSGD16_HA:
+ case R_PPC64_GOT_TLSLD16_HA:
+ case R_PPC64_GOT_TPREL16_HA:
+ case R_PPC64_GOT_DTPREL16_HA:
+ case R_PPC64_TPREL16_HIGHER:
+ case R_PPC64_TPREL16_HIGHERA:
+ case R_PPC64_TPREL16_HIGHEST:
+ case R_PPC64_TPREL16_HIGHESTA:
+ case R_PPC64_DTPREL16_HIGHER:
+ case R_PPC64_DTPREL16_HIGHERA:
+ case R_PPC64_DTPREL16_HIGHEST:
+ case R_PPC64_DTPREL16_HIGHESTA:
/* It's just possible that this symbol is a weak symbol
that's not actually defined anywhere. In that case,
'sec' would be NULL, and we should leave the symbol
@@ -5926,6 +7941,14 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_TOC16_LO_DS:
case R_PPC64_PLTGOT16_DS:
case R_PPC64_PLTGOT16_LO_DS:
+ case R_PPC64_GOT_TPREL16_DS:
+ case R_PPC64_GOT_TPREL16_LO_DS:
+ case R_PPC64_GOT_DTPREL16_DS:
+ case R_PPC64_GOT_DTPREL16_LO_DS:
+ case R_PPC64_TPREL16_DS:
+ case R_PPC64_TPREL16_LO_DS:
+ case R_PPC64_DTPREL16_DS:
+ case R_PPC64_DTPREL16_LO_DS:
if (((relocation + addend) & 3) != 0)
{
(*_bfd_error_handler)
@@ -5950,7 +7973,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
branch_check:
/* If the branch is out of reach, then redirect the
call to the local stub for this function. */
- from = (offset
+ from = (rel->r_offset
+ input_section->output_offset
+ input_section->output_section->vma);
if (relocation + addend - from + max_br_offset >= 2 * max_br_offset
@@ -5987,7 +8010,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_bfd,
input_section,
contents,
- offset,
+ rel->r_offset,
relocation,
addend);
@@ -6013,13 +8036,9 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
+ name = bfd_elf_local_sym_name (input_bfd, sym);
if (name == NULL)
continue;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
}
if (r == bfd_reloc_overflow)
@@ -6028,7 +8047,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
if (!((*info->callbacks->reloc_overflow)
(info, name, ppc64_elf_howto_table[(int) r_type]->name,
- rel->r_addend, input_bfd, input_section, offset)))
+ rel->r_addend, input_bfd, input_section, rel->r_offset)))
return FALSE;
}
else
@@ -6062,79 +8081,37 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
htab = ppc_hash_table (info);
dynobj = htab->elf.dynobj;
- if (h->plt.offset != (bfd_vma) -1
- && ((struct ppc_link_hash_entry *) h)->is_func_descriptor)
+ if (((struct ppc_link_hash_entry *) h)->is_func_descriptor)
{
+ struct plt_entry *ent;
Elf_Internal_Rela rela;
bfd_byte *loc;
- /* This symbol has an entry in the procedure linkage table. Set
- it up. */
-
- if (htab->splt == NULL
- || htab->srelplt == NULL
- || htab->sglink == NULL)
- abort ();
-
- /* Create a JMP_SLOT reloc to inform the dynamic linker to
- fill in the PLT entry. */
-
- rela.r_offset = (htab->splt->output_section->vma
- + htab->splt->output_offset
- + h->plt.offset);
- rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
- rela.r_addend = 0;
-
- loc = htab->srelplt->contents;
- loc += ((h->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- * sizeof (Elf64_External_Rela));
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- }
-
- if (h->got.offset != (bfd_vma) -1)
- {
- Elf_Internal_Rela rela;
- bfd_byte *loc;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.offset != (bfd_vma) -1)
+ {
+ /* This symbol has an entry in the procedure linkage
+ table. Set it up. */
- /* This symbol has an entry in the global offset table. Set it
- up. */
+ if (htab->splt == NULL
+ || htab->srelplt == NULL
+ || htab->sglink == NULL)
+ abort ();
- if (htab->sgot == NULL || htab->srelgot == NULL)
- abort ();
+ /* Create a JMP_SLOT reloc to inform the dynamic linker to
+ fill in the PLT entry. */
- rela.r_offset = (htab->sgot->output_section->vma
- + htab->sgot->output_offset
- + (h->got.offset &~ (bfd_vma) 1));
-
- /* 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_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- {
- BFD_ASSERT((h->got.offset & 1) != 0);
- rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
- rela.r_addend = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- }
- else
- {
- BFD_ASSERT ((h->got.offset & 1) == 0);
- bfd_put_64 (output_bfd, (bfd_vma) 0,
- htab->sgot->contents + h->got.offset);
- rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_GLOB_DAT);
- rela.r_addend = 0;
- }
+ rela.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + ent->plt.offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
+ rela.r_addend = ent->addend;
- loc = htab->srelgot->contents;
- loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ loc = htab->srelplt->contents;
+ loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
+ * sizeof (Elf64_External_Rela));
+ bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ }
}
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
@@ -6174,9 +8151,9 @@ static enum elf_reloc_type_class
ppc64_elf_reloc_type_class (rela)
const Elf_Internal_Rela *rela;
{
- enum elf_ppc_reloc_type r_type;
+ enum elf_ppc64_reloc_type r_type;
- r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rela->r_info);
+ r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rela->r_info);
switch (r_type)
{
case R_PPC64_RELATIVE:
@@ -6337,6 +8314,7 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
+#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 3115ea5c9f9..707ee632aac 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -1,5 +1,5 @@
/* PowerPC64-specific support for 64-bit ELF.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,6 +21,8 @@ bfd_boolean ppc64_elf_mark_entry_syms
PARAMS ((struct bfd_link_info *));
bfd_boolean ppc64_elf_edit_opd
PARAMS ((bfd *, struct bfd_link_info *));
+bfd_boolean ppc64_elf_tls_optimize
+ PARAMS ((bfd *, struct bfd_link_info *));
bfd_vma ppc64_elf_toc
PARAMS ((bfd *));
int ppc64_elf_setup_section_lists
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index db5237f2e7f..1c81edf75bd 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -51,6 +51,9 @@ static asection *elf_s390_gc_mark_hook
static bfd_boolean elf_s390_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+struct elf_s390_link_hash_entry;
+static void elf_s390_adjust_gotplt
+ PARAMS ((struct elf_s390_link_hash_entry *));
static bfd_boolean elf_s390_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static bfd_boolean allocate_dynrelocs
@@ -69,7 +72,20 @@ static enum elf_reloc_type_class elf_s390_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
static bfd_boolean elf_s390_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_s390_object_p PARAMS ((bfd *));
+static bfd_boolean elf_s390_mkobject
+ PARAMS ((bfd *));
+static bfd_boolean elf_s390_object_p
+ PARAMS ((bfd *));
+static int elf_s390_tls_transition
+ PARAMS ((struct bfd_link_info *, int, int));
+static bfd_reloc_status_type s390_tls_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_vma dtpoff_base
+ PARAMS ((struct bfd_link_info *));
+static bfd_vma tpoff
+ PARAMS ((struct bfd_link_info *, bfd_vma));
+static void invalid_tls_insn
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *));
#include "elf/s390.h"
@@ -94,32 +110,112 @@ static reloc_howto_type elf_howto_table[] =
0, /* dst_mask */
FALSE), /* pcrel_offset */
- HOWTO(R_390_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_8", FALSE, 0,0x000000ff, FALSE),
- HOWTO(R_390_12, 0, 1, 12, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_12", FALSE, 0,0x00000fff, FALSE),
- HOWTO(R_390_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_16", FALSE, 0,0x0000ffff, FALSE),
- HOWTO(R_390_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_32", FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_GOT12, 0, 1, 12, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_GOT12", FALSE, 0,0x00000fff, FALSE),
- HOWTO(R_390_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT32", FALSE, 0,0xffffffff, FALSE),
- HOWTO(R_390_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_COPY, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_COPY", FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_GLOB_DAT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GLOB_DAT",FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_JMP_SLOT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_JMP_SLOT",FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_RELATIVE, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_RELATIVE",FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_GOTOFF, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTOFF", FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_GOTPC, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPC", FALSE, 0,MINUS_ONE, TRUE),
- HOWTO(R_390_GOT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT16", FALSE, 0,0x0000ffff, FALSE),
- HOWTO(R_390_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16", FALSE, 0,0x0000ffff, TRUE),
- HOWTO(R_390_PC16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16DBL", FALSE, 0,0x0000ffff, TRUE),
- HOWTO(R_390_PLT16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT16DBL", FALSE, 0,0x0000ffff, TRUE),
- HOWTO(R_390_PC32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32DBL", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_PLT32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32DBL", FALSE, 0,0xffffffff, TRUE),
- HOWTO(R_390_GOTPCDBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPCDBL", FALSE, 0,MINUS_ONE, TRUE),
- HOWTO(R_390_64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_64", FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_PC64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC64", FALSE, 0,MINUS_ONE, TRUE),
- HOWTO(R_390_GOT64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT64", FALSE, 0,MINUS_ONE, FALSE),
- HOWTO(R_390_PLT64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT64", FALSE, 0,MINUS_ONE, TRUE),
- HOWTO(R_390_GOTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTENT", FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_8", FALSE, 0,0x000000ff, FALSE),
+ HOWTO(R_390_12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_12", FALSE, 0,0x00000fff, FALSE),
+ HOWTO(R_390_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC32", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_GOT12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_GOT12", FALSE, 0,0x00000fff, FALSE),
+ HOWTO(R_390_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOT32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT32", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_COPY, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_COPY", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_GLOB_DAT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GLOB_DAT", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_JMP_SLOT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_JMP_SLOT", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_RELATIVE, 0, 4, 64, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_RELATIVE", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_GOTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTOFF32", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_GOTPC, 0, 4, 64, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPC", FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_GOT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOT16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC16", FALSE, 0,0x0000ffff, TRUE),
+ HOWTO(R_390_PC16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC16DBL", FALSE, 0,0x0000ffff, TRUE),
+ HOWTO(R_390_PLT16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT16DBL", FALSE, 0,0x0000ffff, TRUE),
+ HOWTO(R_390_PC32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC32DBL", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_PLT32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT32DBL", FALSE, 0,0xffffffff, TRUE),
+ HOWTO(R_390_GOTPCDBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPCDBL", FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_64", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_PC64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PC64", FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_GOT64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOT64", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_PLT64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLT64", FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_GOTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTENT", FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_GOTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTOFF16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_GOTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTOFF64", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_GOTPLT12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_GOTPLT12", FALSE, 0,0x00000fff, FALSE),
+ HOWTO(R_390_GOTPLT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLT16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_GOTPLT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLT32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_GOTPLT64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLT64", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_GOTPLTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_GOTPLTENT",FALSE, 0,MINUS_ONE, TRUE),
+ HOWTO(R_390_PLTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLTOFF16", FALSE, 0,0x0000ffff, FALSE),
+ HOWTO(R_390_PLTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLTOFF32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO(R_390_PLTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_PLTOFF64", FALSE, 0,MINUS_ONE, FALSE),
+ HOWTO(R_390_TLS_LOAD, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ s390_tls_reloc, "R_390_TLS_LOAD", FALSE, 0, 0, FALSE),
+ HOWTO(R_390_TLS_GDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ s390_tls_reloc, "R_390_TLS_GDCALL", FALSE, 0, 0, FALSE),
+ HOWTO(R_390_TLS_LDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ s390_tls_reloc, "R_390_TLS_LDCALL", FALSE, 0, 0, FALSE),
+ EMPTY_HOWTO (R_390_TLS_GD32), /* Empty entry for R_390_TLS_GD32. */
+ HOWTO(R_390_TLS_GD64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_GD64", FALSE, 0, MINUS_ONE, FALSE),
+ HOWTO(R_390_TLS_GOTIE12, 0, 1, 12, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_390_TLS_GOTIE12", FALSE, 0, 0x00000fff, FALSE),
+ EMPTY_HOWTO (R_390_TLS_GOTIE32), /* Empty entry for R_390_TLS_GOTIE32. */
+ HOWTO(R_390_TLS_GOTIE64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_GOTIE64", FALSE, 0, MINUS_ONE, FALSE),
+ EMPTY_HOWTO (R_390_TLS_LDM32), /* Empty entry for R_390_TLS_LDM32. */
+ HOWTO(R_390_TLS_LDM64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_LDM64", FALSE, 0, MINUS_ONE, FALSE),
+ EMPTY_HOWTO (R_390_TLS_IE32), /* Empty entry for R_390_TLS_IE32. */
+ HOWTO(R_390_TLS_IE64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_IE64", FALSE, 0, MINUS_ONE, FALSE),
+ HOWTO(R_390_TLS_IEENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_IEENT", FALSE, 0, MINUS_ONE, TRUE),
+ EMPTY_HOWTO (R_390_TLS_LE32), /* Empty entry for R_390_TLS_LE32. */
+ HOWTO(R_390_TLS_LE64, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_LE64", FALSE, 0, MINUS_ONE, FALSE),
+ EMPTY_HOWTO (R_390_TLS_LDO32), /* Empty entry for R_390_TLS_LDO32. */
+ HOWTO(R_390_TLS_LDO64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_LDO64", FALSE, 0, MINUS_ONE, FALSE),
+ HOWTO(R_390_TLS_DTPMOD, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_DTPMOD", FALSE, 0, MINUS_ONE, FALSE),
+ HOWTO(R_390_TLS_DTPOFF, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", FALSE, 0, MINUS_ONE, FALSE),
+ HOWTO(R_390_TLS_TPOFF, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_390_TLS_TPOFF", FALSE, 0, MINUS_ONE, FALSE),
};
/* GNU extension to record C++ vtable hierarchy. */
@@ -164,7 +260,7 @@ elf_s390_reloc_type_lookup (abfd, code)
case BFD_RELOC_390_RELATIVE:
return &elf_howto_table[(int) R_390_RELATIVE];
case BFD_RELOC_32_GOTOFF:
- return &elf_howto_table[(int) R_390_GOTOFF];
+ return &elf_howto_table[(int) R_390_GOTOFF32];
case BFD_RELOC_390_GOTPC:
return &elf_howto_table[(int) R_390_GOTPC];
case BFD_RELOC_390_GOT16:
@@ -175,10 +271,6 @@ elf_s390_reloc_type_lookup (abfd, code)
return &elf_howto_table[(int) R_390_PC16DBL];
case BFD_RELOC_390_PLT16DBL:
return &elf_howto_table[(int) R_390_PLT16DBL];
- case BFD_RELOC_VTABLE_INHERIT:
- return &elf64_s390_vtinherit_howto;
- case BFD_RELOC_VTABLE_ENTRY:
- return &elf64_s390_vtentry_howto;
case BFD_RELOC_390_PC32DBL:
return &elf_howto_table[(int) R_390_PC32DBL];
case BFD_RELOC_390_PLT32DBL:
@@ -195,6 +287,58 @@ elf_s390_reloc_type_lookup (abfd, code)
return &elf_howto_table[(int) R_390_PLT64];
case BFD_RELOC_390_GOTENT:
return &elf_howto_table[(int) R_390_GOTENT];
+ case BFD_RELOC_16_GOTOFF:
+ return &elf_howto_table[(int) R_390_GOTOFF16];
+ case BFD_RELOC_390_GOTOFF64:
+ return &elf_howto_table[(int) R_390_GOTOFF64];
+ case BFD_RELOC_390_GOTPLT12:
+ return &elf_howto_table[(int) R_390_GOTPLT12];
+ case BFD_RELOC_390_GOTPLT16:
+ return &elf_howto_table[(int) R_390_GOTPLT16];
+ case BFD_RELOC_390_GOTPLT32:
+ return &elf_howto_table[(int) R_390_GOTPLT32];
+ case BFD_RELOC_390_GOTPLT64:
+ return &elf_howto_table[(int) R_390_GOTPLT64];
+ case BFD_RELOC_390_GOTPLTENT:
+ return &elf_howto_table[(int) R_390_GOTPLTENT];
+ case BFD_RELOC_390_PLTOFF16:
+ return &elf_howto_table[(int) R_390_PLTOFF16];
+ case BFD_RELOC_390_PLTOFF32:
+ return &elf_howto_table[(int) R_390_PLTOFF32];
+ case BFD_RELOC_390_PLTOFF64:
+ return &elf_howto_table[(int) R_390_PLTOFF64];
+ case BFD_RELOC_390_TLS_LOAD:
+ return &elf_howto_table[(int) R_390_TLS_LOAD];
+ case BFD_RELOC_390_TLS_GDCALL:
+ return &elf_howto_table[(int) R_390_TLS_GDCALL];
+ case BFD_RELOC_390_TLS_LDCALL:
+ return &elf_howto_table[(int) R_390_TLS_LDCALL];
+ case BFD_RELOC_390_TLS_GD64:
+ return &elf_howto_table[(int) R_390_TLS_GD64];
+ case BFD_RELOC_390_TLS_GOTIE12:
+ return &elf_howto_table[(int) R_390_TLS_GOTIE12];
+ case BFD_RELOC_390_TLS_GOTIE64:
+ return &elf_howto_table[(int) R_390_TLS_GOTIE64];
+ case BFD_RELOC_390_TLS_LDM64:
+ return &elf_howto_table[(int) R_390_TLS_LDM64];
+ case BFD_RELOC_390_TLS_IE64:
+ return &elf_howto_table[(int) R_390_TLS_IE64];
+ case BFD_RELOC_390_TLS_IEENT:
+ return &elf_howto_table[(int) R_390_TLS_IEENT];
+ case BFD_RELOC_390_TLS_LE64:
+ return &elf_howto_table[(int) R_390_TLS_LE64];
+ case BFD_RELOC_390_TLS_LDO64:
+ return &elf_howto_table[(int) R_390_TLS_LDO64];
+ case BFD_RELOC_390_TLS_DTPMOD:
+ return &elf_howto_table[(int) R_390_TLS_DTPMOD];
+ case BFD_RELOC_390_TLS_DTPOFF:
+ return &elf_howto_table[(int) R_390_TLS_DTPOFF];
+ case BFD_RELOC_390_TLS_TPOFF:
+ return &elf_howto_table[(int) R_390_TLS_TPOFF];
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &elf64_s390_vtinherit_howto;
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &elf64_s390_vtentry_howto;
default:
break;
}
@@ -226,6 +370,23 @@ elf_s390_info_to_howto (abfd, cache_ptr, dst)
}
}
+/* A relocation function which doesn't do anything. */
+static bfd_reloc_status_type
+s390_tls_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;
+{
+ if (output_bfd)
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+}
+
static bfd_boolean
elf_s390_is_local_label_name (abfd, name)
bfd *abfd;
@@ -357,8 +518,62 @@ struct elf_s390_link_hash_entry
/* Track dynamic relocs copied for this symbol. */
struct elf_s390_dyn_relocs *dyn_relocs;
+
+ /* Number of GOTPLT references for a function. */
+ bfd_signed_vma gotplt_refcount;
+
+#define GOT_UNKNOWN 0
+#define GOT_NORMAL 1
+#define GOT_TLS_GD 2
+#define GOT_TLS_IE 3
+#define GOT_TLS_IE_NLT 3
+ unsigned char tls_type;
};
+#define elf_s390_hash_entry(ent) \
+ ((struct elf_s390_link_hash_entry *)(ent))
+
+struct elf_s390_obj_tdata
+{
+ struct elf_obj_tdata root;
+
+ /* tls_type for each local got entry. */
+ char *local_got_tls_type;
+};
+
+#define elf_s390_tdata(abfd) \
+ ((struct elf_s390_obj_tdata *) (abfd)->tdata.any)
+
+#define elf_s390_local_got_tls_type(abfd) \
+ (elf_s390_tdata (abfd)->local_got_tls_type)
+
+static bfd_boolean
+elf_s390_mkobject (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ return TRUE;
+}
+
+static bfd_boolean
+elf_s390_object_p (abfd)
+ bfd *abfd;
+{
+ /* Allocate our special target data. */
+ struct elf_s390_obj_tdata *new_tdata;
+ bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
+ new_tdata = bfd_zalloc (abfd, amt);
+ if (new_tdata == NULL)
+ return FALSE;
+ new_tdata->root = *abfd->tdata.elf_obj_data;
+ abfd->tdata.any = new_tdata;
+ /* Set the right machine number for an s390 elf32 file. */
+ return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_64);
+}
+
/* s390 ELF linker hash table. */
struct elf_s390_link_hash_table
@@ -374,6 +589,11 @@ struct elf_s390_link_hash_table
asection *sdynbss;
asection *srelbss;
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tls_ldm_got;
+
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
};
@@ -409,6 +629,8 @@ link_hash_newfunc (entry, table, string)
eh = (struct elf_s390_link_hash_entry *) entry;
eh->dyn_relocs = NULL;
+ eh->gotplt_refcount = 0;
+ eh->tls_type = GOT_UNKNOWN;
}
return entry;
@@ -440,6 +662,7 @@ elf_s390_link_hash_table_create (abfd)
ret->srelplt = NULL;
ret->sdynbss = NULL;
ret->srelbss = NULL;
+ ret->tls_ldm_got.refcount = 0;
ret->sym_sec.abfd = NULL;
return &ret->elf.root;
@@ -552,9 +775,43 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
eind->dyn_relocs = NULL;
}
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
+
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
+static int
+elf_s390_tls_transition (info, r_type, is_local)
+ struct bfd_link_info *info;
+ int r_type;
+ int is_local;
+{
+ if (info->shared)
+ return r_type;
+
+ switch (r_type)
+ {
+ case R_390_TLS_GD64:
+ case R_390_TLS_IE64:
+ if (is_local)
+ return R_390_TLS_LE64;
+ return R_390_TLS_IE64;
+ case R_390_TLS_GOTIE64:
+ if (is_local)
+ return R_390_TLS_LE64;
+ return R_390_TLS_GOTIE64;
+ case R_390_TLS_LDM64:
+ return R_390_TLS_LE64;
+ }
+
+ return r_type;
+}
+
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
table. */
@@ -572,6 +829,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
asection *sreloc;
+ bfd_signed_vma *local_got_refcounts;
+ int tls_type, old_tls_type;
if (info->relocateable)
return TRUE;
@@ -579,12 +838,14 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
htab = elf_s390_hash_table (info);
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
sreloc = NULL;
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
+ unsigned int r_type;
unsigned long r_symndx;
struct elf_link_hash_entry *h;
@@ -603,41 +864,48 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- switch (ELF64_R_TYPE (rel->r_info))
+ /* Create got section and local_got_refcounts array if they
+ are needed. */
+ r_type = elf_s390_tls_transition (info,
+ ELF64_R_TYPE (rel->r_info),
+ h == NULL);
+ switch (r_type)
{
case R_390_GOT12:
case R_390_GOT16:
case R_390_GOT32:
case R_390_GOT64:
case R_390_GOTENT:
- /* This symbol requires a global offset table entry. */
- if (h != NULL)
- {
- h->got.refcount += 1;
- }
- else
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLT64:
+ case R_390_GOTPLTENT:
+ case R_390_TLS_GD64:
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_GOTIE64:
+ case R_390_TLS_IEENT:
+ case R_390_TLS_IE64:
+ case R_390_TLS_LDM64:
+ if (h == NULL
+ && local_got_refcounts == NULL)
{
- bfd_signed_vma *local_got_refcounts;
+ bfd_size_type size;
- /* This is a global offset table entry for a local symbol. */
- local_got_refcounts = elf_local_got_refcounts (abfd);
+ size = symtab_hdr->sh_info;
+ size *= (sizeof (bfd_signed_vma) + sizeof(char));
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_zalloc (abfd, size));
if (local_got_refcounts == NULL)
- {
- bfd_size_type size;
-
- size = symtab_hdr->sh_info;
- size *= sizeof (bfd_signed_vma);
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
- if (local_got_refcounts == NULL)
- return FALSE;
- elf_local_got_refcounts (abfd) = local_got_refcounts;
- }
- local_got_refcounts[r_symndx] += 1;
+ return FALSE;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ elf_s390_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + symtab_hdr->sh_info);
}
- /* Fall through */
-
- case R_390_GOTOFF:
+ /* Fall through. */
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
+ case R_390_GOTOFF64:
case R_390_GOTPC:
case R_390_GOTPCDBL:
if (htab->sgot == NULL)
@@ -647,12 +915,25 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (!create_got_section (htab->elf.dynobj, info))
return FALSE;
}
+ }
+
+ switch (r_type)
+ {
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
+ case R_390_GOTOFF64:
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ /* Got is created, nothing to be done. */
break;
case R_390_PLT16DBL:
case R_390_PLT32:
case R_390_PLT32DBL:
case R_390_PLT64:
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ case R_390_PLTOFF64:
/* 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
@@ -662,13 +943,120 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
/* If this is a local symbol, we resolve it directly without
creating a procedure linkage table entry. */
- if (h == NULL)
- continue;
+ if (h != NULL)
+ {
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount += 1;
+ }
+ break;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- h->plt.refcount += 1;
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLT64:
+ case R_390_GOTPLTENT:
+ /* This symbol requires either a procedure linkage table entry
+ or an entry in the local got. We actually build the entry
+ in adjust_dynamic_symbol because whether this is really a
+ global reference can change and with it the fact if we have
+ to create a plt entry or a local got entry. To be able to
+ make a once global symbol a local one we have to keep track
+ of the number of gotplt references that exist for this
+ symbol. */
+ if (h != NULL)
+ {
+ ((struct elf_s390_link_hash_entry *) h)->gotplt_refcount++;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount += 1;
+ }
+ else
+ local_got_refcounts[r_symndx] += 1;
+ break;
+
+ case R_390_TLS_LDM64:
+ htab->tls_ldm_got.refcount += 1;
break;
+ case R_390_TLS_IE64:
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_GOTIE64:
+ case R_390_TLS_IEENT:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOT64:
+ case R_390_GOTENT:
+ case R_390_TLS_GD64:
+ /* This symbol requires a global offset table entry. */
+ switch (r_type)
+ {
+ default:
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOTENT:
+ tls_type = GOT_NORMAL;
+ break;
+ case R_390_TLS_GD64:
+ tls_type = GOT_TLS_GD;
+ break;
+ case R_390_TLS_IE64:
+ case R_390_TLS_GOTIE64:
+ tls_type = GOT_TLS_IE;
+ break;
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_IEENT:
+ tls_type = GOT_TLS_IE_NLT;
+ break;
+ }
+
+ if (h != NULL)
+ {
+ h->got.refcount += 1;
+ old_tls_type = elf_s390_hash_entry(h)->tls_type;
+ }
+ else
+ {
+ local_got_refcounts[r_symndx] += 1;
+ old_tls_type = elf_s390_local_got_tls_type (abfd) [r_symndx];
+ }
+ /* If a TLS symbol is accessed using IE at least once,
+ there is no point to use dynamic model for it. */
+ if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN)
+ {
+ if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: `%s' accessed both as normal and thread local symbol"),
+ bfd_archive_filename (abfd), h->root.root.string);
+ return FALSE;
+ }
+ if (old_tls_type > tls_type)
+ tls_type = old_tls_type;
+ }
+
+ if (old_tls_type != tls_type)
+ {
+ if (h != NULL)
+ elf_s390_hash_entry (h)->tls_type = tls_type;
+ else
+ elf_s390_local_got_tls_type (abfd) [r_symndx] = tls_type;
+ }
+
+ if (r_type != R_390_TLS_IE64)
+ break;
+ /* Fall through */
+
+ case R_390_TLS_LE64:
+ if (!info->shared)
+ break;
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
case R_390_8:
case R_390_16:
case R_390_32:
@@ -905,6 +1293,7 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
unsigned long r_symndx;
+ int r_type;
struct elf_link_hash_entry *h;
elf_section_data (sec)->local_dynrel = NULL;
@@ -915,89 +1304,161 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_390_GOT12:
- case R_390_GOT16:
- case R_390_GOT32:
- case R_390_GOT64:
- case R_390_GOTOFF:
- case R_390_GOTPC:
- case R_390_GOTPCDBL:
- case R_390_GOTENT:
- r_symndx = ELF64_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;
+ {
+ r_symndx = ELF64_R_SYM (rel->r_info);
- case R_390_8:
- case R_390_12:
- case R_390_16:
- case R_390_32:
- case R_390_64:
- case R_390_PC16:
- case R_390_PC16DBL:
- case R_390_PC32:
- case R_390_PC32DBL:
- case R_390_PC64:
- r_symndx = ELF64_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- struct elf_s390_link_hash_entry *eh;
- struct elf_s390_dyn_relocs **pp;
- struct elf_s390_dyn_relocs *p;
-
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- if (!info->shared && h->plt.refcount > 0)
- h->plt.refcount -= 1;
-
- eh = (struct elf_s390_link_hash_entry *) h;
-
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
- if (p->sec == sec)
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ r_type = elf_s390_tls_transition (info,
+ ELF64_R_TYPE (rel->r_info),
+ r_symndx >= symtab_hdr->sh_info);
+ switch (r_type)
+ {
+ case R_390_TLS_LDM64:
+ if (elf_s390_hash_table (info)->tls_ldm_got.refcount > 0)
+ elf_s390_hash_table (info)->tls_ldm_got.refcount -= 1;
+ break;
+
+ case R_390_TLS_GD64:
+ case R_390_TLS_IE64:
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_GOTIE64:
+ case R_390_TLS_IEENT:
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOT64:
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
+ case R_390_GOTOFF64:
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ case R_390_GOTENT:
+ if (h != NULL)
+ {
+ 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;
+ }
+ if (r_type != R_390_TLS_IE64)
+ break;
+ /* Fall through */
+
+ case R_390_TLS_LE64:
+ if (!info->shared)
+ break;
+ /* Fall through */
+
+ case R_390_8:
+ case R_390_12:
+ case R_390_16:
+ case R_390_32:
+ case R_390_64:
+ case R_390_PC16:
+ case R_390_PC16DBL:
+ case R_390_PC32:
+ case R_390_PC32DBL:
+ case R_390_PC64:
+ if (h != NULL)
+ {
+ struct elf_s390_link_hash_entry *eh;
+ struct elf_s390_dyn_relocs **pp;
+ struct elf_s390_dyn_relocs *p;
+
+ if (!info->shared && h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+
+ eh = (struct elf_s390_link_hash_entry *) h;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ if (ELF64_R_TYPE (rel->r_info) == R_390_PC16
+ || ELF64_R_TYPE (rel->r_info) == R_390_PC16DBL
+ || ELF64_R_TYPE (rel->r_info) == R_390_PC32
+ || ELF64_R_TYPE (rel->r_info) == R_390_PC32DBL
+ || ELF64_R_TYPE (rel->r_info) == R_390_PC64)
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32:
+ case R_390_PLT32DBL:
+ case R_390_PLT64:
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ case R_390_PLTOFF64:
+ if (h != NULL)
+ {
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ break;
+
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLT64:
+ case R_390_GOTPLTENT:
+ if (h != NULL)
+ {
+ if (h->plt.refcount > 0)
{
- if (ELF64_R_TYPE (rel->r_info) == R_390_PC16
- || ELF64_R_TYPE (rel->r_info) == R_390_PC16DBL
- || ELF64_R_TYPE (rel->r_info) == R_390_PC32)
- p->pc_count -= 1;
- p->count -= 1;
- if (p->count == 0)
- *pp = p->next;
- break;
+ ((struct elf_s390_link_hash_entry *) h)->gotplt_refcount--;
+ h->plt.refcount -= 1;
}
- }
- break;
-
- case R_390_PLT16DBL:
- case R_390_PLT32:
- case R_390_PLT32DBL:
- case R_390_PLT64:
- r_symndx = ELF64_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;
+ }
+ else if (local_got_refcounts != NULL)
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx] -= 1;
+ }
+ break;
- default:
- break;
- }
+ default:
+ break;
+ }
+ }
return TRUE;
}
+/* Make sure we emit a GOT entry if the symbol was supposed to have a PLT
+ entry but we found we will not create any. Called when we find we will
+ not have any PLT for this symbol, by for example
+ elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link,
+ or elf_s390_size_dynamic_sections if no dynamic sections will be
+ created (we're only linking static objects). */
+
+static void
+elf_s390_adjust_gotplt (h)
+ struct elf_s390_link_hash_entry *h;
+{
+ if (h->elf.root.type == bfd_link_hash_warning)
+ h = (struct elf_s390_link_hash_entry *) h->elf.root.u.i.link;
+
+ if (h->gotplt_refcount <= 0)
+ return;
+
+ /* We simply add the number of gotplt references to the number
+ * of got references for this symbol. */
+ h->elf.got.refcount += h->gotplt_refcount;
+ h->gotplt_refcount = -1;
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -1035,6 +1496,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
linkage table, and we can just do a PC32 reloc instead. */
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
return TRUE;
@@ -1171,6 +1633,9 @@ allocate_dynrelocs (h, inf)
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;
@@ -1225,18 +1690,41 @@ allocate_dynrelocs (h, inf)
{
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
}
else
{
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
- if (h->got.refcount > 0)
+ /* If R_390_TLS_{IE64,GOTIE64,GOTIE12,IEENT} symbol is now local to
+ the binary, we can optimize a bit. IE64 and GOTIE64 get converted
+ to R_390_TLS_LE64 requiring no TLS entry. For GOTIE12 and IEENT
+ we can save the dynamic TLS relocation. */
+ if (h->got.refcount > 0
+ && !info->shared
+ && h->dynindx == -1
+ && elf_s390_hash_entry(h)->tls_type >= GOT_TLS_IE)
+ {
+ if (elf_s390_hash_entry(h)->tls_type == GOT_TLS_IE_NLT)
+ /* For the GOTIE access without a literal pool entry the offset has
+ to be stored somewhere. The immediate value in the instruction
+ is not bit enough so the value is stored in the got. */
+ {
+ h->got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += GOT_ENTRY_SIZE;
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+ }
+ else if (h->got.refcount > 0)
{
asection *s;
bfd_boolean dyn;
+ int tls_type = elf_s390_hash_entry(h)->tls_type;
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
@@ -1250,8 +1738,18 @@ allocate_dynrelocs (h, inf)
s = htab->sgot;
h->got.offset = s->_raw_size;
s->_raw_size += GOT_ENTRY_SIZE;
+ /* R_390_TLS_GD64 needs 2 consecutive GOT slots. */
+ if (tls_type == GOT_TLS_GD)
+ s->_raw_size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ /* R_390_TLS_IE64 needs one dynamic relocation,
+ R_390_TLS_GD64 needs one if local symbol and two if global. */
+ if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ || tls_type >= GOT_TLS_IE)
+ htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ else if (tls_type == GOT_TLS_GD)
+ htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
}
else
@@ -1397,6 +1895,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
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 *srela;
@@ -1438,14 +1937,17 @@ elf_s390_size_dynamic_sections (output_bfd, info)
symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
locsymcount = symtab_hdr->sh_info;
end_local_got = local_got + locsymcount;
+ local_tls_type = elf_s390_local_got_tls_type (ibfd);
s = htab->sgot;
srela = htab->srelgot;
- for (; local_got < end_local_got; ++local_got)
+ for (; local_got < end_local_got; ++local_got, ++local_tls_type)
{
if (*local_got > 0)
{
*local_got = s->_raw_size;
s->_raw_size += GOT_ENTRY_SIZE;
+ if (*local_tls_type == GOT_TLS_GD)
+ s->_raw_size += GOT_ENTRY_SIZE;
if (info->shared)
srela->_raw_size += sizeof (Elf64_External_Rela);
}
@@ -1454,6 +1956,17 @@ elf_s390_size_dynamic_sections (output_bfd, info)
}
}
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ /* Allocate 2 got entries and 1 dynamic reloc for R_390_TLS_LDM64
+ relocs. */
+ htab->tls_ldm_got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ else
+ htab->tls_ldm_got.offset = -1;
+
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
@@ -1564,6 +2077,58 @@ elf_s390_size_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Return the base VMA address which should be subtracted from real addresses
+ when resolving @dtpoff relocation.
+ This is PT_TLS segment p_vaddr. */
+
+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)
+ return 0;
+ return elf_hash_table (info)->tls_segment->start;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+static bfd_vma
+tpoff (info, address)
+ struct bfd_link_info *info;
+ bfd_vma address;
+{
+ struct elf_link_tls_segment *tls_segment
+ = elf_hash_table (info)->tls_segment;
+
+ /* If tls_segment is NULL, we should have signalled an error already. */
+ if (tls_segment == NULL)
+ return 0;
+ return (align_power (tls_segment->size, tls_segment->align)
+ + tls_segment->start - address);
+}
+
+/* Complain if TLS instruction relocation is against an invalid
+ instruction. */
+
+static void
+invalid_tls_insn (input_bfd, input_section, rel)
+ bfd *input_bfd;
+ asection *input_section;
+ Elf_Internal_Rela *rel;
+{
+ reloc_howto_type *howto;
+
+ howto = elf_howto_table + ELF64_R_TYPE (rel->r_info);
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): invalid instruction for TLS relocation %s"),
+ bfd_archive_filename (input_bfd),
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset,
+ howto->name);
+}
+
/* Relocate a 390 ELF section. */
static bfd_boolean
@@ -1597,7 +2162,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
relend = relocs + input_section->reloc_count;
for (; rel < relend; rel++)
{
- int r_type;
+ unsigned int r_type;
reloc_howto_type *howto;
unsigned long r_symndx;
struct elf_link_hash_entry *h;
@@ -1607,12 +2172,13 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_reloc_status_type r;
+ int tls_type;
r_type = ELF64_R_TYPE (rel->r_info);
if (r_type == (int) R_390_GNU_VTINHERIT
|| r_type == (int) R_390_GNU_VTENTRY)
continue;
- if (r_type < 0 || r_type >= (int) R_390_max)
+ if (r_type >= (int) R_390_max)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1620,6 +2186,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
howto = elf_howto_table + r_type;
r_symndx = ELF64_R_SYM (rel->r_info);
+
+ /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -1676,6 +2244,40 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
switch (r_type)
{
+ case R_390_GOTPLT12:
+ case R_390_GOTPLT16:
+ case R_390_GOTPLT32:
+ case R_390_GOTPLT64:
+ case R_390_GOTPLTENT:
+ /* There are three cases for a GOTPLT relocation. 1) The
+ relocation is against the jump slot entry of a plt that
+ will get emitted to the output file. 2) The relocation
+ is against the jump slot of a plt entry that has been
+ removed. elf_s390_adjust_gotplt has created a GOT entry
+ as replacement. 3) The relocation is against a local symbol.
+ Cases 2) and 3) are the same as the GOT relocation code
+ so we just have to test for case 1 and fall through for
+ the other two. */
+ if (h != NULL && h->plt.offset != (bfd_vma) -1)
+ {
+ bfd_vma plt_index;
+
+ /* Calc. index no.
+ Current offset - size first entry / entry size. */
+ plt_index = (h->plt.offset - PLT_FIRST_ENTRY_SIZE) /
+ PLT_ENTRY_SIZE;
+
+ /* Offset in GOT is PLT index plus GOT headers(3) times 4,
+ addr & GOT addr. */
+ relocation = (plt_index + 3) * GOT_ENTRY_SIZE;
+ unresolved_reloc = FALSE;
+
+ if (r_type == R_390_GOTPLTENT)
+ relocation += htab->sgot->output_section->vma;
+ break;
+ }
+ /* Fall through. */
+
case R_390_GOT12:
case R_390_GOT16:
case R_390_GOT32:
@@ -1775,12 +2377,15 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
* between the start of the GOT and the symbols entry. We
* add the vma of the GOT to get the correct value.
*/
- if (r_type == R_390_GOTENT)
+ if ( r_type == R_390_GOTENT
+ || r_type == R_390_GOTPLTENT)
relocation += htab->sgot->output_section->vma;
break;
- case R_390_GOTOFF:
+ case R_390_GOTOFF16:
+ case R_390_GOTOFF32:
+ case R_390_GOTOFF64:
/* Relocation is relative to the start of the global offset
table. */
@@ -1790,7 +2395,6 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
permitted by the ABI, we might have to change this
calculation. */
relocation -= htab->sgot->output_section->vma;
-
break;
case R_390_GOTPC:
@@ -1825,6 +2429,29 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
+ htab->splt->output_offset
+ h->plt.offset);
unresolved_reloc = FALSE;
+ break;
+
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ case R_390_PLTOFF64:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table relative to the start of the GOT. */
+
+ /* For local symbols or if we didn't make a PLT entry for
+ this symbol resolve the symbol directly. */
+ if ( h == NULL
+ || h->plt.offset == (bfd_vma) -1
+ || htab->splt == NULL)
+ {
+ relocation -= htab->sgot->output_section->vma;
+ break;
+ }
+
+ relocation = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset
+ - htab->sgot->output_section->vma);
+ unresolved_reloc = FALSE;
break;
case R_390_8:
@@ -1931,6 +2558,346 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
break;
+ /* Relocations for tls literal pool entries. */
+ case R_390_TLS_IE64:
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ asection *sreloc;
+ bfd_byte *loc;
+
+ outrel.r_offset = rel->r_offset
+ + input_section->output_section->vma
+ + input_section->output_offset;
+ outrel.r_info = ELF64_R_INFO (0, R_390_RELATIVE);
+ sreloc = elf_section_data (input_section)->sreloc;
+ if (sreloc == NULL)
+ abort ();
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloc_out (output_bfd, &outrel, loc);
+ }
+ /* Fall through */
+
+ case R_390_TLS_GD64:
+ case R_390_TLS_GOTIE64:
+ r_type = elf_s390_tls_transition (info, r_type, h == NULL);
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf_s390_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ {
+ tls_type = elf_s390_hash_entry(h)->tls_type;
+ if (!info->shared && h->dynindx == -1 && tls_type >= GOT_TLS_IE)
+ r_type = R_390_TLS_LE64;
+ }
+ if (r_type == R_390_TLS_GD64 && tls_type >= GOT_TLS_IE)
+ r_type = R_390_TLS_IE64;
+
+ if (r_type == R_390_TLS_LE64)
+ {
+ /* This relocation gets optimized away by the local exec
+ access optimization. */
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_64 (output_bfd, -tpoff (info, relocation),
+ contents + rel->r_offset);
+ continue;
+ }
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ if (h != NULL)
+ off = h->got.offset;
+ else
+ {
+ if (local_got_offsets == NULL)
+ abort ();
+
+ off = local_got_offsets[r_symndx];
+ }
+
+ emit_tls_relocs:
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+ int dr_type, indx;
+
+ if (htab->srelgot == NULL)
+ abort ();
+
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off);
+
+ indx = h && h->dynindx != -1 ? h->dynindx : 0;
+ if (r_type == R_390_TLS_GD64)
+ dr_type = R_390_TLS_DTPMOD;
+ else
+ dr_type = R_390_TLS_TPOFF;
+ if (dr_type == R_390_TLS_TPOFF && indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ outrel.r_info = ELF64_R_INFO (indx, dr_type);
+ loc = htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++
+ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+
+ if (r_type == R_390_TLS_GD64)
+ {
+ if (indx == 0)
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_64 (output_bfd,
+ relocation - dtpoff_base (info),
+ htab->sgot->contents + off + GOT_ENTRY_SIZE);
+ }
+ else
+ {
+ outrel.r_info = ELF64_R_INFO (indx, R_390_TLS_DTPOFF);
+ outrel.r_offset += GOT_ENTRY_SIZE;
+ outrel.r_addend = 0;
+ htab->srelgot->reloc_count++;
+ loc += sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ }
+ }
+
+ if (h != NULL)
+ h->got.offset |= 1;
+ else
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ if (off >= (bfd_vma) -2)
+ abort ();
+ if (r_type == ELF64_R_TYPE (rel->r_info))
+ {
+ relocation = htab->sgot->output_offset + off;
+ if (r_type == R_390_TLS_IE64 || r_type == R_390_TLS_IEENT)
+ relocation += htab->sgot->output_section->vma;
+ unresolved_reloc = FALSE;
+ }
+ else
+ {
+ bfd_put_64 (output_bfd, htab->sgot->output_offset + off,
+ contents + rel->r_offset);
+ continue;
+ }
+ break;
+
+ case R_390_TLS_GOTIE12:
+ case R_390_TLS_IEENT:
+ if (h == NULL)
+ {
+ if (local_got_offsets == NULL)
+ abort();
+ off = local_got_offsets[r_symndx];
+ if (info->shared)
+ goto emit_tls_relocs;
+ }
+ else
+ {
+ off = h->got.offset;
+ tls_type = elf_s390_hash_entry(h)->tls_type;
+ if (info->shared || h->dynindx != -1 || tls_type < GOT_TLS_IE)
+ goto emit_tls_relocs;
+ }
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_64 (output_bfd, -tpoff (info, relocation),
+ htab->sgot->contents + off);
+ relocation = htab->sgot->output_offset + off;
+ if (r_type == R_390_TLS_IEENT)
+ relocation += htab->sgot->output_section->vma;
+ unresolved_reloc = FALSE;
+ break;
+
+ case R_390_TLS_LDM64:
+ if (! info->shared)
+ /* The literal pool entry this relocation refers to gets ignored
+ by the optimized code of the local exec model. Do nothing
+ and the value will turn out zero. */
+ continue;
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ off = htab->tls_ldm_got.offset;
+ if (off & 1)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+
+ if (htab->srelgot == NULL)
+ abort ();
+
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off);
+
+ bfd_put_64 (output_bfd, 0,
+ htab->sgot->contents + off + GOT_ENTRY_SIZE);
+ outrel.r_info = ELF64_R_INFO (0, R_390_TLS_DTPMOD);
+ outrel.r_addend = 0;
+ loc = htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++
+ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ htab->tls_ldm_got.offset |= 1;
+ }
+ relocation = htab->sgot->output_offset + off;
+ unresolved_reloc = FALSE;
+ break;
+
+ case R_390_TLS_LE64:
+ if (info->shared)
+ {
+ /* Linking a shared library with non-fpic code requires
+ a R_390_TLS_TPOFF relocation. */
+ Elf_Internal_Rela outrel;
+ asection *sreloc;
+ bfd_byte *loc;
+ int indx;
+
+ outrel.r_offset = rel->r_offset
+ + input_section->output_section->vma
+ + input_section->output_offset;
+ if (h != NULL && h->dynindx != -1)
+ indx = h->dynindx;
+ else
+ indx = 0;
+ outrel.r_info = ELF64_R_INFO (indx, R_390_TLS_TPOFF);
+ if (indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ sreloc = elf_section_data (input_section)->sreloc;
+ if (sreloc == NULL)
+ abort ();
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ }
+ else
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_64 (output_bfd, -tpoff (info, relocation),
+ contents + rel->r_offset);
+ }
+ continue;
+
+ case R_390_TLS_LDO64:
+ if (info->shared || (input_section->flags & SEC_CODE) == 0)
+ relocation -= dtpoff_base (info);
+ else
+ /* When converting LDO to LE, we must negate. */
+ relocation = -tpoff (info, relocation);
+ break;
+
+ /* Relocations for tls instructions. */
+ case R_390_TLS_LOAD:
+ case R_390_TLS_GDCALL:
+ case R_390_TLS_LDCALL:
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = elf_s390_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ tls_type = elf_s390_hash_entry(h)->tls_type;
+
+ if (tls_type == GOT_TLS_GD)
+ continue;
+
+ if (r_type == R_390_TLS_LOAD)
+ {
+ if (!info->shared && (h == NULL || h->dynindx == -1))
+ {
+ /* IE->LE transition. Four valid cases:
+ lg %rx,(0,%ry) -> sllg %rx,%ry,0
+ lg %rx,(%ry,0) -> sllg %rx,%ry,0
+ lg %rx,(%ry,%r12) -> sllg %rx,%ry,0
+ lg %rx,(%r12,%ry) -> sllg %rx,%ry,0 */
+ unsigned int insn0, insn1, ry;
+
+ insn0 = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ insn1 = bfd_get_16 (input_bfd, contents + rel->r_offset + 4);
+ if (insn1 != 0x0004)
+ invalid_tls_insn (input_bfd, input_section, rel);
+ ry = 0;
+ if ((insn0 & 0xff00f000) == 0xe3000000)
+ /* lg %rx,0(%ry,0) -> sllg %rx,%ry,0 */
+ ry = (insn0 & 0x000f0000);
+ else if ((insn0 & 0xff0f0000) == 0xe3000000)
+ /* lg %rx,0(0,%ry) -> sllg %rx,%ry,0 */
+ ry = (insn0 & 0x0000f000) << 4;
+ else if ((insn0 & 0xff00f000) == 0xe300c000)
+ /* lg %rx,0(%ry,%r12) -> sllg %rx,%ry,0 */
+ ry = (insn0 & 0x000f0000);
+ else if ((insn0 & 0xff0f0000) == 0xe30c0000)
+ /* lg %rx,0(%r12,%ry) -> sllg %rx,%ry,0 */
+ ry = (insn0 & 0x0000f000) << 4;
+ else
+ invalid_tls_insn (input_bfd, input_section, rel);
+ insn0 = 0xeb000000 | (insn0 & 0x00f00000) | ry;
+ insn1 = 0x000d;
+ bfd_put_32 (output_bfd, insn0, contents + rel->r_offset);
+ bfd_put_16 (output_bfd, insn1, contents + rel->r_offset + 4);
+ }
+ }
+ else if (r_type == R_390_TLS_GDCALL)
+ {
+ unsigned int insn0, insn1;
+
+ insn0 = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ insn1 = bfd_get_16 (input_bfd, contents + rel->r_offset + 4);
+ if ((insn0 & 0xffff0000) != 0xc0e50000)
+ invalid_tls_insn (input_bfd, input_section, rel);
+ if (!info->shared && (h == NULL || h->dynindx == -1))
+ {
+ /* GD->LE transition.
+ brasl %r14,__tls_get_addr@plt -> brcl 0,. */
+ insn0 = 0xc0040000;
+ insn1 = 0x0000;
+ }
+ else
+ {
+ /* GD->IE transition.
+ brasl %r14,__tls_get_addr@plt -> lg %r2,0(%r2,%r12) */
+ insn0 = 0xe322c000;
+ insn1 = 0x0004;
+ }
+ bfd_put_32 (output_bfd, insn0, contents + rel->r_offset);
+ bfd_put_16 (output_bfd, insn1, contents + rel->r_offset + 4);
+ }
+ else if (r_type == R_390_TLS_LDCALL)
+ {
+ if (!info->shared)
+ {
+ unsigned int insn0, insn1;
+
+ insn0 = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ insn1 = bfd_get_16 (input_bfd, contents + rel->r_offset + 4);
+ if ((insn0 & 0xffff0000) != 0xc0e50000)
+ invalid_tls_insn (input_bfd, input_section, rel);
+ /* LD->LE transition.
+ brasl %r14,__tls_get_addr@plt -> brcl 0,. */
+ insn0 = 0xc0040000;
+ insn1 = 0x0000;
+ bfd_put_32 (output_bfd, insn0, contents + rel->r_offset);
+ bfd_put_16 (output_bfd, insn1, contents + rel->r_offset + 4);
+ }
+ }
+ continue;
+
default:
break;
}
@@ -2090,7 +3057,10 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got.offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1
+ && elf_s390_hash_entry(h)->tls_type != GOT_TLS_GD
+ && elf_s390_hash_entry(h)->tls_type != GOT_TLS_IE
+ && elf_s390_hash_entry(h)->tls_type != GOT_TLS_IE_NLT)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -2308,13 +3278,6 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
return TRUE;
}
-static bfd_boolean
-elf_s390_object_p (abfd)
- bfd *abfd;
-{
- return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_64);
-}
-
/*
* Why was the hash table entry size definition changed from
* ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and
@@ -2388,6 +3351,7 @@ const struct elf_size_info s390_elf64_size_info =
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
-#define elf_backend_object_p elf_s390_object_p
+#define bfd_elf64_mkobject elf_s390_mkobject
+#define elf_backend_object_p elf_s390_object_p
#include "elf64-target.h"
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index c3a3f05a0b2..c9d248e8457 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1,6 +1,6 @@
/* SPARC-specific support for 64-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -77,6 +77,8 @@ static bfd_boolean sparc64_elf_fake_sections
static const char *sparc64_elf_print_symbol_all
PARAMS ((bfd *, PTR, asymbol *));
+static bfd_boolean sparc64_elf_new_section_hook
+ PARAMS ((bfd *, asection *));
static bfd_boolean sparc64_elf_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
static bfd_boolean sparc64_elf_relocate_section
@@ -171,7 +173,31 @@ static reloc_howto_type sparc64_elf_howto_table[] =
HOWTO(R_SPARC_L44, 0,2,13,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_L44", FALSE,0,0x00000fff,FALSE),
HOWTO(R_SPARC_REGISTER, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_notsup_reloc, "R_SPARC_REGISTER",FALSE,0,MINUS_ONE, FALSE),
HOWTO(R_SPARC_UA64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", FALSE,0,MINUS_ONE, TRUE),
- HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE)
+ HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",FALSE,0,0x003fffff, FALSE),
+ HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",FALSE,0,0x000003ff, FALSE),
+ HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",FALSE,0,0x003fffff, FALSE),
+ HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",FALSE,0,0x000003ff, FALSE),
+ HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_TLS_DTPOFF64,0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF64",FALSE,0,MINUS_ONE,TRUE),
+ HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",FALSE,0,0x00000000,TRUE)
};
struct elf_reloc_map {
@@ -225,6 +251,30 @@ static const struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_5, R_SPARC_5 },
{ BFD_RELOC_SPARC_6, R_SPARC_6 },
{ BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 },
+ { BFD_RELOC_SPARC_TLS_GD_HI22, R_SPARC_TLS_GD_HI22 },
+ { BFD_RELOC_SPARC_TLS_GD_LO10, R_SPARC_TLS_GD_LO10 },
+ { BFD_RELOC_SPARC_TLS_GD_ADD, R_SPARC_TLS_GD_ADD },
+ { BFD_RELOC_SPARC_TLS_GD_CALL, R_SPARC_TLS_GD_CALL },
+ { BFD_RELOC_SPARC_TLS_LDM_HI22, R_SPARC_TLS_LDM_HI22 },
+ { BFD_RELOC_SPARC_TLS_LDM_LO10, R_SPARC_TLS_LDM_LO10 },
+ { BFD_RELOC_SPARC_TLS_LDM_ADD, R_SPARC_TLS_LDM_ADD },
+ { BFD_RELOC_SPARC_TLS_LDM_CALL, R_SPARC_TLS_LDM_CALL },
+ { BFD_RELOC_SPARC_TLS_LDO_HIX22, R_SPARC_TLS_LDO_HIX22 },
+ { BFD_RELOC_SPARC_TLS_LDO_LOX10, R_SPARC_TLS_LDO_LOX10 },
+ { BFD_RELOC_SPARC_TLS_LDO_ADD, R_SPARC_TLS_LDO_ADD },
+ { BFD_RELOC_SPARC_TLS_IE_HI22, R_SPARC_TLS_IE_HI22 },
+ { BFD_RELOC_SPARC_TLS_IE_LO10, R_SPARC_TLS_IE_LO10 },
+ { BFD_RELOC_SPARC_TLS_IE_LD, R_SPARC_TLS_IE_LD },
+ { BFD_RELOC_SPARC_TLS_IE_LDX, R_SPARC_TLS_IE_LDX },
+ { BFD_RELOC_SPARC_TLS_IE_ADD, R_SPARC_TLS_IE_ADD },
+ { BFD_RELOC_SPARC_TLS_LE_HIX22, R_SPARC_TLS_LE_HIX22 },
+ { BFD_RELOC_SPARC_TLS_LE_LOX10, R_SPARC_TLS_LE_LOX10 },
+ { BFD_RELOC_SPARC_TLS_DTPMOD32, R_SPARC_TLS_DTPMOD32 },
+ { BFD_RELOC_SPARC_TLS_DTPMOD64, R_SPARC_TLS_DTPMOD64 },
+ { BFD_RELOC_SPARC_TLS_DTPOFF32, R_SPARC_TLS_DTPOFF32 },
+ { BFD_RELOC_SPARC_TLS_DTPOFF64, R_SPARC_TLS_DTPOFF64 },
+ { BFD_RELOC_SPARC_TLS_TPOFF32, R_SPARC_TLS_TPOFF32 },
+ { BFD_RELOC_SPARC_TLS_TPOFF64, R_SPARC_TLS_TPOFF64 },
#ifndef SPARC64_OLD_RELOCS
{ BFD_RELOC_SPARC_PLT32, R_SPARC_PLT32 },
#endif
@@ -1868,8 +1918,30 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
return TRUE;
}
-#define SET_SEC_DO_RELAX(section) do { elf_section_data(section)->tdata = (void *)1; } while (0)
-#define SEC_DO_RELAX(section) (elf_section_data(section)->tdata == (void *)1)
+struct sparc64_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ unsigned int do_relax;
+};
+
+#define sec_do_relax(sec) \
+ ((struct sparc64_elf_section_data *) elf_section_data (sec))->do_relax
+
+static bfd_boolean
+sparc64_elf_new_section_hook (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct sparc64_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = (struct sparc64_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
static bfd_boolean
sparc64_elf_relax_section (abfd, section, link_info, again)
@@ -1879,7 +1951,7 @@ sparc64_elf_relax_section (abfd, section, link_info, again)
bfd_boolean *again;
{
*again = FALSE;
- SET_SEC_DO_RELAX (section);
+ sec_do_relax (section) = 1;
return TRUE;
}
@@ -2456,7 +2528,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_WDISP30:
do_wplt30:
- if (SEC_DO_RELAX (input_section)
+ if (sec_do_relax (input_section)
&& rel->r_offset + 4 < input_section->_raw_size)
{
#define G0 0
@@ -3116,6 +3188,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_reloc_type_lookup
#define bfd_elf64_bfd_relax_section \
sparc64_elf_relax_section
+#define bfd_elf64_new_section_hook \
+ sparc64_elf_new_section_hook
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 060b129d356..a70f873af6a 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -1,5 +1,5 @@
/* ELF linker support.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1304,7 +1304,7 @@ elf_link_add_object_symbols (abfd, info)
Test for --just-symbols by looking at info set up by
_bfd_elf_link_just_syms. */
if ((s = abfd->sections) != NULL
- && elf_section_data (s)->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+ && s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
goto error_return;
/* Find the name to use in a DT_NEEDED entry that refers to this
@@ -2234,7 +2234,7 @@ elf_link_add_object_symbols (abfd, info)
&secdata->sec_info))
goto error_return;
if (secdata->sec_info)
- secdata->sec_info_type = ELF_INFO_TYPE_STABS;
+ stab->sec_info_type = ELF_INFO_TYPE_STABS;
}
}
}
@@ -2256,7 +2256,7 @@ elf_link_add_object_symbols (abfd, info)
s, &secdata->sec_info))
goto error_return;
else if (secdata->sec_info)
- secdata->sec_info_type = ELF_INFO_TYPE_MERGE;
+ s->sec_info_type = ELF_INFO_TYPE_MERGE;
}
}
@@ -2902,7 +2902,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
/* Any syms created from now on start with -1 in
got.refcount/offset and plt.refcount/offset. */
- elf_hash_table (info)->init_refcount = -1;
+ elf_hash_table (info)->init_refcount = elf_hash_table (info)->init_offset;
/* The backend may have to create some sections regardless of whether
we're dynamic or not. */
@@ -3909,10 +3909,13 @@ elf_adjust_dynamic_symbol (h, data)
bfd *dynobj;
struct elf_backend_data *bed;
+ if (! is_elf_hash_table (eif->info))
+ return FALSE;
+
if (h->root.type == bfd_link_hash_warning)
{
- h->plt.offset = (bfd_vma) -1;
- h->got.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (eif->info)->init_offset;
+ h->got = elf_hash_table (eif->info)->init_offset;
/* When warning symbols are created, they **replace** the "real"
entry in the hash table, thus we never get to see the real
@@ -3924,9 +3927,6 @@ elf_adjust_dynamic_symbol (h, data)
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
- if (! is_elf_hash_table (eif->info))
- return FALSE;
-
/* Fix the symbol flags. */
if (! elf_fix_symbol_flags (h, eif))
return FALSE;
@@ -3944,7 +3944,7 @@ elf_adjust_dynamic_symbol (h, data)
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
&& (h->weakdef == NULL || h->weakdef->dynindx == -1))))
{
- h->plt.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (eif->info)->init_offset;
return TRUE;
}
@@ -5916,7 +5916,7 @@ elf_link_sec_merge_syms (h, data)
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& ((sec = h->root.u.def.section)->flags & SEC_MERGE)
- && elf_section_data (sec)->sec_info_type == ELF_INFO_TYPE_MERGE)
+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE)
{
bfd *output_bfd = (bfd *) data;
@@ -6522,7 +6522,7 @@ elf_link_input_bfd (finfo, input_bfd)
{
isec = section_from_elf_index (input_bfd, isym->st_shndx);
if (isec
- && elf_section_data (isec)->sec_info_type == ELF_INFO_TYPE_MERGE
+ && isec->sec_info_type == ELF_INFO_TYPE_MERGE
&& ELF_ST_TYPE (isym->st_info) != STT_SECTION)
isym->st_value =
_bfd_merged_section_offset (output_bfd, &isec,
@@ -7015,7 +7015,7 @@ elf_link_input_bfd (finfo, input_bfd)
{
/* Section written out. */
}
- else switch (elf_section_data (o)->sec_info_type)
+ else switch (o->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
if (! (_bfd_write_section_stabs
@@ -8268,7 +8268,7 @@ elf_bfd_discard_info (output_bfd, info)
if (stab != NULL
&& (stab->_raw_size == 0
|| bfd_is_abs_section (stab->output_section)
- || elf_section_data (stab)->sec_info_type != ELF_INFO_TYPE_STABS))
+ || stab->sec_info_type != ELF_INFO_TYPE_STABS))
stab = NULL;
if (stab == NULL
@@ -8374,7 +8374,7 @@ elf_section_ignore_discarded_relocs (sec)
{
struct elf_backend_data *bed;
- switch (elf_section_data (sec)->sec_info_type)
+ switch (sec->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
case ELF_INFO_TYPE_EH_FRAME:
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 144a9da13bf..00a0e88c1ce 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 32-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -96,6 +96,7 @@ static irix_compat_t elf_n32_mips_irix_compat
extern const bfd_target bfd_elf32_nbigmips_vec;
extern const bfd_target bfd_elf32_nlittlemips_vec;
+static asection *prev_reloc_section = NULL;
static bfd_vma prev_reloc_address = -1;
static bfd_vma prev_reloc_addend = 0;
@@ -1207,29 +1208,31 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto =
{ \
/* If we're relocating, and this is an external symbol, we don't \
want to change anything. */ \
- if (obfd != (bfd *) NULL \
- && (sym->flags & BSF_SECTION_SYM) == 0 \
- && (! entry->howto->partial_inplace \
- || entry->addend == 0)) \
+ if ((obfd) != (bfd *) NULL \
+ && ((sym)->flags & BSF_SECTION_SYM) == 0 \
+ && (! (entry)->howto->partial_inplace \
+ || (entry)->addend == 0)) \
{ \
- entry->address += sec->output_offset; \
+ (entry)->address += (sec)->output_offset; \
return bfd_reloc_ok; \
} \
\
/* The addend of combined relocs is remembered and left for \
subsequent relocs. */ \
- if (prev_reloc_address != reloc_entry->address) \
+ if (prev_reloc_address != (entry)->address \
+ || prev_reloc_section != (sec)) \
{ \
- prev_reloc_address = reloc_entry->address; \
- prev_reloc_addend = reloc_entry->addend; \
+ prev_reloc_section = (sec); \
+ prev_reloc_address = (entry)->address; \
+ prev_reloc_addend = (entry)->addend; \
} \
else \
- reloc_entry->addend = prev_reloc_addend; \
+ (entry)->addend = prev_reloc_addend; \
}
#define SET_RELOC_ADDEND(entry) \
{ \
- prev_reloc_addend = entry->addend; \
+ prev_reloc_addend = (entry)->addend; \
}
static bfd_reloc_status_type
@@ -2196,6 +2199,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define elf_backend_mips_irix_compat elf_n32_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
+#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf32_bfd_get_relocated_section_contents \
_bfd_elf_mips_get_relocated_section_contents
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index aa4c5ad8136..df48866911e 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -1,5 +1,5 @@
/* IA-64 support for 64-bit ELF
- Copyright 1998, 1999, 2000, 2001, 2002 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.
@@ -148,6 +148,8 @@ struct elfNN_ia64_link_hash_table
bfd_size_type minplt_entries; /* number of minplt entries */
unsigned reltext : 1; /* are there relocs against readonly sections? */
+ 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;
};
@@ -2416,8 +2418,23 @@ allocate_global_data_got (dyn_i, data)
}
if (dyn_i->want_dtpmod)
{
- dyn_i->dtpmod_offset = x->ofs;
- x->ofs += 8;
+ if (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info))
+ {
+ dyn_i->dtpmod_offset = x->ofs;
+ x->ofs += 8;
+ }
+ else
+ {
+ struct elfNN_ia64_link_hash_table *ia64_info;
+
+ ia64_info = elfNN_ia64_hash_table (x->info);
+ if (ia64_info->self_dtpmod_offset == (bfd_vma) -1)
+ {
+ ia64_info->self_dtpmod_offset = x->ofs;
+ x->ofs += 8;
+ }
+ dyn_i->dtpmod_offset = ia64_info->self_dtpmod_offset;
+ }
}
if (dyn_i->want_dtprel)
{
@@ -2687,7 +2704,7 @@ allocate_dynrel_entries (dyn_i, data)
ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
if ((dynamic_symbol || shared) && dyn_i->want_tprel)
ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
- if ((dynamic_symbol || shared) && dyn_i->want_dtpmod)
+ if (dynamic_symbol && dyn_i->want_dtpmod)
ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
if (dynamic_symbol && dyn_i->want_dtprel)
ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
@@ -2753,6 +2770,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
dynobj = elf_hash_table(info)->dynobj;
ia64_info = elfNN_ia64_hash_table (info);
+ ia64_info->self_dtpmod_offset = (bfd_vma) -1;
BFD_ASSERT(dynobj != NULL);
data.info = info;
@@ -2831,6 +2849,8 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
/* Allocate space for the dynamic relocations that turned out to be
required. */
+ if (info->shared && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
+ ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data);
}
@@ -3264,8 +3284,17 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
got_offset = dyn_i->tprel_offset;
break;
case R_IA64_DTPMOD64LSB:
- done = dyn_i->dtpmod_done;
- dyn_i->dtpmod_done = TRUE;
+ if (dyn_i->dtpmod_offset != ia64_info->self_dtpmod_offset)
+ {
+ done = dyn_i->dtpmod_done;
+ dyn_i->dtpmod_done = TRUE;
+ }
+ else
+ {
+ done = ia64_info->self_dtpmod_done;
+ ia64_info->self_dtpmod_done = TRUE;
+ dynindx = 0;
+ }
got_offset = dyn_i->dtpmod_offset;
break;
case R_IA64_DTPREL64LSB:
@@ -3734,8 +3763,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
if ((sym_sec->flags & SEC_MERGE)
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
- && (elf_section_data (sym_sec)->sec_info_type
- == ELF_INFO_TYPE_MERGE))
+ && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
{
struct elfNN_ia64_local_hash_entry *loc_h;
@@ -4224,6 +4252,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_DTPREL14:
case R_IA64_DTPREL22:
case R_IA64_DTPREL64I:
+ case R_IA64_DTPREL64LSB:
+ case R_IA64_DTPREL64MSB:
value -= elfNN_ia64_dtprel_base (info);
r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
break;
@@ -4233,13 +4263,23 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTOFF_DTPREL22:
{
int got_r_type;
+ long dynindx = h ? h->dynindx : -1;
+ bfd_vma r_addend = rel->r_addend;
switch (r_type)
{
default:
case R_IA64_LTOFF_TPREL22:
- if (!dynamic_symbol_p && !info->shared)
- value -= elfNN_ia64_tprel_base (info);
+ if (!dynamic_symbol_p)
+ {
+ if (!info->shared)
+ value -= elfNN_ia64_tprel_base (info);
+ else
+ {
+ r_addend += value - elfNN_ia64_dtprel_base (info);
+ dynindx = 0;
+ }
+ }
got_r_type = R_IA64_TPREL64LSB;
break;
case R_IA64_LTOFF_DTPMOD22:
@@ -4254,8 +4294,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
- value = set_got_entry (input_bfd, info, dyn_i,
- (h ? h->dynindx : -1), rel->r_addend,
+ value = set_got_entry (input_bfd, info, dyn_i, dynindx, r_addend,
value, got_r_type);
value -= gp_val;
r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 80a583bc60f..14105198481 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
+#include "libiberty.h"
#include "elf-bfd.h"
#include "elfxx-mips.h"
#include "elf/mips.h"
@@ -48,20 +49,28 @@ struct mips_got_entry
{
/* The input bfd in which the symbol is defined. */
bfd *abfd;
- /* The index of the symbol, as stored in the relocation r_info. If
- it's -1, the addend is a complete address into the
- executable/shared library. */
- unsigned long symndx;
- /* The addend of the relocation that should be added to the symbol
- value. */
- bfd_vma addend;
+ /* The index of the symbol, as stored in the relocation r_info, if
+ we have a local symbol; -1 otherwise. */
+ long symndx;
+ union
+ {
+ /* If abfd == NULL, an address that must be stored in the got. */
+ bfd_vma address;
+ /* If abfd != NULL && symndx != -1, the addend of the relocation
+ that should be added to the symbol value. */
+ bfd_vma addend;
+ /* If abfd != NULL && symndx == -1, the hash table entry
+ corresponding to a global symbol in the got (or, local, if
+ h->forced_local). */
+ struct mips_elf_link_hash_entry *h;
+ } d;
/* The offset from the beginning of the .got section to the entry
- corresponding to this symbol+addend. */
- unsigned long gotidx;
+ corresponding to this symbol+addend. If it's a global symbol
+ whose offset is yet to be decided, it's going to be -1. */
+ long gotidx;
};
-/* This structure is used to hold .got information when linking. It
- is stored in the tdata field of the bfd_elf_section_data structure. */
+/* This structure is used to hold .got information when linking. */
struct mips_got_info
{
@@ -76,8 +85,71 @@ struct mips_got_info
unsigned int assigned_gotno;
/* A hash table holding members of the got. */
struct htab *got_entries;
+ /* A hash table mapping input bfds to other mips_got_info. NULL
+ unless multi-got was necessary. */
+ struct htab *bfd2got;
+ /* In multi-got links, a pointer to the next got (err, rather, most
+ of the time, it points to the previous got). */
+ struct mips_got_info *next;
+};
+
+/* Map an input bfd to a got in a multi-got link. */
+
+struct mips_elf_bfd2got_hash {
+ bfd *bfd;
+ struct mips_got_info *g;
+};
+
+/* Structure passed when traversing the bfd2got hash table, used to
+ create and merge bfd's gots. */
+
+struct mips_elf_got_per_bfd_arg
+{
+ /* A hashtable that maps bfds to gots. */
+ htab_t bfd2got;
+ /* The output bfd. */
+ bfd *obfd;
+ /* The link information. */
+ struct bfd_link_info *info;
+ /* A pointer to the primary got, i.e., the one that's going to get
+ the implicit relocations from DT_MIPS_LOCAL_GOTNO and
+ DT_MIPS_GOTSYM. */
+ struct mips_got_info *primary;
+ /* A non-primary got we're trying to merge with other input bfd's
+ gots. */
+ struct mips_got_info *current;
+ /* The maximum number of got entries that can be addressed with a
+ 16-bit offset. */
+ unsigned int max_count;
+ /* The number of local and global entries in the primary got. */
+ unsigned int primary_count;
+ /* The number of local and global entries in the current got. */
+ unsigned int current_count;
+};
+
+/* Another structure used to pass arguments for got entries traversal. */
+
+struct mips_elf_set_global_got_offset_arg
+{
+ struct mips_got_info *g;
+ int value;
+ unsigned int needed_relocs;
+ struct bfd_link_info *info;
+};
+
+struct _mips_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ union
+ {
+ struct mips_got_info *got_info;
+ bfd_byte *tdata;
+ } u;
};
+#define mips_elf_section_data(sec) \
+ ((struct _mips_elf_section_data *) elf_section_data (sec))
+
/* This structure is passed to mips_elf_sort_hash_table_f when sorting
the dynamic symbols. */
@@ -89,6 +161,11 @@ struct mips_elf_hash_sort_data
/* The least dynamic symbol table index corresponding to a symbol
with a GOT entry. */
long min_got_dynindx;
+ /* The greatest dynamic symbol table index corresponding to a symbol
+ with a GOT entry that is not referenced (e.g., a dynamic symbol
+ with dynamic relocations pointing to it from non-primary
+ GOTs). */
+ long max_unref_got_dynindx;
/* The greatest dynamic symbol table index not corresponding to a
symbol without a GOT entry. */
long max_non_got_dynindx;
@@ -322,30 +399,35 @@ static void bfd_mips_elf_swap_msym_out
PARAMS ((bfd *, const Elf32_Internal_Msym *, Elf32_External_Msym *));
static int sort_dynamic_relocs
PARAMS ((const void *, const void *));
+static int sort_dynamic_relocs_64
+ PARAMS ((const void *, const void *));
static bfd_boolean mips_elf_output_extsym
PARAMS ((struct mips_elf_link_hash_entry *, PTR));
static int gptab_compare PARAMS ((const void *, const void *));
-static asection * mips_elf_got_section PARAMS ((bfd *));
+static asection * mips_elf_rel_dyn_section PARAMS ((bfd *, bfd_boolean));
+static asection * mips_elf_got_section PARAMS ((bfd *, bfd_boolean));
static struct mips_got_info *mips_elf_got_info
PARAMS ((bfd *, asection **));
static bfd_vma mips_elf_local_got_index
- PARAMS ((bfd *, struct bfd_link_info *, bfd_vma));
+ PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_vma));
static bfd_vma mips_elf_global_got_index
- PARAMS ((bfd *, struct elf_link_hash_entry *));
+ PARAMS ((bfd *, bfd *, struct elf_link_hash_entry *));
static bfd_vma mips_elf_got_page
- PARAMS ((bfd *, struct bfd_link_info *, bfd_vma, bfd_vma *));
+ PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_vma, bfd_vma *));
static bfd_vma mips_elf_got16_entry
- PARAMS ((bfd *, struct bfd_link_info *, bfd_vma, bfd_boolean));
+ PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_vma, bfd_boolean));
static bfd_vma mips_elf_got_offset_from_index
- PARAMS ((bfd *, bfd *, bfd_vma));
+ PARAMS ((bfd *, bfd *, bfd *, bfd_vma));
static struct mips_got_entry *mips_elf_create_local_got_entry
- PARAMS ((bfd *, struct mips_got_info *, asection *, bfd_vma));
+ PARAMS ((bfd *, bfd *, struct mips_got_info *, asection *, bfd_vma));
static bfd_boolean mips_elf_sort_hash_table
PARAMS ((struct bfd_link_info *, unsigned long));
static bfd_boolean mips_elf_sort_hash_table_f
PARAMS ((struct mips_elf_link_hash_entry *, PTR));
+static bfd_boolean mips_elf_record_local_got_symbol
+ PARAMS ((bfd *, long, bfd_vma, struct mips_got_info *));
static bfd_boolean mips_elf_record_global_got_symbol
- PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *,
+ PARAMS ((struct elf_link_hash_entry *, bfd *, struct bfd_link_info *,
struct mips_got_info *));
static const Elf_Internal_Rela *mips_elf_next_relocation
PARAMS ((bfd *, unsigned int, const Elf_Internal_Rela *,
@@ -360,7 +442,7 @@ static bfd_vma mips_elf_highest PARAMS ((bfd_vma));
static bfd_boolean mips_elf_create_compact_rel_section
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean mips_elf_create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean));
static asection *mips_elf_create_msym_section
PARAMS ((bfd *));
static bfd_reloc_status_type mips_elf_calculate_relocation
@@ -382,14 +464,34 @@ static bfd_boolean mips_elf_create_dynamic_relocation
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
struct mips_elf_link_hash_entry *, asection *,
bfd_vma, bfd_vma *, asection *));
-static INLINE int elf_mips_isa PARAMS ((flagword));
+static void mips_set_isa_flags PARAMS ((bfd *));
static INLINE char* elf_mips_abi_name PARAMS ((bfd *));
static void mips_elf_irix6_finish_dynamic_symbol
PARAMS ((bfd *, const char *, Elf_Internal_Sym *));
-static bfd_boolean _bfd_mips_elf_mach_extends_p PARAMS ((flagword, flagword));
+static bfd_boolean mips_mach_extends_p PARAMS ((unsigned long, unsigned long));
+static bfd_boolean mips_32bit_flags_p PARAMS ((flagword));
+static INLINE hashval_t mips_elf_hash_bfd_vma PARAMS ((bfd_vma));
static hashval_t mips_elf_got_entry_hash PARAMS ((const PTR));
static int mips_elf_got_entry_eq PARAMS ((const PTR, const PTR));
+static bfd_boolean mips_elf_multi_got
+ PARAMS ((bfd *, struct bfd_link_info *, struct mips_got_info *,
+ asection *, bfd_size_type));
+static hashval_t mips_elf_multi_got_entry_hash PARAMS ((const PTR));
+static int mips_elf_multi_got_entry_eq PARAMS ((const PTR, const PTR));
+static hashval_t mips_elf_bfd2got_entry_hash PARAMS ((const PTR));
+static int mips_elf_bfd2got_entry_eq PARAMS ((const PTR, const PTR));
+static int mips_elf_make_got_per_bfd PARAMS ((void **, void *));
+static int mips_elf_merge_gots PARAMS ((void **, void *));
+static int mips_elf_set_global_got_offset PARAMS ((void**, void *));
+static int mips_elf_resolve_final_got_entry PARAMS ((void**, void *));
+static void mips_elf_resolve_final_got_entries
+ PARAMS ((struct mips_got_info *));
+static bfd_vma mips_elf_adjust_gp
+ PARAMS ((bfd *, struct mips_got_info *, bfd *));
+static struct mips_got_info *mips_elf_got_for_ibfd
+ PARAMS ((struct mips_got_info *, bfd *));
+
/* This will be used when we sort the dynamic relocation records. */
static bfd *reldyn_sorting_bfd;
@@ -491,15 +593,19 @@ static bfd *reldyn_sorting_bfd;
/* The number of local .got entries we reserve. */
#define MIPS_RESERVED_GOTNO (2)
+/* The offset of $gp from the beginning of the .got section. */
+#define ELF_MIPS_GP_OFFSET(abfd) (0x7ff0)
+
+/* The maximum size of the GOT for it to be addressable using 16-bit
+ 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. */
-#define ELF_MIPS_GP_OFFSET(abfd) (SGI_COMPAT (abfd) ? 0x7ff0 : 0x8000)
#define STUB_LW(abfd) \
- (SGI_COMPAT (abfd) \
- ? (ABI_64_P (abfd) \
- ? 0xdf998010 /* ld t9,0x8010(gp) */ \
- : 0x8f998010) /* lw t9,0x8010(gp) */ \
- : 0x8f998010) /* lw t9,0x8000(gp) */
+ ((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 */
@@ -636,6 +742,22 @@ mips_elf_link_hash_newfunc (entry, table, string)
return (struct bfd_hash_entry *) ret;
}
+
+bfd_boolean
+_bfd_mips_elf_new_section_hook (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct _mips_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = (struct _mips_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
/* Read ECOFF debugging information from a .mdebug section into a
ecoff_debug_info structure. */
@@ -1209,6 +1331,26 @@ sort_dynamic_relocs (arg1, arg2)
return ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info);
}
+/* Like sort_dynamic_relocs, but used for elf64 relocations. */
+
+static int
+sort_dynamic_relocs_64 (arg1, arg2)
+ const PTR arg1;
+ const PTR arg2;
+{
+ Elf_Internal_Rela int_reloc1[3];
+ Elf_Internal_Rela int_reloc2[3];
+
+ (*get_elf_backend_data (reldyn_sorting_bfd)->s->swap_reloc_in)
+ (reldyn_sorting_bfd, arg1, int_reloc1);
+ (*get_elf_backend_data (reldyn_sorting_bfd)->s->swap_reloc_in)
+ (reldyn_sorting_bfd, arg2, int_reloc2);
+
+ return (ELF64_R_SYM (int_reloc1[0].r_info)
+ - ELF64_R_SYM (int_reloc2[0].r_info));
+}
+
+
/* This routine is used to write out ECOFF debugging external symbol
information. It is called via mips_elf_link_hash_traverse. The
ECOFF external symbol information must match the ELF external
@@ -1417,17 +1559,36 @@ gptab_compare (p1, p2)
}
/* Functions to manage the got entry hash table. */
+
+/* Use all 64 bits of a bfd_vma for the computation of a 32-bit
+ hash number. */
+
+static INLINE hashval_t
+mips_elf_hash_bfd_vma (addr)
+ bfd_vma addr;
+{
+#ifdef BFD64
+ return addr + (addr >> 32);
+#else
+ return addr;
+#endif
+}
+
+/* got_entries only match if they're identical, except for gotidx, so
+ use all fields to compute the hash, and compare the appropriate
+ union members. */
+
static hashval_t
mips_elf_got_entry_hash (entry_)
const PTR entry_;
{
const struct mips_got_entry *entry = (struct mips_got_entry *)entry_;
- return htab_hash_pointer (entry->abfd) + entry->symndx
-#ifdef BFD64
- + (entry->addend >> 32)
-#endif
- + entry->addend;
+ return entry->symndx
+ + (! entry->abfd ? mips_elf_hash_bfd_vma (entry->d.address)
+ : entry->abfd->id
+ + (entry->symndx >= 0 ? mips_elf_hash_bfd_vma (entry->d.addend)
+ : entry->d.h->root.root.root.hash));
}
static int
@@ -1439,16 +1600,87 @@ mips_elf_got_entry_eq (entry1, entry2)
const struct mips_got_entry *e2 = (struct mips_got_entry *)entry2;
return e1->abfd == e2->abfd && e1->symndx == e2->symndx
- && e1->addend == e2->addend;
+ && (! e1->abfd ? e1->d.address == e2->d.address
+ : e1->symndx >= 0 ? e1->d.addend == e2->d.addend
+ : e1->d.h == e2->d.h);
+}
+
+/* multi_got_entries are still a match in the case of global objects,
+ even if the input bfd in which they're referenced differs, so the
+ hash computation and compare functions are adjusted
+ accordingly. */
+
+static hashval_t
+mips_elf_multi_got_entry_hash (entry_)
+ const PTR entry_;
+{
+ const struct mips_got_entry *entry = (struct mips_got_entry *)entry_;
+
+ return entry->symndx
+ + (! entry->abfd
+ ? mips_elf_hash_bfd_vma (entry->d.address)
+ : entry->symndx >= 0
+ ? (entry->abfd->id
+ + mips_elf_hash_bfd_vma (entry->d.addend))
+ : entry->d.h->root.root.root.hash);
+}
+
+static int
+mips_elf_multi_got_entry_eq (entry1, entry2)
+ const PTR entry1;
+ const PTR entry2;
+{
+ const struct mips_got_entry *e1 = (struct mips_got_entry *)entry1;
+ const struct mips_got_entry *e2 = (struct mips_got_entry *)entry2;
+
+ return e1->symndx == e2->symndx
+ && (e1->symndx >= 0 ? e1->abfd == e2->abfd && e1->d.addend == e2->d.addend
+ : e1->abfd == NULL || e2->abfd == NULL
+ ? e1->abfd == e2->abfd && e1->d.address == e2->d.address
+ : e1->d.h == e2->d.h);
}
+/* Returns the dynamic relocation section for DYNOBJ. */
+
+static asection *
+mips_elf_rel_dyn_section (dynobj, create_p)
+ bfd *dynobj;
+ bfd_boolean create_p;
+{
+ static const char dname[] = ".rel.dyn";
+ asection *sreloc;
+
+ sreloc = bfd_get_section_by_name (dynobj, dname);
+ if (sreloc == NULL && create_p)
+ {
+ sreloc = bfd_make_section (dynobj, dname);
+ if (sreloc == NULL
+ || ! bfd_set_section_flags (dynobj, sreloc,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, sreloc,
+ 4))
+ return NULL;
+ }
+ return sreloc;
+}
+
/* Returns the GOT section for ABFD. */
static asection *
-mips_elf_got_section (abfd)
+mips_elf_got_section (abfd, maybe_excluded)
bfd *abfd;
+ bfd_boolean maybe_excluded;
{
- return bfd_get_section_by_name (abfd, ".got");
+ asection *sgot = bfd_get_section_by_name (abfd, ".got");
+ if (sgot == NULL
+ || (! maybe_excluded && (sgot->flags & SEC_EXCLUDE) != 0))
+ return NULL;
+ return sgot;
}
/* Returns the GOT information associated with the link indicated by
@@ -1463,14 +1695,15 @@ mips_elf_got_info (abfd, sgotp)
asection *sgot;
struct mips_got_info *g;
- sgot = mips_elf_got_section (abfd);
+ sgot = mips_elf_got_section (abfd, TRUE);
BFD_ASSERT (sgot != NULL);
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
+ BFD_ASSERT (mips_elf_section_data (sgot) != NULL);
+ g = mips_elf_section_data (sgot)->u.got_info;
BFD_ASSERT (g != NULL);
if (sgotp)
- *sgotp = sgot;
+ *sgotp = (sgot->flags & SEC_EXCLUDE) == 0 ? sgot : NULL;
+
return g;
}
@@ -1479,8 +1712,8 @@ mips_elf_got_info (abfd, sgotp)
-1 if no satisfactory GOT offset can be found. */
static bfd_vma
-mips_elf_local_got_index (abfd, info, value)
- bfd *abfd;
+mips_elf_local_got_index (abfd, ibfd, info, value)
+ bfd *abfd, *ibfd;
struct bfd_link_info *info;
bfd_vma value;
{
@@ -1490,7 +1723,7 @@ mips_elf_local_got_index (abfd, info, value)
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
- entry = mips_elf_create_local_got_entry (abfd, g, sgot, value);
+ entry = mips_elf_create_local_got_entry (abfd, ibfd, g, sgot, value);
if (entry)
return entry->gotidx;
else
@@ -1500,18 +1733,38 @@ mips_elf_local_got_index (abfd, info, value)
/* Returns the GOT index for the global symbol indicated by H. */
static bfd_vma
-mips_elf_global_got_index (abfd, h)
- bfd *abfd;
+mips_elf_global_got_index (abfd, ibfd, h)
+ bfd *abfd, *ibfd;
struct elf_link_hash_entry *h;
{
bfd_vma index;
asection *sgot;
- struct mips_got_info *g;
+ struct mips_got_info *g, *gg;
long global_got_dynindx = 0;
- g = mips_elf_got_info (abfd, &sgot);
- if (g->global_gotsym != NULL)
- global_got_dynindx = g->global_gotsym->dynindx;
+ gg = g = mips_elf_got_info (abfd, &sgot);
+ if (g->bfd2got && ibfd)
+ {
+ struct mips_got_entry e, *p;
+
+ BFD_ASSERT (h->dynindx >= 0);
+
+ g = mips_elf_got_for_ibfd (g, ibfd);
+ if (g->next != gg)
+ {
+ e.abfd = ibfd;
+ e.symndx = -1;
+ e.d.h = (struct mips_elf_link_hash_entry *)h;
+
+ p = (struct mips_got_entry *) htab_find (g->got_entries, &e);
+
+ BFD_ASSERT (p->gotidx > 0);
+ return p->gotidx;
+ }
+ }
+
+ if (gg->global_gotsym != NULL)
+ global_got_dynindx = gg->global_gotsym->dynindx;
/* Once we determine the global GOT entry with the lowest dynamic
symbol table index, we must put all dynamic symbols with greater
@@ -1532,8 +1785,8 @@ mips_elf_global_got_index (abfd, h)
OFFSETP, if it is non-NULL. */
static bfd_vma
-mips_elf_got_page (abfd, info, value, offsetp)
- bfd *abfd;
+mips_elf_got_page (abfd, ibfd, info, value, offsetp)
+ bfd *abfd, *ibfd;
struct bfd_link_info *info;
bfd_vma value;
bfd_vma *offsetp;
@@ -1545,7 +1798,7 @@ mips_elf_got_page (abfd, info, value, offsetp)
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
- entry = mips_elf_create_local_got_entry (abfd, g, sgot,
+ entry = mips_elf_create_local_got_entry (abfd, ibfd, g, sgot,
(value + 0x8000)
& (~(bfd_vma)0xffff));
@@ -1555,7 +1808,7 @@ mips_elf_got_page (abfd, info, value, offsetp)
index = entry->gotidx;
if (offsetp)
- *offsetp = value - entry->addend;
+ *offsetp = value - entry->d.address;
return index;
}
@@ -1564,8 +1817,8 @@ mips_elf_got_page (abfd, info, value, offsetp)
for value. Return the index into the GOT for this entry. */
static bfd_vma
-mips_elf_got16_entry (abfd, info, value, external)
- bfd *abfd;
+mips_elf_got16_entry (abfd, ibfd, info, value, external)
+ bfd *abfd, *ibfd;
struct bfd_link_info *info;
bfd_vma value;
bfd_boolean external;
@@ -1585,7 +1838,7 @@ mips_elf_got16_entry (abfd, info, value, external)
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
- entry = mips_elf_create_local_got_entry (abfd, g, sgot, value);
+ entry = mips_elf_create_local_got_entry (abfd, ibfd, g, sgot, value);
if (entry)
return entry->gotidx;
else
@@ -1596,35 +1849,46 @@ mips_elf_got16_entry (abfd, info, value, external)
in the GOT. */
static bfd_vma
-mips_elf_got_offset_from_index (dynobj, output_bfd, index)
+mips_elf_got_offset_from_index (dynobj, output_bfd, input_bfd, index)
bfd *dynobj;
bfd *output_bfd;
+ bfd *input_bfd;
bfd_vma index;
{
asection *sgot;
bfd_vma gp;
+ struct mips_got_info *g;
- sgot = mips_elf_got_section (dynobj);
- gp = _bfd_get_gp_value (output_bfd);
- return (sgot->output_section->vma + sgot->output_offset + index -
- gp);
+ g = mips_elf_got_info (dynobj, &sgot);
+ gp = _bfd_get_gp_value (output_bfd)
+ + mips_elf_adjust_gp (output_bfd, g, input_bfd);
+
+ return sgot->output_section->vma + sgot->output_offset + index - gp;
}
/* Create a local GOT entry for VALUE. Return the index of the entry,
or -1 if it could not be created. */
static struct mips_got_entry *
-mips_elf_create_local_got_entry (abfd, g, sgot, value)
- bfd *abfd;
- struct mips_got_info *g;
+mips_elf_create_local_got_entry (abfd, ibfd, gg, sgot, value)
+ bfd *abfd, *ibfd;
+ struct mips_got_info *gg;
asection *sgot;
bfd_vma value;
{
struct mips_got_entry entry, **loc;
+ struct mips_got_info *g;
- entry.abfd = abfd;
- entry.symndx = (unsigned long)-1;
- entry.addend = value;
+ entry.abfd = NULL;
+ entry.symndx = -1;
+ entry.d.address = value;
+
+ g = mips_elf_got_for_ibfd (gg, ibfd);
+ if (g == NULL)
+ {
+ g = mips_elf_got_for_ibfd (gg, abfd);
+ BFD_ASSERT (g != NULL);
+ }
loc = (struct mips_got_entry **) htab_find_slot (g->got_entries, &entry,
INSERT);
@@ -1642,7 +1906,7 @@ mips_elf_create_local_got_entry (abfd, g, sgot, value)
if (g->assigned_gotno >= g->local_gotno)
{
- (*loc)->gotidx = (unsigned long)-1;
+ (*loc)->gotidx = -1;
/* We didn't allocate enough space in the GOT. */
(*_bfd_error_handler)
(_("not enough GOT space for local GOT entries"));
@@ -1674,8 +1938,19 @@ mips_elf_sort_hash_table (info, max_local)
dynobj = elf_hash_table (info)->dynobj;
+ g = mips_elf_got_info (dynobj, NULL);
+
hsd.low = NULL;
- hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount;
+ hsd.max_unref_got_dynindx =
+ hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount
+ /* In the multi-got case, assigned_gotno of the master got_info
+ indicate the number of entries that aren't referenced in the
+ primary GOT, but that must have entries because there are
+ dynamic relocations that reference it. Since they aren't
+ referenced, we move them to the end of the GOT, so that they
+ don't prevent other entries that are referenced from getting
+ too large offsets. */
+ - (g->next ? g->assigned_gotno : 0);
hsd.max_non_got_dynindx = max_local;
mips_elf_link_hash_traverse (((struct mips_elf_link_hash_table *)
elf_hash_table (info)),
@@ -1685,10 +1960,11 @@ mips_elf_sort_hash_table (info, max_local)
/* There should have been enough room in the symbol table to
accommodate both the GOT and non-GOT symbols. */
BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
+ BFD_ASSERT ((unsigned long)hsd.max_unref_got_dynindx
+ <= elf_hash_table (info)->dynsymcount);
/* Now we know which dynamic symbol has the lowest dynamic symbol
table index in the GOT. */
- g = mips_elf_got_info (dynobj, NULL);
g->global_gotsym = hsd.low;
return TRUE;
@@ -1714,7 +1990,17 @@ mips_elf_sort_hash_table_f (h, data)
if (h->root.dynindx == -1)
return TRUE;
- if (h->root.got.offset != 1)
+ /* Global symbols that need GOT entries that are not explicitly
+ referenced are marked with got offset 2. Those that are
+ referenced get a 1, and those that don't need GOT entries get
+ -1. */
+ if (h->root.got.offset == 2)
+ {
+ if (hsd->max_unref_got_dynindx == hsd->min_got_dynindx)
+ hsd->low = (struct elf_link_hash_entry *) h;
+ h->root.dynindx = hsd->max_unref_got_dynindx++;
+ }
+ else if (h->root.got.offset != 1)
h->root.dynindx = hsd->max_non_got_dynindx++;
else
{
@@ -1730,11 +2016,14 @@ mips_elf_sort_hash_table_f (h, data)
posterity. */
static bfd_boolean
-mips_elf_record_global_got_symbol (h, info, g)
+mips_elf_record_global_got_symbol (h, abfd, info, g)
struct elf_link_hash_entry *h;
+ bfd *abfd;
struct bfd_link_info *info;
- struct mips_got_info *g ATTRIBUTE_UNUSED;
+ struct mips_got_info *g;
{
+ struct mips_got_entry entry, **loc;
+
/* A global symbol in the GOT must also be in the dynamic symbol
table. */
if (h->dynindx == -1)
@@ -1750,8 +2039,26 @@ mips_elf_record_global_got_symbol (h, info, g)
return FALSE;
}
+ entry.abfd = abfd;
+ entry.symndx = -1;
+ entry.d.h = (struct mips_elf_link_hash_entry *) h;
+
+ loc = (struct mips_got_entry **) htab_find_slot (g->got_entries, &entry,
+ INSERT);
+
/* If we've already marked this entry as needing GOT space, we don't
need to do it again. */
+ if (*loc)
+ return TRUE;
+
+ *loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
+
+ if (! *loc)
+ return FALSE;
+
+ entry.gotidx = -1;
+ memcpy (*loc, &entry, sizeof entry);
+
if (h->got.offset != MINUS_ONE)
return TRUE;
@@ -1762,6 +2069,582 @@ mips_elf_record_global_got_symbol (h, info, g)
return TRUE;
}
+
+/* Reserve space in G for a GOT entry containing the value of symbol
+ SYMNDX in input bfd ABDF, plus ADDEND. */
+
+static bfd_boolean
+mips_elf_record_local_got_symbol (abfd, symndx, addend, g)
+ bfd *abfd;
+ long symndx;
+ bfd_vma addend;
+ struct mips_got_info *g;
+{
+ struct mips_got_entry entry, **loc;
+
+ entry.abfd = abfd;
+ entry.symndx = symndx;
+ entry.d.addend = addend;
+ loc = (struct mips_got_entry **)
+ htab_find_slot (g->got_entries, &entry, INSERT);
+
+ if (*loc)
+ return TRUE;
+
+ entry.gotidx = g->local_gotno++;
+
+ *loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
+
+ if (! *loc)
+ return FALSE;
+
+ memcpy (*loc, &entry, sizeof entry);
+
+ return TRUE;
+}
+
+/* Compute the hash value of the bfd in a bfd2got hash entry. */
+
+static hashval_t
+mips_elf_bfd2got_entry_hash (entry_)
+ const PTR entry_;
+{
+ const struct mips_elf_bfd2got_hash *entry
+ = (struct mips_elf_bfd2got_hash *)entry_;
+
+ return entry->bfd->id;
+}
+
+/* Check whether two hash entries have the same bfd. */
+
+static int
+mips_elf_bfd2got_entry_eq (entry1, entry2)
+ const PTR entry1;
+ const PTR entry2;
+{
+ const struct mips_elf_bfd2got_hash *e1
+ = (const struct mips_elf_bfd2got_hash *)entry1;
+ const struct mips_elf_bfd2got_hash *e2
+ = (const struct mips_elf_bfd2got_hash *)entry2;
+
+ return e1->bfd == e2->bfd;
+}
+
+/* In a multi-got link, determine the GOT to be used for IBDF. G must
+ be the master GOT data. */
+
+static struct mips_got_info *
+mips_elf_got_for_ibfd (g, ibfd)
+ struct mips_got_info *g;
+ bfd *ibfd;
+{
+ struct mips_elf_bfd2got_hash e, *p;
+
+ if (! g->bfd2got)
+ return g;
+
+ e.bfd = ibfd;
+ p = (struct mips_elf_bfd2got_hash *) htab_find (g->bfd2got, &e);
+ return p ? p->g : NULL;
+}
+
+/* Create one separate got for each bfd that has entries in the global
+ got, such that we can tell how many local and global entries each
+ bfd requires. */
+
+static int
+mips_elf_make_got_per_bfd (entryp, p)
+ void **entryp;
+ void *p;
+{
+ struct mips_got_entry *entry = (struct mips_got_entry *)*entryp;
+ struct mips_elf_got_per_bfd_arg *arg = (struct mips_elf_got_per_bfd_arg *)p;
+ htab_t bfd2got = arg->bfd2got;
+ struct mips_got_info *g;
+ struct mips_elf_bfd2got_hash bfdgot_entry, *bfdgot;
+ void **bfdgotp;
+
+ /* Find the got_info for this GOT entry's input bfd. Create one if
+ none exists. */
+ bfdgot_entry.bfd = entry->abfd;
+ bfdgotp = htab_find_slot (bfd2got, &bfdgot_entry, INSERT);
+ bfdgot = (struct mips_elf_bfd2got_hash *)*bfdgotp;
+
+ if (bfdgot != NULL)
+ g = bfdgot->g;
+ else
+ {
+ bfdgot = (struct mips_elf_bfd2got_hash *)bfd_alloc
+ (arg->obfd, sizeof (struct mips_elf_bfd2got_hash));
+
+ if (bfdgot == NULL)
+ {
+ arg->obfd = 0;
+ return 0;
+ }
+
+ *bfdgotp = bfdgot;
+
+ bfdgot->bfd = entry->abfd;
+ bfdgot->g = g = (struct mips_got_info *)
+ bfd_alloc (arg->obfd, sizeof (struct mips_got_info));
+ if (g == NULL)
+ {
+ arg->obfd = 0;
+ return 0;
+ }
+
+ g->global_gotsym = NULL;
+ g->global_gotno = 0;
+ g->local_gotno = 0;
+ g->assigned_gotno = -1;
+ g->got_entries = htab_try_create (1, mips_elf_multi_got_entry_hash,
+ mips_elf_multi_got_entry_eq,
+ (htab_del) NULL);
+ if (g->got_entries == NULL)
+ {
+ arg->obfd = 0;
+ return 0;
+ }
+
+ g->bfd2got = NULL;
+ g->next = NULL;
+ }
+
+ /* Insert the GOT entry in the bfd's got entry hash table. */
+ entryp = htab_find_slot (g->got_entries, entry, INSERT);
+ if (*entryp != NULL)
+ return 1;
+
+ *entryp = entry;
+
+ if (entry->symndx >= 0 || entry->d.h->forced_local)
+ ++g->local_gotno;
+ else
+ ++g->global_gotno;
+
+ return 1;
+}
+
+/* Attempt to merge gots of different input bfds. Try to use as much
+ as possible of the primary got, since it doesn't require explicit
+ dynamic relocations, but don't use bfds that would reference global
+ symbols out of the addressable range. Failing the primary got,
+ attempt to merge with the current got, or finish the current got
+ and then make make the new got current. */
+
+static int
+mips_elf_merge_gots (bfd2got_, p)
+ void **bfd2got_;
+ void *p;
+{
+ struct mips_elf_bfd2got_hash *bfd2got
+ = (struct mips_elf_bfd2got_hash *)*bfd2got_;
+ struct mips_elf_got_per_bfd_arg *arg = (struct mips_elf_got_per_bfd_arg *)p;
+ unsigned int lcount = bfd2got->g->local_gotno;
+ unsigned int gcount = bfd2got->g->global_gotno;
+ unsigned int maxcnt = arg->max_count;
+
+ /* If we don't have a primary GOT and this is not too big, use it as
+ a starting point for the primary GOT. */
+ if (! arg->primary && lcount + gcount <= maxcnt)
+ {
+ arg->primary = bfd2got->g;
+ arg->primary_count = lcount + gcount;
+ }
+ /* If it looks like we can merge this bfd's entries with those of
+ the primary, merge them. The heuristics is conservative, but we
+ don't have to squeeze it too hard. */
+ else if (arg->primary
+ && (arg->primary_count + lcount + gcount) <= maxcnt)
+ {
+ struct mips_got_info *g = bfd2got->g;
+ int old_lcount = arg->primary->local_gotno;
+ int old_gcount = arg->primary->global_gotno;
+
+ bfd2got->g = arg->primary;
+
+ htab_traverse (g->got_entries,
+ mips_elf_make_got_per_bfd,
+ arg);
+ if (arg->obfd == NULL)
+ return 0;
+
+ htab_delete (g->got_entries);
+ /* We don't have to worry about releasing memory of the actual
+ got entries, since they're all in the master got_entries hash
+ table anyway. */
+
+ BFD_ASSERT (old_lcount + lcount == arg->primary->local_gotno);
+ BFD_ASSERT (old_gcount + gcount >= arg->primary->global_gotno);
+
+ arg->primary_count = arg->primary->local_gotno
+ + arg->primary->global_gotno;
+ }
+ /* If we can merge with the last-created got, do it. */
+ else if (arg->current
+ && arg->current_count + lcount + gcount <= maxcnt)
+ {
+ struct mips_got_info *g = bfd2got->g;
+ int old_lcount = arg->current->local_gotno;
+ int old_gcount = arg->current->global_gotno;
+
+ bfd2got->g = arg->current;
+
+ htab_traverse (g->got_entries,
+ mips_elf_make_got_per_bfd,
+ arg);
+ if (arg->obfd == NULL)
+ return 0;
+
+ htab_delete (g->got_entries);
+
+ BFD_ASSERT (old_lcount + lcount == arg->current->local_gotno);
+ BFD_ASSERT (old_gcount + gcount >= arg->current->global_gotno);
+
+ arg->current_count = arg->current->local_gotno
+ + arg->current->global_gotno;
+ }
+ /* Well, we couldn't merge, so create a new GOT. Don't check if it
+ fits; if it turns out that it doesn't, we'll get relocation
+ overflows anyway. */
+ else
+ {
+ bfd2got->g->next = arg->current;
+ arg->current = bfd2got->g;
+
+ arg->current_count = lcount + gcount;
+ }
+
+ return 1;
+}
+
+/* If passed a NULL mips_got_info in the argument, set the marker used
+ to tell whether a global symbol needs a got entry (in the primary
+ got) to the given VALUE.
+
+ If passed a pointer G to a mips_got_info in the argument (it must
+ not be the primary GOT), compute the offset from the beginning of
+ the (primary) GOT section to the entry in G corresponding to the
+ global symbol. G's assigned_gotno must contain the index of the
+ first available global GOT entry in G. VALUE must contain the size
+ of a GOT entry in bytes. For each global GOT entry that requires a
+ dynamic relocation, NEEDED_RELOCS is incremented, and the symbol is
+ marked as not elligible for lazy resolution through a function
+ stub. */
+static int
+mips_elf_set_global_got_offset (entryp, p)
+ void **entryp;
+ void *p;
+{
+ struct mips_got_entry *entry = (struct mips_got_entry *)*entryp;
+ struct mips_elf_set_global_got_offset_arg *arg
+ = (struct mips_elf_set_global_got_offset_arg *)p;
+ struct mips_got_info *g = arg->g;
+
+ if (entry->abfd != NULL && entry->symndx == -1
+ && entry->d.h->root.dynindx != -1)
+ {
+ if (g)
+ {
+ BFD_ASSERT (g->global_gotsym == NULL);
+
+ entry->gotidx = arg->value * (long) g->assigned_gotno++;
+ /* We can't do lazy update of GOT entries for
+ non-primary GOTs since the PLT entries don't use the
+ right offsets, so punt at it for now. */
+ entry->d.h->no_fn_stub = TRUE;
+ if (arg->info->shared
+ || (elf_hash_table (arg->info)->dynamic_sections_created
+ && ((entry->d.h->root.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ && ((entry->d.h->root.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ ++arg->needed_relocs;
+ }
+ else
+ entry->d.h->root.got.offset = arg->value;
+ }
+
+ return 1;
+}
+
+/* Follow indirect and warning hash entries so that each got entry
+ points to the final symbol definition. P must point to a pointer
+ to the hash table we're traversing. Since this traversal may
+ modify the hash table, we set this pointer to NULL to indicate
+ we've made a potentially-destructive change to the hash table, so
+ the traversal must be restarted. */
+static int
+mips_elf_resolve_final_got_entry (entryp, p)
+ void **entryp;
+ void *p;
+{
+ struct mips_got_entry *entry = (struct mips_got_entry *)*entryp;
+ htab_t got_entries = *(htab_t *)p;
+
+ if (entry->abfd != NULL && entry->symndx == -1)
+ {
+ struct mips_elf_link_hash_entry *h = entry->d.h;
+
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ if (entry->d.h == h)
+ return 1;
+
+ entry->d.h = h;
+
+ /* If we can't find this entry with the new bfd hash, re-insert
+ it, and get the traversal restarted. */
+ if (! htab_find (got_entries, entry))
+ {
+ htab_clear_slot (got_entries, entryp);
+ entryp = htab_find_slot (got_entries, entry, INSERT);
+ if (! *entryp)
+ *entryp = entry;
+ /* Abort the traversal, since the whole table may have
+ moved, and leave it up to the parent to restart the
+ process. */
+ *(htab_t *)p = NULL;
+ return 0;
+ }
+ /* We might want to decrement the global_gotno count, but it's
+ either too early or too late for that at this point. */
+ }
+
+ return 1;
+}
+
+/* Turn indirect got entries in a got_entries table into their final
+ locations. */
+static void
+mips_elf_resolve_final_got_entries (g)
+ struct mips_got_info *g;
+{
+ htab_t got_entries;
+
+ do
+ {
+ got_entries = g->got_entries;
+
+ htab_traverse (got_entries,
+ mips_elf_resolve_final_got_entry,
+ &got_entries);
+ }
+ while (got_entries == NULL);
+}
+
+/* Return the offset of an input bfd IBFD's GOT from the beginning of
+ the primary GOT. */
+static bfd_vma
+mips_elf_adjust_gp (abfd, g, ibfd)
+ bfd *abfd;
+ struct mips_got_info *g;
+ bfd *ibfd;
+{
+ if (g->bfd2got == NULL)
+ return 0;
+
+ g = mips_elf_got_for_ibfd (g, ibfd);
+ if (! g)
+ return 0;
+
+ BFD_ASSERT (g->next);
+
+ g = g->next;
+
+ return (g->local_gotno + g->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
+}
+
+/* Turn a single GOT that is too big for 16-bit addressing into
+ a sequence of GOTs, each one 16-bit addressable. */
+
+static bfd_boolean
+mips_elf_multi_got (abfd, info, g, got, pages)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ struct mips_got_info *g;
+ asection *got;
+ bfd_size_type pages;
+{
+ struct mips_elf_got_per_bfd_arg got_per_bfd_arg;
+ struct mips_elf_set_global_got_offset_arg set_got_offset_arg;
+ struct mips_got_info *gg;
+ unsigned int assign;
+
+ g->bfd2got = htab_try_create (1, mips_elf_bfd2got_entry_hash,
+ mips_elf_bfd2got_entry_eq,
+ (htab_del) NULL);
+ if (g->bfd2got == NULL)
+ return FALSE;
+
+ got_per_bfd_arg.bfd2got = g->bfd2got;
+ got_per_bfd_arg.obfd = abfd;
+ got_per_bfd_arg.info = info;
+
+ /* Count how many GOT entries each input bfd requires, creating a
+ map from bfd to got info while at that. */
+ mips_elf_resolve_final_got_entries (g);
+ htab_traverse (g->got_entries, mips_elf_make_got_per_bfd, &got_per_bfd_arg);
+ if (got_per_bfd_arg.obfd == NULL)
+ return FALSE;
+
+ got_per_bfd_arg.current = NULL;
+ got_per_bfd_arg.primary = NULL;
+ /* Taking out PAGES entries is a worst-case estimate. We could
+ compute the maximum number of pages that each separate input bfd
+ uses, but it's probably not worth it. */
+ got_per_bfd_arg.max_count = ((MIPS_ELF_GOT_MAX_SIZE (abfd)
+ / MIPS_ELF_GOT_SIZE (abfd))
+ - MIPS_RESERVED_GOTNO - pages);
+
+ /* Try to merge the GOTs of input bfds together, as long as they
+ don't seem to exceed the maximum GOT size, choosing one of them
+ to be the primary GOT. */
+ htab_traverse (g->bfd2got, mips_elf_merge_gots, &got_per_bfd_arg);
+ if (got_per_bfd_arg.obfd == NULL)
+ return FALSE;
+
+ /* If we find any suitable primary GOT, create an empty one. */
+ if (got_per_bfd_arg.primary == NULL)
+ {
+ g->next = (struct mips_got_info *)
+ bfd_alloc (abfd, sizeof (struct mips_got_info));
+ if (g->next == NULL)
+ return FALSE;
+
+ g->next->global_gotsym = NULL;
+ g->next->global_gotno = 0;
+ g->next->local_gotno = 0;
+ g->next->assigned_gotno = 0;
+ g->next->got_entries = htab_try_create (1, mips_elf_multi_got_entry_hash,
+ mips_elf_multi_got_entry_eq,
+ (htab_del) NULL);
+ if (g->next->got_entries == NULL)
+ return FALSE;
+ g->next->bfd2got = NULL;
+ }
+ else
+ g->next = got_per_bfd_arg.primary;
+ g->next->next = got_per_bfd_arg.current;
+
+ /* GG is now the master GOT, and G is the primary GOT. */
+ gg = g;
+ g = g->next;
+
+ /* Map the output bfd to the primary got. That's what we're going
+ to use for bfds that use GOT16 or GOT_PAGE relocations that we
+ didn't mark in check_relocs, and we want a quick way to find it.
+ We can't just use gg->next because we're going to reverse the
+ list. */
+ {
+ struct mips_elf_bfd2got_hash *bfdgot;
+ void **bfdgotp;
+
+ bfdgot = (struct mips_elf_bfd2got_hash *)bfd_alloc
+ (abfd, sizeof (struct mips_elf_bfd2got_hash));
+
+ if (bfdgot == NULL)
+ return FALSE;
+
+ bfdgot->bfd = abfd;
+ bfdgot->g = g;
+ bfdgotp = htab_find_slot (gg->bfd2got, bfdgot, INSERT);
+
+ BFD_ASSERT (*bfdgotp == NULL);
+ *bfdgotp = bfdgot;
+ }
+
+ /* The IRIX dynamic linker requires every symbol that is referenced
+ in a dynamic relocation to be present in the primary GOT, so
+ arrange for them to appear after those that are actually
+ referenced.
+
+ GNU/Linux could very well do without it, but it would slow down
+ the dynamic linker, since it would have to resolve every dynamic
+ symbol referenced in other GOTs more than once, without help from
+ the cache. Also, knowing that every external symbol has a GOT
+ helps speed up the resolution of local symbols too, so GNU/Linux
+ follows IRIX's practice.
+
+ The number 2 is used by mips_elf_sort_hash_table_f to count
+ global GOT symbols that are unreferenced in the primary GOT, with
+ an initial dynamic index computed from gg->assigned_gotno, where
+ the number of unreferenced global entries in the primary GOT is
+ preserved. */
+ if (1)
+ {
+ gg->assigned_gotno = gg->global_gotno - g->global_gotno;
+ g->global_gotno = gg->global_gotno;
+ set_got_offset_arg.value = 2;
+ }
+ else
+ {
+ /* This could be used for dynamic linkers that don't optimize
+ symbol resolution while applying relocations so as to use
+ primary GOT entries or assuming the symbol is locally-defined.
+ With this code, we assign lower dynamic indices to global
+ symbols that are not referenced in the primary GOT, so that
+ their entries can be omitted. */
+ gg->assigned_gotno = 0;
+ set_got_offset_arg.value = -1;
+ }
+
+ /* Reorder dynamic symbols as described above (which behavior
+ depends on the setting of VALUE). */
+ set_got_offset_arg.g = NULL;
+ htab_traverse (gg->got_entries, mips_elf_set_global_got_offset,
+ &set_got_offset_arg);
+ set_got_offset_arg.value = 1;
+ htab_traverse (g->got_entries, mips_elf_set_global_got_offset,
+ &set_got_offset_arg);
+ if (! mips_elf_sort_hash_table (info, 1))
+ return FALSE;
+
+ /* Now go through the GOTs assigning them offset ranges.
+ [assigned_gotno, local_gotno[ will be set to the range of local
+ entries in each GOT. We can then compute the end of a GOT by
+ adding local_gotno to global_gotno. We reverse the list and make
+ it circular since then we'll be able to quickly compute the
+ beginning of a GOT, by computing the end of its predecessor. To
+ avoid special cases for the primary GOT, while still preserving
+ assertions that are valid for both single- and multi-got links,
+ we arrange for the main got struct to have the right number of
+ global entries, but set its local_gotno such that the initial
+ offset of the primary GOT is zero. Remember that the primary GOT
+ will become the last item in the circular linked list, so it
+ points back to the master GOT. */
+ gg->local_gotno = -g->global_gotno;
+ gg->global_gotno = g->global_gotno;
+ assign = 0;
+ gg->next = gg;
+
+ do
+ {
+ struct mips_got_info *gn;
+
+ assign += MIPS_RESERVED_GOTNO;
+ g->assigned_gotno = assign;
+ g->local_gotno += assign + pages;
+ assign = g->local_gotno + g->global_gotno;
+
+ /* Take g out of the direct list, and push it onto the reversed
+ list that gg points to. */
+ gn = g->next;
+ g->next = gg->next;
+ gg->next = g;
+ g = gn;
+ }
+ while (g);
+
+ got->_raw_size = (gg->next->local_gotno
+ + gg->next->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
+
+ return TRUE;
+}
+
/* Returns the first relocation of type r_type found, beginning with
RELOCATION. RELEND is one-past-the-end of the relocation table. */
@@ -1937,9 +2820,10 @@ mips_elf_create_compact_rel_section (abfd, info)
/* Create the .got section to hold the global offset table. */
static bfd_boolean
-mips_elf_create_got_section (abfd, info)
+mips_elf_create_got_section (abfd, info, maybe_exclude)
bfd *abfd;
struct bfd_link_info *info;
+ bfd_boolean maybe_exclude;
{
flagword flags;
register asection *s;
@@ -1949,12 +2833,20 @@ mips_elf_create_got_section (abfd, info)
bfd_size_type amt;
/* This function may be called more than once. */
- if (mips_elf_got_section (abfd))
- return TRUE;
+ s = mips_elf_got_section (abfd, TRUE);
+ if (s)
+ {
+ if (! maybe_exclude)
+ s->flags &= ~SEC_EXCLUDE;
+ return TRUE;
+ }
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED);
+ if (maybe_exclude)
+ flags |= SEC_EXCLUDE;
+
s = bfd_make_section (abfd, ".got");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags)
@@ -1980,9 +2872,6 @@ mips_elf_create_got_section (abfd, info)
&& ! bfd_elf32_link_record_dynamic_symbol (info, h))
return FALSE;
- /* The first several global offset table entries are reserved. */
- s->_raw_size = MIPS_RESERVED_GOTNO * MIPS_ELF_GOT_SIZE (abfd);
-
amt = sizeof (struct mips_got_info);
g = (struct mips_got_info *) bfd_alloc (abfd, amt);
if (g == NULL)
@@ -1990,20 +2879,15 @@ mips_elf_create_got_section (abfd, info)
g->global_gotsym = NULL;
g->local_gotno = MIPS_RESERVED_GOTNO;
g->assigned_gotno = MIPS_RESERVED_GOTNO;
+ g->bfd2got = NULL;
+ g->next = NULL;
g->got_entries = htab_try_create (1, mips_elf_got_entry_hash,
mips_elf_got_entry_eq,
(htab_del) NULL);
if (g->got_entries == NULL)
return FALSE;
- if (elf_section_data (s) == NULL)
- {
- amt = sizeof (struct bfd_elf_section_data);
- s->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
- if (elf_section_data (s) == NULL)
- return FALSE;
- }
- elf_section_data (s)->tdata = (PTR) g;
- elf_section_data (s)->this_hdr.sh_flags
+ mips_elf_section_data (s)->u.got_info = g;
+ mips_elf_section_data (s)->elf.this_hdr.sh_flags
|= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
return TRUE;
@@ -2325,6 +3209,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
{
BFD_ASSERT (addend == 0);
g = mips_elf_global_got_index (elf_hash_table (info)->dynobj,
+ input_bfd,
(struct elf_link_hash_entry *) h);
if (! elf_hash_table(info)->dynamic_sections_created
|| (info->shared
@@ -2335,7 +3220,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
symbol is defined locally, or was forced to be local.
We must initialize this entry in the GOT. */
bfd *tmpbfd = elf_hash_table (info)->dynobj;
- asection *sgot = mips_elf_got_section(tmpbfd);
+ asection *sgot = mips_elf_got_section (tmpbfd, FALSE);
MIPS_ELF_PUT_WORD (tmpbfd, symbol + addend, sgot->contents + g);
}
}
@@ -2345,14 +3230,15 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
else
{
- g = mips_elf_local_got_index (abfd, info, symbol + addend);
+ g = mips_elf_local_got_index (abfd, input_bfd,
+ info, symbol + addend);
if (g == MINUS_ONE)
return bfd_reloc_outofrange;
}
/* Convert GOT indices to actual offsets. */
g = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- abfd, g);
+ abfd, input_bfd, g);
break;
case R_MIPS_HI16:
@@ -2363,6 +3249,11 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
case R_MIPS_LITERAL:
gp0 = _bfd_get_gp_value (input_bfd);
gp = _bfd_get_gp_value (abfd);
+ if (elf_hash_table (info)->dynobj)
+ gp += mips_elf_adjust_gp (abfd,
+ mips_elf_got_info
+ (elf_hash_table (info)->dynobj, NULL),
+ input_bfd);
break;
default:
@@ -2535,12 +3426,13 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
follows. */
forced = ! mips_elf_local_relocation_p (input_bfd, relocation,
local_sections, FALSE);
- value = mips_elf_got16_entry (abfd, info, symbol + addend, forced);
+ value = mips_elf_got16_entry (abfd, input_bfd, info,
+ symbol + addend, forced);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
value
= mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- abfd, value);
+ abfd, input_bfd, value);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
}
@@ -2579,16 +3471,16 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
case R_MIPS_GOT_PAGE:
- value = mips_elf_got_page (abfd, info, symbol + addend, NULL);
+ value = mips_elf_got_page (abfd, input_bfd, info, symbol + addend, NULL);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
value = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- abfd, value);
+ abfd, input_bfd, value);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
case R_MIPS_GOT_OFST:
- mips_elf_got_page (abfd, info, symbol + addend, &value);
+ mips_elf_got_page (abfd, input_bfd, info, symbol + addend, &value);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -2859,7 +3751,7 @@ mips_elf_allocate_dynamic_relocations (abfd, n)
{
asection *s;
- s = bfd_get_section_by_name (abfd, ".rel.dyn");
+ s = mips_elf_rel_dyn_section (abfd, FALSE);
BFD_ASSERT (s != NULL);
if (s->_raw_size == 0)
@@ -2896,7 +3788,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
r_type = ELF_R_TYPE (output_bfd, rel->r_info);
dynobj = elf_hash_table (info)->dynobj;
- sreloc = bfd_get_section_by_name (dynobj, ".rel.dyn");
+ sreloc = mips_elf_rel_dyn_section (dynobj, FALSE);
BFD_ASSERT (sreloc != NULL);
BFD_ASSERT (sreloc->contents != NULL);
BFD_ASSERT (sreloc->reloc_count * MIPS_ELF_REL_SIZE (output_bfd)
@@ -2934,11 +3826,9 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
}
#endif
- if (outrel[0].r_offset == (bfd_vma) -1)
+ if (outrel[0].r_offset == (bfd_vma) -1
+ || outrel[0].r_offset == (bfd_vma) -2)
skip = TRUE;
- /* FIXME: For -2 runtime relocation needs to be skipped, but
- properly resolved statically and installed. */
- BFD_ASSERT (outrel[0].r_offset != (bfd_vma) -2);
/* If we've decided to skip this relocation, just output an empty
record. Note that R_MIPS_NONE == 0, so that this call to memset
@@ -3080,32 +3970,6 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
return TRUE;
}
-/* Return the ISA for a MIPS e_flags value. */
-
-static INLINE int
-elf_mips_isa (flags)
- flagword flags;
-{
- switch (flags & EF_MIPS_ARCH)
- {
- case E_MIPS_ARCH_1:
- return 1;
- case E_MIPS_ARCH_2:
- return 2;
- case E_MIPS_ARCH_3:
- return 3;
- case E_MIPS_ARCH_4:
- return 4;
- case E_MIPS_ARCH_5:
- return 5;
- case E_MIPS_ARCH_32:
- return 32;
- case E_MIPS_ARCH_64:
- return 64;
- }
- return 4;
-}
-
/* Return the MACH for a MIPS e_flags value. */
unsigned long
@@ -3172,6 +4036,10 @@ _bfd_elf_mips_mach (flags)
case E_MIPS_ARCH_64:
return bfd_mach_mipsisa64;
break;
+
+ case E_MIPS_ARCH_32R2:
+ return bfd_mach_mipsisa32r2;
+ break;
}
}
@@ -3330,19 +4198,19 @@ _bfd_mips_elf_section_processing (abfd, hdr)
if (hdr->sh_type == SHT_MIPS_OPTIONS
&& hdr->bfd_section != NULL
- && elf_section_data (hdr->bfd_section) != NULL
- && elf_section_data (hdr->bfd_section)->tdata != NULL)
+ && mips_elf_section_data (hdr->bfd_section) != NULL
+ && mips_elf_section_data (hdr->bfd_section)->u.tdata != NULL)
{
bfd_byte *contents, *l, *lend;
- /* We stored the section contents in the elf_section_data tdata
- field in the set_section_contents routine. We save the
- section contents so that we don't have to read them again.
+ /* We stored the section contents in the tdata field in the
+ set_section_contents routine. We save the section contents
+ so that we don't have to read them again.
At this point we know that elf_gp is set, so we can look
through the section contents to see if there is an
ODK_REGINFO structure. */
- contents = (bfd_byte *) elf_section_data (hdr->bfd_section)->tdata;
+ contents = mips_elf_section_data (hdr->bfd_section)->u.tdata;
l = contents;
lend = contents + hdr->sh_size;
while (l + sizeof (Elf_External_Options) <= lend)
@@ -3732,8 +4600,7 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
esd->rel_hdr2 = (Elf_Internal_Shdr *) bfd_zalloc (abfd, amt);
if (!esd->rel_hdr2)
return FALSE;
- _bfd_elf_init_reloc_shdr (abfd, esd->rel_hdr2, sec,
- !elf_section_data (sec)->use_rela_p);
+ _bfd_elf_init_reloc_shdr (abfd, esd->rel_hdr2, sec, !sec->use_rela_p);
}
return TRUE;
@@ -3975,7 +4842,10 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
}
/* We need to create .got section. */
- if (! mips_elf_create_got_section (abfd, info))
+ if (! mips_elf_create_got_section (abfd, info, FALSE))
+ return FALSE;
+
+ if (! mips_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE))
return FALSE;
/* Create the .msym section on IRIX6. It is used by the dynamic
@@ -4304,13 +5174,13 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
}
else
{
- sgot = mips_elf_got_section (dynobj);
+ sgot = mips_elf_got_section (dynobj, FALSE);
if (sgot == NULL)
g = NULL;
else
{
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
+ BFD_ASSERT (mips_elf_section_data (sgot) != NULL);
+ g = mips_elf_section_data (sgot)->u.got_info;
BFD_ASSERT (g != NULL);
}
}
@@ -4365,7 +5235,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
case R_MIPS_GOT_DISP:
if (dynobj == NULL)
elf_hash_table (info)->dynobj = dynobj = abfd;
- if (! mips_elf_create_got_section (dynobj, info))
+ if (! mips_elf_create_got_section (dynobj, info, FALSE))
return FALSE;
g = mips_elf_got_info (dynobj, &sgot);
break;
@@ -4388,8 +5258,6 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
|| r_type == R_MIPS_GOT_LO16
|| r_type == R_MIPS_GOT_DISP))
{
- struct mips_got_entry entry, **loc;
-
/* We may need a local GOT entry for this relocation. We
don't count R_MIPS_GOT_PAGE because we can estimate the
maximum number of pages needed by looking at the size of
@@ -4397,26 +5265,9 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
R_MIPS_CALL16. We don't count R_MIPS_GOT_HI16, or
R_MIPS_CALL_HI16 because these are always followed by an
R_MIPS_GOT_LO16 or R_MIPS_CALL_LO16. */
-
- entry.abfd = abfd;
- entry.symndx = r_symndx;
- entry.addend = rel->r_addend;
- loc = (struct mips_got_entry **)
- htab_find_slot (g->got_entries, &entry, INSERT);
-
- if (*loc == NULL)
- {
- entry.gotidx = g->local_gotno++;
-
- *loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
-
- if (! *loc)
- return FALSE;
-
- memcpy (*loc, &entry, sizeof entry);
-
- sgot->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
- }
+ if (! mips_elf_record_local_got_symbol (abfd, r_symndx,
+ rel->r_addend, g))
+ return FALSE;
}
switch (r_type)
@@ -4437,7 +5288,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
/* This symbol requires a global offset table entry. */
- if (! mips_elf_record_global_got_symbol (h, info, g))
+ if (! mips_elf_record_global_got_symbol (h, abfd, info, g))
return FALSE;
/* We need a stub, not a plt entry for the undefined
@@ -4453,7 +5304,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
case R_MIPS_GOT_LO16:
case R_MIPS_GOT_DISP:
/* This symbol requires a global offset table entry. */
- if (h && ! mips_elf_record_global_got_symbol (h, info, g))
+ if (h && ! mips_elf_record_global_got_symbol (h, abfd, info, g))
return FALSE;
break;
@@ -4465,24 +5316,9 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
{
if (sreloc == NULL)
{
- const char *dname = ".rel.dyn";
-
- sreloc = bfd_get_section_by_name (dynobj, dname);
+ sreloc = mips_elf_rel_dyn_section (dynobj, TRUE);
if (sreloc == NULL)
- {
- sreloc = bfd_make_section (dynobj, dname);
- if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || ! bfd_set_section_alignment (dynobj, sreloc,
- 4))
- return FALSE;
- }
+ return FALSE;
}
#define MIPS_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
if (info->shared)
@@ -4517,9 +5353,16 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
this symbol, a symbol must have a dynamic symbol
table index greater that DT_MIPS_GOTSYM if there are
dynamic relocations against it. */
- if (h != NULL
- && ! mips_elf_record_global_got_symbol (h, info, g))
- return FALSE;
+ if (h != NULL)
+ {
+ if (dynobj == NULL)
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! mips_elf_create_got_section (dynobj, info, TRUE))
+ return FALSE;
+ g = mips_elf_got_info (dynobj, &sgot);
+ if (! mips_elf_record_global_got_symbol (h, abfd, info, g))
+ return FALSE;
+ }
}
if (SGI_COMPAT (abfd))
@@ -4711,19 +5554,86 @@ _bfd_mips_elf_always_size_sections (output_bfd, info)
{
asection *ri;
+ bfd *dynobj;
+ asection *s;
+ struct mips_got_info *g;
+ int i;
+ bfd_size_type loadable_size = 0;
+ bfd_size_type local_gotno;
+ bfd *sub;
+
/* The .reginfo section has a fixed size. */
ri = bfd_get_section_by_name (output_bfd, ".reginfo");
if (ri != NULL)
bfd_set_section_size (output_bfd, ri,
(bfd_size_type) sizeof (Elf32_External_RegInfo));
- if (info->relocateable
- || ! mips_elf_hash_table (info)->mips16_stubs_seen)
+ if (! (info->relocateable
+ || ! mips_elf_hash_table (info)->mips16_stubs_seen))
+ mips_elf_link_hash_traverse (mips_elf_hash_table (info),
+ mips_elf_check_mips16_stubs,
+ (PTR) NULL);
+
+ dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj == NULL)
+ /* Relocatable links don't have it. */
+ return TRUE;
+
+ g = mips_elf_got_info (dynobj, &s);
+ if (s == NULL)
return TRUE;
- mips_elf_link_hash_traverse (mips_elf_hash_table (info),
- mips_elf_check_mips16_stubs,
- (PTR) NULL);
+ /* Calculate the total loadable size of the output. That
+ will give us the maximum number of GOT_PAGE entries
+ required. */
+ for (sub = info->input_bfds; sub; sub = sub->link_next)
+ {
+ asection *subsection;
+
+ for (subsection = sub->sections;
+ subsection;
+ subsection = subsection->next)
+ {
+ if ((subsection->flags & SEC_ALLOC) == 0)
+ continue;
+ loadable_size += ((subsection->_raw_size + 0xf)
+ &~ (bfd_size_type) 0xf);
+ }
+ }
+
+ /* There has to be a global GOT entry for every symbol with
+ a dynamic symbol table index of DT_MIPS_GOTSYM or
+ higher. Therefore, it make sense to put those symbols
+ that need GOT entries at the end of the symbol table. We
+ do that here. */
+ if (! mips_elf_sort_hash_table (info, 1))
+ return FALSE;
+
+ if (g->global_gotsym != NULL)
+ i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx;
+ else
+ /* If there are no global symbols, or none requiring
+ relocations, then GLOBAL_GOTSYM will be NULL. */
+ i = 0;
+
+ /* In the worst case, we'll get one stub per dynamic symbol, plus
+ one to account for the dummy entry at the end required by IRIX
+ rld. */
+ loadable_size += MIPS_FUNCTION_STUB_SIZE * (i + 1);
+
+ /* Assume there are two loadable segments consisting of
+ contiguous sections. Is 5 enough? */
+ local_gotno = (loadable_size >> 16) + 5;
+
+ g->local_gotno += local_gotno;
+ s->_raw_size += g->local_gotno * MIPS_ELF_GOT_SIZE (output_bfd);
+
+ g->global_gotno = i;
+ s->_raw_size += i * MIPS_ELF_GOT_SIZE (output_bfd);
+
+ if (s->_raw_size > MIPS_ELF_GOT_MAX_SIZE (output_bfd)
+ && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno))
+ return FALSE;
return TRUE;
}
@@ -4738,7 +5648,6 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
bfd *dynobj;
asection *s;
bfd_boolean reltext;
- struct mips_got_info *g = NULL;
dynobj = elf_hash_table (info)->dynobj;
BFD_ASSERT (dynobj != NULL);
@@ -4814,61 +5723,64 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
to copy relocs into the output file. */
if (strcmp (name, ".rel.dyn") != 0)
s->reloc_count = 0;
+
+ /* If combreloc is enabled, elf_link_sort_relocs() will
+ sort relocations, but in a different way than we do,
+ and before we're done creating relocations. Also, it
+ will move them around between input sections'
+ relocation's contents, so our sorting would be
+ broken, so don't let it run. */
+ info->combreloc = 0;
}
}
else if (strncmp (name, ".got", 4) == 0)
{
- int i;
- bfd_size_type loadable_size = 0;
- bfd_size_type local_gotno;
- bfd *sub;
-
- BFD_ASSERT (elf_section_data (s) != NULL);
- g = (struct mips_got_info *) elf_section_data (s)->tdata;
- BFD_ASSERT (g != NULL);
-
- /* Calculate the total loadable size of the output. That
- will give us the maximum number of GOT_PAGE entries
- required. */
- for (sub = info->input_bfds; sub; sub = sub->link_next)
+ /* _bfd_mips_elf_always_size_sections() has already done
+ most of the work, but some symbols may have been mapped
+ to versions that we must now resolve in the got_entries
+ hash tables. */
+ struct mips_got_info *gg = mips_elf_got_info (dynobj, NULL);
+ struct mips_got_info *g = gg;
+ struct mips_elf_set_global_got_offset_arg set_got_offset_arg;
+ unsigned int needed_relocs = 0;
+
+ if (gg->next)
{
- asection *subsection;
+ set_got_offset_arg.value = MIPS_ELF_GOT_SIZE (output_bfd);
+ set_got_offset_arg.info = info;
- for (subsection = sub->sections;
- subsection;
- subsection = subsection->next)
+ mips_elf_resolve_final_got_entries (gg);
+ for (g = gg->next; g && g->next != gg; g = g->next)
{
- if ((subsection->flags & SEC_ALLOC) == 0)
- continue;
- loadable_size += ((subsection->_raw_size + 0xf)
- &~ (bfd_size_type) 0xf);
+ unsigned int save_assign;
+
+ mips_elf_resolve_final_got_entries (g);
+
+ /* Assign offsets to global GOT entries. */
+ save_assign = g->assigned_gotno;
+ g->assigned_gotno = g->local_gotno;
+ set_got_offset_arg.g = g;
+ set_got_offset_arg.needed_relocs = 0;
+ htab_traverse (g->got_entries,
+ mips_elf_set_global_got_offset,
+ &set_got_offset_arg);
+ needed_relocs += set_got_offset_arg.needed_relocs;
+ BFD_ASSERT (g->assigned_gotno - g->local_gotno
+ <= g->global_gotno);
+
+ g->assigned_gotno = save_assign;
+ if (info->shared)
+ {
+ needed_relocs += g->local_gotno - g->assigned_gotno;
+ BFD_ASSERT (g->assigned_gotno == g->next->local_gotno
+ + g->next->global_gotno
+ + MIPS_RESERVED_GOTNO);
+ }
}
- }
- loadable_size += MIPS_FUNCTION_STUB_SIZE;
-
- /* Assume there are two loadable segments consisting of
- contiguous sections. Is 5 enough? */
- local_gotno = (loadable_size >> 16) + 5;
-
- g->local_gotno += local_gotno;
- s->_raw_size += local_gotno * MIPS_ELF_GOT_SIZE (dynobj);
-
- /* There has to be a global GOT entry for every symbol with
- a dynamic symbol table index of DT_MIPS_GOTSYM or
- higher. Therefore, it make sense to put those symbols
- that need GOT entries at the end of the symbol table. We
- do that here. */
- if (! mips_elf_sort_hash_table (info, 1))
- return FALSE;
- if (g->global_gotsym != NULL)
- i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx;
- else
- /* If there are no global symbols, or none requiring
- relocations, then GLOBAL_GOTSYM will be NULL. */
- i = 0;
- g->global_gotno = i;
- s->_raw_size += i * MIPS_ELF_GOT_SIZE (dynobj);
+ if (needed_relocs)
+ mips_elf_allocate_dynamic_relocations (dynobj, needed_relocs);
+ }
}
else if (strcmp (name, MIPS_ELF_STUB_SECTION_NAME (output_bfd)) == 0)
{
@@ -4953,7 +5865,7 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
return FALSE;
- if (bfd_get_section_by_name (dynobj, ".rel.dyn"))
+ if (mips_elf_rel_dyn_section (dynobj, FALSE))
{
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0))
return FALSE;
@@ -5496,7 +6408,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_vma gval;
asection *sgot;
asection *smsym;
- struct mips_got_info *g;
+ struct mips_got_info *g, *gg;
const char *name;
struct mips_elf_link_hash_entry *mh;
@@ -5544,10 +6456,10 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
BFD_ASSERT (h->dynindx != -1
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0);
- sgot = mips_elf_got_section (dynobj);
+ sgot = mips_elf_got_section (dynobj, FALSE);
BFD_ASSERT (sgot != NULL);
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
+ BFD_ASSERT (mips_elf_section_data (sgot) != NULL);
+ g = mips_elf_section_data (sgot)->u.got_info;
BFD_ASSERT (g != NULL);
/* Run through the global symbol table, creating GOT entries for all
@@ -5568,15 +6480,69 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
That's because such the functions are now no longer defined
in a shared object.) */
- if (info->shared && h->root.type == bfd_link_hash_undefined)
+ if ((info->shared && h->root.type == bfd_link_hash_undefined)
+ || h->root.type == bfd_link_hash_undefweak)
value = 0;
else
value = h->root.u.def.value;
}
- offset = mips_elf_global_got_index (dynobj, h);
+ offset = mips_elf_global_got_index (dynobj, output_bfd, h);
MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
}
+ if (g->next && h->dynindx != -1)
+ {
+ struct mips_got_entry e, *p;
+ bfd_vma offset;
+ bfd_vma value;
+ Elf_Internal_Rela rel[3];
+ bfd_vma addend = 0;
+
+ gg = g;
+
+ e.abfd = output_bfd;
+ e.symndx = -1;
+ e.d.h = (struct mips_elf_link_hash_entry *)h;
+
+ if (info->shared
+ || h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)
+ value = 0;
+ else if (sym->st_value)
+ value = sym->st_value;
+ else
+ value = h->root.u.def.value;
+
+ memset (rel, 0, sizeof (rel));
+ rel[0].r_info = ELF_R_INFO (output_bfd, 0, R_MIPS_REL32);
+
+ for (g = g->next; g->next != gg; g = g->next)
+ {
+ if (g->got_entries
+ && (p = (struct mips_got_entry *) htab_find (g->got_entries,
+ &e)))
+ {
+ offset = p->gotidx;
+ rel[0].r_offset = rel[1].r_offset = rel[2].r_offset = offset;
+
+ MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
+
+ if ((info->shared
+ || (elf_hash_table (info)->dynamic_sections_created
+ && p->d.h != NULL
+ && ((p->d.h->root.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ && ((p->d.h->root.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ && ! (mips_elf_create_dynamic_relocation
+ (output_bfd, info, rel,
+ e.d.h, NULL, value, &addend, sgot)))
+ return FALSE;
+ BFD_ASSERT (addend == 0);
+ }
+ }
+ }
+
/* Create a .msym entry, if appropriate. */
smsym = bfd_get_section_by_name (dynobj, ".msym");
if (smsym)
@@ -5683,19 +6649,21 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
bfd *dynobj;
asection *sdyn;
asection *sgot;
- struct mips_got_info *g;
+ struct mips_got_info *gg, *g;
dynobj = elf_hash_table (info)->dynobj;
sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
- sgot = bfd_get_section_by_name (dynobj, ".got");
+ sgot = mips_elf_got_section (dynobj, FALSE);
if (sgot == NULL)
- g = NULL;
+ gg = g = NULL;
else
{
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
+ BFD_ASSERT (mips_elf_section_data (sgot) != NULL);
+ gg = mips_elf_section_data (sgot)->u.got_info;
+ BFD_ASSERT (gg != NULL);
+ g = mips_elf_got_for_ibfd (gg, output_bfd);
BFD_ASSERT (g != NULL);
}
@@ -5725,7 +6693,7 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
switch (dyn.d_tag)
{
case DT_RELENT:
- s = (bfd_get_section_by_name (dynobj, ".rel.dyn"));
+ s = mips_elf_rel_dyn_section (dynobj, FALSE);
BFD_ASSERT (s != NULL);
dyn.d_un.d_val = MIPS_ELF_REL_SIZE (dynobj);
break;
@@ -5811,9 +6779,9 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
break;
case DT_MIPS_GOTSYM:
- if (g->global_gotsym)
+ if (gg->global_gotsym)
{
- dyn.d_un.d_val = g->global_gotsym->dynindx;
+ dyn.d_un.d_val = gg->global_gotsym->dynindx;
break;
}
/* In case if we don't have global got symbols we default
@@ -5876,6 +6844,41 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
elf_section_data (sgot->output_section)->this_hdr.sh_entsize
= MIPS_ELF_GOT_SIZE (output_bfd);
+ /* Generate dynamic relocations for the non-primary gots. */
+ if (gg != NULL && gg->next)
+ {
+ Elf_Internal_Rela rel[3];
+ bfd_vma addend = 0;
+
+ memset (rel, 0, sizeof (rel));
+ rel[0].r_info = ELF_R_INFO (output_bfd, 0, R_MIPS_REL32);
+
+ for (g = gg->next; g->next != gg; g = g->next)
+ {
+ bfd_vma index = g->next->local_gotno + g->next->global_gotno;
+
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0, sgot->contents
+ + index++ * MIPS_ELF_GOT_SIZE (output_bfd));
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0x80000000, sgot->contents
+ + index++ * MIPS_ELF_GOT_SIZE (output_bfd));
+
+ if (! info->shared)
+ continue;
+
+ while (index < g->assigned_gotno)
+ {
+ rel[0].r_offset = rel[1].r_offset = rel[2].r_offset
+ = index++ * MIPS_ELF_GOT_SIZE (output_bfd);
+ if (!(mips_elf_create_dynamic_relocation
+ (output_bfd, info, rel, NULL,
+ bfd_abs_section_ptr,
+ 0, &addend, sgot)))
+ return FALSE;
+ BFD_ASSERT (addend == 0);
+ }
+ }
+ }
+
{
asection *smsym;
asection *s;
@@ -5938,43 +6941,35 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
/* We need to sort the entries of the dynamic relocation section. */
- if (!ABI_64_P (output_bfd))
+ s = mips_elf_rel_dyn_section (dynobj, FALSE);
+
+ if (s != NULL
+ && s->_raw_size > (bfd_vma)2 * MIPS_ELF_REL_SIZE (output_bfd))
{
- asection *reldyn;
+ reldyn_sorting_bfd = output_bfd;
- reldyn = bfd_get_section_by_name (dynobj, ".rel.dyn");
- if (reldyn != NULL && reldyn->reloc_count > 2)
- {
- reldyn_sorting_bfd = output_bfd;
- qsort ((Elf32_External_Rel *) reldyn->contents + 1,
- (size_t) reldyn->reloc_count - 1,
- sizeof (Elf32_External_Rel), sort_dynamic_relocs);
- }
+ if (ABI_64_P (output_bfd))
+ qsort ((Elf64_External_Rel *) s->contents + 1,
+ (size_t) s->reloc_count - 1,
+ sizeof (Elf64_Mips_External_Rel), sort_dynamic_relocs_64);
+ else
+ qsort ((Elf32_External_Rel *) s->contents + 1,
+ (size_t) s->reloc_count - 1,
+ sizeof (Elf32_External_Rel), sort_dynamic_relocs);
}
-
- /* Clean up a first relocation in .rel.dyn. */
- s = bfd_get_section_by_name (dynobj, ".rel.dyn");
- if (s != NULL && s->_raw_size > 0)
- memset (s->contents, 0, MIPS_ELF_REL_SIZE (dynobj));
}
return TRUE;
}
-/* The final processing done just before writing out a MIPS ELF object
- file. This gets the MIPS architecture right based on the machine
- number. This is used by both the 32-bit and the 64-bit ABI. */
-void
-_bfd_mips_elf_final_write_processing (abfd, linker)
+/* Set ABFD's EF_MIPS_ARCH and EF_MIPS_MACH flags. */
+
+static void
+mips_set_isa_flags (abfd)
bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
{
- unsigned long val;
- unsigned int i;
- Elf_Internal_Shdr **hdrpp;
- const char *name;
- asection *sec;
+ flagword val;
switch (bfd_get_mach (abfd))
{
@@ -6047,11 +7042,38 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
case bfd_mach_mipsisa64:
val = E_MIPS_ARCH_64;
- }
+ break;
+ case bfd_mach_mipsisa32r2:
+ val = E_MIPS_ARCH_32R2;
+ break;
+ }
elf_elfheader (abfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
elf_elfheader (abfd)->e_flags |= val;
+}
+
+
+/* The final processing done just before writing out a MIPS ELF object
+ file. This gets the MIPS architecture right based on the machine
+ number. This is used by both the 32-bit and the 64-bit ABI. */
+
+void
+_bfd_mips_elf_final_write_processing (abfd, linker)
+ bfd *abfd;
+ bfd_boolean linker ATTRIBUTE_UNUSED;
+{
+ unsigned int i;
+ Elf_Internal_Shdr **hdrpp;
+ const char *name;
+ asection *sec;
+
+ /* Keep the existing EF_MIPS_MACH and EF_MIPS_ARCH flags if the former
+ is nonzero. This is for compatibility with old objects, which used
+ a combination of a 32-bit EF_MIPS_ARCH and a 64-bit EF_MIPS_MACH. */
+ if ((elf_elfheader (abfd)->e_flags & EF_MIPS_MACH) == 0)
+ mips_set_isa_flags (abfd);
+
/* Set the sh_info field for .gptab sections and other appropriate
info for each special section. */
for (i = 1, hdrpp = elf_elfsections (abfd) + 1;
@@ -6502,14 +7524,57 @@ _bfd_mips_elf_hide_symbol (info, entry, force_local)
h->forced_local = TRUE;
dynobj = elf_hash_table (info)->dynobj;
- got = bfd_get_section_by_name (dynobj, ".got");
- g = (struct mips_got_info *) elf_section_data (got)->tdata;
+ got = mips_elf_got_section (dynobj, FALSE);
+ g = mips_elf_section_data (got)->u.got_info;
- _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
+ if (g->next)
+ {
+ struct mips_got_entry e;
+ struct mips_got_info *gg = g;
+
+ /* Since we're turning what used to be a global symbol into a
+ local one, bump up the number of local entries of each GOT
+ that had an entry for it. This will automatically decrease
+ the number of global entries, since global_gotno is actually
+ the upper limit of global entries. */
+ e.abfd = dynobj;
+ e.symndx = -1;
+ e.d.h = h;
+
+ for (g = g->next; g != gg; g = g->next)
+ if (htab_find (g->got_entries, &e))
+ {
+ BFD_ASSERT (g->global_gotno > 0);
+ g->local_gotno++;
+ g->global_gotno--;
+ }
+
+ /* If this was a global symbol forced into the primary GOT, we
+ no longer need an entry for it. We can't release the entry
+ at this point, but we must at least stop counting it as one
+ of the symbols that required a forced got entry. */
+ if (h->root.got.offset == 2)
+ {
+ BFD_ASSERT (gg->assigned_gotno > 0);
+ gg->assigned_gotno--;
+ }
+ }
+ else if (g->global_gotno == 0 && g->global_gotsym == NULL)
+ /* If we haven't got through GOT allocation yet, just bump up the
+ number of local entries, as this symbol won't be counted as
+ global. */
+ g->local_gotno++;
+ else if (h->root.got.offset == 1)
+ {
+ /* If we're past non-multi-GOT allocation and this symbol had
+ been marked for a global got entry, give it a local entry
+ instead. */
+ BFD_ASSERT (g->global_gotno > 0);
+ g->local_gotno++;
+ g->global_gotno--;
+ }
- /* FIXME: Do we allocate too much GOT space here? */
- g->local_gotno++;
- got->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
+ _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
}
#define PDR_SIZE 32
@@ -6564,7 +7629,7 @@ _bfd_mips_elf_discard_info (abfd, cookie, info)
if (skip != 0)
{
- elf_section_data (o)->tdata = tdata;
+ mips_elf_section_data (o)->u.tdata = tdata;
o->_cooked_size = o->_raw_size - skip * PDR_SIZE;
ret = TRUE;
}
@@ -6598,7 +7663,7 @@ _bfd_mips_elf_write_section (output_bfd, sec, contents)
if (strcmp (sec->name, ".pdr") != 0)
return FALSE;
- if (elf_section_data (sec)->tdata == NULL)
+ if (mips_elf_section_data (sec)->u.tdata == NULL)
return FALSE;
to = contents;
@@ -6607,7 +7672,7 @@ _bfd_mips_elf_write_section (output_bfd, sec, contents)
from < end;
from += PDR_SIZE, i++)
{
- if (((unsigned char *) elf_section_data (sec)->tdata)[i] == 1)
+ if ((mips_elf_section_data (sec)->u.tdata)[i] == 1)
continue;
if (to != from)
memcpy (to, from, PDR_SIZE);
@@ -6757,7 +7822,7 @@ _bfd_mips_elf_set_section_contents (abfd, section, location, offset, count)
if (elf_section_data (section) == NULL)
return FALSE;
}
- c = (bfd_byte *) elf_section_data (section)->tdata;
+ c = mips_elf_section_data (section)->u.tdata;
if (c == NULL)
{
bfd_size_type size;
@@ -6769,7 +7834,7 @@ _bfd_mips_elf_set_section_contents (abfd, section, location, offset, count)
c = (bfd_byte *) bfd_zalloc (abfd, size);
if (c == NULL)
return FALSE;
- elf_section_data (section)->tdata = (PTR) c;
+ mips_elf_section_data (section)->u.tdata = c;
}
memcpy (c + offset, location, (size_t) count);
@@ -7068,8 +8133,8 @@ _bfd_mips_elf_final_link (abfd, info)
/* Make sure we didn't grow the global .got region. */
dynobj = elf_hash_table (info)->dynobj;
- got = bfd_get_section_by_name (dynobj, ".got");
- g = (struct mips_got_info *) elf_section_data (got)->tdata;
+ got = mips_elf_got_section (dynobj, FALSE);
+ g = mips_elf_section_data (got)->u.got_info;
if (g->global_gotsym != NULL)
BFD_ASSERT ((elf_hash_table (info)->dynsymcount
@@ -7720,26 +8785,97 @@ _bfd_mips_elf_final_link (abfd, info)
return TRUE;
}
-/* Return TRUE if machine EXTENSION is an extension of machine BASE,
- meaning that it should be safe to link code for the two machines
- and set the output machine to EXTENSION. EXTENSION and BASE are
- both submasks of EF_MIPS_MACH. */
+/* Structure for saying that BFD machine EXTENSION extends BASE. */
+
+struct mips_mach_extension {
+ unsigned long extension, base;
+};
+
+
+/* An array describing how BFD machines relate to one another. The entries
+ are ordered topologically with MIPS I extensions listed last. */
+
+static const struct mips_mach_extension mips_mach_extensions[] = {
+ /* MIPS64 extensions. */
+ { bfd_mach_mips_sb1, bfd_mach_mipsisa64 },
+
+ /* MIPS V extensions. */
+ { bfd_mach_mipsisa64, bfd_mach_mips5 },
+
+ /* R10000 extensions. */
+ { bfd_mach_mips12000, bfd_mach_mips10000 },
+
+ /* R5000 extensions. Note: the vr5500 ISA is an extension of the core
+ vr5400 ISA, but doesn't include the multimedia stuff. It seems
+ better to allow vr5400 and vr5500 code to be merged anyway, since
+ many libraries will just use the core ISA. Perhaps we could add
+ some sort of ASE flag if this ever proves a problem. */
+ { bfd_mach_mips5500, bfd_mach_mips5400 },
+ { bfd_mach_mips5400, bfd_mach_mips5000 },
+
+ /* MIPS IV extensions. */
+ { bfd_mach_mips5, bfd_mach_mips8000 },
+ { bfd_mach_mips10000, bfd_mach_mips8000 },
+ { bfd_mach_mips5000, bfd_mach_mips8000 },
+
+ /* VR4100 extensions. */
+ { bfd_mach_mips4120, bfd_mach_mips4100 },
+ { bfd_mach_mips4111, bfd_mach_mips4100 },
+
+ /* MIPS III extensions. */
+ { bfd_mach_mips8000, bfd_mach_mips4000 },
+ { bfd_mach_mips4650, bfd_mach_mips4000 },
+ { bfd_mach_mips4600, bfd_mach_mips4000 },
+ { bfd_mach_mips4400, bfd_mach_mips4000 },
+ { bfd_mach_mips4300, bfd_mach_mips4000 },
+ { bfd_mach_mips4100, bfd_mach_mips4000 },
+ { bfd_mach_mips4010, bfd_mach_mips4000 },
+
+ /* MIPS32 extensions. */
+ { bfd_mach_mipsisa32r2, bfd_mach_mipsisa32 },
+
+ /* MIPS II extensions. */
+ { bfd_mach_mips4000, bfd_mach_mips6000 },
+ { bfd_mach_mipsisa32, bfd_mach_mips6000 },
+
+ /* MIPS I extensions. */
+ { bfd_mach_mips6000, bfd_mach_mips3000 },
+ { bfd_mach_mips3900, bfd_mach_mips3000 }
+};
+
+
+/* Return true if bfd machine EXTENSION is an extension of machine BASE. */
static bfd_boolean
-_bfd_mips_elf_mach_extends_p (base, extension)
- flagword base, extension;
+mips_mach_extends_p (base, extension)
+ unsigned long base, extension;
{
- /* The vr5500 ISA is an extension of the core vr5400 ISA, but doesn't
- include the multimedia stuff. It seems better to allow vr5400
- and vr5500 code to be merged anyway, since many libraries will
- just use the core ISA. Perhaps we could add some sort of ASE
- flag if this ever proves a problem. */
- return (base == 0
- || (base == E_MIPS_MACH_5400 && extension == E_MIPS_MACH_5500)
- || (base == E_MIPS_MACH_4100 && extension == E_MIPS_MACH_4111)
- || (base == E_MIPS_MACH_4100 && extension == E_MIPS_MACH_4120));
+ size_t i;
+
+ for (i = 0; extension != base && i < ARRAY_SIZE (mips_mach_extensions); i++)
+ if (extension == mips_mach_extensions[i].extension)
+ extension = mips_mach_extensions[i].base;
+
+ return extension == base;
}
+
+/* Return true if the given ELF header flags describe a 32-bit binary. */
+
+static bfd_boolean
+mips_32bit_flags_p (flags)
+ flagword flags;
+{
+ return ((flags & EF_MIPS_32BITMODE) != 0
+ || (flags & EF_MIPS_ABI) == E_MIPS_ABI_O32
+ || (flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32
+ || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_1
+ || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2
+ || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32
+ || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R2);
+}
+
+
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -7789,6 +8925,11 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
new_flags &= ~EF_MIPS_NOREORDER;
old_flags &= ~EF_MIPS_NOREORDER;
+ /* Some IRIX 6 BSD-compatibility objects have this bit set. It
+ doesn't seem to matter. */
+ new_flags &= ~EF_MIPS_XGOT;
+ old_flags &= ~EF_MIPS_XGOT;
+
if (new_flags == old_flags)
return TRUE;
@@ -7835,66 +8976,50 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
ok = FALSE;
}
- /* Compare the ISA's. */
- if ((new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH))
- != (old_flags & (EF_MIPS_ARCH | EF_MIPS_MACH)))
+ /* Compare the ISAs. */
+ if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
{
- int new_mach = new_flags & EF_MIPS_MACH;
- int old_mach = old_flags & EF_MIPS_MACH;
- int new_isa = elf_mips_isa (new_flags);
- int old_isa = elf_mips_isa (old_flags);
-
- /* If either has no machine specified, just compare the general isa's.
- Some combinations of machines are ok, if the isa's match. */
- if (new_mach == old_mach
- || _bfd_mips_elf_mach_extends_p (new_mach, old_mach)
- || _bfd_mips_elf_mach_extends_p (old_mach, new_mach))
+ (*_bfd_error_handler)
+ (_("%s: linking 32-bit code with 64-bit code"),
+ bfd_archive_filename (ibfd));
+ ok = FALSE;
+ }
+ else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd)))
+ {
+ /* OBFD's ISA isn't the same as, or an extension of, IBFD's. */
+ if (mips_mach_extends_p (bfd_get_mach (obfd), bfd_get_mach (ibfd)))
{
- /* Don't warn about mixing code using 32-bit ISAs, or mixing code
- using 64-bit ISAs. They will normally use the same data sizes
- and calling conventions. */
-
- if (( (new_isa == 1 || new_isa == 2 || new_isa == 32)
- ^ (old_isa == 1 || old_isa == 2 || old_isa == 32)) != 0)
- {
- (*_bfd_error_handler)
- (_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
- bfd_archive_filename (ibfd), new_isa, old_isa);
- ok = FALSE;
- }
- else
- {
- /* Do we need to update the mach field? */
- if (_bfd_mips_elf_mach_extends_p (old_mach, new_mach))
- {
- elf_elfheader (obfd)->e_flags &= ~EF_MIPS_MACH;
- elf_elfheader (obfd)->e_flags |= new_mach;
- }
-
- /* Do we need to update the ISA field? */
- if (new_isa > old_isa)
- {
- elf_elfheader (obfd)->e_flags &= ~EF_MIPS_ARCH;
- elf_elfheader (obfd)->e_flags
- |= new_flags & EF_MIPS_ARCH;
- }
- }
+ /* Copy the architecture info from IBFD to OBFD. Also copy
+ the 32-bit flag (if set) so that we continue to recognise
+ OBFD as a 32-bit binary. */
+ bfd_set_arch_info (obfd, bfd_get_arch_info (ibfd));
+ elf_elfheader (obfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
+ elf_elfheader (obfd)->e_flags
+ |= new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
+
+ /* Copy across the ABI flags if OBFD doesn't use them
+ and if that was what caused us to treat IBFD as 32-bit. */
+ if ((old_flags & EF_MIPS_ABI) == 0
+ && mips_32bit_flags_p (new_flags)
+ && !mips_32bit_flags_p (new_flags & ~EF_MIPS_ABI))
+ elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ABI;
}
else
{
+ /* The ISAs aren't compatible. */
(*_bfd_error_handler)
- (_("%s: ISA mismatch (%d) with previous modules (%d)"),
+ (_("%s: linking %s module with previous %s modules"),
bfd_archive_filename (ibfd),
- _bfd_elf_mips_mach (new_flags),
- _bfd_elf_mips_mach (old_flags));
+ bfd_printable_name (ibfd),
+ bfd_printable_name (obfd));
ok = FALSE;
}
-
- new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
- old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
}
- /* Compare ABI's. The 64-bit ABI does not use EF_MIPS_ABI. But, it
+ new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
+ old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
+
+ /* Compare ABIs. The 64-bit ABI does not use EF_MIPS_ABI. But, it
does set EI_CLASS differently from any 32-bit ABI. */
if ((new_flags & EF_MIPS_ABI) != (old_flags & EF_MIPS_ABI)
|| (elf_elfheader (ibfd)->e_ident[EI_CLASS]
@@ -8005,6 +9130,8 @@ _bfd_mips_elf_print_private_bfd_data (abfd, ptr)
fprintf (file, _(" [mips32]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64)
fprintf (file, _(" [mips64]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R2)
+ fprintf (file, _(" [mips32r2]"));
else
fprintf (file, _(" [unknown ISA]"));
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 9b935c6f649..3f7794361b6 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -1,5 +1,5 @@
/* MIPS ELF specific backend routines.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf/common.h"
#include "elf/internal.h"
+extern bfd_boolean _bfd_mips_elf_new_section_hook
+ PARAMS ((bfd *, asection *));
extern void _bfd_mips_elf_symbol_processing
PARAMS ((bfd *, asymbol *));
extern bfd_boolean _bfd_mips_elf_section_processing
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index c3ff1047c28..69e3782b1bc 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -1,6 +1,6 @@
/* Target definitions for NN-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -53,7 +53,9 @@
#define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
#endif
#define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol
+#ifndef bfd_elfNN_new_section_hook
#define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook
+#endif
#define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach
#ifndef bfd_elfNN_set_section_contents
#define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 779fd712df0..08119528c4e 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -1,6 +1,6 @@
/* BFD back-end for ieee-695 objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -2074,7 +2074,7 @@ ieee_slurp_section_data (abfd)
for (s = abfd->sections; s != (asection *) NULL; s = s->next)
{
- ieee_per_section_type *per = (ieee_per_section_type *) s->used_by_bfd;
+ ieee_per_section_type *per = ieee_per_section (s);
if ((s->flags & SEC_DEBUGGING) != 0)
continue;
per->data = (bfd_byte *) bfd_alloc (ieee->h.abfd, s->_raw_size);
@@ -2098,7 +2098,7 @@ ieee_slurp_section_data (abfd)
section_number = must_parse_int (&(ieee->h));
s = ieee->section_table[section_number];
s->flags |= SEC_LOAD | SEC_HAS_CONTENTS;
- current_map = (ieee_per_section_type *) s->used_by_bfd;
+ current_map = ieee_per_section (s);
location_ptr = current_map->data - s->vma;
/* The document I have says that Microtec's compilers reset */
/* this after a sec section, even though the standard says not */
@@ -2192,8 +2192,8 @@ ieee_new_section_hook (abfd, newsect)
bfd *abfd;
asection *newsect;
{
- newsect->used_by_bfd = (PTR)
- bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
+ newsect->used_by_bfd
+ = (PTR) bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
if (!newsect->used_by_bfd)
return FALSE;
ieee_per_section (newsect)->data = (bfd_byte *) NULL;
@@ -2221,7 +2221,7 @@ ieee_get_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
- ieee_per_section_type *p = (ieee_per_section_type *) section->used_by_bfd;
+ ieee_per_section_type *p = ieee_per_section (section);
if ((section->flags & SEC_DEBUGGING) != 0)
return _bfd_generic_get_section_contents (abfd, section, location,
offset, count);
@@ -2237,7 +2237,6 @@ ieee_canonicalize_reloc (abfd, section, relptr, symbols)
arelent **relptr;
asymbol **symbols;
{
-/* ieee_per_section_type *p = (ieee_per_section_type *) section->used_by_bfd;*/
ieee_reloc_type *src = (ieee_reloc_type *) (section->relocation);
ieee_data_type *ieee = IEEE_DATA (abfd);
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 8f3cf58b61d..222b23dcb5d 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -793,6 +793,30 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_L44",
"BFD_RELOC_SPARC_REGISTER",
"BFD_RELOC_SPARC_REV32",
+ "BFD_RELOC_SPARC_TLS_GD_HI22",
+ "BFD_RELOC_SPARC_TLS_GD_LO10",
+ "BFD_RELOC_SPARC_TLS_GD_ADD",
+ "BFD_RELOC_SPARC_TLS_GD_CALL",
+ "BFD_RELOC_SPARC_TLS_LDM_HI22",
+ "BFD_RELOC_SPARC_TLS_LDM_LO10",
+ "BFD_RELOC_SPARC_TLS_LDM_ADD",
+ "BFD_RELOC_SPARC_TLS_LDM_CALL",
+ "BFD_RELOC_SPARC_TLS_LDO_HIX22",
+ "BFD_RELOC_SPARC_TLS_LDO_LOX10",
+ "BFD_RELOC_SPARC_TLS_LDO_ADD",
+ "BFD_RELOC_SPARC_TLS_IE_HI22",
+ "BFD_RELOC_SPARC_TLS_IE_LO10",
+ "BFD_RELOC_SPARC_TLS_IE_LD",
+ "BFD_RELOC_SPARC_TLS_IE_LDX",
+ "BFD_RELOC_SPARC_TLS_IE_ADD",
+ "BFD_RELOC_SPARC_TLS_LE_HIX22",
+ "BFD_RELOC_SPARC_TLS_LE_LOX10",
+ "BFD_RELOC_SPARC_TLS_DTPMOD32",
+ "BFD_RELOC_SPARC_TLS_DTPMOD64",
+ "BFD_RELOC_SPARC_TLS_DTPOFF32",
+ "BFD_RELOC_SPARC_TLS_DTPOFF64",
+ "BFD_RELOC_SPARC_TLS_TPOFF32",
+ "BFD_RELOC_SPARC_TLS_TPOFF64",
"BFD_RELOC_ALPHA_GPDISP_HI16",
"BFD_RELOC_ALPHA_GPDISP_LO16",
"BFD_RELOC_ALPHA_GPDISP",
@@ -967,6 +991,46 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_PPC64_TOC16_LO_DS",
"BFD_RELOC_PPC64_PLTGOT16_DS",
"BFD_RELOC_PPC64_PLTGOT16_LO_DS",
+ "BFD_RELOC_PPC_TLS",
+ "BFD_RELOC_PPC_DTPMOD",
+ "BFD_RELOC_PPC_TPREL16",
+ "BFD_RELOC_PPC_TPREL16_LO",
+ "BFD_RELOC_PPC_TPREL16_HI",
+ "BFD_RELOC_PPC_TPREL16_HA",
+ "BFD_RELOC_PPC_TPREL",
+ "BFD_RELOC_PPC_DTPREL16",
+ "BFD_RELOC_PPC_DTPREL16_LO",
+ "BFD_RELOC_PPC_DTPREL16_HI",
+ "BFD_RELOC_PPC_DTPREL16_HA",
+ "BFD_RELOC_PPC_DTPREL",
+ "BFD_RELOC_PPC_GOT_TLSGD16",
+ "BFD_RELOC_PPC_GOT_TLSGD16_LO",
+ "BFD_RELOC_PPC_GOT_TLSGD16_HI",
+ "BFD_RELOC_PPC_GOT_TLSGD16_HA",
+ "BFD_RELOC_PPC_GOT_TLSLD16",
+ "BFD_RELOC_PPC_GOT_TLSLD16_LO",
+ "BFD_RELOC_PPC_GOT_TLSLD16_HI",
+ "BFD_RELOC_PPC_GOT_TLSLD16_HA",
+ "BFD_RELOC_PPC_GOT_TPREL16",
+ "BFD_RELOC_PPC_GOT_TPREL16_LO",
+ "BFD_RELOC_PPC_GOT_TPREL16_HI",
+ "BFD_RELOC_PPC_GOT_TPREL16_HA",
+ "BFD_RELOC_PPC_GOT_DTPREL16",
+ "BFD_RELOC_PPC_GOT_DTPREL16_LO",
+ "BFD_RELOC_PPC_GOT_DTPREL16_HI",
+ "BFD_RELOC_PPC_GOT_DTPREL16_HA",
+ "BFD_RELOC_PPC64_TPREL16_DS",
+ "BFD_RELOC_PPC64_TPREL16_LO_DS",
+ "BFD_RELOC_PPC64_TPREL16_HIGHER",
+ "BFD_RELOC_PPC64_TPREL16_HIGHERA",
+ "BFD_RELOC_PPC64_TPREL16_HIGHEST",
+ "BFD_RELOC_PPC64_TPREL16_HIGHESTA",
+ "BFD_RELOC_PPC64_DTPREL16_DS",
+ "BFD_RELOC_PPC64_DTPREL16_LO_DS",
+ "BFD_RELOC_PPC64_DTPREL16_HIGHER",
+ "BFD_RELOC_PPC64_DTPREL16_HIGHERA",
+ "BFD_RELOC_PPC64_DTPREL16_HIGHEST",
+ "BFD_RELOC_PPC64_DTPREL16_HIGHESTA",
"BFD_RELOC_I370_D12",
"BFD_RELOC_CTOR",
"BFD_RELOC_ARM_PCREL_BRANCH",
@@ -1208,6 +1272,35 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_390_GOT64",
"BFD_RELOC_390_PLT64",
"BFD_RELOC_390_GOTENT",
+ "BFD_RELOC_390_GOTOFF64",
+ "BFD_RELOC_390_GOTPLT12",
+ "BFD_RELOC_390_GOTPLT16",
+ "BFD_RELOC_390_GOTPLT32",
+ "BFD_RELOC_390_GOTPLT64",
+ "BFD_RELOC_390_GOTPLTENT",
+ "BFD_RELOC_390_PLTOFF16",
+ "BFD_RELOC_390_PLTOFF32",
+ "BFD_RELOC_390_PLTOFF64",
+ "BFD_RELOC_390_TLS_LOAD",
+ "BFD_RELOC_390_TLS_GDCALL",
+ "BFD_RELOC_390_TLS_LDCALL",
+ "BFD_RELOC_390_TLS_GD32",
+ "BFD_RELOC_390_TLS_GD64",
+ "BFD_RELOC_390_TLS_GOTIE12",
+ "BFD_RELOC_390_TLS_GOTIE32",
+ "BFD_RELOC_390_TLS_GOTIE64",
+ "BFD_RELOC_390_TLS_LDM32",
+ "BFD_RELOC_390_TLS_LDM64",
+ "BFD_RELOC_390_TLS_IE32",
+ "BFD_RELOC_390_TLS_IE64",
+ "BFD_RELOC_390_TLS_IEENT",
+ "BFD_RELOC_390_TLS_LE32",
+ "BFD_RELOC_390_TLS_LE64",
+ "BFD_RELOC_390_TLS_LDO32",
+ "BFD_RELOC_390_TLS_LDO64",
+ "BFD_RELOC_390_TLS_DTPMOD",
+ "BFD_RELOC_390_TLS_DTPOFF",
+ "BFD_RELOC_390_TLS_TPOFF",
"BFD_RELOC_IP2K_FR9",
"BFD_RELOC_IP2K_BANK",
"BFD_RELOC_IP2K_ADDR16CJP",
@@ -1373,6 +1466,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_VAX_GLOB_DAT",
"BFD_RELOC_VAX_JMP_SLOT",
"BFD_RELOC_VAX_RELATIVE",
+ "BFD_RELOC_MSP430_10_PCREL",
+ "BFD_RELOC_MSP430_16_PCREL",
+ "BFD_RELOC_MSP430_16",
+ "BFD_RELOC_MSP430_16_PCREL_BYTE",
+ "BFD_RELOC_MSP430_16_BYTE",
+ "BFD_RELOC_IQ2000_OFFSET_16",
+ "BFD_RELOC_IQ2000_OFFSET_21",
+ "BFD_RELOC_IQ2000_UHI16",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
diff --git a/bfd/mmo.c b/bfd/mmo.c
index f734fa93c87..56c97460319 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -1,5 +1,5 @@
/* BFD back-end for mmo objects (MMIX-specific object-format).
- Copyright 2001, 2002
+ Copyright 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com).
Infrastructure and other bits originally copied from srec.c and
@@ -335,6 +335,9 @@ struct mmo_section_data_struct
mmo_data_list_type *tail;
};
+#define mmo_section_data(sec) \
+ ((struct mmo_section_data_struct *) (sec)->used_by_bfd)
+
/* These structures are used in bfd_map_over_sections constructs. */
/* Used when writing out sections; all but the register contents section
@@ -1177,12 +1180,11 @@ mmo_get_spec_section (abfd, spec_data_number)
}
loc->next = NULL;
- if (((struct mmo_section_data_struct *) (sec->used_by_bfd))->tail != NULL)
- ((struct mmo_section_data_struct *) (sec->used_by_bfd))->tail->next
- = loc;
+ if (mmo_section_data (sec)->tail != NULL)
+ mmo_section_data (sec)->tail->next = loc;
else
- ((struct mmo_section_data_struct *) (sec->used_by_bfd))->head = loc;
- ((struct mmo_section_data_struct *) (sec->used_by_bfd))->tail = loc;
+ mmo_section_data (sec)->head = loc;
+ mmo_section_data (sec)->tail = loc;
loc->where = section_vma;
return sec;
@@ -1517,8 +1519,7 @@ mmo_get_loc (sec, vma, size)
int size;
{
bfd_size_type allocated_size;
- struct mmo_section_data_struct *sdatap
- = (struct mmo_section_data_struct *) sec->used_by_bfd;
+ struct mmo_section_data_struct *sdatap = mmo_section_data (sec);
struct mmo_data_list_struct *datap = sdatap->head;
struct mmo_data_list_struct *entry;
@@ -2463,15 +2464,9 @@ mmo_internal_write_section (abfd, sec)
if (strcmp (sec->name, MMO_TEXT_SECTION_NAME) == 0)
/* FIXME: Output source file name and line number. */
- return
- mmo_write_loc_chunk_list (abfd,
- ((struct mmo_section_data_struct *)
- (sec->used_by_bfd))->head);
+ return mmo_write_loc_chunk_list (abfd, mmo_section_data (sec)->head);
else if (strcmp (sec->name, MMO_DATA_SECTION_NAME) == 0)
- return
- mmo_write_loc_chunk_list (abfd,
- ((struct mmo_section_data_struct *)
- (sec->used_by_bfd))->head);
+ return mmo_write_loc_chunk_list (abfd, mmo_section_data (sec)->head);
else if (strcmp (sec->name, MMIX_REG_CONTENTS_SECTION_NAME) == 0)
/* Not handled here. */
{
@@ -2486,9 +2481,7 @@ mmo_internal_write_section (abfd, sec)
int n = atoi (sec->name + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX));
mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_SPEC << 16) | n);
return (! abfd->tdata.mmo_data->have_error
- && mmo_write_chunk_list (abfd,
- ((struct mmo_section_data_struct *)
- (sec->used_by_bfd))->head));
+ && mmo_write_chunk_list (abfd, mmo_section_data (sec)->head));
}
/* Ignore sections that are just allocated or empty; we write out
_contents_ here. */
@@ -2605,16 +2598,11 @@ EXAMPLE
/* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually
loaded. */
if (bfd_get_section_flags (abfd, sec) & SEC_LOAD)
- return
- ! abfd->tdata.mmo_data->have_error
- && mmo_write_loc_chunk_list (abfd,
- ((struct mmo_section_data_struct *)
- (sec->used_by_bfd))->head);
- return
- ! abfd->tdata.mmo_data->have_error
- && mmo_write_chunk_list (abfd,
- ((struct mmo_section_data_struct *)
- (sec->used_by_bfd))->head);
+ return (! abfd->tdata.mmo_data->have_error
+ && mmo_write_loc_chunk_list (abfd,
+ mmo_section_data (sec)->head));
+ return (! abfd->tdata.mmo_data->have_error
+ && mmo_write_chunk_list (abfd, mmo_section_data (sec)->head));
}
return TRUE;
}
diff --git a/bfd/oasys.c b/bfd/oasys.c
index 494e155bffc..3c393864cf6 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -1,6 +1,6 @@
/* BFD back-end for oasys objects.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001,
+ 2002, 2003 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -864,7 +864,7 @@ oasys_get_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
- oasys_per_section_type *p = (oasys_per_section_type *) section->used_by_bfd;
+ oasys_per_section_type *p = oasys_per_section (section);
oasys_slurp_section_data (abfd);
if (! p->initialized)
{
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 32d223ebb74..81bd2c83501 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -1,6 +1,6 @@
/* opncls.c -- open and close a BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002
+ 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -25,6 +25,7 @@
#include "sysdep.h"
#include "objalloc.h"
#include "libbfd.h"
+#include "libiberty.h"
#ifndef S_IXUSR
#define S_IXUSR 0100 /* Execute by owner. */
@@ -36,6 +37,10 @@
#define S_IXOTH 0001 /* Execute by others. */
#endif
+/* Counter used to initialize the bfd identifier. */
+
+static unsigned int _bfd_id_counter = 0;
+
/* fdopen is a loser -- we should use stdio exclusively. Unfortunately
if we do that we can't use fcntl. */
@@ -50,6 +55,8 @@ _bfd_new_bfd ()
if (nbfd == NULL)
return NULL;
+ nbfd->id = _bfd_id_counter++;
+
nbfd->memory = (PTR) objalloc_create ();
if (nbfd->memory == NULL)
{
@@ -693,3 +700,335 @@ bfd_release (abfd, block)
{
objalloc_free_block ((struct objalloc *) abfd->memory, block);
}
+
+
+/*
+ GNU Extension: separate debug-info files
+
+ The idea here is that a special section called .gnu_debuglink might be
+ embedded in a binary file, which indicates that some *other* file
+ contains the real debugging information. This special section contains a
+ filename and CRC32 checksum, which we read and resolve to another file,
+ if it exists.
+
+ This facilitates "optional" provision of debugging information, without
+ having to provide two complete copies of every binary object (with and
+ without debug symbols).
+*/
+
+static unsigned long calc_crc32 PARAMS ((unsigned long, const unsigned char *, size_t));
+static char * get_debug_link_info PARAMS ((bfd *, unsigned long *));
+static bfd_boolean separate_debug_file_exists PARAMS ((const char *, const unsigned long));
+static char * find_separate_debug_file PARAMS ((bfd *, const char *));
+
+/*
+INTERNAL_FUNCTION
+ calc_crc32
+
+SYNOPSIS
+ unsigned long calc_crc32 (unsigned long crc, const unsigned char *buf, size_t len);
+
+DESCRIPTION
+ Advance the CRC32 given by @var{crc} through @var{len}
+ bytes of @var{buf}. Return the updated CRC32 value.
+*/
+
+static unsigned long
+calc_crc32 (crc, buf, len)
+ unsigned long crc;
+ const unsigned char *buf;
+ size_t len;
+{
+ static const unsigned long crc32_table[256] =
+ {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ };
+ const unsigned char *end;
+
+ crc = ~crc & 0xffffffff;
+ for (end = buf + len; buf < end; ++ buf)
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ return ~crc & 0xffffffff;;
+}
+
+
+/*
+INTERNAL_FUNCTION
+ get_debug_link_info
+
+SYNOPSIS
+ char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
+
+DESCRIPTION
+ fetch the filename and CRC32 value for any separate debuginfo
+ associated with @var{abfd}. Return NULL if no such info found,
+ otherwise return filename and update @var{crc32_out}.
+*/
+
+static char *
+get_debug_link_info (abfd, crc32_out)
+ bfd *abfd;
+ unsigned long *crc32_out;
+{
+ asection * sect;
+ bfd_size_type debuglink_size;
+ unsigned long crc32;
+ char * contents;
+ int crc_offset;
+ bfd_boolean ret;
+
+ BFD_ASSERT (abfd);
+ BFD_ASSERT (crc32_out);
+
+ sect = bfd_get_section_by_name (abfd, ".gnu_debuglink");
+
+ if (sect == NULL)
+ return NULL;
+
+ debuglink_size = bfd_section_size (abfd, sect);
+
+ contents = xmalloc (debuglink_size);
+ ret = bfd_get_section_contents (abfd, sect, contents,
+ (file_ptr)0, debuglink_size);
+ if (! ret)
+ {
+ free (contents);
+ return NULL;
+ }
+
+ /* Crc value is stored after the filename, aligned up to 4 bytes. */
+ crc_offset = strlen (contents) + 1;
+ crc_offset = (crc_offset + 3) & ~3;
+
+ crc32 = bfd_get_32 (abfd, (bfd_byte *) (contents + crc_offset));
+
+ *crc32_out = crc32;
+ return contents;
+}
+
+/*
+INTERNAL_FUNCTION
+ separate_debug_file_exists
+
+SYNOPSIS
+ bfd_boolean separate_debug_file_exists (char * name, unsigned long crc32)
+
+DESCRIPTION
+ Checks to see if @var{name} is a file and if its contents
+ match @var{crc32}.
+*/
+
+static bfd_boolean
+separate_debug_file_exists (name, crc)
+ const char *name;
+ const unsigned long crc;
+{
+ static char buffer [8 * 1024];
+ unsigned long file_crc = 0;
+ int fd;
+ int count;
+
+ BFD_ASSERT (name);
+
+ fd = open (name, O_RDONLY);
+ if (fd < 0)
+ return FALSE;
+
+ while ((count = read (fd, buffer, sizeof (buffer))) > 0)
+ file_crc = calc_crc32 (file_crc, buffer, count);
+
+ close (fd);
+
+ return crc == file_crc;
+}
+
+
+/*
+INTERNAL_FUNCTION
+ find_separate_debug_file
+
+SYNOPSIS
+ char * find_separate_debug_file (bfd *abfd)
+
+DESCRIPTION
+ Searches @var{abfd} for a reference to separate debugging
+ information, scans various locations in the filesystem, including
+ the file tree rooted at @var{debug_file_directory}, and returns a
+ filename of such debugging information if the file is found and has
+ matching CRC32. Returns NULL if no reference to debugging file
+ exists, or file cannot be found.
+*/
+
+static char *
+find_separate_debug_file (abfd, debug_file_directory)
+ bfd *abfd;
+ const char *debug_file_directory;
+{
+ char *basename;
+ char *dir;
+ char *debugfile;
+ unsigned long crc32;
+ int i;
+
+ BFD_ASSERT (abfd);
+ if (debug_file_directory == NULL)
+ debug_file_directory = ".";
+
+ /* BFD may have been opened from a stream. */
+ if (! abfd->filename)
+ return NULL;
+
+ basename = get_debug_link_info (abfd, & crc32);
+
+ if (basename == NULL || strlen (basename) < 1)
+ return NULL;
+
+ dir = xstrdup (abfd->filename);
+ BFD_ASSERT (strlen (dir) != 0);
+
+ /* Strip off filename part. */
+ for (i = strlen (dir) - 1; i >= 0; i--)
+ if (IS_DIR_SEPARATOR (dir[i]))
+ break;
+
+ dir[i + 1] = '\0';
+ BFD_ASSERT (dir[i] == '/' || dir[0] == '\0')
+
+ debugfile = xmalloc (strlen (debug_file_directory) + 1
+ + strlen (dir)
+ + strlen (".debug/")
+ + strlen (basename)
+ + 1);
+
+ /* First try in the same directory as the original file: */
+ strcpy (debugfile, dir);
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32))
+ {
+ free (basename);
+ free (dir);
+ return debugfile;
+ }
+
+ /* Then try in a subdirectory called .debug. */
+ strcpy (debugfile, dir);
+ strcat (debugfile, ".debug/");
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32))
+ {
+ free (basename);
+ free (dir);
+ return debugfile;
+ }
+
+ /* Then try in the global debugfile directory. */
+ strcpy (debugfile, debug_file_directory);
+ i = strlen (debug_file_directory) - 1;
+ if (i > 0
+ && debug_file_directory[i] != '/'
+ && dir[0] != '/')
+ strcat (debugfile, "/");
+ strcat (debugfile, dir);
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32))
+ {
+ free (basename);
+ free (dir);
+ return debugfile;
+ }
+
+ free (debugfile);
+ free (basename);
+ free (dir);
+ return NULL;
+}
+
+
+/*
+FUNCTION
+ bfd_follow_gnu_debuglink
+
+SYNOPSIS
+ char * bfd_follow_gnu_debuglink(bfd *abfd, const char *dir);
+
+DESCRIPTION
+
+ Takes a BFD and searches it for a .gnu_debuglink section. If this
+ section is found, examines the section for the name and checksum of
+ a '.debug' file containing auxiliary debugging
+ information. Searches filesystem for .debug file in some standard
+ locations, including the directory tree rooted at @var{dir}, and if
+ found returns the full filename. If @var{dir} is NULL, will search
+ default path configured into libbfd at build time.
+
+RETURNS
+ <<NULL>> on any errors or failure to locate the .debug file,
+ otherwise a pointer to a heap-allocated string containing the
+ filename. The caller is responsible for freeing this string.
+*/
+
+char *
+bfd_follow_gnu_debuglink (abfd, dir)
+ bfd *abfd;
+ const char * dir;
+{
+#if 0 /* Disabled until DEBUGDIR can be defined by configure.in */
+ if (dir == NULL)
+ dir = DEBUGDIR;
+#endif
+ return find_separate_debug_file (abfd, dir);
+}
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 54a0c25faf2..24d4a48337c 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -80,6 +80,7 @@ cpu-i860.c
cpu-i960.c
cpu-ia64.c
cpu-ip2k.c
+cpu-iq2000.c
cpu-m10200.c
cpu-m10300.c
cpu-m32r.c
@@ -90,6 +91,7 @@ cpu-m88k.c
cpu-mcore.c
cpu-mips.c
cpu-mmix.c
+cpu-msp430.c
cpu-ns32k.c
cpu-openrisc.c
cpu-or32.c
@@ -143,6 +145,7 @@ elf32-i386.c
elf32-i860.c
elf32-i960.c
elf32-ip2k.c
+elf32-iq2000.c
elf32-m32r.c
elf32-m68hc11.c
elf32-m68hc12.c
@@ -150,6 +153,7 @@ elf32-m68k.c
elf32-m88k.c
elf32-mcore.c
elf32-mips.c
+elf32-msp430.c
elf32-openrisc.c
elf32-or32.c
elf32-pj.c
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 23224f3b3ab..9f8a952c591 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -1,6 +1,6 @@
/* BFD support for handling relocation entries.
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.
@@ -1872,6 +1872,56 @@ ENUM
BFD_RELOC_SPARC_REV32
ENUMDOC
SPARC little endian relocation
+ENUM
+ BFD_RELOC_SPARC_TLS_GD_HI22
+ENUMX
+ BFD_RELOC_SPARC_TLS_GD_LO10
+ENUMX
+ BFD_RELOC_SPARC_TLS_GD_ADD
+ENUMX
+ BFD_RELOC_SPARC_TLS_GD_CALL
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDM_HI22
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDM_LO10
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDM_ADD
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDM_CALL
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDO_HIX22
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDO_LOX10
+ENUMX
+ BFD_RELOC_SPARC_TLS_LDO_ADD
+ENUMX
+ BFD_RELOC_SPARC_TLS_IE_HI22
+ENUMX
+ BFD_RELOC_SPARC_TLS_IE_LO10
+ENUMX
+ BFD_RELOC_SPARC_TLS_IE_LD
+ENUMX
+ BFD_RELOC_SPARC_TLS_IE_LDX
+ENUMX
+ BFD_RELOC_SPARC_TLS_IE_ADD
+ENUMX
+ BFD_RELOC_SPARC_TLS_LE_HIX22
+ENUMX
+ BFD_RELOC_SPARC_TLS_LE_LOX10
+ENUMX
+ BFD_RELOC_SPARC_TLS_DTPMOD32
+ENUMX
+ BFD_RELOC_SPARC_TLS_DTPMOD64
+ENUMX
+ BFD_RELOC_SPARC_TLS_DTPOFF32
+ENUMX
+ BFD_RELOC_SPARC_TLS_DTPOFF64
+ENUMX
+ BFD_RELOC_SPARC_TLS_TPOFF32
+ENUMX
+ BFD_RELOC_SPARC_TLS_TPOFF64
+ENUMDOC
+ SPARC TLS relocations
ENUM
BFD_RELOC_ALPHA_GPDISP_HI16
@@ -2343,6 +2393,89 @@ ENUMDOC
Power(rs6000) and PowerPC relocations.
ENUM
+ BFD_RELOC_PPC_TLS
+ENUMX
+ BFD_RELOC_PPC_DTPMOD
+ENUMX
+ BFD_RELOC_PPC_TPREL16
+ENUMX
+ BFD_RELOC_PPC_TPREL16_LO
+ENUMX
+ BFD_RELOC_PPC_TPREL16_HI
+ENUMX
+ BFD_RELOC_PPC_TPREL16_HA
+ENUMX
+ BFD_RELOC_PPC_TPREL
+ENUMX
+ BFD_RELOC_PPC_DTPREL16
+ENUMX
+ BFD_RELOC_PPC_DTPREL16_LO
+ENUMX
+ BFD_RELOC_PPC_DTPREL16_HI
+ENUMX
+ BFD_RELOC_PPC_DTPREL16_HA
+ENUMX
+ BFD_RELOC_PPC_DTPREL
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSGD16
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSGD16_LO
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSGD16_HI
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSGD16_HA
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSLD16
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSLD16_LO
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSLD16_HI
+ENUMX
+ BFD_RELOC_PPC_GOT_TLSLD16_HA
+ENUMX
+ BFD_RELOC_PPC_GOT_TPREL16
+ENUMX
+ BFD_RELOC_PPC_GOT_TPREL16_LO
+ENUMX
+ BFD_RELOC_PPC_GOT_TPREL16_HI
+ENUMX
+ BFD_RELOC_PPC_GOT_TPREL16_HA
+ENUMX
+ BFD_RELOC_PPC_GOT_DTPREL16
+ENUMX
+ BFD_RELOC_PPC_GOT_DTPREL16_LO
+ENUMX
+ BFD_RELOC_PPC_GOT_DTPREL16_HI
+ENUMX
+ BFD_RELOC_PPC_GOT_DTPREL16_HA
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_DS
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_HIGHER
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_HIGHERA
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_HIGHEST
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_HIGHESTA
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_DS
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_HIGHER
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_HIGHERA
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_HIGHEST
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_HIGHESTA
+ENUMDOC
+ PowerPC and PowerPC64 thread-local storage relocations.
+
+ENUM
BFD_RELOC_I370_D12
ENUMDOC
IBM 370/390 relocations
@@ -3169,6 +3302,85 @@ ENUM
BFD_RELOC_390_GOTENT
ENUMDOC
32 bit rel. offset to GOT entry.
+ENUM
+ BFD_RELOC_390_GOTOFF64
+ENUMDOC
+ 64 bit offset to GOT.
+ENUM
+ BFD_RELOC_390_GOTPLT12
+ENUMDOC
+ 12-bit offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_390_GOTPLT16
+ENUMDOC
+ 16-bit offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_390_GOTPLT32
+ENUMDOC
+ 32-bit offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_390_GOTPLT64
+ENUMDOC
+ 64-bit offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_390_GOTPLTENT
+ENUMDOC
+ 32-bit rel. offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_390_PLTOFF16
+ENUMDOC
+ 16-bit rel. offset from the GOT to a PLT entry.
+ENUM
+ BFD_RELOC_390_PLTOFF32
+ENUMDOC
+ 32-bit rel. offset from the GOT to a PLT entry.
+ENUM
+ BFD_RELOC_390_PLTOFF64
+ENUMDOC
+ 64-bit rel. offset from the GOT to a PLT entry.
+
+ENUM
+ BFD_RELOC_390_TLS_LOAD
+ENUMX
+ BFD_RELOC_390_TLS_GDCALL
+ENUMX
+ BFD_RELOC_390_TLS_LDCALL
+ENUMX
+ BFD_RELOC_390_TLS_GD32
+ENUMX
+ BFD_RELOC_390_TLS_GD64
+ENUMX
+ BFD_RELOC_390_TLS_GOTIE12
+ENUMX
+ BFD_RELOC_390_TLS_GOTIE32
+ENUMX
+ BFD_RELOC_390_TLS_GOTIE64
+ENUMX
+ BFD_RELOC_390_TLS_LDM32
+ENUMX
+ BFD_RELOC_390_TLS_LDM64
+ENUMX
+ BFD_RELOC_390_TLS_IE32
+ENUMX
+ BFD_RELOC_390_TLS_IE64
+ENUMX
+ BFD_RELOC_390_TLS_IEENT
+ENUMX
+ BFD_RELOC_390_TLS_LE32
+ENUMX
+ BFD_RELOC_390_TLS_LE64
+ENUMX
+ BFD_RELOC_390_TLS_LDO32
+ENUMX
+ BFD_RELOC_390_TLS_LDO64
+ENUMX
+ BFD_RELOC_390_TLS_DTPMOD
+ENUMX
+ BFD_RELOC_390_TLS_DTPOFF
+ENUMX
+ BFD_RELOC_390_TLS_TPOFF
+ENUMDOC
+ s390 tls relocations.
ENUM
BFD_RELOC_IP2K_FR9
@@ -3613,6 +3825,28 @@ ENUMX
BFD_RELOC_VAX_RELATIVE
ENUMDOC
Relocations used by VAX ELF.
+
+ENUM
+ BFD_RELOC_MSP430_10_PCREL
+ENUMX
+ BFD_RELOC_MSP430_16_PCREL
+ENUMX
+ BFD_RELOC_MSP430_16
+ENUMX
+ BFD_RELOC_MSP430_16_PCREL_BYTE
+ENUMX
+ BFD_RELOC_MSP430_16_BYTE
+ENUMDOC
+ msp430 specific relocation codes
+
+ENUM
+ BFD_RELOC_IQ2000_OFFSET_16
+ENUMX
+ BFD_RELOC_IQ2000_OFFSET_21
+ENUMX
+ BFD_RELOC_IQ2000_UHI16
+ENUMDOC
+ IQ2000 Relocations.
ENDSENUM
BFD_RELOC_UNUSED
diff --git a/bfd/section.c b/bfd/section.c
index 35a0e5a6a05..89f8126536c 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -1,6 +1,6 @@
/* Object file "section" support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -377,10 +377,35 @@ CODE_FRAGMENT
. {* A mark flag used by some linker backends for garbage collection. *}
. unsigned int gc_mark : 1;
.
-. {* Used by the ELF code to mark sections which have been allocated
-. to segments. *}
+. {* The following flags are used by the ELF linker. *}
+.
+. {* Mark sections which have been allocated to segments. *}
. unsigned int segment_mark : 1;
.
+. {* Type of sec_info information. *}
+. unsigned int sec_info_type:3;
+.#define ELF_INFO_TYPE_NONE 0
+.#define ELF_INFO_TYPE_STABS 1
+.#define ELF_INFO_TYPE_MERGE 2
+.#define ELF_INFO_TYPE_EH_FRAME 3
+.#define ELF_INFO_TYPE_JUST_SYMS 4
+.
+. {* Nonzero if this section uses RELA relocations, rather than REL. *}
+. unsigned int use_rela_p:1;
+.
+. {* Bits used by various backends. *}
+. unsigned int has_tls_reloc:1;
+.
+. {* Usused bits. *}
+. unsigned int flag11:1;
+. unsigned int flag12:1;
+. unsigned int flag13:1;
+. unsigned int flag14:1;
+. unsigned int flag15:1;
+. unsigned int flag16:4;
+. unsigned int flag20:4;
+. unsigned int flag24:8;
+.
. {* End of internal packed boolean fields. *}
.
. {* The virtual memory address of the section - where it will be
@@ -590,6 +615,12 @@ static const asymbol global_syms[] =
/* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
0, 0, 1, 0, \
\
+ /* sec_info_type, use_rela_p, has_tls_reloc, flag11, flag12, */ \
+ 0, 0, 0, 0, 0, \
+ \
+ /* flag13, flag14, flag15, flag16, flag20, flag24, */ \
+ 0, 0, 0, 0, 0, 0, \
+ \
/* vma, lma, _cooked_size, _raw_size, */ \
0, 0, 0, 0, \
\
diff --git a/bfd/targets.c b/bfd/targets.c
index 998327de1d0..c541c11ab55 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -1,6 +1,6 @@
/* Generic target-file-type support for the BFD library.
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.
@@ -533,6 +533,7 @@ extern const bfd_target bfd_elf32_i960_vec;
extern const bfd_target bfd_elf32_ia64_big_vec;
extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
extern const bfd_target bfd_elf32_ip2k_vec;
+extern const bfd_target bfd_elf32_iq2000_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
@@ -547,6 +548,7 @@ extern const bfd_target bfd_elf32_mcore_big_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
+extern const bfd_target bfd_elf32_msp430_vec;
extern const bfd_target bfd_elf32_nbigmips_vec;
extern const bfd_target bfd_elf32_nlittlemips_vec;
extern const bfd_target bfd_elf32_ntradbigmips_vec;
@@ -819,6 +821,7 @@ static const bfd_target * const _bfd_target_vector[] = {
#endif
&bfd_elf32_ia64_hpux_big_vec,
&bfd_elf32_ip2k_vec,
+ &bfd_elf32_iq2000_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_oabi_vec,
@@ -833,6 +836,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_mcore_little_vec,
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
+ &bfd_elf32_msp430_vec,
#ifdef BFD64
&bfd_elf32_nbigmips_vec,
&bfd_elf32_nlittlemips_vec,
diff --git a/bfd/version.h b/bfd/version.h
index 41b8bc4afa2..32e8805c95a 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20021223
+#define BFD_VERSION_DATE 20030207
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/config.guess b/config.guess
index 181f0a2b4f5..ca12b79a540 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2002-09-12'
+timestamp='2003-01-03'
# 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
@@ -98,30 +98,31 @@ trap 'exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-# This shell variable is my proudest work .. or something. --bje
+# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
-dummy=$tmpdir/dummy ;
-files="$dummy.c $dummy.o $dummy.rel $dummy" ;
-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
- rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;
-unset files'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -178,7 +179,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -223,6 +235,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:MicroBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -257,7 +272,7 @@ main:
jsr \$26,exit
.end main
EOF
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
case `$dummy` in
0-0)
@@ -286,7 +301,6 @@ EOF
;;
esac
fi
- rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
@@ -437,10 +451,9 @@ EOF
exit (-1);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy \
+ $CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
@@ -449,7 +462,7 @@ EOF
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
- Night_Hawk:*:*:PowerMAX_OS)
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -524,8 +537,7 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -623,11 +635,21 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -661,8 +683,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -720,15 +741,15 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
@@ -756,7 +777,6 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c && rmdir $tmpdir
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
@@ -769,13 +789,16 @@ EOF
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
- echo i386-pc-interix3
+ echo i586-pc-interix3
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
+ echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -818,8 +841,26 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- rm -f $dummy.c && rmdir $tmpdir
- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -914,7 +955,6 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c && rmdir $tmpdir
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@@ -932,6 +972,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -966,9 +1023,6 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -995,9 +1049,12 @@ EOF
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1014,9 +1071,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1134,11 +1188,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1157,12 +1206,6 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1283,8 +1326,7 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-rm -f $dummy.c $dummy && rmdir $tmpdir
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
diff --git a/config.if b/config.if
index 3958928ec65..c38b59c841e 100644
--- a/config.if
+++ b/config.if
@@ -2,9 +2,8 @@
# Don't call it directly. This shell script fragment is called to
# determine:
#
-# 1. libstcxx_interface: the interface name for libstdc++.
-# 2. cxx_interface: the interface name for c++.
-# 3. libc_interface: the interface name for libc.
+# 1. libstcxx_incdir: the interface name for libstdc++.
+# 2. libc_interface: the interface name for libc.
#
# Get the top level src dir.
@@ -21,25 +20,21 @@ else
if_topsrcdir=${top_srcdir}
fi
-if [ "${enable_libstdcxx_v3}" = "yes" ] ; then
- libstdcxx_srcdir=${if_topsrcdir}/libstdc++-v3
-else
- libstdcxx_srcdir=${if_topsrcdir}/libstdc++
-fi
-
-if [ -f ${libstdcxx_srcdir}/Makefile.in ]; then
-# We check libstdc++ for libstdcxx_interface.
-libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
-else
-libstdcxx_interface=
-fi
-
-if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then
-# We check gcc/cp for cxx_interface.
-cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
-else
-cxx_interface=
+# Set libstdcxx_incdir.
+# This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4.
+if test -z "$gcc_version"; then
+ if test -z "${gcc_version_trigger}" \
+ && test -f ${if_topsrcdir}/gcc/version.c; then
+ gcc_version_trigger=${if_topsrcdir}/gcc/version.c
+ fi
+ if test -f "${gcc_version_trigger}"; then
+ gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
+ else
+ gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
+ fi
+ gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
fi
+libstdcxx_incdir=c++/${gcc_version}
# The trickiest part is libc_interface.
if [ -z "${libc_interface}" ]
@@ -82,8 +77,8 @@ EOF
exit 1
fi
else
- # Cross compiling. Assume glibc 2.2.
- libc_interface=-libc6.2-
+ # Cross compiling. Assume glibc 2.1.
+ libc_interface=-libc6.1-
fi
;;
*)
diff --git a/config.sub b/config.sub
index 2a55e05cd66..04baf3d80d1 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2002-09-12'
+timestamp='2003-01-03'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -245,11 +245,13 @@ case $basic_machine in
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
@@ -315,11 +317,13 @@ case $basic_machine in
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39 | mipstx39el \
- | none-* | np1-* | ns16k-* | ns32k-* \
+ | mipstx39-* | mipstx39el-* \
+ | msp430-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -716,6 +720,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -901,10 +909,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
- t3d)
- basic_machine=alpha-cray
- os=-unicos
- ;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
@@ -977,10 +981,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1113,11 +1113,12 @@ case $os in
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -microbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1129,8 +1130,10 @@ case $os in
;;
esac
;;
+ -nto-qnx*)
+ ;;
-nto*)
- os=-nto-qnx
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
diff --git a/config/ChangeLog b/config/ChangeLog
index c183693fd6b..15c7c3e0ae3 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,20 @@
+2002-12-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * acx.m4: Name cache variables properly.
+ (NCN_STRICT_CHECK_TOOL): If program is not found and
+ value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2,
+ depending on whether build != host or not.
+ (NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix.
+
+2002-12-28 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * acx.m4: New.
+ * mh-a68bsd, mh-aix386, mh-apollo68, mh-delta88, mh-hp300,
+ mh-hpux, mh-hpux8, mh-irix5, mh-irix6, mh-ncrsvr43, mh-openedition,
+ mh-riscos, mh-sysv: Delete.
+ * mh-cxux, mh-dgux386, mh-interix, mh-lynxrs6k, mh-ncr3000,
+ mh-necv4, mh-sco, mh-solaris, mh-sysv4, mh-sysv5, mt-v810: Simplify.
+
2002-12-16 Christopher Faylor <cgf@redhat.com>
* mh-cygwin: Don't build libtermcap if it doesn't exist.
diff --git a/config/acx.m4 b/config/acx.m4
new file mode 100644
index 00000000000..4e16bcd31b5
--- /dev/null
+++ b/config/acx.m4
@@ -0,0 +1,81 @@
+# Autoconf M4 include file defining utility macros for complex Canadian
+# cross builds.
+
+####
+# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
+# or AC_INIT.
+# These demand that AC_CANONICAL_SYSTEM be called beforehand.
+AC_DEFUN([_NCN_TOOL_PREFIXES],
+[ncn_tool_prefix=
+test -n "$host_alias" && ncn_tool_prefix=$host_alias-
+ncn_target_tool_prefix=
+test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
+]) []dnl # _NCN_TOOL_PREFIXES
+
+####
+# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
+# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
+# Code is pretty much lifted from autoconf2.53.
+
+AC_DEFUN([NCN_CHECK_TARGET_TOOL],
+[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
+if test -n "$ncn_target_tool_prefix"; then
+ AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2],
+ [${ncn_target_tool_prefix}$2], , [$4])
+fi
+if test -z "$ac_cv_prog_$1" ; then
+ ncn_cv_$1=$$1
+ AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [$3], [$4])
+ $1=$ncn_cv_$1
+else
+ $1="$ac_cv_prog_$1"
+fi
+]) []dnl # NCN_CHECK_TARGET_TOOL
+
+
+####
+# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
+# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
+
+AC_DEFUN([NCN_STRICT_CHECK_TOOL],
+[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
+if test -n "$ncn_tool_prefix"; then
+ AC_CHECK_PROG([$1], [${ncn_tool_prefix}$2],
+ [${ncn_tool_prefix}$2], , [$4])
+fi
+if test -z "$ac_cv_prog_$1" ; then
+ if test $build = $host ; then
+ ncn_cv_$1=$$1
+ AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4])
+ $1=$ncn_cv_$1
+ else
+ $1="ifelse([$3],[],[${ncn_tool_prefix}$2],[$3])"
+ fi
+else
+ $1="$ac_cv_prog_$1"
+fi
+]) []dnl # NCN_STRICT_CHECK_TOOL
+
+
+####
+# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
+# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
+
+AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOL],
+[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
+if test -n "$ncn_target_tool_prefix"; then
+ AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2],
+ [${ncn_target_tool_prefix}$2], , [$4])
+fi
+if test -z "$ac_cv_prog_$1" ; then
+ if test $build = $target ; then
+ ncn_cv_$1=$$1
+ AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4])
+ $1=$ncn_cv_$1
+ else
+ $1="ifelse([$3],[],[${ncn_target_tool_prefix}$2],[$3])"
+ fi
+else
+ $1="$ac_cv_prog_$1"
+fi
+]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL
diff --git a/config/mh-a68bsd b/config/mh-a68bsd
deleted file mode 100644
index 2fe28d0a4e2..00000000000
--- a/config/mh-a68bsd
+++ /dev/null
@@ -1,2 +0,0 @@
-RANLIB=true
-BISON=yacc
diff --git a/config/mh-aix386 b/config/mh-aix386
deleted file mode 100644
index 4accd1cddfb..00000000000
--- a/config/mh-aix386
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB = @:
diff --git a/config/mh-apollo68 b/config/mh-apollo68
deleted file mode 100644
index eb102d55010..00000000000
--- a/config/mh-apollo68
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB=true
diff --git a/config/mh-cxux b/config/mh-cxux
index 0a98f113baf..8680654fff8 100644
--- a/config/mh-cxux
+++ b/config/mh-cxux
@@ -1,7 +1,5 @@
# Configuration for Harris CX/UX 7 (and maybe 6), based on sysv4 configuration.
-RANLIB = true
-
# The l flag generates a warning from the SVR4 archiver, remove it.
AR_FLAGS = cq
diff --git a/config/mh-delta88 b/config/mh-delta88
deleted file mode 100644
index bc9c45302d5..00000000000
--- a/config/mh-delta88
+++ /dev/null
@@ -1,4 +0,0 @@
-RANLIB = true
-
-
-
diff --git a/config/mh-dgux386 b/config/mh-dgux386
index 2fcd4bf09bb..b2d2a057b4c 100644
--- a/config/mh-dgux386
+++ b/config/mh-dgux386
@@ -1,6 +1,3 @@
-# from mh-sysv4
-RANLIB = true
-
# The l flag generates a warning from the SVR4 archiver, remove it.
AR_FLAGS = cr
diff --git a/config/mh-hp300 b/config/mh-hp300
deleted file mode 100644
index 17a69a6c89f..00000000000
--- a/config/mh-hp300
+++ /dev/null
@@ -1,3 +0,0 @@
-# If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
-# If it's HP/UX ar, this should be harmless.
-RANLIB = ar ts
diff --git a/config/mh-hpux b/config/mh-hpux
deleted file mode 100644
index 40030020773..00000000000
--- a/config/mh-hpux
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB = true
diff --git a/config/mh-hpux8 b/config/mh-hpux8
deleted file mode 100644
index 40030020773..00000000000
--- a/config/mh-hpux8
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB = true
diff --git a/config/mh-interix b/config/mh-interix
index 16930060d70..67dff5c4432 100644
--- a/config/mh-interix
+++ b/config/mh-interix
@@ -1,6 +1,5 @@
# The shell may not be in /bin.
SHELL = sh
-RANLIB = true
# We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be
# built without debugging information
diff --git a/config/mh-irix5 b/config/mh-irix5
deleted file mode 100644
index 0019ee4308e..00000000000
--- a/config/mh-irix5
+++ /dev/null
@@ -1,2 +0,0 @@
-# Makefile changes for SGI's running IRIX-5.x.
-RANLIB = true
diff --git a/config/mh-irix6 b/config/mh-irix6
deleted file mode 100644
index bf6d8dc73d7..00000000000
--- a/config/mh-irix6
+++ /dev/null
@@ -1,2 +0,0 @@
-# Makefile changes for SGI's running IRIX-6.x.
-RANLIB = true
diff --git a/config/mh-lynxrs6k b/config/mh-lynxrs6k
index 3ee763996de..fac1b973a60 100644
--- a/config/mh-lynxrs6k
+++ b/config/mh-lynxrs6k
@@ -1,5 +1,2 @@
-# LynxOS running on the rs6000 doesn't have ranlib
-RANLIB = true
-
# /bin/sh is too buggy, so use /bin/bash instead.
SHELL = /bin/bash
diff --git a/config/mh-ncr3000 b/config/mh-ncr3000
index ead6cce7332..7c6ee12739b 100644
--- a/config/mh-ncr3000
+++ b/config/mh-ncr3000
@@ -1,6 +1,4 @@
# Host configuration file for an NCR 3000 (i486/SVR4) system.
-RANLIB = true
-
# The l flag generates a warning from the SVR4 archiver, remove it.
AR_FLAGS = cq
diff --git a/config/mh-ncrsvr43 b/config/mh-ncrsvr43
deleted file mode 100644
index 5446d77abf9..00000000000
--- a/config/mh-ncrsvr43
+++ /dev/null
@@ -1,3 +0,0 @@
-# Host configuration file for an NCR 3000 (i486/SVR43) system.
-
-RANLIB = true
diff --git a/config/mh-necv4 b/config/mh-necv4
index 6845f3caa20..d71805e052a 100644
--- a/config/mh-necv4
+++ b/config/mh-necv4
@@ -1,6 +1,4 @@
# Host Makefile fragment for NEC MIPS SVR4.
-RANLIB = true
-
# NEC -lX11 needs some other libraries.
X11_EXTRA_LIBS = -lsocket -lnsl
diff --git a/config/mh-openedition b/config/mh-openedition
deleted file mode 100644
index 40030020773..00000000000
--- a/config/mh-openedition
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB = true
diff --git a/config/mh-riscos b/config/mh-riscos
deleted file mode 100644
index 07588c76f1f..00000000000
--- a/config/mh-riscos
+++ /dev/null
@@ -1,3 +0,0 @@
-# This is for a MIPS running RISC/os 4.52C.
-
-RANLIB = true
diff --git a/config/mh-sco b/config/mh-sco
index 574b92aa71d..bf5a807b0e7 100644
--- a/config/mh-sco
+++ b/config/mh-sco
@@ -1,4 +1,3 @@
-RANLIB = true
# You may need this if you don't have bison.
# BISON = yacc -Sm10400
diff --git a/config/mh-solaris b/config/mh-solaris
index 16553c5f3cd..6e8f296a4ea 100644
--- a/config/mh-solaris
+++ b/config/mh-solaris
@@ -1,5 +1,2 @@
# Makefile changes for Suns running Solaris 2
-
-RANLIB = true
-
X11_EXTRA_LIBS = -lnsl -lsocket
diff --git a/config/mh-sysv b/config/mh-sysv
deleted file mode 100644
index 40030020773..00000000000
--- a/config/mh-sysv
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB = true
diff --git a/config/mh-sysv4 b/config/mh-sysv4
index 3634950d75c..2e9374c7f96 100644
--- a/config/mh-sysv4
+++ b/config/mh-sysv4
@@ -1,5 +1,3 @@
-RANLIB = true
-
# The l flag generates a warning from the SVR4 archiver, remove it.
AR_FLAGS = cr
diff --git a/config/mh-sysv5 b/config/mh-sysv5
index 3634950d75c..2e9374c7f96 100644
--- a/config/mh-sysv5
+++ b/config/mh-sysv5
@@ -1,5 +1,3 @@
-RANLIB = true
-
# The l flag generates a warning from the SVR4 archiver, remove it.
AR_FLAGS = cr
diff --git a/config/mt-aix43 b/config/mt-aix43
deleted file mode 100644
index 0c6627fa7e2..00000000000
--- a/config/mt-aix43
+++ /dev/null
@@ -1,4 +0,0 @@
-# AIX 4.3 and above requires -X32_64 flag to all ar and nm commands
-# to handle both 32-bit and 64-bit objects.
-AR_FOR_TARGET=ar -X32_64
-NM_FOR_TARGET=nm -B -X32_64
diff --git a/config/mt-v810 b/config/mt-v810
index 97da6c26592..f5714f89e8a 100644
--- a/config/mt-v810
+++ b/config/mt-v810
@@ -1,4 +1,3 @@
CC_FOR_TARGET = ca732 -ansi
AS_FOR_TARGET = as732
AR_FOR_TARGET = ar732
-RANLIB_FOR_TARGET = true
diff --git a/configure b/configure
index 6b4d9b49562..39ee865f68a 100755
--- a/configure
+++ b/configure
@@ -1,94 +1,44 @@
-#!/bin/sh
+#! /bin/sh
-### WARNING: this file contains embedded tabs. Do not run untabify on this file.
-
-# Configuration script
-# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001,
-# 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This file was originally written by K. Richard Pixley.
-
-#
-# Shell script to create proper links to machine-dependent files in
-# preparation for compilation.
-#
-# If configure succeeds, it leaves its status in config.status.
-# If configure fails after disturbing the status quo,
-# config.status is removed.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
-export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0 $argv; kill $$)
-
-remove=rm
-hard_link=ln
-symbolic_link='ln -s'
-
-#for Test
-#remove="echo rm"
-#hard_link="echo ln"
-#symbolic_link="echo ln -s"
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --disable-serial-[{host,target,build}-]configure
+ Don't force sequential configuration of
+ sub-packages for the host, target or build
+ machine, or of any sub-packages at all"
-# clear some things potentially inherited from environment.
-
-Makefile=Makefile
-Makefile_in=Makefile.in
-arguments=
-build_alias=
-cache_file=config.cache
-cache_file_option=
-configdirs=
-extraconfigdirs=
-diroptions=
-enable_threads=no
-enable_shared=no
-enable_libstdcxx_v3=yes
-exec_prefix=
-exec_prefixoption=
-fatal=
-floating_point=default
-gas=default
-gcc_version=
-gcc_version_trigger=
-host_alias=NOHOST
-host_makefile_frag=
-moveifchange=
-norecursion=
-other_options=
-package_makefile_frag=
-package_makefile_rules_frag=
-prefix=/usr/local
-progname=
-program_prefix=
-program_prefixoption=
-program_suffix=
-program_suffixoption=
-program_transform_name=
-program_transform_nameoption=
-redirect=
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
site=
-site_makefile_frag=
-site_option=
+sitefile=
srcdir=
-srctrigger=
-target_alias=NOTARGET
-target_makefile_frag=
-undefs=NOUNDEFS
-version="$Revision$"
-x11=default
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -102,17 +52,666 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-### we might need to use some other shell than /bin/sh for running subshells
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=move-if-change
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+ fi
+else
+ CONFIG_SITE="$sitefile"
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:589: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:610: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:628: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+
+# Autoconf M4 include file defining utility macros for complex Canadian
+# cross builds.
+
+####
+# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
+# or AC_INIT.
+# These demand that AC_CANONICAL_SYSTEM be called beforehand.
+
+####
+# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
+# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
+# Code is pretty much lifted from autoconf2.53.
+
+
+
+####
+# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
+# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
+
+
+
+####
+# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
+# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
+
+
+
+# clear some things potentially inherited from environment.
+
+enable_threads=no
+enable_shared=no
+enable_libstdcxx_v3=yes
+floating_point=default
+gas=default
+x11=default
+
+### 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
### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
### without also having to set CONFIG_SHELL. This code will work when
### using bash, which sets OSTYPE.
case "${OSTYPE}" in
*win32*)
- if [ x${CONFIG_SHELL} = x ]; then
- if [ ! -f /bin/sh ]; then
- if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
+ if test x${CONFIG_SHELL} = x ; then
+ if test ! -f /bin/sh ; then
+ if test x${SHELL} != x && test -f ${SHELL} ; then
CONFIG_SHELL=${SHELL}
export CONFIG_SHELL
else
@@ -137,680 +736,1246 @@ esac
config_shell=${CONFIG_SHELL-/bin/sh}
-NO_EDIT="This file was generated automatically by configure. Do not edit."
-
## this is a little touchy and won't always work, but...
##
-## if the argv[0] starts with a slash then it is an absolute name that can (and
+## if the argv[[0]] starts with a slash then it is an absolute name that can (and
## must) be used as is.
##
-## otherwise, if argv[0] has no slash in it, we can assume that it is on the
+## otherwise, if argv[[0]] has no slash in it, we can assume that it is on the
## path. Since PATH might include "." we also add `pwd` to the end of PATH.
##
progname=$0
# if PWD already has a value, it is probably wrong.
-if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi
-
-case "${progname}" in
-/* | [A-Za-z]:[\\/]* ) ;;
-*/*) ;;
-*)
- PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
- ;;
-esac
+if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
# Export original configure arguments for use by sub-configures.
TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
-export TOPLEVEL_CONFIGURE_ARGUMENTS
-# Loop over all args
-while :
-do
+moveifchange=${srcdir}/move-if-change
-# Break out if there are no more args
- case $# in
- 0)
- break
- ;;
- esac
+# Set srcdir to "." if that's what it is.
+# This is important for multilib support.
+pwd=`${PWDCMD-pwd}`
+srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
+if test "${pwd}" = "${srcpwd}" ; then
+ srcdir=.
+fi
-# Get the first arg, and shuffle
- option=$1
- shift
+topsrcdir=$srcpwd
-# Make all options have two hyphens
- orig_option=$option # Save original for error messages
- case $option in
- --*) ;;
- -*) option=-$option ;;
- esac
-
-# Split out the argument for options that take them
- case $option in
- --*=*)
- optarg=`echo $option | sed -e 's/^[^=]*=//'`
- arguments="$arguments $option"
- ;;
-# These options have mandatory values. Since we didn't find an = sign,
-# the value must be in the next argument
- --bu* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-* | --bi* | --sb* | --li* | --da* | --sy* | --sh* | --lo* | --in* | --ol* | --ma*)
- optarg=$1
- shift
- arguments="$arguments $option=$optarg"
- ;;
- --v)
- arguments="$arguments -v"
- ;;
- --*)
- arguments="$arguments $option"
- ;;
- esac
+extra_host_args=
+# Define the trigger file to make sure configure will re-run whenever
+# the gcc version number changes.
+if test "${with_gcc_version_trigger+set}" = set ; then
+ gcc_version_trigger="$with_gcc_version_trigger"
+ gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
+else
+ # If gcc's sources are available, define the trigger file.
+ if test -f ${topsrcdir}/gcc/version.c ; then
+ gcc_version_trigger=${topsrcdir}/gcc/version.c
+ gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
+ case "$ac_configure_args" in
+ *--with-gcc-version-trigger=$gcc_version_trigger* )
+ ;;
+ * )
+ # Add to all subconfigure arguments: build, host, and target.
+ ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
+ ;;
+ esac
+ fi
+fi
-# Now, process the options
- case $option in
-
- --bi*)
- bindir=$optarg
- diroptions="$diroptions --bindir=$optarg"
- ;;
- --build* | --bu*)
- case "$build_alias" in
- "") build_alias=$optarg ;;
- *) echo '***' Can only configure for one build machine at a time. 1>&2
- fatal=yes
- ;;
- esac
- ;;
- --cache*)
- cache_file=$optarg
- ;;
- --da*)
- datadir=$optarg
- diroptions="$diroptions --datadir=$optarg"
- ;;
- --disable-*)
- enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
- eval $enableopt=no
- disableoptions="$disableoptions $option"
- ;;
- --enable-*)
- case "$option" in
- *=*) ;;
- *) optarg=yes ;;
- esac
-
- enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval "$enableopt=\$optarg"
- enableoptions="$enableoptions '$option'"
- ;;
- --exec-prefix* | --ex*)
- exec_prefix=$optarg
- exec_prefixoption="--exec-prefix=$optarg"
- ;;
- --gas | --g*)
- gas=yes
- ;;
- --help | --he*)
- fatal=yes
- ;;
- --host* | --ho*)
- case $host_alias in
- NOHOST) host_alias=$optarg ;;
- *) echo '***' Can only configure for one host at a time. 1>&2
- fatal=yes
- ;;
- esac
- ;;
- --inc*)
- includedir=$optarg
- diroptions="$diroptions --includedir=$optarg"
- ;;
- --inf*)
- infodir=$optarg
- diroptions="$diroptions --infodir=$optarg"
- ;;
- --libd*)
- libdir=$optarg
- diroptions="$diroptions --libdir=$optarg"
- ;;
- --libe*)
- libexecdir=$optarg
- diroptions="$diroptions --libexecdir=$optarg"
- ;;
- --lo*)
- localstatedir=$optarg
- diroptions="$diroptions --localstatedir=$optarg"
- ;;
- --ma*)
- mandir=$optarg
- diroptions="$diroptions --mandir=$optarg"
- ;;
- --nfp | --nf*)
- floating_point=no
- floating_pointoption="--nfp"
- ;;
- --norecursion | --no*)
- norecursion=yes
- ;;
- --ol*)
- oldincludedir=$optarg
- diroptions="$diroptions --oldincludedir=$optarg"
- ;;
- --prefix* | --pre*)
- prefix=$optarg
- prefixoption="--prefix=$optarg"
- ;;
- --program-prefix* | --program-p*)
- program_prefix=$optarg
- program_prefixoption="--program-prefix=$optarg"
- ;;
- --program-suffix* | --program-s*)
- program_suffix=$optarg
- program_suffixoption="--program-suffix=$optarg"
- ;;
- --program-transform-name* | --program-t*)
- # Double any backslashes or dollar signs in the argument
- program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
- program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
- ;;
- --sb*)
- sbindir=$optarg
- diroptions="$diroptions --sbindir=$optarg"
- ;;
- --sh*)
- sharedstatedir=$optarg
- diroptions="$diroptions --sharedstatedir=$optarg"
- ;;
- --silent | --sil* | --quiet | --q*)
- redirect=">/dev/null"
- verbose=--silent
- ;;
- --site* | --sit*)
- site=$optarg
- site_option="--site=$optarg"
- ;;
- --srcdir*/ | --sr*/)
- # Remove trailing slashes. Otherwise, when the file name gets
- # bolted into an object file as debug info, it has two slashes
- # in it. Ordinarily this is ok, but emacs takes double slash
- # to mean "forget the first part".
- srcdir=`echo $optarg | sed -e 's:/$::'`
- ;;
- --srcdir* | --sr*)
- srcdir=$optarg
- ;;
- --sy*)
- sysconfdir=$optarg
- diroptions="$diroptions --sysconfdir=$optarg"
- ;;
- --target* | --ta*)
- case $target_alias in
- NOTARGET) target_alias=$optarg ;;
- *) echo '***' Can only configure for one target at a time. 1>&2
- fatal=yes
- ;;
- esac
- ;;
- --tmpdir* | --tm*)
- TMPDIR=$optarg
- tmpdiroption="--tmpdir=$optarg"
- ;;
- --verbose | --v | --verb*)
- redirect=
- verbose=--verbose
- ;;
- --version | --V | --vers*)
- echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
- exit 0
- ;;
- --with-*)
- case "$option" in
- *=*) ;;
- *) optarg=yes ;;
- esac
-
- withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval $withopt="\$optarg"
- withoptions="$withoptions $option"
- ;;
- --without-*)
- withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
- eval $withopt=no
- withoutoptions="$withoutoptions $option"
- ;;
- --x) with_x=yes
- withoptions="$withoptions --with-x"
- ;;
- --x-i* | --x-l*) other_options="$other_options $orig_option"
- ;;
- --*)
- echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
- exit 1
- ;;
- *)
- case $undefs in
- NOUNDEFS) undefs=$option ;;
- *) echo '***' Can only configure for one host and one target at a time. 1>&2
- fatal=yes
- ;;
- esac
- ;;
- esac
-done
+### To add a new directory to the tree, first choose whether it is a target
+### or a host dependent tool. Then put it into the appropriate list
+### (library or tools, host or target), doing a dependency sort.
-# process host and target
+# Subdirs will be configured in the order listed in build_configdirs,
+# configdirs, or target_configdirs; see the serialization section below.
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET UNDEFS
+# Dependency sorting is only needed when *configuration* must be done in
+# a particular order. In all cases a dependency should be specified in
+# the Makefile, whether or not it's implicitly specified here.
+
+# Double entries in build_configdirs, configdirs, or target_configdirs may
+# cause circular dependencies and break everything horribly.
+
+# these libraries are used by various programs built for the host environment
#
-# The rules are:
-# 1. You aren't allowed to specify --host, --target, and undefs at the
-# same time.
-# 2. Host defaults to undefs.
-# 3. If undefs is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target defaults to undefs.
-# 5. If undefs is not specified, then target defaults to host.
-
-case "${fatal}" in
-"")
- # Make sure that host, target & undefs aren't all specified at the
- # same time.
- case $host_alias---$target_alias---$undefs in
- NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
- ;;
- *) echo '***' Can only configure for one host and one target at a time. 1>&2
- fatal=yes
- break 2
- ;;
- esac
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
- # Now, do defaulting for host.
- case $host_alias in
- NOHOST)
- case $undefs in
- NOUNDEFS)
- # Neither --host option nor undefs were present.
- # Call config.guess.
- guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
- if host_alias=`${config_shell} ${guesssys}`
- then
- # If the string we are going to use for
- # the target is a prefix of the string
- # we just guessed for the host, then
- # assume we are running native, and force
- # the same string for both target and host.
- case $target_alias in
- NOTARGET) ;;
- *)
- if expr $host_alias : $target_alias >/dev/null
- then
- host_alias=$target_alias
- fi
- ;;
- esac
- echo "Configuring for a ${host_alias} host."
- arguments="--host=$host_alias $arguments"
- else
- echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2
- fatal=yes
- fi
- ;;
- *)
- host_alias=$undefs
- arguments="--host=$host_alias $arguments"
- undefs=NOUNDEFS
- ;;
- esac
- esac
+libstdcxx_version="target-libstdc++-v3"
- # Do defaulting for target. If --target option isn't present, default
- # to undefs. If undefs isn't present, default to host.
- case $target_alias in
- NOTARGET)
- case $undefs in
- NOUNDEFS)
- target_alias=$host_alias
- ;;
- *)
- target_alias=$undefs
- arguments="--target=$target_alias $arguments"
- ;;
- esac
- esac
- ;;
-*) ;;
-esac
+# these tools are built for the host environment
+# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
+# know that we are building the simulator.
+# binutils, gas and ld appear in that order because it makes sense to run
+# "make check" in that particular order.
+host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
-if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
- exec 1>&2
- echo Usage: configure [OPTIONS] [HOST]
- echo
- echo Options: [defaults in brackets]
- echo ' --prefix=MYDIR install into MYDIR [/usr/local]'
- echo ' --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]'
- echo ' --help print this message [normal config]'
- echo ' --build=BUILD configure for building on BUILD [BUILD=HOST]'
- echo ' --host=HOST configure for HOST [determined via config.guess]'
- echo ' --norecursion configure this directory only [recurse]'
- echo ' --program-prefix=FOO prepend FOO to installed program names [""]'
- echo ' --program-suffix=FOO append FOO to installed program names [""]'
- echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
- echo ' --site=SITE configure with site-specific makefile for SITE'
- echo ' --srcdir=DIR find the sources in DIR [. or ..]'
- echo ' --target=TARGET configure for TARGET [TARGET=HOST]'
- echo ' --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]'
- echo ' --nfp configure for software floating point [hard float]'
- echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
- echo ' --without-FOO package FOO is NOT available'
- echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
- echo ' --disable-FOO do not include feature FOO'
- echo
- echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
- echo
- if [ -r config.status ] ; then
- cat config.status
- fi
+# libgcj represents the runtime libraries only used by gcj.
+libgcj="target-libffi \
+ target-boehm-gc \
+ target-zlib \
+ target-qthreads \
+ target-libjava"
- exit 1
-fi
+# these libraries are built for the target environment, and are built after
+# the host libraries and the host tools (which may be a cross compiler)
+#
+target_libs="target-libiberty \
+ target-libgloss \
+ target-newlib \
+ ${libstdcxx_version} \
+ target-libf2c \
+ ${libgcj} \
+ target-libobjc"
-configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
-moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
-## the sed command below emulates the dirname command
-topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}`
+# these tools are built using the target libs, and are intended to run only
+# in the target environment
+#
+# note: any program that *uses* libraries that are in the "target_libs"
+# list belongs in this list. those programs are also very likely
+# candidates for the "native_only" list which follows
+#
+target_tools="target-examples target-groff target-gperf target-rda"
+
+################################################################################
+
+## All tools belong in one of the four categories, and are assigned above
+## We assign ${configdirs} this way to remove all embedded newlines. This
+## is important because configure will choke if they ever get through.
+## ${configdirs} is directories we build using the host tools.
+## ${target_configdirs} is directories we build using the target tools.
+#
+configdirs=`echo ${host_libs} ${host_tools}`
+target_configdirs=`echo ${target_libs} ${target_tools}`
+################################################################################
-# this is a hack. sun4 must always be a valid host alias or this will fail.
-if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
- true
+srcname="gnu development package"
+
+# This gets set non-empty for some net releases of packages.
+appdirs=""
+
+# Define is_cross_compiler to save on calls to 'test'.
+is_cross_compiler=
+if test x"${host}" = x"${target}" ; then
+ is_cross_compiler=no
else
- echo '***' cannot find config.sub. 1>&2
- exit 1
+ is_cross_compiler=yes
+fi
+
+# We always want to use the same name for this directory, so that dejagnu
+# can reliably find it.
+target_subdir=${target_alias}
+
+if test ! -d ${target_subdir} ; then
+ if mkdir ${target_subdir} ; then true
+ else
+ echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
+ exit 1
+ fi
fi
-touch config.junk
-if ${config_shell} ${moveifchange} config.junk config.trash ; then
- true
-else
- echo '***' cannot find move-if-change. 1>&2
- exit 1
+build_prefix=build-
+build_subdir=${build_prefix}${build_alias}
+
+if test x"${build_alias}" != x"${host}" ; then
+ if test ! -d ${build_subdir} ; then
+ if mkdir ${build_subdir} ; then true
+ else
+ echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
+ exit 1
+ fi
+ fi
fi
-rm -f config.junk config.trash
-case "${srcdir}" in
-"")
- if [ -r configure.in ] ; then
- srcdir=.
- else
- if [ -r ${progname}.in ] ; then
- srcdir=`echo ${progname} | sed 's:/configure$::'`
- else
- echo '***' "Can't find configure.in. Try using --srcdir=some_dir" 1>&2
- exit 1
- fi
- fi
- ;;
-*)
- # Set srcdir to "." if that's what it is.
- # This is important for multilib support.
- if [ ! -d ${srcdir} ] ; then
- echo "Invalid source directory ${srcdir}" >&2
- exit 1
- fi
- pwd=`${PWDCMD-pwd}`
- srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
- if [ "${pwd}" = "${srcpwd}" ] ; then
- srcdir=.
- fi
-esac
+# Skipdirs are removed silently.
+skipdirs=
+# Noconfigdirs are removed loudly.
+noconfigdirs=""
-### warn about some conflicting configurations.
+use_gnu_ld=
+# Make sure we don't let GNU ld be added if we didn't want it.
+if test x$with_gnu_ld = xno ; then
+ use_gnu_ld=no
+ noconfigdirs="$noconfigdirs ld"
+fi
-case "${srcdir}" in
-".") ;;
-*)
- if [ -f ${srcdir}/config.status ] ; then
- echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2
- exit 1
- fi
+use_gnu_as=
+# Make sure we don't let GNU as be added if we didn't want it.
+if test x$with_gnu_as = xno ; then
+ use_gnu_as=no
+ noconfigdirs="$noconfigdirs gas"
+fi
+
+# some tools are so dependent upon X11 that if we're not building with X,
+# it's not even worth trying to configure, much less build, that tool.
+
+case ${with_x} in
+ yes | "") ;; # the default value for this tree is that X11 is available
+ no)
+ skipdirs="${skipdirs} tk tix itcl libgui"
+ # We won't be able to build gdbtk without X.
+ enable_gdbtk=no
+ ;;
+ *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
esac
-# default exec_prefix
-case "${exec_prefixoption}" in
-"") exec_prefix="\$(prefix)" ;;
-*) ;;
+# Some tools are only suitable for building in a "native" situation.
+# Remove these if host!=target.
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
+
+# Similarly, some are only suitable for cross toolchains.
+# Remove these if host=target.
+cross_only="target-libgloss target-newlib target-opcodes"
+
+case $is_cross_compiler in
+ no) skipdirs="${skipdirs} ${cross_only}" ;;
+ yes) skipdirs="${skipdirs} ${native_only}" ;;
esac
-### break up ${srcdir}/configure.in.
-case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
-"")
- echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
- # Check for a directory that's been converted to use autoconf since
- # it was last configured.
- if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
- echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
- if [ -r ${srcdir}/configure ] ; then
- echo '***' Running the local configure script. 1>&2
- case "${cache_file}" in
- "") cache_file_option= ;;
- *) cache_file_option="--cache-file=${cache_file}" ;;
- esac
- srcdiroption="--srcdir=${srcdir}"
- case "${build_alias}" in
- "") buildopt= ;;
- *) buildopt="--build=${build_alias}" ;;
- esac
- eval exec ${config_shell} ${srcdir}/configure ${verbose} \
- ${buildopt} --host=${host_alias} --target=${target_alias} \
- ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
- ${srcdiroption} ${diroptions} \
- ${program_prefixoption} ${program_suffixoption} \
- ${program_transform_nameoption} ${site_option} \
- ${withoptions} ${withoutoptions} \
- ${enableoptions} ${disableoptions} ${floating_pointoption} \
- ${cache_file_option} ${other_options} ${redirect}
- else
- echo '***' There is no configure script present though. 1>&2
- fi
- fi
- exit 1
- ;;
-*) ;;
+# If both --with-headers and --with-libs are specified, default to
+# --without-newlib.
+if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
+ if test x"${with_newlib}" = x ; then
+ with_newlib=no
+ fi
+fi
+
+# Recognize --with-newlib/--without-newlib.
+case ${with_newlib} in
+ no) skipdirs="${skipdirs} target-newlib" ;;
+ yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
-case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
-"")
- echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
- exit 1
- ;;
-*) ;;
+# Configure extra directories which are host specific
+
+case "${host}" in
+ *-cygwin*)
+ configdirs="$configdirs libtermcap" ;;
esac
-case "${TMPDIR}" in
-"") TMPDIR=/tmp ; export TMPDIR ;;
-*) ;;
+# Remove more programs from consideration, based on the host or
+# target this usually means that a port of the program doesn't
+# exist yet.
+
+case "${host}" in
+ hppa*64*-*-*)
+ noconfigdirs="$noconfigdirs byacc"
+ ;;
+ i[3456]86-*-vsta)
+ noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
+ ;;
+ i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
+ noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
+ ;;
+ i[3456]86-*-mingw32*)
+ # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
+ noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
+ ;;
+ i[3456]86-*-beos*)
+ noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
+ ;;
+ *-*-cygwin*)
+ noconfigdirs="autoconf automake send-pr rcs guile perl"
+ ;;
+ *-*-netbsd*)
+ noconfigdirs="rcs"
+ ;;
+ ppc*-*-pe)
+ noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
+ ;;
+ powerpc-*-beos*)
+ noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
+ ;;
+ *-*-darwin*)
+ noconfigdirs="$noconfigdirs tk itcl tix libgui"
+ ;;
esac
-# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
-tmpdir=${TMPDIR}/cNf$$
-mkdir ${tmpdir} || exit 1
-tmpfile=${tmpdir}/cNf$$
-# Note that under many versions of sh a trap handler for 0 will *override* any
-# exit status you explicitly specify! At this point, the only non-error exit
-# is at the end of the script; these actions are duplicated there, minus
-# the "exit 1". Don't use "exit 0" anywhere after this without resetting the
-# trap handler, or you'll lose.
-trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15
-
-# split ${srcdir}/configure.in into common, per-host, per-target,
-# and post-target parts. Post-target is optional.
-sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
-sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
-if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
- sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
- sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
-else
- sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
- echo >${tmpfile}.pos
-fi
-
-### do common part of configure.in
-
-. ${tmpfile}.com
-
-# some sanity checks on configure.in
-case "${srctrigger}" in
-"")
- echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in. 1>&2
- exit 1
- ;;
-*) ;;
+# Save it here so that, even in case of --enable-libgcj, if the Java
+# front-end isn't enabled, we still get libgcj disabled.
+libgcj_saved=$libgcj
+case $enable_libgcj in
+yes)
+ # If we reset it here, it won't get added to noconfigdirs in the
+ # target-specific build rules, so it will be forcibly enabled
+ # (unless the Java language itself isn't enabled).
+ libgcj=
+ ;;
+no)
+ # Make sure we get it printed in the list of not supported target libs.
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
esac
-case "${build_alias}" in
-"")
- if result=`${config_shell} ${configsub} ${host_alias}` ; then
- build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- build=${build_cpu}-${build_vendor}-${build_os}
- build_alias=${host_alias}
- fi
- ;;
-*)
- if result=`${config_shell} ${configsub} ${build_alias}` ; then
- buildopt="--build=${build_alias}"
- build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- build=${build_cpu}-${build_vendor}-${build_os}
- else
- echo "Unrecognized build system name ${build_alias}." 1>&2
- exit 1
- fi
+case "${target}" in
+ *-*-chorusos)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ ;;
+ *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ ;;
+ *-*-netbsd*)
+ # Skip some stuff on all NetBSD configurations.
+ noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
+
+ # Skip some stuff that's unsupported on some NetBSD configurations.
+ case "${target}" in
+ i*86-*-netbsdelf*) ;;
+ *)
+ noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ esac
+ ;;
+ *-*-netware)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
+ ;;
+ *-*-rtems*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ case ${target} in
+ h8300*-*-* | h8500-*-*)
+ noconfigdirs="$noconfigdirs target-libf2c"
+ ;;
+ *) ;;
+ esac
+ ;;
+ *-*-vxworks*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ ;;
+ alpha*-dec-osf*)
+ # ld works, but does not support shared libraries.
+ # newlib is not 64 bit ready. I'm not sure about fileutils.
+ # gas doesn't generate exception information.
+ noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
+ ;;
+ alpha*-*-*vms*)
+ noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
+ ;;
+ alpha*-*-linux*)
+ # newlib is not 64 bit ready
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
+ alpha*-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
+ alpha*-*-*)
+ # newlib is not 64 bit ready
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ ;;
+ sh-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs target-examples"
+ noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
+ noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
+ noconfigdirs="$noconfigdirs expect dejagnu"
+ # the C++ libraries don't build on top of CE's C libraries
+ noconfigdirs="$noconfigdirs ${libstdcxx_version}"
+ noconfigdirs="$noconfigdirs target-newlib"
+ case "${host}" in
+ *-*-cygwin*) ;; # keep gdb and readline
+ *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
+ ;;
+ esac
+ ;;
+ arc-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ arm-*-coff | strongarm-*-coff | xscale-*-coff)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+ arm-*-pe*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ arm-*-oabi*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ thumb-*-coff)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ thumb-*-elf)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ thumb-*-oabi)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ thumb-*-pe)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ arm-*-riscix*)
+ noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
+ ;;
+ avr-*-*)
+ noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
+ ;;
+ c4x-*-* | tic4x-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
+ ;;
+ c54x*-*-* | tic54x-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
+ ;;
+ cris-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ d10v-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
+ ;;
+ d30v-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ fr30-*-elf*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ frv-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ h8300*-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
+ h8500-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
+ ;;
+ hppa*64*-*-linux* | parisc*64*-*-linux*)
+ # In this case, it's because the hppa64-linux target is for
+ # the kernel only at this point and has no libc, and thus no
+ # headers, crt*.o, etc., all of which are needed by these.
+ noconfigdirs="$noconfigdirs target-zlib"
+ ;;
+ hppa*-*-*elf* | \
+ parisc*-*-linux* | hppa*-*-linux* | \
+ hppa*-*-lites* | \
+ hppa*-*-openbsd* | \
+ hppa*64*-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ # Do configure ld/binutils/gas for this case.
+ ;;
+ hppa*-*-*)
+ # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
+ # build on HP-UX 10.20.
+ noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
+ ;;
+ ia64*-*-elf*)
+ # No gdb support yet.
+ noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
+ ;;
+ ia64*-**-hpux*)
+ # No gdb or ld support yet.
+ noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
+ ;;
+ i[3456]86-*-coff | i[3456]86-*-elf)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ i[34567]86-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
+ i[3456]86-*-linux*)
+ # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
+ # not build java stuff by default.
+ case "${target}" in
+ *-*-*libc1*)
+ noconfigdirs="$noconfigdirs ${libgcj}";;
+ esac
+
+ # This section makes it possible to build newlib natively on linux.
+ # If we are using a cross compiler then don't configure newlib.
+ if test x${is_cross_compiler} != xno ; then
+ noconfigdirs="$noconfigdirs target-newlib"
+ fi
+ noconfigdirs="$noconfigdirs target-libgloss"
+ # If we are not using a cross compiler, do configure newlib.
+ # Note however, that newlib will only be configured in this situation
+ # if the --with-newlib option has been given, because otherwise
+ # 'target-newlib' will appear in skipdirs.
+ ;;
+ i[3456]86-*-mingw32*)
+ target_configdirs="$target_configdirs target-mingw"
+ noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
+
+ # Can't build gdb for mingw32 if not native.
+ case "${host}" in
+ i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
+ ;;
+ esac
+ ;;
+ *-*-cygwin*)
+ target_configdirs="$target_configdirs target-libtermcap target-winsup"
+ noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
+ # always build newlib.
+ skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+
+ # Can't build gdb for Cygwin if not native.
+ case "${host}" in
+ *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
+ ;;
+ esac
+ ;;
+ i[3456]86-*-pe)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
+ ;;
+ i[3456]86-*-sco3.2v5*)
+ # The linker does not yet know about weak symbols in COFF,
+ # and is not configured to handle mixed ELF and COFF.
+ noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
+ ;;
+ i[3456]86-*-sco*)
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
+ i[3456]86-*-solaris2*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
+ i[3456]86-*-sysv4*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ i[3456]86-*-beos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
+ ;;
+ m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
+ noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
+ ;;
+ m68k-*-elf*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ m68k-*-coff*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ mcore-*-pe*)
+ # The EPOC C++ environment does not support exceptions or rtti,
+ # and so building libstdc++-v3 tends not to always work.
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
+ mmix-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
+ ;;
+ mn10200-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ mn10300-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ powerpc-*-aix*)
+ # copied from rs6000-*-* entry
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
+ powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
+ target_configdirs="$target_configdirs target-winsup"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
+ # always build newlib.
+ skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ ;;
+ # This is temporary until we can link against shared libraries
+ powerpcle-*-solaris*)
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
+ ;;
+ powerpc-*-beos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
+ ;;
+ powerpc-*-darwin*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}"
+ ;;
+ powerpc-*-eabi)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ powerpc64*-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ # not yet ported.
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ rs6000-*-lynxos*)
+ noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
+ ;;
+ rs6000-*-aix*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ ;;
+ rs6000-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ ;;
+ m68k-apollo-*)
+ noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
+ ;;
+ mips*-*-irix5*)
+ # The GNU linker does not support shared libraries.
+ noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
+ ;;
+ mips*-*-irix6*)
+ # Linking libjava exceeds command-line length limits on at least
+ # IRIX 6.2, but not on IRIX 6.5.
+ # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
+ # <oldham@codesourcery.com>
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
+ mips*-dec-bsd*)
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
+ mips*-*-bsd*)
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
+ mipstx39-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
+ ;;
+ mips*-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ ;;
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+ sh-*-*)
+ case "${host}" in
+ i[3456]86-*-vsta) ;; # don't add gprof back in
+ i[3456]86-*-go32*) ;; # don't add gprof back in
+ i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
+ *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
+ esac
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ sh64-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ sparc-*-elf*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ sparc64-*-elf*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ sparclite-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ sparc-*-sunos4*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ if test x${is_cross_compiler} != xno ; then
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
+ else
+ use_gnu_ld=no
+ fi
+ ;;
+ sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
+ ;;
+ v810-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss ${libgcj}"
+ ;;
+ v850-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ v850e-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ v850ea-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ ;;
+ vax-*-vms)
+ noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
+ ;;
+ vax-*-*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ ;;
+ ip2k-*-*)
+ noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
+ ;;
+ *-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
+ *-*-lynxos*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ ;;
+ *-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
esac
-if result=`${config_shell} ${configsub} ${host_alias}` ; then
- true
+# If we aren't building newlib, then don't build libgloss, since libgloss
+# depends upon some newlib header files.
+case "${noconfigdirs}" in
+ *target-libgloss*) ;;
+ *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
+esac
+
+# Figure out what language subdirectories are present.
+# Look if the user specified --enable-languages="..."; if not, use
+# the environment variable $LANGUAGES if defined. $LANGUAGES might
+# go away some day.
+# NB: embedded tabs in this IF block -- do not untabify
+if test x"${enable_languages+set}" != xset; then
+ if test x"${LANGUAGES+set}" = xset; then
+ enable_languages="${LANGUAGES}"
+ echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+ else
+ enable_languages=all
+ fi
else
- echo "Unrecognized host system name ${host_alias}." 1>&2
- exit 1
+ if test x"${enable_languages}" = x ||
+ test x"${enable_languages}" = xyes;
+ then
+ echo configure.in: --enable-languages needs at least one language argument 1>&2
+ exit 1
+ fi
fi
-host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-host=${host_cpu}-${host_vendor}-${host_os}
+enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
-. ${tmpfile}.hst
+# First scan to see if an enabled language requires some other language.
+# We assume that a given config-lang.in will list all the language
+# front ends it requires, even if some are required indirectly.
+for lang in ${srcdir}/gcc/*/config-lang.in ..
+do
+ case $lang in
+ ..)
+ ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[*]/config-lang.in)
+ ;;
+ *)
+ lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
+ this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
+ for other in $this_lang_requires
+ do
+ case ,${enable_languages}, in
+ *,$other,*)
+ ;;
+ *,all,*)
+ ;;
+ *,$lang_alias,*)
+ echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
+ enable_languages="$enable_languages,$other"
+ ;;
+ esac
+ done
+ ;;
+ esac
+done
-if result=`${config_shell} ${configsub} ${target_alias}` ; then
- true
-else
- echo "Unrecognized target system name ${target_alias}." 1>&2
- exit 1
+subdirs=
+for lang in ${srcdir}/gcc/*/config-lang.in ..
+do
+ case $lang in
+ ..) ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[*]/config-lang.in) ;;
+ *)
+ lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
+ this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
+ this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ ]*\).*$,\1,p' $lang`
+ build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
+ if test "x$lang_alias" = x
+ then
+ echo "$lang doesn't set \$language." 1>&2
+ exit 1
+ fi
+ case ${build_by_default},${enable_languages}, in
+ *,$lang_alias,*) add_this_lang=yes ;;
+ no,*) add_this_lang=no ;;
+ *,all,*) add_this_lang=yes ;;
+ *) add_this_lang=no ;;
+ esac
+ if test x"${add_this_lang}" = xyes; then
+ eval target_libs='"$target_libs "'\"$this_lang_libs\"
+ else
+ eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
+ fi
+ ;;
+ esac
+done
+
+# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
+# $target_configdirs.
+# If we have the source for $noconfigdirs entries, add them to $notsupp.
+
+notsupp=""
+for dir in . $skipdirs $noconfigdirs ; do
+ dirname=`echo $dir | sed -e s/target-//g`
+ if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
+ if test -r $srcdir/$dirname/configure ; then
+ if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ true
+ else
+ notsupp="$notsupp $dir"
+ fi
+ fi
+ fi
+ if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
+ if test -r $srcdir/$dirname/configure ; then
+ if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ true
+ else
+ notsupp="$notsupp $dir"
+ fi
+ fi
+ fi
+done
+
+# Sometimes the tools are distributed with libiberty but with no other
+# libraries. In that case, we don't want to build target-libiberty.
+if test -n "${target_configdirs}" ; then
+ others=
+ for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
+ if test "$i" != "libiberty" ; then
+ if test -r $srcdir/$i/configure ; then
+ others=yes;
+ break;
+ fi
+ fi
+ done
+ if test -z "${others}" ; then
+ target_configdirs=
+ fi
fi
-target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-target=${target_cpu}-${target_vendor}-${target_os}
-. ${tmpfile}.tgt
+# Quietly strip out all directories which aren't configurable in this tree.
+# This relies on all configurable subdirectories being autoconfiscated, which
+# is now the case.
+configdirs_all="$configdirs"
+configdirs=
+for i in ${configdirs_all} ; do
+ if test -f ${srcdir}/$i/configure ; then
+ configdirs="${configdirs} $i"
+ fi
+done
+target_configdirs_all="$target_configdirs"
+target_configdirs=
+for i in ${target_configdirs_all} ; do
+ j=`echo $i | sed -e s/target-//g`
+ if test -f ${srcdir}/$j/configure ; then
+ target_configdirs="${target_configdirs} $i"
+ fi
+done
-# Find the source files, if location was not specified.
-case "${srcdir}" in
-"")
- srcdirdefaulted=1
- srcdir=.
- if [ ! -r ${srctrigger} ] ; then
- srcdir=..
- fi
- ;;
-*) ;;
+# Produce a warning message for the subdirs we can't configure.
+# This isn't especially interesting in the Cygnus tree, but in the individual
+# FSF releases, it's important to let people know when their machine isn't
+# supported by the one or two programs in a package.
+
+if test -n "${notsupp}" && test -z "${norecursion}" ; then
+ # If $appdirs is non-empty, at least one of those directories must still
+ # be configured, or we error out. (E.g., if the gas release supports a
+ # specified target in some subdirs but not the gas subdir, we shouldn't
+ # pretend that all is well.)
+ if test -n "$appdirs" ; then
+ for dir in $appdirs ; do
+ if test -r $dir/Makefile.in ; then
+ if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ appdirs=""
+ break
+ fi
+ if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ appdirs=""
+ break
+ fi
+ fi
+ done
+ if test -n "$appdirs" ; then
+ echo "*** This configuration is not supported by this package." 1>&2
+ exit 1
+ fi
+ fi
+ # Okay, some application will build, or we don't care to check. Still
+ # notify of subdirs not getting built.
+ echo "*** This configuration is not supported in the following subdirectories:" 1>&2
+ echo " ${notsupp}" 1>&2
+ echo " (Any other directories should still work fine.)" 1>&2
+fi
+
+case "$host" in
+ *msdosdjgpp*)
+ enable_gdbtk=no ;;
esac
-if [ ! -r ${srcdir}/${srctrigger} ] ; then
- case "${srcdirdefaulted}" in
- "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;;
- *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;;
- esac
+copy_dirs=
- echo '***' \(At least ${srctrigger} is missing.\) 1>&2
- exit 1
+# Handle --with-headers=XXX. If the value is not "yes", the contents of
+# the named directory are copied to $(tooldir)/sys-include.
+if test x"${with_headers}" != x ; then
+ if test x${is_cross_compiler} = xno ; then
+ echo 1>&2 '***' --with-headers is only supported when cross compiling
+ exit 1
+ fi
+ if test x"${with_headers}" != xyes ; then
+ case "${exec_prefixoption}" in
+ "") x=${prefix} ;;
+ *) x=${exec_prefix} ;;
+ esac
+ copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+ fi
fi
-# Some systems (e.g., one of the i386-aix systems the gas testers are
-# using) don't handle "\$" correctly, so don't use it here.
-tooldir='$(exec_prefix)'/${target_alias}
+# Handle --with-libs=XXX. If the value is not "yes", the contents of
+# the name directories are copied to $(tooldir)/lib. Multiple directories
+# are permitted.
+if test x"${with_libs}" != x ; then
+ if test x${is_cross_compiler} = xno ; then
+ echo 1>&2 '***' --with-libs is only supported when cross compiling
+ exit 1
+ fi
+ if test x"${with_libs}" != xyes ; then
+ # Copy the libraries in reverse order, so that files in the first named
+ # library override files in subsequent libraries.
+ case "${exec_prefixoption}" in
+ "") x=${prefix} ;;
+ *) x=${exec_prefix} ;;
+ esac
+ for l in ${with_libs}; do
+ copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
+ done
+ fi
+fi
-if [ "${host_alias}" != "${target_alias}" ] ; then
- if [ "${program_prefixoption}" = "" ] ; then
- if [ "${program_suffixoption}" = "" ] ; then
- if [ "${program_transform_nameoption}" = "" ] ; then
- program_prefix=${target_alias}- ;
- fi
- fi
+# Handle ${copy_dirs}
+set fnord ${copy_dirs}
+shift
+while test $# != 0 ; do
+ if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
+ :
+ else
+ echo Copying $1 to $2
+
+ # Use the install script to create the directory and all required
+ # parent directories.
+ if test -d $2 ; then
+ :
+ else
+ echo >config.temp
+ ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
fi
+
+ # Copy the directory, assuming we have tar.
+ # FIXME: Should we use B in the second tar? Not all systems support it.
+ (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
+
+ # It is the responsibility of the user to correctly adjust all
+ # symlinks. If somebody can figure out how to handle them correctly
+ # here, feel free to add the code.
+
+ echo $1 > $2/COPIED
+ fi
+ shift; shift
+done
+
+# Work in distributions that contain no compiler tools, like Autoconf.
+tentative_cc=""
+host_makefile_frag=/dev/null
+if test -d ${srcdir}/config ; then
+case "${host}" in
+ m68k-hp-hpux*)
+ # Avoid "too much defining" errors from HPUX compiler.
+ tentative_cc="cc -Wp,-H256000"
+ # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
+ # If it's HP/UX ar, this should be harmless.
+ RANLIB="ar ts"
+ ;;
+ m68k-apollo-sysv*)
+ tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
+ ;;
+ m68k-apollo-bsd*)
+ #None of the Apollo compilers can compile gas or binutils. The preprocessor
+ # chokes on bfd, the compiler won't let you assign integers to enums, and
+ # other problems. Defining CC to gcc is a questionable way to say "don't use
+ # the apollo compiler" (the preferred version of GCC could be called cc,
+ # or whatever), but I'm not sure leaving CC as cc is any better...
+ #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
+ # Used to have BISON=yacc.
+ tentative_cc=gcc
+ ;;
+ m88k-dg-dgux*)
+ tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+ host_makefile_frag="config/mh-dgux"
+ ;;
+ m88k-harris-cxux*)
+ # Under CX/UX, we want to tell the compiler to use ANSI mode.
+ tentative_cc="cc -Xa"
+ host_makefile_frag="config/mh-cxux"
+ ;;
+ m88k-motorola-sysv*)
+ ;;
+ mips*-dec-ultrix*)
+ tentative_cc="cc -Wf,-XNg1000"
+ host_makefile_frag="config/mh-decstation"
+ ;;
+ mips*-nec-sysv4*)
+ # The C compiler on NEC MIPS SVR4 needs bigger tables.
+ tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
+ host_makefile_frag="config/mh-necv4"
+ ;;
+ mips*-sgi-irix4*)
+ # Tell compiler to use K&R C. We can't compile under the SGI Ansi
+ # environment. Also bump switch table size so that cp-parse will
+ # compile. Bump string length limit so linker builds.
+ tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
+ ;;
+ mips*-*-sysv4*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ mips*-*-sysv*)
+ # This is for a MIPS running RISC/os 4.52C.
+
+ # This is needed for GDB, but needs to be in the top-level make because
+ # if a library is compiled with the bsd headers and gets linked with the
+ # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
+ # a different size).
+ # ptrace(2) apparently has problems in the BSD environment. No workaround is
+ # known except to select the sysv environment. Could we use /proc instead?
+ # These "sysv environments" and "bsd environments" often end up being a pain.
+ #
+ # This is not part of CFLAGS because perhaps not all C compilers have this
+ # option.
+ tentative_cc="cc -systype sysv"
+ ;;
+ i370-ibm-opened*)
+ tentative_cc="c89"
+ ;;
+ i[3456]86-*-sysv5*)
+ host_makefile_frag="config/mh-sysv5"
+ ;;
+ i[3456]86-*-dgux*)
+ tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+ host_makefile_frag="config/mh-dgux386"
+ ;;
+ i[3456]86-ncr-sysv4.3*)
+ # The MetaWare compiler will generate a copyright message unless you
+ # turn it off by adding the -Hnocopyr flag.
+ tentative_cc="cc -Hnocopyr"
+ ;;
+ i[3456]86-ncr-sysv4*)
+ # for an NCR 3000 (i486/SVR4) system.
+ # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
+ # This compiler not only emits obnoxious copyright messages every time
+ # you run it, but it chokes and dies on a whole bunch of GNU source
+ # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
+ tentative_cc="/usr/ccs/ATT/cc"
+ host_makefile_frag="config/mh-ncr3000"
+ ;;
+ i[3456]86-*-sco3.2v5*)
+ ;;
+ i[3456]86-*-sco*)
+ # The native C compiler botches some simple uses of const. Unfortunately,
+ # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
+ tentative_cc="cc -Dconst="
+ host_makefile_frag="config/mh-sco"
+ ;;
+ i[3456]86-*-udk*)
+ host_makefile_frag="config/mh-sysv5"
+ ;;
+ i[3456]86-*-solaris2*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ i[3456]86-*-msdosdjgpp*)
+ host_makefile_frag="config/mh-djgpp"
+ ;;
+ *-cygwin*)
+ host_makefile_frag="config/mh-cygwin"
+ ;;
+ *-mingw32*)
+ host_makefile_frag="config/mh-mingw32"
+ ;;
+ *-interix*)
+ host_makefile_frag="config/mh-interix"
+ ;;
+ vax-*-ultrix2*)
+ # The old BSD pcc isn't up to compiling parts of gdb so use gcc
+ tentative_cc=gcc
+ ;;
+ *-*-solaris2*)
+ host_makefile_frag="config/mh-solaris"
+ ;;
+ m68k-sun-sunos*)
+ # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
+ # without overflowing the jump tables (-J says to use a 32 bit table)
+ tentative_cc="cc -J"
+ ;;
+ *-hp-hpux*)
+ tentative_cc="cc -Wp,-H256000"
+ ;;
+ *-*-hiux*)
+ tentative_cc="cc -Wp,-H256000"
+ ;;
+ rs6000-*-lynxos*)
+ # /bin/cc is less than useful for our purposes. Always use GCC
+ tentative_cc="/usr/cygnus/progressive/bin/gcc"
+ host_makefile_frag="config/mh-lynxrs6k"
+ ;;
+ *-*-lynxos*)
+ # /bin/cc is less than useful for our purposes. Always use GCC
+ tentative_cc="/bin/gcc"
+ ;;
+ *-*-sysv4*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+esac
fi
-# Merge program_prefix and program_suffix onto program_transform_name.
-# (program_suffix used to use $, but it's hard to preserve $ through both
-# make and sh.)
-if [ "${program_suffix}" != "" ] ; then
- program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
+extra_arflags_for_target=
+extra_nmflags_for_target=
+extra_ranlibflags_for_target=
+target_makefile_frag=/dev/null
+case "${target}" in
+ i[3456]86-*-netware*)
+ target_makefile_frag="config/mt-netware"
+ ;;
+ powerpc-*-netware*)
+ target_makefile_frag="config/mt-netware"
+ ;;
+ *-*-linux*)
+ target_makefile_frag="config/mt-linux"
+ ;;
+ *-*-aix4.[3456789]* | *-*-aix[56789].*)
+ # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
+ # commands to handle both 32-bit and 64-bit objects. These flags are
+ # harmless if we're using GNU nm or ar.
+ extra_arflags_for_target=" -X32_64"
+ extra_nmflags_for_target=" -B -X32_64"
+ ;;
+ *-*-darwin*)
+ # ranlib from Darwin requires the -c flag to look at common symbols.
+ extra_ranlibflags_for_target=" -c"
+ ;;
+ mips*-*-pe | sh*-*-pe | *arm-wince-pe)
+ target_makefile_frag="config/mt-wince"
+ ;;
+esac
+
+alphaieee_frag=/dev/null
+case $target in
+ alpha*-*-*)
+ # This just makes sure to use the -mieee option to build target libs.
+ # This should probably be set individually by each library.
+ alphaieee_frag="config/mt-alphaieee"
+ ;;
+esac
+
+# If --enable-target-optspace always use -Os instead of -O2 to build
+# the target libraries, similarly if it is not specified, use -Os
+# on selected platforms.
+ospace_frag=/dev/null
+case "${enable_target_optspace}:${target}" in
+ yes:*)
+ ospace_frag="config/mt-ospace"
+ ;;
+ :d30v-*)
+ ospace_frag="config/mt-d30v"
+ ;;
+ :m32r-* | :d10v-* | :fr30-*)
+ ospace_frag="config/mt-ospace"
+ ;;
+ no:* | :*)
+ ;;
+ *)
+ echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
+ ;;
+esac
+
+# Set with_gnu_as and with_gnu_ld as appropriate.
+#
+# This is done by determining whether or not the appropriate directory
+# is available, and by checking whether or not specific configurations
+# have requested that this magic not happen.
+#
+# The command line options always override the explicit settings in
+# configure.in, and the settings in configure.in override this magic.
+#
+# If the default for a toolchain is to use GNU as and ld, and you don't
+# want to do that, then you should use the --without-gnu-as and
+# --without-gnu-ld options for the configure script.
+
+if test x${use_gnu_as} = x &&
+ echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
+ with_gnu_as=yes
+ extra_host_args="$extra_host_args --with-gnu-as"
fi
-if [ "${program_prefix}" != "" ] ; then
- program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
+if test x${use_gnu_ld} = x &&
+ echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
+ with_gnu_ld=yes
+ extra_host_args="$extra_host_args --with-gnu-ld"
fi
-# If CC and CXX are not set in the environment, and the Makefile
-# exists, try to extract them from it. This is to handle running
-# ./config.status by hand.
-if [ -z "${CC}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
-/\\$/ N
-s/\\\n//g
-t loop
-/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CC=`tail -1 Makefile.cc`
- rm -f Makefile.cc
+# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
+# can detect this case.
+
+if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
+ with_newlib=yes
+ extra_host_args="$extra_host_args --with-newlib"
fi
-if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
-/\\$/ N
-s/\\\n//g
-t loop
-/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CFLAGS=`tail -1 Makefile.cc`
- rm -f Makefile.cc
+# We default to --with-shared on platforms where -fpic is meaningless.
+# Well, we don't yet, but we will.
+if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
+ case "${target}" in
+ alpha*-dec-osf*) enable_shared=yes ;;
+ alpha*-*-linux*) enable_shared=yes ;;
+ mips-sgi-irix5*) enable_shared=yes ;;
+ *) enable_shared=no ;;
+ esac
fi
-if [ -z "${CXX}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
-/\\$/ N
-s/\\\n//g
-t loop
-/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CXX=`tail -1 Makefile.cc`
- rm -f Makefile.cc
+case "${enable_shared}" in
+ yes) shared=yes ;;
+ no) shared=no ;;
+ "") shared=no ;;
+ *) shared=yes ;;
+esac
+
+
+# Default to using --with-stabs for certain targets.
+if test x${with_stabs} = x ; then
+ case "${target}" in
+ mips*-*-irix6*o32)
+ with_stabs=yes;
+ extra_host_args="${extra_host_args} --with-stabs"
+ ;;
+ mips*-*-irix6*)
+ ;;
+ mips*-*-* | alpha*-*-osf*)
+ with_stabs=yes;
+ extra_host_args="${extra_host_args} --with-stabs"
+ ;;
+ esac
fi
-if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
-/\\$/ N
-s/\\\n//g
-t loop
-/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CXXFLAGS=`tail -1 Makefile.cc`
- rm -f Makefile.cc
+# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
+# them automatically.
+case "${host}" in
+ hppa*64*-*-hpux11*)
+ extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
+ ;;
+esac
+
+# If we aren't going to be using gcc, see if we can extract a definition
+# of CC from the fragment.
+# Actually, use the 'pre-extracted' version above.
+if test -z "${CC}" && test "${build}" = "${host}" ; then
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ found=
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc; then
+ found=yes
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -z "${found}" && test -n "${tentative_cc}" ; then
+ CC=$tentative_cc
+ fi
fi
+# Some systems (e.g., one of the i386-aix systems the gas testers are
+# using) don't handle "\$" correctly, so don't use it here.
+tooldir='$(exec_prefix)'/${target_alias}
+build_tooldir=${tooldir}
+
# Generate a default definition for YACC. This is used if the makefile can't
# locate bison or byacc in objdir.
@@ -868,39 +2033,10 @@ do
test -n "$DEFAULT_LEX" && break
done
-
-if [ "${build}" != "${host}" ]; then
+if test "${build}" != "${host}" ; then
# If we are doing a Canadian Cross, in which the host and build systems
# are not the same, we set reasonable default values for the tools.
- tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
- tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
- tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
- tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
- tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
- tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
- tools="${tools} OBJCOPY OBJDUMP"
-
- for var in ${tools}; do
- if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
- sed -n -e ':loop
-/\\$/ N
-s/\\\n//g
-t loop
-/^'"${var}"'[ ]*=/ s/'"${var}"'[ ]*=[ ]*\(.*\)/\1/p' \
- < Makefile > Makefile.v
- t=`tail -1 Makefile.v`
- if [ -n "${t}" ]; then
- eval "${var}=\${t}"
- fi
- rm -f Makefile.v
- fi
- done
- AR=${AR-${host_alias}-ar}
- AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
- AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
- AS=${AS-${host_alias}-as}
- AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
BISON=${BISON-bison}
CC=${CC-${host_alias}-gcc}
CFLAGS=${CFLAGS-"-g -O2"}
@@ -910,25 +2046,12 @@ t loop
CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
- DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
- DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
BUILD_PREFIX=${build_alias}-
BUILD_PREFIX_1=${build_alias}-
- LD=${LD-${host_alias}-ld}
- LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
MAKEINFO=${MAKEINFO-makeinfo}
- NM=${NM-${host_alias}-nm}
- NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
- NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
- RANLIB=${RANLIB-${host_alias}-ranlib}
- RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
- WINDRES=${WINDRES-${host_alias}-windres}
- WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
- OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
- OBJDUMP=${OBJDUMP-${host_alias}-objdump}
-
- if [ -z "${YACC}" ]; then
+
+ if test -z "${YACC}" ; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH; do
test -z "$dir" && dir=.
@@ -946,12 +2069,12 @@ t loop
fi
done
IFS="$save_ifs"
- if [ -z "${YACC}" ]; then
+ if test -z "${YACC}" ; then
YACC="bison -y"
fi
fi
- if [ -z "${LEX}" ]; then
+ if test -z "${LEX}" ; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH; do
test -z "$dir" && dir=.
@@ -968,17 +2091,6 @@ t loop
LEX=${LEX-flex}
fi
- # Export variables which autoconf might try to set.
- export AS
- export AR
- export CC_FOR_BUILD
- export DLLTOOL
- export LD
- export NM
- export RANLIB
- export WINDRES
- export OBJCOPY
- export OBJDUMP
else
# Set reasonable default values for some tools even if not Canadian.
# Of course, these are different reasonable default values, originally
@@ -988,43 +2100,24 @@ else
# in Makefile.in, so can still be overridden by fragments.
# This is all going to change when we autoconfiscate...
- tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
- tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
- tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
- tools="${tools} NM_FOR_TARGET RANLIB_FOR_TARGET"
- tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
-
- AR=ar
- AR_FOR_TARGET='\$(USUAL_AR_FOR_TARGET)'
- AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
- AS=as
- AS_FOR_TARGET='\$(USUAL_AS_FOR_TARGET)'
- BISON='$(USUAL_BISON)'
- CC_FOR_BUILD='\$(CC)'
- DLLTOOL=dlltool
- DLLTOOL_FOR_TARGET='\$(USUAL_DLLTOOL_FOR_TARGET)'
- GCC_FOR_TARGET='\$(USUAL_GCC_FOR_TARGET)'
+ BISON="\$(USUAL_BISON)"
+ CC_FOR_BUILD="\$(CC)"
+ GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
BUILD_PREFIX=
BUILD_PREFIX_1=loser-
- LD=ld
- LD_FOR_TARGET='\$(USUAL_LD_FOR_TARGET)'
- MAKEINFO='\$(USUAL_MAKEINFO)'
- NM=nm
- NM_FOR_TARGET='\$(USUAL_NM_FOR_TARGET)'
- NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
- RANLIB_FOR_TARGET='\$(USUAL_RANLIB_FOR_TARGET)'
- WINDRES=windres
- WINDRES_FOR_TARGET='\$(USUAL_WINDRES_FOR_TARGET)'
- LEX='\$(USUAL_LEX)'
- YACC='\$(USUAL_YACC)'
+ MAKEINFO="\$(USUAL_MAKEINFO)"
+ LEX="\$(USUAL_LEX)"
+ YACC="\$(USUAL_YACC)"
# If CC is still not set, try to get gcc.
- if [ -z "${CC}" ]; then
+ cc_prog_is_gcc=
+ if test -z "${CC}" ; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH; do
test -z "$dir" && dir=.
if test -f $dir/gcc; then
CC="gcc"
+ cc_prog_is_gcc=yes
echo 'void f(){}' > conftest.c
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
CFLAGS=${CFLAGS-"-g -O2"}
@@ -1040,11 +2133,20 @@ else
IFS="$save_ifs"
CC=${CC-cc}
else
+ # Determine if we are using gcc.
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+ if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
+ cc_prog_is_gcc=yes
+ fi
+ rm -f conftest.c
if test -z "${CFLAGS}"; then
# Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
# is set to a version of gcc.
- case "${CC}" in
- *gcc)
+ if test "$cc_prog_is_gcc" = yes; then
echo 'void f(){}' > conftest.c
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
CFLAGS=${CFLAGS-"-g -O2"}
@@ -1054,7 +2156,25 @@ else
CXXFLAGS=${CXXFLAGS-"-O2"}
fi
rm -f conftest*
- ;;
+ fi
+ fi
+ fi
+
+ # We must set the default linker to the linker used by gcc for the correct
+ # operation of libtool. If LD is not defined and we are using gcc, try to
+ # set the LD default to the ld used by gcc.
+ if test -z "$LD"; then
+ if test "$cc_prog_is_gcc" = yes; then
+ case $build in
+ *-*-mingw*)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
+ *)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
+ esac
+ case $gcc_prog_ld in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ LD="$gcc_prog_ld" ;;
esac
fi
fi
@@ -1064,27 +2184,22 @@ else
CXXFLAGS=${CXXFLAGS-"-g -O2"}
fi
-export CC
-export CXX
-export CFLAGS
-export CXXFLAGS
-
# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
# Set up the list of links to be made.
# ${links} is the list of link names, and ${files} is the list of names to link to.
# Make the links.
configlinks="${links}"
-if [ -r ./config.status ] ; then
+if test -r ./config.status ; then
mv -f ./config.status ./config.back
fi
-while [ -n "${files}" ] ; do
+while test -n "${files}" ; do
# set file to car of files, files to cdr of files
set ${files}; file=$1; shift; files=$*
set ${links}; link=$1; shift; links=$*
- if [ ! -r ${srcdir}/${file} ] ; then
- if [ ! -r ${file} ] ; then
+ if test ! -r ${srcdir}/${file} ; then
+ if test ! -r ${file} ; then
echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
exit 1
@@ -1105,7 +2220,7 @@ while [ -n "${files}" ] ; do
${remove} -r -f ${link}
${hard_link} ${srcfile} ${link}
fi
- if [ ! -r ${link} ] ; then
+ if test ! -r ${link} ; then
echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
exit 1
fi
@@ -1116,7 +2231,7 @@ done
# Create a .gdbinit file which runs the one in srcdir
# and tells GDB to look there for source files.
-if [ -r ${srcdir}/.gdbinit ] ; then
+if test -r ${srcdir}/.gdbinit ; then
case ${srcdir} in
.) ;;
*) cat > ./.gdbinit <<EOF
@@ -1129,260 +2244,2058 @@ EOF
esac
fi
-# Install a makefile, and make it set VPATH
-# if necessary so that the sources are found.
-# Also change its value of srcdir.
-# NOTE: Makefile generation constitutes the majority of the time in configure. Hence, this section has
-# been somewhat optimized and is perhaps a bit twisty.
+# record if we want runtime library stuff installed in libsubdir.
+# Blank means no.
+if test -z "${enable_version_specific_runtime_libs}"; then
+ enable_version_specific_runtime_libs=no
+fi
+
+# Make sure that the compiler is able to generate an executable. If it
+# can't, we are probably in trouble. We don't care whether we can run the
+# executable--we might be using a cross compiler--we only care whether it
+# can be created. At this point the main configure script has set CC.
+we_are_ok=no
+echo "int main () { return 0; }" > conftest.c
+${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
+if test $? = 0 ; then
+ if test -s conftest || test -s conftest.exe ; then
+ we_are_ok=yes
+ fi
+fi
+case $we_are_ok in
+ no)
+ echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
+ echo 1>&2 "*** You must set the environment variable CC to a working compiler."
+ rm -f conftest*
+ exit 1
+ ;;
+esac
+rm -f conftest*
+
+# The Solaris /usr/ucb/cc compiler does not appear to work.
+case "${host}" in
+ sparc-sun-solaris2*)
+ CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
+ if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
+ could_use=
+ test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
+ if test -d /opt/cygnus/bin ; then
+ if test "$could_use" = "" ; then
+ could_use="/opt/cygnus/bin"
+ else
+ could_use="$could_use or /opt/cygnus/bin"
+ fi
+ fi
+ if test "$could_use" = "" ; then
+ echo "Warning: compilation may fail because you're using"
+ echo "/usr/ucb/cc. You should change your PATH or CC "
+ echo "variable and rerun configure."
+ else
+ echo "Warning: compilation may fail because you're using"
+ echo "/usr/ucb/cc, when you should use the C compiler from"
+ echo "$could_use. You should change your"
+ echo "PATH or CC variable and rerun configure."
+ fi
+ fi
+ ;;
+esac
+
+# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
+# binutils tools will find libbfd.so.
+if test "${shared}" = "yes" ; then
+ SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)"
+else
+ SET_LIB_PATH=
+fi
+
-# code is order so as to try to sed the smallest input files we know.
-# so do these separately because I don't trust the order of sed -e expressions.
+case "${host}" in
+ *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
+ *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
+esac
-# the five makefile fragments MUST end up in the resulting Makefile in this order:
-# package macros, target, host, site, and package rules.
+# Record target_configdirs and the configure arguments for target and
+# build configuration in Makefile.
+target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
-if [ -f ${srcdir}/${Makefile_in} ] ; then
+# This is the final value for target_configdirs. configdirs already
+# has its final value. It's time to create some lists of valid targets.
- # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
- rm -f ./${Makefile}.tem
- case "${package_makefile_rules_frag}" in
- "") cp ${srcdir}/${Makefile_in} ./Makefile.tem ;;
- *)
- if [ ! -f ${package_makefile_rules_frag} ] ; then
- package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
- fi
- if [ -f ${package_makefile_rules_frag} ] ; then
- sed -e "/^####/ r ${package_makefile_rules_frag}" ${srcdir}/${Makefile_in} > ${Makefile}.tem
- else
- echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
- echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
- cp ${srcdir}/${Makefile_in} ./Makefile.tem
- fi
+# While at that, we remove Makefiles if we were started for recursive
+# configuration, such that the top-level Makefile reconfigures them,
+# like we used to do when configure itself was recursive.
+
+all_build_modules=
+configure_build_modules=
+# Only make build modules if build != host.
+# This should be done more generally, but at the moment it doesn't matter.
+if test ${host_alias} != ${build_alias} ; then
+ for module in libiberty ; do
+ all_build_modules=all-build-${module}
+ configure_build_modules=configure-build-${module}
+ if test -z "${no_recursion}" \
+ && test -f ${build_subdir}/${module}/Makefile; then
+ echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
+ rm -f ${build_subdir}/${module}/Makefile
+ fi
+ done
+fi
+
+all_host_modules=
+check_host_modules=
+install_host_modules=
+configure_host_modules=
+for module in ${configdirs} ; do
+ all_host_modules="${all_host_modules} all-${module}"
+ check_host_modules="${check_host_modules} check-${module}"
+ install_host_modules="${install_host_modules} install-${module}"
+ configure_host_modules="${configure_host_modules} configure-${module}"
+ if test -z "${no_recursion}" \
+ && test -f ${module}/Makefile; then
+ echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
+ rm -f ${module}/Makefile
+ fi
+done
+install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
+
+all_target_modules=
+check_target_modules=
+install_target_modules=
+configure_target_modules=
+for module in ${target_configdirs} ; do
+ all_target_modules="${all_target_modules} all-target-${module}"
+ check_target_modules="${check_target_modules} check-target-${module}"
+ install_target_modules="${install_target_modules} install-target-${module}"
+ configure_target_modules="${configure_target_modules} configure-target-${module}"
+ if test -z "${no_recursion}" \
+ && test -f ${target_subdir}/${module}/Makefile; then
+ echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
+ rm -f ${target_subdir}/${module}/Makefile
+ fi
+done
+
+# Determine whether gdb needs tk/tcl or not.
+# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
+# and in that case we want gdb to be built without tk. Ugh!
+# In fact I believe gdb is the *only* package directly dependent on tk,
+# so we should be able to put the 'maybe's in unconditionally and
+# leave out the maybe dependencies when enable_gdbtk is false. I'm not
+# 100% sure that that's safe though.
+
+gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
+case "$enable_gdbtk" in
+ no)
+ GDB_TK="" ;;
+ yes)
+ GDB_TK="${gdb_tk}" ;;
+ *)
+ # Only add the dependency on gdbtk when GDBtk is part of the gdb
+ # distro. Eventually someone will fix this and move Insight, nee
+ # gdbtk to a separate directory.
+ if test -d ${srcdir}/gdb/gdbtk ; then
+ GDB_TK="${gdb_tk}"
+ else
+ GDB_TK=""
+ fi
+ ;;
+esac
+
+# Create the 'maybe dependencies'. This uses a temporary file.
+rm -f maybedep.tmp
+echo '# maybedep.tmp' > maybedep.tmp
+for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
+ ${install_host_modules} ${install_target_modules} \
+ ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
+ ; do
+ echo "maybe-${item}: ${item}" >> maybedep.tmp
+done
+maybe_dependencies=maybedep.tmp
+
+
+# Create the serialization dependencies. This uses a temporary file.
+
+# Check whether --enable-serial-configure or --disable-serial-configure was given.
+if test "${enable_serial_configure+set}" = set; then
+ enableval="$enable_serial_configure"
+ :
+fi
+
+
+# These force 'configure's to be done one at a time, to avoid problems
+# with contention over a shared config.cache.
+rm -f serdep.tmp
+echo '# serdep.tmp' > serdep.tmp
+olditem=
+test "x${enable_serial_configure}" = xno ||
+test "x${enable_serial_build_configure}" = xno ||
+for item in ${build_configdirs} ; do
+ case ${olditem} in
+ "") ;;
+ *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
+ esac
+ olditem=${item}
+done
+olditem=
+test "x${enable_serial_configure}" = xno ||
+test "x${enable_serial_host_configure}" = xno ||
+for item in ${configdirs} ; do
+ case ${olditem} in
+ "") ;;
+ *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
+ esac
+ olditem=${item}
+done
+olditem=
+test "x${enable_serial_configure}" = xno ||
+test "x${enable_serial_target_configure}" = xno ||
+for item in ${target_configdirs} ; do
+ case ${olditem} in
+ "") ;;
+ *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
esac
- # working copy now in ${Makefile}.tem
+ olditem=${item}
+done
+serialization_dependencies=serdep.tmp
- # Conditionalize for this site.
- rm -f ${Makefile}
- case "${site}" in
- "") mv ./Makefile.tem ${Makefile} ;;
- *)
- site_makefile_frag=${srcdir}/config/ms-${site}
- if [ -f ${site_makefile_frag} ] ; then
- sed -e "/^####/ r ${site_makefile_frag}" ./Makefile.tem > ${Makefile}
- else
- mv ./Makefile.tem ${Makefile}
- site_makefile_frag=
- fi
+# 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.
+baseargs=`echo " ${ac_configure_args} " | \
+ sed -e 's/ --no[^ ]* / /' \
+ -e 's/ --c[a-z-]*[= ][^ ]* / /' \
+ -e 's/ --sr[a-z-]*[= ][^ ]* / /' \
+ -e 's/ --ho[a-z-]*[= ][^ ]* / /' \
+ -e 's/ --bu[a-z-]*[= ][^ ]* / /' \
+ -e 's/ --t[a-z-]*[= ][^ ]* / /' \
+ -e 's/ -cache-file[= ][^ ]* / /' \
+ -e 's/ -srcdir[= ][^ ]* / /' \
+ -e 's/ -host[= ][^ ]* / /' \
+ -e 's/ -build[= ][^ ]* / /' \
+ -e 's/ -target[= ][^ ]* / /' \
+ -e 's/ [^ -][^ ]* / /' \
+ -e 's/^ *//;s/ *$//'`
+
+# 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
+# desired.
+build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
+
+# For host modules, accept cache file option, or specification as blank.
+case "${cache_file}" in
+"") # empty
+ cache_file_option="" ;;
+/* | [A-Za-z]:[\\/]* ) # absolute path
+ cache_file_option="--cache-file=${cache_file}" ;;
+*) # relative path
+ cache_file_option="--cache-file=../${cache_file}" ;;
+esac
+
+host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+
+target_configargs=${baseargs}
+
+# Passing a --with-cross-host argument lets the target libraries know
+# whether they are being built with a cross-compiler or being built
+# native. However, it would be better to use other mechanisms to make the
+# sorts of decisions they want to make on this basis. Please consider
+# this option to be deprecated. FIXME.
+if test x${is_cross_compiler} = xyes ; then
+ target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
+fi
+
+# Default to --enable-multilib.
+if test x${enable_multilib} = x ; then
+ target_configargs="--enable-multilib ${target_configargs}"
+fi
+
+# Pass --with-newlib if appropriate. Note that target_configdirs has
+# changed from the earlier setting of with_newlib.
+if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
+ target_configargs="--with-newlib ${target_configargs}"
+fi
+
+# Pass the appropriate --host, --build, and --cache-file arguments.
+target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
+
+# provide a proper gxx_include_dir.
+# Note, if you change the default, make sure to fix both here and in
+# the gcc and libstdc++-v3 subdirectories.
+# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
+gxx_include_dir=
+if test -n "${with_gxx_include_dir}"; then
+ case "${with_gxx_include_dir}" in
+ yes )
+ echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
+ exit 1
+ ;;
+ no )
+ ;;
+ * )
+ gxx_include_dir=${with_gxx_include_dir}
;;
esac
- # working copy now in ${Makefile}
+fi
+if test x${gxx_include_dir} = x; then
+ if test x${enable_version_specific_runtime_libs} = xyes; then
+ gxx_include_dir='${libsubdir}/include/c++'
+ else
+ . ${srcdir}/config.if
+ gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
+ fi
+else
+ gxx_include_dir=${gxx_include_dir}
+fi
- # Conditionalize the makefile for this host.
- rm -f ./Makefile.tem
- case "${host_makefile_frag}" in
- "") mv ${Makefile} ./Makefile.tem ;;
- *)
- if [ ! -f ${host_makefile_frag} ] ; then
- host_makefile_frag=${srcdir}/${host_makefile_frag}
- fi
- if [ -f ${host_makefile_frag} ] ; then
- sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ./Makefile.tem
- else
- echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
- echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
- mv ${Makefile} ./Makefile.tem
- fi
- esac
- # working copy now in ./Makefile.tem
+FLAGS_FOR_TARGET=
+case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+ *" --with-newlib "*)
+ case "$target" in
+ *-cygwin*)
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
+ esac
- # Conditionalize the makefile for this target.
- rm -f ${Makefile}
- case "${target_makefile_frag}" in
- "") mv ./Makefile.tem ${Makefile} ;;
- *)
- if [ ! -f ${target_makefile_frag} ] ; then
- target_makefile_frag=${srcdir}/${target_makefile_frag}
- fi
- if [ -f ${target_makefile_frag} ] ; then
- sed -e "/^####/ r ${target_makefile_frag}" ./Makefile.tem > ${Makefile}
- else
- mv ./Makefile.tem ${Makefile}
- target_makefile_frag=
- fi
+ # If we're not building GCC, don't discard standard headers.
+ if test -d ${srcdir}/gcc; then
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
+
+ if test "${build}" != "${host}"; then
+ # On Canadian crosses, CC_FOR_TARGET will have already been set
+ # by `configure', so we won't have an opportunity to add -Bgcc/
+ # to it. This is right: we don't want to search that directory
+ # for binaries, but we want the header files in there, so add
+ # them explicitly.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
+
+ # Someone might think of using the pre-installed headers on
+ # Canadian crosses, in case the installed compiler is not fully
+ # compatible with the compiler being built. In this case, it
+ # would be better to flag an error than risking having
+ # incompatible object files being constructed. We can't
+ # guarantee that an error will be flagged, but let's hope the
+ # compiler will do it, when presented with incompatible header
+ # files.
+ fi
+ fi
+
+ case "${target}-${is_cross_compiler}" in
+ i[3456]86-*-linux*-no)
+ # Here host == target, so we don't need to build gcc,
+ # so we don't want to discard standard headers.
+ FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
+ ;;
+ *)
+ # If we're building newlib, use its generic headers last, but search
+ # for any libc-related directories first (so make it the last -B
+ # switch).
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
;;
+ esac
+ ;;
esac
- # working copy now in ${Makefile}
+ ;;
+esac
+
+# 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
+# being built; programs in there won't even run.
+if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
+ # Search for pre-installed headers if nothing else fits.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
+fi
+
+if test "x${use_gnu_ld}" = x &&
+ echo " ${configdirs} " | grep " ld " > /dev/null ; then
+ # Arrange for us to find uninstalled linker scripts.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
+fi
+
+if test "x${CC_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${srcdir}/gcc; then
+ CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
+elif test "$host" = "$target"; then
+ CC_FOR_TARGET='$(CC)'
+else
+ CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
+fi
+CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+
+if test "x${GCJ_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${srcdir}/gcc; then
+ GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
+elif test "$host" = "$target"; then
+ GCJ_FOR_TARGET='gcj'
+else
+ GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
+fi
+GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+
+# Don't use libstdc++-v3's flags to configure/build itself.
+libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+
+if test "x${CXX_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${srcdir}/gcc; then
+ # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
+ # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
+ # default whereas gcc does not.
+ # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
+ # all other cases.
+ CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
+ RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
+elif test "$host" = "$target"; then
+ CXX_FOR_TARGET='$(CXX)'
+ RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
+else
+ CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
+ RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
+fi
+CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+
+qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
+qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
+
+# We want to defer the evaluation of `cmd`s and shell variables in
+# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
+# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
+# quotes, but we still have to duplicate `$'s so that shell variables
+# can be expanded by the nested make as shell variables, not as make
+# macros.
+qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
+qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
+
+# Wrap CC_FOR_TARGET and friends, for certain types of builds.
+CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
+GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
+CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
+RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
+RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
+
+# Makefile fragments.
+host_makefile_frag=${srcdir}/${host_makefile_frag}
+target_makefile_frag=${srcdir}/${target_makefile_frag}
+alphaieee_frag=${srcdir}/${alphaieee_frag}
+ospace_frag=${srcdir}/${ospace_frag}
+
+
+
+
+
+# Miscellanea: directories, flags, etc.
+
+
+
+
- # Emit the default values of this package's macros.
- rm -f ./Makefile.tem
- case "${package_makefile_frag}" in
- "") mv ${Makefile} ./Makefile.tem ;;
- *)
- if [ ! -f ${package_makefile_frag} ] ; then
- package_makefile_frag=${srcdir}/${package_makefile_frag}
- fi
- if [ -f ${package_makefile_frag} ] ; then
- sed -e "/^####/ r ${package_makefile_frag}" ${Makefile} > ./Makefile.tem
- else
- echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
- echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
- mv ${Makefile} ./Makefile.tem
- fi
- esac
- # real copy now in ./Makefile.tem
- # record if we want runtime library stuff installed in libsubdir.
- # Blank means no.
- if test -z "${enable_version_specific_runtime_libs}"; then
- enable_version_specific_runtime_libs=no
+
+
+
+
+
+
+
+
+
+
+# Build module lists & subconfigure args.
+
+
+
+
+
+# Host module lists & subconfigure args.
+
+
+
+
+
+
+
+
+# Target module lists & subconfigure args.
+
+
+
+
+
+
+
+
+# Build tools.
+
+
+
+
+
+
+
+# Host tools.
+ncn_tool_prefix=
+test -n "$host_alias" && ncn_tool_prefix=$host_alias-
+ncn_target_tool_prefix=
+test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
+
+ if test -n "$ncn_tool_prefix"; then
+ # 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:2752: 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
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AR="${ncn_tool_prefix}ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR" ; then
+ if test $build = $host ; then
+ ncn_cv_AR=$AR
+ # 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:2785: 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
+ if test -n "$ncn_cv_AR"; then
+ ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_AR="ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
+fi
+fi
+ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
+if test -n "$ncn_cv_AR"; then
+ echo "$ac_t""$ncn_cv_AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ AR=$ncn_cv_AR
+ else
+ AR="${ncn_tool_prefix}ar"
fi
+else
+ AR="$ac_cv_prog_AR"
+fi
- sed -e "s|@configlinks@|${configlinks}|" \
- -e "s|@build_alias@|${build_alias}|" \
- -e "s|@build_cpu@|${build_cpu}|" \
- -e "s|@build_vendor@|${build_vendor}|" \
- -e "s|@build_os@|${build_os}|" \
- -e "s|@host_alias@|${host_alias}|" \
- -e "s|@host_cpu@|${host_cpu}|" \
- -e "s|@host_vendor@|${host_vendor}|" \
- -e "s|@host_os@|${host_os}|" \
- -e "s|@target_alias@|${target_alias}|" \
- -e "s|@target_cpu@|${target_cpu}|" \
- -e "s|@target_vendor@|${target_vendor}|" \
- -e "s|@target_os@|${target_os}|" \
- -e "s|@target_makefile_frag@|${target_makefile_frag}|" \
- -e "s|@host_makefile_frag@|${host_makefile_frag}|" \
- -e "s|@enable_shared@|${enable_shared}|" \
- -e "s|@enable_threads@|${enable_threads}|" \
- -e "s|@enable_version_specific_runtime_libs@|${enable_version_specific_runtime_libs}|" \
- -e "s|@gcc_version_trigger@|${gcc_version_trigger}|" \
- -e "s|@gcc_version@|${gcc_version}|" \
- ./Makefile.tem > ${Makefile}
- mv -f ${Makefile} ./Makefile.tem
- # Real copy now in Makefile.tem; no prologue.
-
- # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
- # remove any form feeds.
- sed -e "s|@configdirs@|${configdirs}|" \
- -e "s|@prefix@|${prefix}|" \
- -e "s|@exec_prefix@|${exec_prefix}|" \
- -e "s|@bindir@|${bindir}|" \
- -e "s|@sbindir@|${sbindir}|" \
- -e "s|@libexecdir@|${libexecdir}|" \
- -e "s|@datadir@|${datadir}|" \
- -e "s|@sysconfdir@|${sysconfdir}|" \
- -e "s|@sharedstatedir@|${sharedstatedir}|" \
- -e "s|@localstatedir@|${localstatedir}|" \
- -e "s|@libdir@|${libdir}|" \
- -e "s|@includedir@|${includedir}|" \
- -e "s|@oldincludedir@|${oldincludedir}|" \
- -e "s|@infodir@|${infodir}|" \
- -e "s|@mandir@|${mandir}|" \
- -e "s|@CC@|${CC}|" \
- -e "s|@CXX@|${CXX}|" \
- -e "s|@CFLAGS@|${CFLAGS}|" \
- -e "s|@CXXFLAGS@|${CXXFLAGS}|" \
- -e "s|@config_shell@|${config_shell}|" \
- -e "s|@srcdir@|${srcdir}|" \
- -e "s/ //" \
- -e "s:@program_transform_name@:${program_transform_name}:" \
- -e "s|@tooldir@|${tooldir}|" \
- -e "s|@build_tooldir@|${tooldir}|" \
- -e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \
- -e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \
- -e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \
- ./Makefile.tem > ${Makefile}
-
- # If this is a Canadian Cross, preset the values of many more
- # tools.
- if [ "${build}" != "${host}" ]; then
- for var in ${tools}; do
- eval val=\$${var}
- sed -e "/^${var}[ ]*=/{
- :loop1
- /\\\\$/ N
- /\\\\$/ b loop1
- s/\\\\\\n//g
- s%^${var}[ ]*=.*$%${var} = ${val}%
- }" ${Makefile} > ${Makefile}.tem
- mv -f ${Makefile}.tem ${Makefile}
- done
+ if test -n "$ncn_tool_prefix"; then
+ # 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:2824: 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
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AS="${ncn_tool_prefix}as"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+ echo "$ac_t""$AS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AS" ; then
+ if test $build = $host ; then
+ ncn_cv_AS=$AS
+ # 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:2857: 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
+ if test -n "$ncn_cv_AS"; then
+ ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_AS="as"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
+fi
+fi
+ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
+if test -n "$ncn_cv_AS"; then
+ echo "$ac_t""$ncn_cv_AS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ AS=$ncn_cv_AS
+ else
+ AS="${ncn_tool_prefix}as"
fi
- # If this is NOT a Canadian Cross, preset the values of some more
- # tools. The above line should get merged into this, but this
- # substitutes *once* where the above substitutes *globally*; that
- # needs to be worked out before the merger. The issue is in Makefile
- # fragment elements (ick, yuck, ugh).
- if [ "${build}" = "${host}" ]; then
- for var in ${tools}; do
- eval val=\$${var}
- sed -e "s%@${var}@%${val}%" ${Makefile} > ${Makefile}.tem
- mv -f ${Makefile}.tem ${Makefile}
- done
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ncn_tool_prefix"; then
+ # 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:2896: 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
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+DLLTOOL="$ac_cv_prog_DLLTOOL"
+if test -n "$DLLTOOL"; then
+ echo "$ac_t""$DLLTOOL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL" ; then
+ if test $build = $host ; then
+ ncn_cv_DLLTOOL=$DLLTOOL
+ # 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:2929: 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
+ if test -n "$ncn_cv_DLLTOOL"; then
+ ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
+fi
+fi
+ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
+if test -n "$ncn_cv_DLLTOOL"; then
+ echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ DLLTOOL=$ncn_cv_DLLTOOL
+ else
+ DLLTOOL="${ncn_tool_prefix}dlltool"
fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
- # final copy now in ${Makefile}
+ if test -n "$ncn_tool_prefix"; then
+ # 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:2968: 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
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LD="${ncn_tool_prefix}ld"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LD="$ac_cv_prog_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+fi
+if test -z "$ac_cv_prog_LD" ; then
+ if test $build = $host ; then
+ ncn_cv_LD=$LD
+ # 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:3001: 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
+ if test -n "$ncn_cv_LD"; then
+ ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_LD="ld"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
+fi
+fi
+ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
+if test -n "$ncn_cv_LD"; then
+ echo "$ac_t""$ncn_cv_LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ LD=$ncn_cv_LD
+ else
+ LD="${ncn_tool_prefix}ld"
+ fi
else
- echo "No Makefile.in found in ${srcdir}/., unable to configure" 1>&2
+ LD="$ac_cv_prog_LD"
fi
-rm -f ./Makefile.tem
+ if test -n "$ncn_tool_prefix"; then
+ # 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:3040: 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
+ if test -n "$NM"; then
+ ac_cv_prog_NM="$NM" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_NM="${ncn_tool_prefix}nm"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+NM="$ac_cv_prog_NM"
+if test -n "$NM"; then
+ echo "$ac_t""$NM" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-case "${host_makefile_frag}" in
- "") using= ;;
- *) using="and \"${host_makefile_frag}\"" ;;
-esac
+fi
+if test -z "$ac_cv_prog_NM" ; then
+ if test $build = $host ; then
+ ncn_cv_NM=$NM
+ # 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:3073: 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
+ if test -n "$ncn_cv_NM"; then
+ ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_NM="nm"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm"
+fi
+fi
+ncn_cv_NM="$ac_cv_prog_ncn_cv_NM"
+if test -n "$ncn_cv_NM"; then
+ echo "$ac_t""$ncn_cv_NM" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ NM=$ncn_cv_NM
+ else
+ NM="${ncn_tool_prefix}nm"
+ fi
+else
+ NM="$ac_cv_prog_NM"
+fi
-case "${target_makefile_frag}" in
- "") ;;
- *) using="${using} and \"${target_makefile_frag}\"" ;;
-esac
+ if test -n "$ncn_tool_prefix"; then
+ # 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:3112: 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
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ncn_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-case "${site_makefile_frag}" in
- "") ;;
- *) using="${using} and \"${site_makefile_frag}\"" ;;
-esac
+fi
+if test -z "$ac_cv_prog_RANLIB" ; then
+ if test $build = $host ; then
+ ncn_cv_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3145: 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
+ if test -n "$ncn_cv_RANLIB"; then
+ ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":"
+fi
+fi
+ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB"
+if test -n "$ncn_cv_RANLIB"; then
+ echo "$ac_t""$ncn_cv_RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ RANLIB=$ncn_cv_RANLIB
+ else
+ RANLIB=":"
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
-newusing=`echo "${using}" | sed 's/and/using/'`
-using=${newusing}
-echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using}
+ if test -n "$ncn_tool_prefix"; then
+ # 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:3184: 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
+ if test -n "$WINDRES"; then
+ ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_WINDRES="${ncn_tool_prefix}windres"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+ echo "$ac_t""$WINDRES" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-. ${tmpfile}.pos
+fi
+if test -z "$ac_cv_prog_WINDRES" ; then
+ if test $build = $host ; then
+ ncn_cv_WINDRES=$WINDRES
+ # 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:3217: 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
+ if test -n "$ncn_cv_WINDRES"; then
+ ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_WINDRES="windres"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres"
+fi
+fi
+ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES"
+if test -n "$ncn_cv_WINDRES"; then
+ echo "$ac_t""$ncn_cv_WINDRES" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ WINDRES=$ncn_cv_WINDRES
+ else
+ WINDRES="${ncn_tool_prefix}windres"
+ fi
+else
+ WINDRES="$ac_cv_prog_WINDRES"
+fi
-# describe the chosen configuration in config.status.
-# Make that file a shellscript which will reestablish
-# the same configuration. Used in Makefiles to rebuild
-# Makefiles.
+ if test -n "$ncn_tool_prefix"; then
+ # 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:3256: 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
+ if test -n "$OBJCOPY"; then
+ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_OBJCOPY="${ncn_tool_prefix}objcopy"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+OBJCOPY="$ac_cv_prog_OBJCOPY"
+if test -n "$OBJCOPY"; then
+ echo "$ac_t""$OBJCOPY" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-case "${norecursion}" in
- "") arguments="${arguments} --norecursion" ;;
- *) ;;
-esac
+fi
+if test -z "$ac_cv_prog_OBJCOPY" ; then
+ if test $build = $host ; then
+ ncn_cv_OBJCOPY=$OBJCOPY
+ # 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:3289: 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
+ if test -n "$ncn_cv_OBJCOPY"; then
+ ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
+fi
+fi
+ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY"
+if test -n "$ncn_cv_OBJCOPY"; then
+ echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ OBJCOPY=$ncn_cv_OBJCOPY
+ else
+ OBJCOPY="${ncn_tool_prefix}objcopy"
+ fi
+else
+ OBJCOPY="$ac_cv_prog_OBJCOPY"
+fi
-echo "#!/bin/sh
-# ${NO_EDIT}
-# This directory was configured as follows:
-${progname}" ${arguments} "
-# ${using}" > ./config.new
-chmod a+x ./config.new
-if [ -r ./config.back ] ; then
- mv -f ./config.back ./config.status
+ if test -n "$ncn_tool_prefix"; then
+ # 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:3328: 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
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_OBJDUMP="${ncn_tool_prefix}objdump"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+OBJDUMP="$ac_cv_prog_OBJDUMP"
+if test -n "$OBJDUMP"; then
+ echo "$ac_t""$OBJDUMP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP" ; then
+ if test $build = $host ; then
+ ncn_cv_OBJDUMP=$OBJDUMP
+ # 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:3361: 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
+ if test -n "$ncn_cv_OBJDUMP"; then
+ ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_OBJDUMP="objdump"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump"
+fi
+fi
+ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP"
+if test -n "$ncn_cv_OBJDUMP"; then
+ echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ OBJDUMP=$ncn_cv_OBJDUMP
+ else
+ OBJDUMP="${ncn_tool_prefix}objdump"
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
fi
-${config_shell} ${moveifchange} ./config.new ./config.status
-# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
-# and reset the trap handler.
-rm -rf ${tmpdir}
-trap 0
-exit 0
+
+
+
+
+
+
+# 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:3409: 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
+ if test -n "$AR_FOR_TARGET"; then
+ ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+if test -n "$AR_FOR_TARGET"; then
+ echo "$ac_t""$AR_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3442: 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
+ if test -n "$ncn_cv_AR_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
+fi
+fi
+ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET"
+if test -n "$ncn_cv_AR_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET
+ else
+ AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
+ fi
+else
+ AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+fi
+
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}as; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3481: 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
+ if test -n "$AS_FOR_TARGET"; then
+ ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+if test -n "$AS_FOR_TARGET"; then
+ echo "$ac_t""$AS_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3514: 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
+ if test -n "$ncn_cv_AS_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
+fi
+fi
+ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET"
+if test -n "$ncn_cv_AS_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET
+ else
+ AS_FOR_TARGET="${ncn_target_tool_prefix}as"
+ fi
+else
+ AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+fi
+
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3553: 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
+ if test -n "$DLLTOOL_FOR_TARGET"; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+if test -n "$DLLTOOL_FOR_TARGET"; then
+ echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3586: 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
+ if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
+fi
+fi
+ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET"
+if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET
+ else
+ DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
+ fi
+else
+ DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+fi
+
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3625: 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
+ if test -n "$LD_FOR_TARGET"; then
+ ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+if test -n "$LD_FOR_TARGET"; then
+ echo "$ac_t""$LD_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET
+ # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3658: 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
+ if test -n "$ncn_cv_LD_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
+fi
+fi
+ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET"
+if test -n "$ncn_cv_LD_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET
+ else
+ LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
+ fi
+else
+ LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+fi
+
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3697: 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
+ if test -n "$NM_FOR_TARGET"; then
+ ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+if test -n "$NM_FOR_TARGET"; then
+ echo "$ac_t""$NM_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET
+ # Extract the first word of "nm", so it can be a program name with args.
+set dummy nm; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3730: 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
+ if test -n "$ncn_cv_NM_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
+fi
+fi
+ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET"
+if test -n "$ncn_cv_NM_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET
+ else
+ NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
+ fi
+else
+ NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+fi
+
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3769: 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
+ if test -n "$RANLIB_FOR_TARGET"; then
+ ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+if test -n "$RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3802: 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
+ if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":"
+fi
+fi
+ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET"
+if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET
+ else
+ RANLIB_FOR_TARGET=":"
+ fi
+else
+ RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+fi
+
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3841: 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
+ if test -n "$WINDRES_FOR_TARGET"; then
+ ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
+if test -n "$WINDRES_FOR_TARGET"; then
+ echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
+ if test $build = $target ; then
+ ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
+ # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3874: 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
+ if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
+ ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
+fi
+fi
+ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET"
+if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
+ echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET
+ else
+ WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
+ fi
+else
+ WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
+fi
+
+
+
+
+
+
+
+
+
+
+
+# Fix up target tools.
+if test "x${build}" = "x${host}" ; then
+ # In this case, the newly built tools can and should be used,
+ # so we override the results of the autoconf tests.
+ # This should really only happen when the tools are actually being built,
+ # but that's a further refinement. The new build scheme, where
+ # tools are built into a structure paralleling where they're installed,
+ # should also eliminate all of this cleanly.
+ AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
+ AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
+ DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
+ LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
+ NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
+ RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
+ WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
+fi
+# Certain tools may need extra flags.
+AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
+RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
+NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
-# Local Variables:
-# fill-column: 131
-# End:
+# $0 $ac_configure_args
#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
+/@maybe_dependencies@/r $maybe_dependencies
+s%@maybe_dependencies@%%g
+/@serialization_dependencies@/r $serialization_dependencies
+s%@serialization_dependencies@%%g
+/@host_makefile_frag@/r $host_makefile_frag
+s%@host_makefile_frag@%%g
+/@target_makefile_frag@/r $target_makefile_frag
+s%@target_makefile_frag@%%g
+/@alphaieee_frag@/r $alphaieee_frag
+s%@alphaieee_frag@%%g
+/@ospace_frag@/r $ospace_frag
+s%@ospace_frag@%%g
+s%@SET_LIB_PATH@%$SET_LIB_PATH%g
+s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
+s%@BUILD_PREFIX@%$BUILD_PREFIX%g
+s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
+s%@configlinks@%$configlinks%g
+s%@enable_shared@%$enable_shared%g
+s%@enable_threads@%$enable_threads%g
+s%@enable_version_specific_runtime_libs@%$enable_version_specific_runtime_libs%g
+s%@gcc_version_trigger@%$gcc_version_trigger%g
+s%@gcc_version@%$gcc_version%g
+s%@tooldir@%$tooldir%g
+s%@build_tooldir@%$build_tooldir%g
+s%@GDB_TK@%$GDB_TK%g
+s%@gxx_include_dir@%$gxx_include_dir%g
+s%@libstdcxx_incdir@%$libstdcxx_incdir%g
+s%@build_subdir@%$build_subdir%g
+s%@build_configargs@%$build_configargs%g
+s%@configure_build_modules@%$configure_build_modules%g
+s%@all_build_modules@%$all_build_modules%g
+s%@host_configargs@%$host_configargs%g
+s%@configdirs@%$configdirs%g
+s%@configure_host_modules@%$configure_host_modules%g
+s%@all_host_modules@%$all_host_modules%g
+s%@check_host_modules@%$check_host_modules%g
+s%@install_host_modules@%$install_host_modules%g
+s%@install_host_modules_nogcc@%$install_host_modules_nogcc%g
+s%@target_subdir@%$target_subdir%g
+s%@target_configargs@%$target_configargs%g
+s%@target_configdirs@%$target_configdirs%g
+s%@configure_target_modules@%$configure_target_modules%g
+s%@all_target_modules@%$all_target_modules%g
+s%@check_target_modules@%$check_target_modules%g
+s%@install_target_modules@%$install_target_modules%g
+s%@BISON@%$BISON%g
+s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
+s%@LEX@%$LEX%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@YACC@%$YACC%g
+s%@config_shell@%$config_shell%g
+s%@AR@%$AR%g
+s%@ncn_cv_AR@%$ncn_cv_AR%g
+s%@AS@%$AS%g
+s%@ncn_cv_AS@%$ncn_cv_AS%g
+s%@DLLTOOL@%$DLLTOOL%g
+s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g
+s%@LD@%$LD%g
+s%@ncn_cv_LD@%$ncn_cv_LD%g
+s%@NM@%$NM%g
+s%@ncn_cv_NM@%$ncn_cv_NM%g
+s%@RANLIB@%$RANLIB%g
+s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g
+s%@WINDRES@%$WINDRES%g
+s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g
+s%@OBJCOPY@%$OBJCOPY%g
+s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g
+s%@OBJDUMP@%$OBJDUMP%g
+s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
+s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@DEFAULT_YACC@%$DEFAULT_YACC%g
+s%@DEFAULT_LEX@%$DEFAULT_LEX%g
+s%@DEFAULT_M4@%$DEFAULT_M4%g
+s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
+s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g
+s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
+s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g
+s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
+s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g
+s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
+s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g
+s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
+s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g
+s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
+s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g
+s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
+s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g
+s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
+s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
+s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
+s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
+s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
+s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
+s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
+s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-# end of configure
diff --git a/configure.in b/configure.in
index 82cca6c2383..19c1357d25f 100644
--- a/configure.in
+++ b/configure.in
@@ -1,21 +1,5 @@
-#! /bin/bash
-##############################################################################
-
-## This file is a shell script fragment that supplies the information
-## necessary to tailor a template configure script into the configure
-## script appropriate for this directory. For more information, check
-## any existing configure script.
-
-## Be warned, there are two types of configure.in files. There are those
-## used by Autoconf, which are macros which are expanded into a configure
-## script by autoconf. The other sort, of which this is one, is executed
-## by Cygnus configure.
-
-## For more information on these two systems, check out the documentation
-## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi).
-
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# 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
@@ -32,29 +16,107 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##############################################################################
+### WARNING: this file contains embedded tabs. Do not run untabify on this file.
+
+AC_INIT(move-if-change)
+AC_PREREQ(2.13)
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+sinclude(config/acx.m4)
+
+# clear some things potentially inherited from environment.
+
+enable_threads=no
+enable_shared=no
+enable_libstdcxx_v3=yes
+floating_point=default
+gas=default
+x11=default
+
+### 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
+### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
+### without also having to set CONFIG_SHELL. This code will work when
+### using bash, which sets OSTYPE.
+case "${OSTYPE}" in
+*win32*)
+ if test x${CONFIG_SHELL} = x ; then
+ if test ! -f /bin/sh ; then
+ if test x${SHELL} != x && test -f ${SHELL} ; then
+ CONFIG_SHELL=${SHELL}
+ export CONFIG_SHELL
+ else
+ for prog in sh sh.exe bash bash.exe; do
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$prog; then
+ CONFIG_SHELL=$dir/$prog
+ export CONFIG_SHELL
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ test -n "${CONFIG_SHELL}" && break
+ done
+ fi
+ fi
+ fi
+ ;;
+esac
+
+config_shell=${CONFIG_SHELL-/bin/sh}
+
+## this is a little touchy and won't always work, but...
+##
+## if the argv[[0]] starts with a slash then it is an absolute name that can (and
+## must) be used as is.
+##
+## otherwise, if argv[[0]] has no slash in it, we can assume that it is on the
+## path. Since PATH might include "." we also add `pwd` to the end of PATH.
+##
+
+progname=$0
+# if PWD already has a value, it is probably wrong.
+if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
+
+# Export original configure arguments for use by sub-configures.
+TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
+AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
+
+moveifchange=${srcdir}/move-if-change
+
+# Set srcdir to "." if that's what it is.
+# This is important for multilib support.
+pwd=`${PWDCMD-pwd}`
+srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
+if test "${pwd}" = "${srcpwd}" ; then
+ srcdir=.
+fi
+
+topsrcdir=$srcpwd
extra_host_args=
# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
-if [ "${with_gcc_version_trigger+set}" = set ]; then
- gcc_version_trigger="$with_gcc_version_trigger"
- gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
+if test "${with_gcc_version_trigger+set}" = set ; then
+ gcc_version_trigger="$with_gcc_version_trigger"
+ gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
else
- # If gcc's sources are available, define the trigger file.
- if [ -f ${topsrcdir}/gcc/version.c ] ; then
- gcc_version_trigger=${topsrcdir}/gcc/version.c
- gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
- case "$arguments" in
- *--with-gcc-version-trigger=$gcc_version_trigger* )
- ;;
- * )
- # Add to all subconfigure arguments: build, host, and target.
- arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
- ;;
- esac
- # This will be redundant when we start all subconfigures from the Makefile.
- extra_host_args="--with-gcc-version-trigger=$gcc_version_trigger $extra_host_args"
- fi
+ # If gcc's sources are available, define the trigger file.
+ if test -f ${topsrcdir}/gcc/version.c ; then
+ gcc_version_trigger=${topsrcdir}/gcc/version.c
+ gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
+ case "$ac_configure_args" in
+ *--with-gcc-version-trigger=$gcc_version_trigger* )
+ ;;
+ * )
+ # Add to all subconfigure arguments: build, host, and target.
+ ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
+ ;;
+ esac
+ fi
fi
### To add a new directory to the tree, first choose whether it is a target
@@ -73,7 +135,7 @@ fi
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
libstdcxx_version="target-libstdc++-v3"
@@ -82,7 +144,7 @@ libstdcxx_version="target-libstdc++-v3"
# know that we are building the simulator.
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
-host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
@@ -99,7 +161,7 @@ target_libs="target-libiberty \
target-newlib \
${libstdcxx_version} \
target-libf2c \
- ${libgcj}
+ ${libgcj} \
target-libobjc"
# these tools are built using the target libs, and are intended to run only
@@ -124,18 +186,11 @@ target_configdirs=`echo ${target_libs} ${target_tools}`
################################################################################
-srctrigger=move-if-change
srcname="gnu development package"
# This gets set non-empty for some net releases of packages.
appdirs=""
-# per-host:
-
-# There is no longer anything interesting in the per-host section.
-
-# per-target:
-
# Define is_cross_compiler to save on calls to 'test'.
is_cross_compiler=
if test x"${host}" = x"${target}" ; then
@@ -203,7 +258,7 @@ esac
# Some tools are only suitable for building in a "native" situation.
# Remove these if host!=target.
-native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
# Similarly, some are only suitable for cross toolchains.
# Remove these if host=target.
@@ -243,17 +298,17 @@ case "${host}" in
hppa*64*-*-*)
noconfigdirs="$noconfigdirs byacc"
;;
- i[3456]86-*-vsta)
- noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
+ i[[3456]]86-*-vsta)
+ noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
;;
- i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
- noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
+ i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
+ noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
;;
- i[3456]86-*-mingw32*)
- # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
+ i[[3456]]86-*-mingw32*)
+ # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
;;
- i[3456]86-*-beos*)
+ i[[3456]]86-*-beos*)
noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
;;
*-*-cygwin*)
@@ -263,7 +318,7 @@ case "${host}" in
noconfigdirs="rcs"
;;
ppc*-*-pe)
- noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
+ noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
@@ -293,7 +348,7 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
+ *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
*-*-netbsd*)
@@ -448,13 +503,13 @@ case "${target}" in
# No gdb or ld support yet.
noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
;;
- i[3456]86-*-coff | i[3456]86-*-elf)
+ i[[3456]]86-*-coff | i[[3456]]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[34567]86-*-freebsd*)
+ i[[34567]]86-*-freebsd*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- i[3456]86-*-linux*)
+ i[[3456]]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
case "${target}" in
@@ -473,14 +528,14 @@ case "${target}" in
# if the --with-newlib option has been given, because otherwise
# 'target-newlib' will appear in skipdirs.
;;
- i[3456]86-*-mingw32*)
+ i[[3456]]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
# Can't build gdb for mingw32 if not native.
case "${host}" in
- i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
+ i[[3456]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
;;
esac
;;
@@ -493,28 +548,28 @@ case "${target}" in
# Can't build gdb for Cygwin if not native.
case "${host}" in
*-*-cygwin*) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
;;
esac
;;
- i[3456]86-*-pe)
+ i[[3456]]86-*-pe)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
;;
- i[3456]86-*-sco3.2v5*)
+ i[[3456]]86-*-sco3.2v5*)
# The linker does not yet know about weak symbols in COFF,
# and is not configured to handle mixed ELF and COFF.
noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
;;
- i[3456]86-*-sco*)
+ i[[3456]]86-*-sco*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- i[3456]86-*-solaris2*)
+ i[[3456]]86-*-solaris2*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
- i[3456]86-*-sysv4*)
+ i[[3456]]86-*-sysv4*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
- i[3456]86-*-beos*)
+ i[[3456]]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
@@ -546,13 +601,13 @@ case "${target}" in
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
@@ -585,12 +640,11 @@ case "${target}" in
noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
;;
mips*-*-irix6*)
- # The GNU assembler does not support IRIX 6.
# Linking libjava exceeds command-line length limits on at least
# IRIX 6.2, but not on IRIX 6.5.
# Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
# <oldham@codesourcery.com>
- noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
mips*-dec-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
@@ -612,9 +666,9 @@ case "${target}" in
;;
sh-*-*)
case "${host}" in
- i[3456]86-*-vsta) ;; # don't add gprof back in
- i[3456]86-*-go32*) ;; # don't add gprof back in
- i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
+ i[[3456]]86-*-vsta) ;; # don't add gprof back in
+ i[[3456]]86-*-go32*) ;; # don't add gprof back in
+ i[[3456]]86-*-msdosdjgpp*) ;; # don't add gprof back in
*) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
esac
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
@@ -700,7 +754,7 @@ else
exit 1
fi
fi
-enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
+enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
# First scan to see if an enabled language requires some other language.
# We assume that a given config-lang.in will list all the language
@@ -712,11 +766,11 @@ do
;;
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
- ${srcdir}/gcc/[*]/config-lang.in)
+ ${srcdir}/gcc/[[*]]/config-lang.in)
;;
*)
- lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
- this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
+ lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ ]]*\).*$,\1,p' $lang`
+ this_lang_requires=`sed -n -e 's,^lang_requires=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_requires=\([[^ ]]*\).*$,\1,p' $lang`
for other in $this_lang_requires
do
case ,${enable_languages}, in
@@ -741,12 +795,12 @@ do
..) ;;
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
- ${srcdir}/gcc/[*]/config-lang.in) ;;
+ ${srcdir}/gcc/[[*]]/config-lang.in) ;;
*)
- lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
- this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
- this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ ]*\).*$,\1,p' $lang`
- build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
+ lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ ]]*\).*$,\1,p' $lang`
+ this_lang_libs=`sed -n -e 's,^target_libs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^target_libs=\([[^ ]]*\).*$,\1,p' $lang`
+ this_lang_dirs=`sed -n -e 's,^lang_dirs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_dirs=\([[^ ]]*\).*$,\1,p' $lang`
+ build_by_default=`sed -n -e 's,^build_by_default=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^build_by_default=\([[^ ]]*\).*$,\1,p' $lang`
if test "x$lang_alias" = x
then
echo "$lang doesn't set \$language." 1>&2
@@ -813,20 +867,6 @@ if test -n "${target_configdirs}" ; then
fi
fi
-# Deconfigure all subdirectories, in case we are changing the
-# configuration from one where a subdirectory is supported to one where it
-# is not.
-if test -z "${norecursion}" && test -n "${configdirs}" ; then
- for i in `echo ${configdirs} | sed -e s/target-//g` ; do
- rm -f $i/Makefile
- done
-fi
-if test -z "${norecursion}" && test -n "${target_configdirs}" ; then
- for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
- rm -f ${target_subdir}/$i/Makefile
- done
-fi
-
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
@@ -958,16 +998,18 @@ done
# Work in distributions that contain no compiler tools, like Autoconf.
tentative_cc=""
+host_makefile_frag=/dev/null
if test -d ${srcdir}/config ; then
case "${host}" in
m68k-hp-hpux*)
# Avoid "too much defining" errors from HPUX compiler.
tentative_cc="cc -Wp,-H256000"
- host_makefile_frag="config/mh-hp300"
+ # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
+ # If it's HP/UX ar, this should be harmless.
+ RANLIB="ar ts"
;;
m68k-apollo-sysv*)
tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
- host_makefile_frag="config/mh-apollo68"
;;
m68k-apollo-bsd*)
#None of the Apollo compilers can compile gas or binutils. The preprocessor
@@ -976,8 +1018,8 @@ case "${host}" in
# the apollo compiler" (the preferred version of GCC could be called cc,
# or whatever), but I'm not sure leaving CC as cc is any better...
#CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
+ # Used to have BISON=yacc.
tentative_cc=gcc
- host_makefile_frag="config/mh-a68bsd"
;;
m88k-dg-dgux*)
tentative_cc="gcc -Wall -ansi -D__using_DGUX"
@@ -989,7 +1031,6 @@ case "${host}" in
host_makefile_frag="config/mh-cxux"
;;
m88k-motorola-sysv*)
- host_makefile_frag="config/mh-delta88"
;;
mips*-dec-ultrix*)
tentative_cc="cc -Wf,-XNg1000"
@@ -1000,21 +1041,12 @@ case "${host}" in
tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
host_makefile_frag="config/mh-necv4"
;;
- mips*-sgi-irix6*)
- host_makefile_frag="config/mh-irix6"
- ;;
- mips*-sgi-irix5*)
- host_makefile_frag="config/mh-irix5"
- ;;
mips*-sgi-irix4*)
# Tell compiler to use K&R C. We can't compile under the SGI Ansi
# environment. Also bump switch table size so that cp-parse will
# compile. Bump string length limit so linker builds.
tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
;;
- mips*-sgi-irix3*)
- host_makefile_frag="config/mh-sysv"
- ;;
mips*-*-sysv4*)
host_makefile_frag="config/mh-sysv4"
;;
@@ -1032,26 +1064,23 @@ case "${host}" in
# This is not part of CFLAGS because perhaps not all C compilers have this
# option.
tentative_cc="cc -systype sysv"
- host_makefile_frag="config/mh-riscos"
;;
i370-ibm-opened*)
tentative_cc="c89"
- host_makefile_frag="config/mh-openedition"
;;
- i[3456]86-*-sysv5*)
+ i[[3456]]86-*-sysv5*)
host_makefile_frag="config/mh-sysv5"
;;
- i[3456]86-*-dgux*)
+ i[[3456]]86-*-dgux*)
tentative_cc="gcc -Wall -ansi -D__using_DGUX"
host_makefile_frag="config/mh-dgux386"
;;
- i[3456]86-ncr-sysv4.3*)
+ i[[3456]]86-ncr-sysv4.3*)
# The MetaWare compiler will generate a copyright message unless you
# turn it off by adding the -Hnocopyr flag.
tentative_cc="cc -Hnocopyr"
- host_makefile_frag="config/mh-ncrsvr43"
;;
- i[3456]86-ncr-sysv4*)
+ i[[3456]]86-ncr-sysv4*)
# for an NCR 3000 (i486/SVR4) system.
# The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
# This compiler not only emits obnoxious copyright messages every time
@@ -1060,28 +1089,21 @@ case "${host}" in
tentative_cc="/usr/ccs/ATT/cc"
host_makefile_frag="config/mh-ncr3000"
;;
- i[3456]86-*-sco3.2v5*)
- host_makefile_frag="config/mh-sysv"
+ i[[3456]]86-*-sco3.2v5*)
;;
- i[3456]86-*-sco*)
+ i[[3456]]86-*-sco*)
# The native C compiler botches some simple uses of const. Unfortunately,
# it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
tentative_cc="cc -Dconst="
host_makefile_frag="config/mh-sco"
;;
- i[3456]86-*-udk*)
+ i[[3456]]86-*-udk*)
host_makefile_frag="config/mh-sysv5"
;;
- i[3456]86-*-isc*)
- host_makefile_frag="config/mh-sysv"
- ;;
- i[3456]86-*-solaris2*)
+ i[[3456]]86-*-solaris2*)
host_makefile_frag="config/mh-sysv4"
;;
- i[3456]86-*-aix*)
- host_makefile_frag="config/mh-aix386"
- ;;
- i[3456]86-*-msdosdjgpp*)
+ i[[3456]]86-*-msdosdjgpp*)
host_makefile_frag="config/mh-djgpp"
;;
*-cygwin*)
@@ -1105,17 +1127,11 @@ case "${host}" in
# without overflowing the jump tables (-J says to use a 32 bit table)
tentative_cc="cc -J"
;;
- *-hp-hpux[78]*)
- tentative_cc="cc -Wp,-H256000"
- host_makefile_frag="config/mh-hpux8"
- ;;
*-hp-hpux*)
tentative_cc="cc -Wp,-H256000"
- host_makefile_frag="config/mh-hpux"
;;
*-*-hiux*)
tentative_cc="cc -Wp,-H256000"
- host_makefile_frag="config/mh-hpux"
;;
rs6000-*-lynxos*)
# /bin/cc is less than useful for our purposes. Always use GCC
@@ -1129,25 +1145,15 @@ case "${host}" in
*-*-sysv4*)
host_makefile_frag="config/mh-sysv4"
;;
- *-*-sysv*)
- host_makefile_frag="config/mh-sysv"
- ;;
esac
fi
-rm -f mh-frag
-if test -n "${host_makefile_frag}" ; then
- for f in ${host_makefile_frag}
- do
- cat ${srcdir}/$f >> mh-frag
- done
- host_makefile_frag=mh-frag
-fi
-
extra_arflags_for_target=
extra_nmflags_for_target=
+extra_ranlibflags_for_target=
+target_makefile_frag=/dev/null
case "${target}" in
- i[3456]86-*-netware*)
+ i[[3456]]86-*-netware*)
target_makefile_frag="config/mt-netware"
;;
powerpc-*-netware*)
@@ -1156,19 +1162,23 @@ case "${target}" in
*-*-linux*)
target_makefile_frag="config/mt-linux"
;;
- *-*-aix4.[3456789]* | *-*-aix[56789].*)
+ *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
# nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
# commands to handle both 32-bit and 64-bit objects. These flags are
# harmless if we're using GNU nm or ar.
extra_arflags_for_target=" -X32_64"
extra_nmflags_for_target=" -B -X32_64"
;;
+ *-*-darwin*)
+ # ranlib from Darwin requires the -c flag to look at common symbols.
+ extra_ranlibflags_for_target=" -c"
+ ;;
mips*-*-pe | sh*-*-pe | *arm-wince-pe)
target_makefile_frag="config/mt-wince"
;;
esac
-alphaieee_frag=
+alphaieee_frag=/dev/null
case $target in
alpha*-*-*)
# This just makes sure to use the -mieee option to build target libs.
@@ -1180,7 +1190,7 @@ esac
# If --enable-target-optspace always use -Os instead of -O2 to build
# the target libraries, similarly if it is not specified, use -Os
# on selected platforms.
-ospace_frag=
+ospace_frag=/dev/null
case "${enable_target_optspace}:${target}" in
yes:*)
ospace_frag="config/mt-ospace"
@@ -1198,15 +1208,6 @@ case "${enable_target_optspace}:${target}" in
;;
esac
-rm -f mt-frag
-if test -n "${target_makefile_frag}${alphaieee_frag}${ospace_frag}" ; then
- for f in ${target_makefile_frag} ${alphaieee_frag} ${ospace_frag}
- do
- cat ${srcdir}/$f >> mt-frag
- done
- target_makefile_frag=mt-frag
-fi
-
# Set with_gnu_as and with_gnu_ld as appropriate.
#
# This is done by determining whether or not the appropriate directory
@@ -1283,9 +1284,6 @@ case "${host}" in
;;
esac
-# This will go away when we start subconfigures from the Makefile.
-withoptions="${withoptions} ${extra_host_args}"
-
# If we aren't going to be using gcc, see if we can extract a definition
# of CC from the fragment.
# Actually, use the 'pre-extracted' version above.
@@ -1305,7 +1303,284 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then
fi
fi
-# post-target:
+# Some systems (e.g., one of the i386-aix systems the gas testers are
+# using) don't handle "\$" correctly, so don't use it here.
+tooldir='$(exec_prefix)'/${target_alias}
+build_tooldir=${tooldir}
+
+# Generate a default definition for YACC. This is used if the makefile can't
+# locate bison or byacc in objdir.
+
+for prog in 'bison -y' byacc yacc
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_YACC="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_YACC" && break
+done
+
+# Generate a default definition for M4. This is used if the makefile can't
+# locate m4 in objdir.
+
+for prog in gm4 gnum4 m4
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_M4="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_M4" && break
+done
+
+# Generate a default definition for LEX. This is used if the makefile can't
+# locate flex in objdir.
+
+for prog in flex lex
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_LEX="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_LEX" && break
+done
+
+if test "${build}" != "${host}" ; then
+ # If we are doing a Canadian Cross, in which the host and build systems
+ # are not the same, we set reasonable default values for the tools.
+
+ BISON=${BISON-bison}
+ CC=${CC-${host_alias}-gcc}
+ CFLAGS=${CFLAGS-"-g -O2"}
+ CXX=${CXX-${host_alias}-c++}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+ CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
+ CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
+ CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
+ GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
+ GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
+ BUILD_PREFIX=${build_alias}-
+ BUILD_PREFIX_1=${build_alias}-
+ MAKEINFO=${MAKEINFO-makeinfo}
+
+ if test -z "${YACC}" ; then
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/bison; then
+ YACC="bison -y"
+ break
+ fi
+ if test -f $dir/byacc; then
+ YACC=byacc
+ break
+ fi
+ if test -f $dir/yacc; then
+ YACC=yacc
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -z "${YACC}" ; then
+ YACC="bison -y"
+ fi
+ fi
+
+ if test -z "${LEX}" ; then
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/flex; then
+ LEX=flex
+ break
+ fi
+ if test -f $dir/lex; then
+ LEX=lex
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ LEX=${LEX-flex}
+ fi
+
+else
+ # Set reasonable default values for some tools even if not Canadian.
+ # Of course, these are different reasonable default values, originally
+ # specified directly in the Makefile.
+ # We don't export, so that autoconf can do its job.
+ # Note that all these settings are above the fragment inclusion point
+ # in Makefile.in, so can still be overridden by fragments.
+ # This is all going to change when we autoconfiscate...
+
+ BISON="\$(USUAL_BISON)"
+ CC_FOR_BUILD="\$(CC)"
+ GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
+ BUILD_PREFIX=
+ BUILD_PREFIX_1=loser-
+ MAKEINFO="\$(USUAL_MAKEINFO)"
+ LEX="\$(USUAL_LEX)"
+ YACC="\$(USUAL_YACC)"
+
+ # If CC is still not set, try to get gcc.
+ cc_prog_is_gcc=
+ if test -z "${CC}" ; then
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc; then
+ CC="gcc"
+ cc_prog_is_gcc=yes
+ echo 'void f(){}' > conftest.c
+ if test -z "`${CC} -g -c conftest.c 2>&1`"; then
+ CFLAGS=${CFLAGS-"-g -O2"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+ else
+ CFLAGS=${CFLAGS-"-O2"}
+ CXXFLAGS=${CXXFLAGS-"-O2"}
+ fi
+ rm -f conftest*
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ CC=${CC-cc}
+ else
+ # Determine if we are using gcc.
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+ if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
+ cc_prog_is_gcc=yes
+ fi
+ rm -f conftest.c
+ if test -z "${CFLAGS}"; then
+ # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
+ # is set to a version of gcc.
+ if test "$cc_prog_is_gcc" = yes; then
+ echo 'void f(){}' > conftest.c
+ if test -z "`${CC} -g -c conftest.c 2>&1`"; then
+ CFLAGS=${CFLAGS-"-g -O2"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+ else
+ CFLAGS=${CFLAGS-"-O2"}
+ CXXFLAGS=${CXXFLAGS-"-O2"}
+ fi
+ rm -f conftest*
+ fi
+ fi
+ fi
+
+ # We must set the default linker to the linker used by gcc for the correct
+ # operation of libtool. If LD is not defined and we are using gcc, try to
+ # set the LD default to the ld used by gcc.
+ if test -z "$LD"; then
+ if test "$cc_prog_is_gcc" = yes; then
+ case $build in
+ *-*-mingw*)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
+ *)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
+ esac
+ case $gcc_prog_ld in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ LD="$gcc_prog_ld" ;;
+ esac
+ fi
+ fi
+
+ CXX=${CXX-"c++"}
+ CFLAGS=${CFLAGS-"-g"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+fi
+
+# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
+# Set up the list of links to be made.
+# ${links} is the list of link names, and ${files} is the list of names to link to.
+
+# Make the links.
+configlinks="${links}"
+if test -r ./config.status ; then
+ mv -f ./config.status ./config.back
+fi
+while test -n "${files}" ; do
+ # set file to car of files, files to cdr of files
+ set ${files}; file=$1; shift; files=$*
+ set ${links}; link=$1; shift; links=$*
+
+ if test ! -r ${srcdir}/${file} ; then
+ if test ! -r ${file} ; then
+ echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
+ echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
+ exit 1
+ else
+ srcfile=${file}
+ fi
+ else
+ srcfile=${srcdir}/${file}
+ fi
+
+ ${remove} -f ${link}
+ # Make a symlink if possible, otherwise try a hard link
+ if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
+ true
+ else
+ # We need to re-remove the file because Lynx leaves a
+ # very strange directory there when it fails an NFS symlink.
+ ${remove} -r -f ${link}
+ ${hard_link} ${srcfile} ${link}
+ fi
+ if test ! -r ${link} ; then
+ echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
+ exit 1
+ fi
+
+ echo "Linked \"${link}\" to \"${srcfile}\"."
+done
+
+# Create a .gdbinit file which runs the one in srcdir
+# and tells GDB to look there for source files.
+
+if test -r ${srcdir}/.gdbinit ; then
+ case ${srcdir} in
+ .) ;;
+ *) cat > ./.gdbinit <<EOF
+# ${NO_EDIT}
+dir ${srcdir}
+dir .
+source ${srcdir}/.gdbinit
+EOF
+ ;;
+ esac
+fi
+
+# record if we want runtime library stuff installed in libsubdir.
+# Blank means no.
+if test -z "${enable_version_specific_runtime_libs}"; then
+ enable_version_specific_runtime_libs=no
+fi
# Make sure that the compiler is able to generate an executable. If it
# can't, we are probably in trouble. We don't care whether we can run the
@@ -1333,7 +1608,7 @@ rm -f conftest*
case "${host}" in
sparc-sun-solaris2*)
CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
- if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
+ if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then
could_use=
test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
if test -d /opt/cygnus/bin ; then
@@ -1364,18 +1639,12 @@ if test "${shared}" = "yes" ; then
else
SET_LIB_PATH=
fi
-sed -e "s/@SET_LIB_PATH@/${SET_LIB_PATH}/" Makefile > Makefile.tem
-rm -f Makefile
-mv -f Makefile.tem Makefile
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
-sed -e "s/@RPATH_ENVVAR@/${RPATH_ENVVAR}/" Makefile > Makefile.tem
-rm -f Makefile
-mv -f Makefile.tem Makefile
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
@@ -1384,13 +1653,24 @@ target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
# This is the final value for target_configdirs. configdirs already
# has its final value. It's time to create some lists of valid targets.
+# While at that, we remove Makefiles if we were started for recursive
+# configuration, such that the top-level Makefile reconfigures them,
+# like we used to do when configure itself was recursive.
+
all_build_modules=
configure_build_modules=
# Only make build modules if build != host.
# This should be done more generally, but at the moment it doesn't matter.
if test ${host_alias} != ${build_alias} ; then
- all_build_modules=all-build-libiberty
- configure_build_modules=configure-build-libiberty
+ for module in libiberty ; do
+ all_build_modules=all-build-${module}
+ configure_build_modules=configure-build-${module}
+ if test -z "${no_recursion}" \
+ && test -f ${build_subdir}/${module}/Makefile; then
+ echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
+ rm -f ${build_subdir}/${module}/Makefile
+ fi
+ done
fi
all_host_modules=
@@ -1402,6 +1682,11 @@ for module in ${configdirs} ; do
check_host_modules="${check_host_modules} check-${module}"
install_host_modules="${install_host_modules} install-${module}"
configure_host_modules="${configure_host_modules} configure-${module}"
+ if test -z "${no_recursion}" \
+ && test -f ${module}/Makefile; then
+ echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
+ rm -f ${module}/Makefile
+ fi
done
install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
@@ -1414,6 +1699,11 @@ for module in ${target_configdirs} ; do
check_target_modules="${check_target_modules} check-target-${module}"
install_target_modules="${install_target_modules} install-target-${module}"
configure_target_modules="${configure_target_modules} configure-target-${module}"
+ if test -z "${no_recursion}" \
+ && test -f ${target_subdir}/${module}/Makefile; then
+ echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
+ rm -f ${target_subdir}/${module}/Makefile
+ fi
done
# Determine whether gdb needs tk/tcl or not.
@@ -1423,90 +1713,118 @@ done
# so we should be able to put the 'maybe's in unconditionally and
# leave out the maybe dependencies when enable_gdbtk is false. I'm not
# 100% sure that that's safe though.
+
+gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
case "$enable_gdbtk" in
no)
GDB_TK="" ;;
+ yes)
+ GDB_TK="${gdb_tk}" ;;
*)
- GDB_TK="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui" ;;
+ # Only add the dependency on gdbtk when GDBtk is part of the gdb
+ # distro. Eventually someone will fix this and move Insight, nee
+ # gdbtk to a separate directory.
+ if test -d ${srcdir}/gdb/gdbtk ; then
+ GDB_TK="${gdb_tk}"
+ else
+ GDB_TK=""
+ fi
+ ;;
esac
# Create the 'maybe dependencies'. This uses a temporary file.
rm -f maybedep.tmp
+echo '# maybedep.tmp' > maybedep.tmp
for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
${install_host_modules} ${install_target_modules} \
${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
; do
echo "maybe-${item}: ${item}" >> maybedep.tmp
done
-sed -e '/@maybe_dependencies@/r maybedep.tmp' \
- -e 's/@maybe_dependencies@//' Makefile > Makefile.tem
-rm -f Makefile
-mv -f Makefile.tem Makefile
-rm -f maybedep.tmp
+maybe_dependencies=maybedep.tmp
+AC_SUBST_FILE(maybe_dependencies)
# Create the serialization dependencies. This uses a temporary file.
+AC_ARG_ENABLE([serial-configure],
+[ --disable-serial-[{host,target,build}-]configure
+ Don't force sequential configuration of
+ sub-packages for the host, target or build
+ machine, or of any sub-packages at all])
+
# These force 'configure's to be done one at a time, to avoid problems
# with contention over a shared config.cache.
rm -f serdep.tmp
+echo '# serdep.tmp' > serdep.tmp
olditem=
+test "x${enable_serial_configure}" = xno ||
+test "x${enable_serial_build_configure}" = xno ||
for item in ${build_configdirs} ; do
case ${olditem} in
"") ;;
- *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
+ *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
esac
olditem=${item}
done
olditem=
+test "x${enable_serial_configure}" = xno ||
+test "x${enable_serial_host_configure}" = xno ||
for item in ${configdirs} ; do
case ${olditem} in
"") ;;
- *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;;
+ *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
esac
olditem=${item}
done
olditem=
+test "x${enable_serial_configure}" = xno ||
+test "x${enable_serial_target_configure}" = xno ||
for item in ${target_configdirs} ; do
case ${olditem} in
"") ;;
- *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
+ *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
esac
olditem=${item}
done
-sed -e '/@serialization_dependencies@/r serdep.tmp' \
- -e 's/@serialization_dependencies@//' Makefile > Makefile.tem
-rm -f Makefile
-mv -f Makefile.tem Makefile
-rm -f serdep.tmp
-
-# Base args. Strip norecursion, cache-file, srcdir, host, build, target.
-# These are the ones we might not want to pass down to subconfigures.
-baseargs=`echo "${arguments}" | \
- sed -e 's/--no[^ ]*//' \
- -e 's/--cache[a-z-]*=[^ ]*//' \
- -e 's/--sr[a-z-]*=[^ ]*//' \
- -e 's/--ho[a-z-]*=[^ ]*//' \
- -e 's/--bu[a-z-]*=[^ ]*//' \
- -e 's/--ta[a-z-]*=[^ ]*//'`
+serialization_dependencies=serdep.tmp
+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.
+baseargs=`echo " ${ac_configure_args} " | \
+ sed -e 's/ --no[[^ ]]* / /' \
+ -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \
+ -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \
+ -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \
+ -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \
+ -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \
+ -e 's/ -cache-file[[= ]][[^ ]]* / /' \
+ -e 's/ -srcdir[[= ]][[^ ]]* / /' \
+ -e 's/ -host[[= ]][[^ ]]* / /' \
+ -e 's/ -build[[= ]][[^ ]]* / /' \
+ -e 's/ -target[[= ]][[^ ]]* / /' \
+ -e 's/ [[^ -][^ ]*] / /' \
+ -e 's/^ *//;s/ *$//'`
# 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
# desired.
-buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
+build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
"") # empty
cache_file_option="" ;;
-/* | [A-Za-z]:[\\/]* ) # absolute path
+/* | [[A-Za-z]]:[[\\/]]* ) # absolute path
cache_file_option="--cache-file=${cache_file}" ;;
*) # relative path
cache_file_option="--cache-file=../${cache_file}" ;;
esac
-hostargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
-targargs=${baseargs}
+target_configargs=${baseargs}
# Passing a --with-cross-host argument lets the target libraries know
# whether they are being built with a cross-compiler or being built
@@ -1514,22 +1832,22 @@ targargs=${baseargs}
# sorts of decisions they want to make on this basis. Please consider
# this option to be deprecated. FIXME.
if test x${is_cross_compiler} = xyes ; then
- targargs="--with-cross-host=${host_alias} ${targargs}"
+ target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
fi
# Default to --enable-multilib.
if test x${enable_multilib} = x ; then
- targargs="--enable-multilib ${targargs}"
+ target_configargs="--enable-multilib ${target_configargs}"
fi
# Pass --with-newlib if appropriate. Note that target_configdirs has
# changed from the earlier setting of with_newlib.
if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
- targargs="--with-newlib ${targargs}"
+ target_configargs="--with-newlib ${target_configargs}"
fi
# Pass the appropriate --host, --build, and --cache-file arguments.
-targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
+target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
# provide a proper gxx_include_dir.
# Note, if you change the default, make sure to fix both here and in
@@ -1563,7 +1881,7 @@ fi
FLAGS_FOR_TARGET=
case " $target_configdirs " in
*" newlib "*)
- case " $targargs " in
+ case " $target_configargs " in
*" --with-newlib "*)
case "$target" in
*-cygwin*)
@@ -1594,7 +1912,7 @@ case " $target_configdirs " in
fi
case "${target}-${is_cross_compiler}" in
- i[3456]86-*-linux*-no)
+ i[[3456]]86-*-linux*-no)
# Here host == target, so we don't need to build gcc,
# so we don't want to discard standard headers.
FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
@@ -1633,14 +1951,9 @@ elif test -d ${srcdir}/gcc; then
elif test "$host" = "$target"; then
CC_FOR_TARGET='$(CC)'
else
- CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
+ CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
fi
-# On Canadian crosses, configure reads CC_FOR_TARGET from Makefile,
-# if Makefile exists. Prevent $(FLAGS_FOR_TARGET) from being duplicated.
-case $CC_FOR_TARGET in
-*' $(FLAGS_FOR_TARGET)') ;;
-*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
-esac
+CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
if test "x${GCJ_FOR_TARGET+set}" = xset; then
:
@@ -1649,12 +1962,9 @@ elif test -d ${srcdir}/gcc; then
elif test "$host" = "$target"; then
GCJ_FOR_TARGET='gcj'
else
- GCJ_FOR_TARGET=`echo gcj | sed -e 's/x/x/' ${program_transform_name}`
+ GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
fi
-case $GCJ_FOR_TARGET in
-*' $(FLAGS_FOR_TARGET)') ;;
-*) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
-esac
+GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
# Don't use libstdc++-v3's flags to configure/build itself.
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
@@ -1674,20 +1984,14 @@ elif test "$host" = "$target"; then
CXX_FOR_TARGET='$(CXX)'
RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
else
- CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
+ CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
fi
-case $CXX_FOR_TARGET in
-*' $(FLAGS_FOR_TARGET)') ;;
-*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
-esac
-case $RAW_CXX_FOR_TARGET in
-*' $(FLAGS_FOR_TARGET)') ;;
-*) RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
-esac
+CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
-qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
+qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
+qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
# We want to defer the evaluation of `cmd`s and shell variables in
# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
@@ -1695,48 +1999,131 @@ qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
# quotes, but we still have to duplicate `$'s so that shell variables
# can be expanded by the nested make as shell variables, not as make
# macros.
-qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-
-# BASE_CC_FOR_TARGET is the actual program file of CC_FOR_TARGET,
-# for use in dependencies. Replace $$r with a relative
-# path if it's present.
-set dummy $CC_FOR_TARGET; cc_for_target_first_word=$2
-BASE_CC_FOR_TARGET=`echo "$cc_for_target_first_word" | sed -e 's,[$][$]r,.,'`
-
-sedtemp=sed.$$
-cat >$sedtemp <<EOF
-s%@GDB_TK@%${GDB_TK}%
-s%@configure_build_modules@%${configure_build_modules}%
-s%@all_build_modules@%${all_build_modules}%
-s%@configure_host_modules@%${configure_host_modules}%
-s%@all_host_modules@%${all_host_modules}%
-s%@check_host_modules@%${check_host_modules}%
-s%@install_host_modules@%${install_host_modules}%
-s%@install_host_modules_nogcc@%${install_host_modules_nogcc}%
-s%@configure_target_modules@%${configure_target_modules}%
-s%@all_target_modules@%${all_target_modules}%
-s%@check_target_modules@%${check_target_modules}%
-s%@install_target_modules@%${install_target_modules}%
-s:@target_configdirs@:${target_configdirs}:
-s%@target_configargs@%${targargs}%
-s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%
-s%@CC_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
-s%@BASE_CC_FOR_TARGET@%${BASE_CC_FOR_TARGET}%
-s%@GCJ_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
-s%@CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
-s%@RAW_CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}%
-s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
-s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}%
-s%@target_subdir@%${target_subdir}%
-s%@build_subdir@%${build_subdir}%
-s%@build_configargs@%${buildargs}%
-s%@gxx_include_dir@%${gxx_include_dir}%
-s%@libstdcxx_incdir@%${libstdcxx_incdir}%
-s%@host_configargs@%${hostargs}%
-EOF
-sed -f $sedtemp Makefile > Makefile.tem
-rm -f Makefile $sedtemp
-mv -f Makefile.tem Makefile
+qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
+qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
+
+# Wrap CC_FOR_TARGET and friends, for certain types of builds.
+CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
+GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
+CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
+RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
+RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
+
+# Makefile fragments.
+host_makefile_frag=${srcdir}/${host_makefile_frag}
+target_makefile_frag=${srcdir}/${target_makefile_frag}
+alphaieee_frag=${srcdir}/${alphaieee_frag}
+ospace_frag=${srcdir}/${ospace_frag}
+AC_SUBST_FILE(host_makefile_frag)
+AC_SUBST_FILE(target_makefile_frag)
+AC_SUBST_FILE(alphaieee_frag)
+AC_SUBST_FILE(ospace_frag)
+
+# Miscellanea: directories, flags, etc.
+AC_SUBST(SET_LIB_PATH)
+AC_SUBST(RPATH_ENVVAR)
+AC_SUBST(BUILD_PREFIX)
+AC_SUBST(BUILD_PREFIX_1)
+AC_SUBST(configlinks)
+AC_SUBST(enable_shared)
+AC_SUBST(enable_threads)
+AC_SUBST(enable_version_specific_runtime_libs)
+AC_SUBST(gcc_version_trigger)
+AC_SUBST(gcc_version)
+AC_SUBST(tooldir)
+AC_SUBST(build_tooldir)
+AC_SUBST(GDB_TK)
+AC_SUBST(gxx_include_dir)
+AC_SUBST(libstdcxx_incdir)
+
+# Build module lists & subconfigure args.
+AC_SUBST(build_subdir)
+AC_SUBST(build_configargs)
+AC_SUBST(configure_build_modules)
+AC_SUBST(all_build_modules)
+
+# Host module lists & subconfigure args.
+AC_SUBST(host_configargs)
+AC_SUBST(configdirs)
+AC_SUBST(configure_host_modules)
+AC_SUBST(all_host_modules)
+AC_SUBST(check_host_modules)
+AC_SUBST(install_host_modules)
+AC_SUBST(install_host_modules_nogcc)
+
+# Target module lists & subconfigure args.
+AC_SUBST(target_subdir)
+AC_SUBST(target_configargs)
+AC_SUBST(target_configdirs)
+AC_SUBST(configure_target_modules)
+AC_SUBST(all_target_modules)
+AC_SUBST(check_target_modules)
+AC_SUBST(install_target_modules)
+
+# Build tools.
+AC_SUBST(BISON)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(LEX)
+AC_SUBST(MAKEINFO)
+AC_SUBST(YACC)
+AC_SUBST(config_shell)
+
+# Host tools.
+NCN_STRICT_CHECK_TOOL(AR, ar)
+NCN_STRICT_CHECK_TOOL(AS, as)
+NCN_STRICT_CHECK_TOOL(DLLTOOL, dlltool)
+NCN_STRICT_CHECK_TOOL(LD, ld)
+NCN_STRICT_CHECK_TOOL(NM, nm)
+NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :)
+NCN_STRICT_CHECK_TOOL(WINDRES, windres)
+NCN_STRICT_CHECK_TOOL(OBJCOPY, objcopy)
+NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump)
+AC_SUBST(CC)
+AC_SUBST(CXX)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(DEFAULT_YACC)
+AC_SUBST(DEFAULT_LEX)
+AC_SUBST(DEFAULT_M4)
+
+# Target tools.
+NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
+NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
+NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
+NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
+NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
+NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
+NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+
+AC_SUBST(GCC_FOR_TARGET)
+AC_SUBST(FLAGS_FOR_TARGET)
+AC_SUBST(CC_FOR_TARGET)
+AC_SUBST(GCJ_FOR_TARGET)
+AC_SUBST(CXX_FOR_TARGET)
+AC_SUBST(RAW_CXX_FOR_TARGET)
+AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
+AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
+
+# Fix up target tools.
+if test "x${build}" = "x${host}" ; then
+ # In this case, the newly built tools can and should be used,
+ # so we override the results of the autoconf tests.
+ # This should really only happen when the tools are actually being built,
+ # but that's a further refinement. The new build scheme, where
+ # tools are built into a structure paralleling where they're installed,
+ # should also eliminate all of this cleanly.
+ AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
+ AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
+ DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
+ LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
+ NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
+ RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
+ WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
+fi
+# Certain tools may need extra flags.
+AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
+RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
+NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
-#
+AC_OUTPUT(Makefile)
diff --git a/etc/ChangeLog b/etc/ChangeLog
index debe735ca99..9a1a67d2015 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-02 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.in (DESTDIR): New.
+ (install-info): Use it.
+
2002-06-11 Nick Clifton <nickc@cambridge.redhat.com>
Import the following patches from the FSF GCC sources:
diff --git a/etc/Makefile.in b/etc/Makefile.in
index 2bc34574540..63f7738c64a 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -2,6 +2,8 @@
# Makefile.in for etc
#
+DESTDIR =
+
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -68,17 +70,17 @@ info:
done
install-info: info
- $(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
if test ! -f standards.info; then cd $(srcdir); fi; \
if test -f standards.info; then \
for i in standards.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
done; \
fi
if test ! -f configure.info; then cd $(srcdir); fi; \
if test -f configure.info; then \
for i in configure.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
done; \
fi
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 74c62362e69..4b7cb372d92 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,16209 +1,2095 @@
-2003-01-31 David Carlton <carlton@math.stanford.edu>
-
- From Jim Blandy <jimb@redhat.com>:
-
- Use a single, consistent representation for an empty minimal
- symbol table in an objfile.
- * objfiles.c (terminate_minimal_symbol_table): New function.
- (allocate_objfile): Call it.
- * objfiles.h (terminate_minimal_symbol_table): New declaration.
- (ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
- non-NULL.
- * minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
- objfile has minimal symbols, compare minimal_symbol_count to zero,
- instead of comparing msymbols with NULL.
- * objfiles.c (have_minimal_symbols): Same.
- * solib-sunos.c (solib_add_common_symbols): Call
- terminate_minimal_symbol_table.
- * symfile.c (reread_symbols): Same.
-
- * objfiles.h: Revert patch from 2003-01-27, to be replaced by
- similar patch from Jim Blandy.
- * objfiles.c (objfile_relocate): Ditto.
- * i386-linux-tdep.c (find_minsym_and_objfile): Ditto.
- * arm-linux-tdep.c (find_minsym_and_objfile): Ditto.
- * gdbtypes.h: Delete INTEGER_COERCION_BADNESS,
- FLOAT_COERCION_BADNESS.
- * gdbtypes.c (rank_one_type): Replace all uses of
- INTEGER_COERCION_BADNESS by INTEGER_CONVERSION_BADNESS.
- * valops.c (find_overload_match): Call cp_func_name.
- * cp-support.h: Declare cp_func_name.
- * cp-support.c (cp_func_name): New function.
-
-2003-01-30 David Carlton <carlton@math.stanford.edu>
-
- * valops.c (find_overload_match): Move code into
- find_oload_champ_namespace.
- (find_oload_champ_namespace): New function, which immediately gets
- eviscerated and turned into a call to
- find_oload_champ_namespace_loop.
- (find_oload_champ_namespace_loop): New function.
- * symtab.c (make_symbol_overload_list): Move entire body into
- make_symbol_overload_list_qualified.
- (make_symbol_overload_list_qualified): New.
- (read_in_psymtabs): New.
- (make_symbol_overload_list_qualified): Rewrite.
- (make_symbol_overload_list_using): New.
- (lookup_symbol_namespace): Use alloca, not xmalloc.
- (make_symbol_overload_list): Put some memory management stuff back
- in.
-
-2003-01-28 David Carlton <carlton@math.stanford.edu>
-
- * valops.c (find_overload_match): Calculate func_name via
- SYMBOL_CPLUS_DEMANGLED_NAME + remove_params.
- * symtab.c (remove_params): Make extern.
- * symtab.h: Add declaration for remove_params.
- * symtab.c (overload_list_add_symbol): Change second arg to const
- char *.
- * valops.c (find_overload_match) Update call to
- make_symbol_overload_list.
- * symtab.h: Update declaration for make_symbol_overload_list.
- * symtab.c (make_symbol_overload_list): Change arguments.
- * valops.c (find_overload_match): Rename cleanups to old_cleanups;
- handle freeing func_name via cleanups.
-
-2003-01-27 David Carlton <carlton@math.stanford.edu>
-
- * objfiles.h: Add comments about objfile->msymbols being NULL.
- * objfiles.c (objfile_relocate): Enclose ALL_OBJFILE_MSYMBOLS in
- guard.
- * i386-linux-tdep.c (find_minsym_and_objfile): Call ALL_MSYMBOLS
- instead of ALL_OBJFILES and ALL_OBJFILE_MSYMBOLS.
- * arm-linux-tdep.c (find_minsym_and_objfile): Ditto.
-
-2003-01-24 David Carlton <carlton@math.stanford.edu>
-
- * valops.c (find_oload_champ): New function.
- (find_overload_match): Separate code into find_oload_champ and
- oload_method_static.
- (find_oload_champ): Call oload_method_static.
- (oload_method_static): New function.
- (find_overload_match): Call classify_oload_match.
- (classify_oload_match): New function.
- * value.h: Update declaration of find_overload_match.
- * eval.c (evaluate_subexp_standard): Pass current block to
- find_overload_match.
- * valops.c (find_overload_match): Add CURRENT_BLOCK arg.
-
-2003-01-20 David Carlton <carlton@math.stanford.edu>
-
- * p-exp.y: Add block to OP_FUNCALL.
- * objc-exp.y: Add block to OP_FUNCALL.
- * m2-exp.y: Add block to OP_FUNCALL.
- * c-exp.y: Add block to OP_FUNCALL.
- * ada-exp.y: Add block to OP_FUNCALL.
- (write_object_renaming): Ditto.
- * parse.c (length_of_subexp): Split off OP_FUNCALL.
- (prefixify_subexp): Ditto.
- * expprint.c (print_subexp): Change offset for OP_FUNCALL.
- (dump_subexp): Ditto.
- * eval.c (evaluate_subexp_standard): Change offset for
- OP_FUNCALL.
- * ada-lang.c (ada_resolve_subexp): Add comment on OP_FUNCALL.
- (replace_operator_with_call): Add block to OP_FUNCALL.
- (ada_evaluate_subexp): Change offset for OP_FUNCALL.
- * expression.h (exp_opcode): Change comments before OP_FUNCALL and
- OP_F77_UNDETERMINED_ARGLIST.
-
-2003-01-14 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (search_symbols): Add comment.
- (lookup_symbol_aux_using): Function name should start line.
- (lookup_symbol_aux_using_loop): Ditto.
- (lookup_block_symbol): Add comment.
-
-2003-01-13 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (read_structure_scope): Add comment.
- (add_partial_structure): Ditto.
- * symtab.c (lookup_transparent_type): Add comment.
-
-2003-01-10 David Carlton <carlton@math.stanford.edu>
-
- * objfiles.c (allocate_objfile): Always set name.
- * dwarf2read.c (scan_partial_symbols): Don't call
- add_partial_structure on unions.
- (add_partial_structure): Look for enclosing namespace names.
- (read_structure_scope): Look enclosing namespace/class names.
- (new_symbol): For C++ structures, always grab the name from the
- type's name.
-
-2003-01-07 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (add_partial_structure): New function.
- (scan_partial_symbols): Call add_partial_structure. New variable
- info_ptr_updated.
- * symtab.h (struct general_symbol_info): Make demangled_names
- const char *.
-
-2003-01-06 David Carlton <carlton@math.stanford.edu>
-
- * config/djgpp/fnchange.lst: Mention
- testsuite/gdb.c++/namespace1.cc.
- * cp-support.h: Declare cp_lookup_namespace_symbol.
- * cp-support.c (cp_lookup_namespace_symbol): New function.
- (cp_check_namespace_symbol): Call cp_lookup_namespace_symbol.
- (cp_lookup_possible_namespace_symbol): Update comment.
- * symtab.c (lookup_symbol_aux_file): Add 'anonymous_namespace'
- argument.
- (lookup_symbol_namespace): Call lookup_symbol_aux_file with new
- argument.
- * cp-support.h: Declare cp_is_anonymous.
- * cp-support.c (cp_is_anonymous): New function.
- * buildsym.c (add_symbol_to_list): Don't test for anonymous
- namespace mention here.
- (scan_for_anonymous_namespaces): Test for it here, instead.
- * symtab.c (lookup_symbol_aux_minsyms): Delete.
- (lookup_symbol_aux_nonlocal): Don't call
- lookup_symbol_aux_minsyms.
-
-2002-12-24 David Carlton <carlton@math.stanford.edu>
-
- * MAINTAINERS: Delete OBSOLETE targets.
- * config/sparc/tm-sparc.h: Delete duplicate definition of
- DEPRECATED_PC_IN_CALL_DUMMY.
-
-2002-12-23 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (search_symbols): Update comment.
- (lookup_symbol): Don't demangle names.
- (lookup_symbol_minsym): Delete FIXME comment.
- (lookup_symbol_linkage): Add comment.
- (lookup_symbol_aux): Rename 'mangled_name' argument to
- 'linkage_name'.
- (lookup_symbol_aux_local): Ditto.
- (lookup_symbol_aux_block): Ditto.
- (lookup_symbol_aux_nonlocal): Ditto.
- (lookup_symbol_aux_file): Ditto.
- (lookup_symbol_aux_symtabs): Ditto.
- (lookup_symbol_aux_psymtabs): Ditto.
- (lookup_symbol_aux_using): Ditto.
- (lookup_symbol_aux_using_loop): Ditto.
- (lookup_symbol_namespace): Ditto.
- (lookup_symbol_aux_minsyms): Ditto.
- * symfile.c (psymbol_init_demangled_name): Delete unnecessary
- variable, initialization.
-
- * Merge from mainline; tag is carlton_dictionary-20021223-merge.
-
-2002-12-23 Daniel Jacobowitz <drow@mvista.com>
-
- * config/pa/nm-hppab.h: Delete duplicate CANNOT_STORE_REGISTER decl.
- * config/pa/nm-hppao.h: Delete duplicate CANNOT_STORE_REGISTER decl.
-
-2002-12-23 Rodney Brown <rbrown64@csc.com.au>
-
- * config/pa/nm-hppah.h: Delete duplicate CANNOT_STORE_REGISTER decl.
-
-2002-12-23 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux): Delete 'force_return' variable.
- (lookup_symbol_aux_minsyms): Delete 'force_return' argument.
- (search_symbols): Call lookup_symbol_aux_minsyms to find debugging
- information associated to a minsym, not lookup_symbol.
-
-2002-12-21 Mark Kettenis <kettenis@gnu.org>
-
- * x86-64-tdep.h (x86_64_init_abi): New prototype.
- * x86-64-tdep.c (i386_fp_regnum_p): Remove function.
- (x86_64_init_abi): Make non-static. Set number of pseudo
- registers to 0.
- (x86_64_gdbarch_init): Remove function.
- (_initialize_x86_64_tdep): Renove register_gdbarch_init call.
- Remove code dealing with dissambly.
- * x86-64-linux-tdep.c (x86_64_linux_init_abi): New function.
- (_initialize_x86_64_linux_tdep): New function.
- * config/i386/x86-64linux.mt (TDEPFILES): Add i386-tdep.o and
- i386-tdep.o.
-
-2002-12-14 Mark Kettenis <kettenis@gnu.org>
-
- * osabi.c: Include "gdb_assert.h" and "gdb_string.h".
- (struct gdb_osabi_handler): Remove member `arch'. Add member
- `arch_info'.
- (gdbarch_register_osabi): Add new argument `machine'. Use ot to
- construct a `struct bfd_arch_info' and store it in the `struct
- gdb_osabi_handler' that is created.
- (gdbarch_init_osabi): Check for compatibility based on machine
- type and architecture.
- * osabi.h (gdbarch_register_osabi): Adjust prototype and update
- comment.
- * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add 0 as
- second argument in call to gdbarch_register_osabi.
- * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise.
- * alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise.
- * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise.
- * arm-linux-tdep.c (_initialize_arm_linux_tdep): Likewise.
- * arm-tdep.c (_initialize_arm_tdep): Likewise.
- * armnbsd-tdep.c (_initialize_armnbsd_tdep): Likewise.
- * hppa-hpux-tdep.c (_initialize_hppa_hpux_tdep): Likewise.
- * i386-interix-tdep.c (_initialize_i386_interix_tdep): Likewise.
- * i386-linux-tdep.c (_initialize_i386_linux_tdep): Likewise.
- * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Likewise.
- * i386-tdep.c (_initialize_i386_tdep): Likewise.
- * i386bsd-tdep.c (_initialize_i386bsd_tdep): Likewise.
- * i386gnu-tdep.c (_initialize_i386gnu_tdep): Likewise.
- * i386ly-tdep.c (_initialize_i386lynx_tdep): Renamed from
- _initialize_i386bsd_tdep and updated likewise.
- * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Likewise.
- * i386obsd-tdep.c (_initialize_i386obsd_tdep): Likewise.
- * mips-irix-tdep.c (_initialize_mips_irix_tdep): Likewise.
- * mips-linux-tdep.c (_initialize_mips_linux_tdep): Likewise.
- * mipsnbsd-tdep.c (_initialize_mipsnbsd__tdep): Likewise.
- * ns32knbsd-tdep.c (_initialize_ns32kmnsd_tdep): Likewise.
- * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Likewise.
- * ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Likewise.
- * shnbsd-tdep.c (_initialize_shnbsd_tdep): Likewise.
- * sparcnbsd-tdep.c (_initialize_sparcnbsd_tdep): Likewise.
-
-2002-12-20 Kevin Buettner <kevinb@redhat.com>
-
- * solib-svr4.c (elf_locate_base): Fix sizeof() related bug. Add
- DT_MIPS_RLD_MAP case for 64-bit targets.
-
-2002-12-20 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (heuristic_proc_desc): Clear memory associated with
- ``temp_saved_regs'', not the pointer or other storage contiguous
- to this pointer.
-
-2002-12-20 Kevin Buettner <kevinb@redhat.com>
-
- * Makefile.in (mips-linux-tdep.o): Add $(osabi_h) and $(gdb_string_h).
- * config/mips/tm-linux.h (mips_linux_svr4_fetch_link_map_offsets)
- (mips_linux_get_longjmp_target): Delete declarations.
- (SVR4_FETCH_LINK_MAP_OFFSETS, GET_LONGJMP_TARGET)
- (MIPS_LINUX_JB_ELEMENT_SIZE, MIPS_LINUX_JB_PC): Delete definitions.
- * mips-linux-tdep.c (osabi.h, gdb_string.h): Include.
- (MIPS_LINUX_JB_ELEMENT_SIZE, MIPS_LINUX_JB_PC): Define.
- (mips_linux_get_longjmp_target)
- (mips_linux_svr4_fetch_link_map_offsets): Make static.
- (mips_linux_init_abi): New function.
- (_initialize_mips_linux_tdep): Register mips_linux_init_abi().
-
-2002-12-19 Keith Seitz <keiths@redhat.com>
-
- patch committed by Elena Zannoni <ezannoni@redhat.com>
- * thread.c (do_captured_list_thread_ids): Call prune_threads and
- target_find_new_threads. Fix for PR mi/669.
-
-2002-12-19 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (decode_line_1): Move code into decode_all_digits.
- (decode_all_digits): New function.
-
-2002-12-19 Kevin Buettner <kevinb@redhat.com>
-
- * exec.c (print_section_info): Select a format string to use with
- local_hex_string_custom() based upon the value of TARGET_ADDR_BIT.
-
-2002-12-18 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (deprecated_update_current_frame_pc_hack): Replace
- deprecated_update_current_frame_pc_hack.
- (deprecated_update_frame_base_hack): New function.
- * frame.h (deprecated_update_frame_pc_hack): Replace
- (deprecated_update_frame_base_hack): Declare.
- * infrun.c (normal_stop): Update.
-
-2002-12-18 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_init_extra_frame_info): Use
- frame_extra_info_zalloc.
- (rs6000_frame_args_address): Use get_frame_extra_info.
- (frame_get_saved_regs): Use get_frame_saved_regs.
- (frame_initial_stack_address): Use get_frame_saved_regs and
- get_frame_extra_info.
- (frame_initial_stack_address): Use get_frame_extra_info.
-
-2002-12-17 Kevin Buettner <kevinb@redhat.com>
-
- * dve3900-rom.c (r3900_regnames): Don't use NUM_REGS to determine
- array size.
- (fetch_bitmapped_register, store_bitmapped_register): Add bounds
- checks for r3900_regnames[].
-
-2002-12-17 Richard Earnshaw <rearnsha@arm.com>
-
- * armnbsd-tdep.c (ARM_NBSD_JB_PC): Renamed from JB_PC.
- All uses changed
- (ARM_NBSD_JB_ELELMENT_SIZE): Similarly.
-
-2002-12-17 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_partial_symbol): Don't search past the end of
- the partial symbols.
-
-2002-12-17 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (frame_info): Use get_frame_saved_regs.
- * breakpoint.c (until_break_command): Use get_frame_pc.
-
-2002-12-16 Kevin Buettner <kevinb@redhat.com>
-
- * buildsym.c (block_end_complaint, anon_block_end_complaint)
- (innerblock_complaint, innerblock_anon_complaint)
- (blockvector_complaint): Delete deprecated complaint structs.
- (finish_block, make_blockvector, end_symtab): Replace calls
- to complain() with calls to complaint().
- * coffread.c (ef_complaint, ef_stack_complaint, eb_stack_complaint)
- (bf_no_aux_complaint, ef_no_aux_complaint, lineno_complaint)
- (unexpected_type_complaint, bad_sclass_complaint)
- (misordered_blocks_complaint, tagndx_bad_complaint, eb_complaint):
- Delete deprecated complaint structs.
- (coff_symtab_read, enter_linenos, decode_type, decode_base_type):
- Replace calls to complain() with calls to complaint().
- * dbxread.c (lbrac_complaint, string_table_offset_complaint)
- (unknown_symtype_complaint, unknown_symchar_complaint)
- (lbrac_rbrac_complaint, lbrac_unmatched_complaint)
- (lbrac_mismatch_complaint, repeated_header_complaint)
- (unclaimed_bincl_complaint, discarding_local_symbols_complaint):
- Delete deprecated complaint structs.
- (unknown_symtype_complaint, lbrac_mismatch_complaint)
- (repeated_header_complaint)
- (function_outside_compiliation_unit_complaint): New functions.
- (add_old_header_file, find_corresponding_bincl_psymtab)
- (set_namestring, find_stab_function_addr, read_dbx_symtab)
- (process_one_symbol): Replace calls to complain() with, possibly
- indirect, calls to complaint().
- * dwarfread.c (no_bfd_get_N, malformed_die, bad_die_ref)
- (unknown_attribute_form, unknown_attribute_length)
- (unexpected_fund_type, unknown_type_modifier, volatile_ignored)
- (const_ignored, botched_modified_type, op_deref2, op_deref4)
- (basereg_not_handled, dup_user_type_allocation)
- (dup_user_type_definition, missing_tag, bad_array_element_type)
- (subscript_data_items, unhandled_array_subscript_format)
- (unknown_array_subscript_format, not_row_major)
- (missing_at_name): Delete deprecated complaint structs.
- (bad_die_ref_complaint, unknown_attribute_form_complaint)
- (dup_user_type_definition_complaint)
- (bad_array_element_type_complaint): New functions.
- (lookup_utype, alloc_utype, struct_type, decode_array_element_type)
- (decode_subscript_data_item, dwarf_read_array_type)
- (read_tag_string_type, read_subroutine_type, read_func_scope)
- (locval, scan_partial_symbols, decode_modified_type)
- (decode_func_type, basicdieinfo, completeddieinfo, target_to_host)
- (attribute_size): Replace calls to complain() with, possibly
- indirect, calls to complaint().
- * elfread.c (section_info_complaint, section_info_dup_complaint)
- (stab_info_mismatch_complaint, stab_info_questionable_complaint):
- Delete deprecated complaint structs.
- (elf_symtab_read, elfstab_offset_sections): Replace calls to
- complain() with calls to complaint().
- * gdbtypes.c (stub_noname_complaint): Delete deprecated complaint
- struct.
- (stub_noname_complaint): New function.
- (check_typedef, add_mangled_type): Replace calls to complain()
- with calls to complaint().
- * hpread.c (string_table_offset_complaint, lbrac_unmatched_complaint)
- (lbrac_mismatch_complaint, hpread_unhandled_end_common_complaint)
- (hpread_unhandled_type_complaint, hpread_struct_complaint)
- (hpread_array_complaint, hpread_type_lookup_complaint)
- (hpread_unexpected_end_complaint, hpread_tagdef_complaint)
- (hpread_unhandled_common_complaint)
- (hpread_unhandled_blockdata_complaint): Delete deprecated complaint
- struct definitions and declarations.
- (lbrac_unmatched_complaint, lbrac_mismatch_complaint): New functions.
- (SET_NAMESTRING, hpread_type_lookup, hpread_process_one_debug_symbol):
- Replace calls to complain() with, possibly indirect, calls to
- complaint().
- * macrotab.c (macro_include, check_for_redefinition, macro_undef):
- Likewise.
- * mdebugread.c (bad_file_number_complaint, index_complaint)
- (aux_index_complaint, block_index_complaint)
- (unknown_ext_complaint, unknown_sym_complaint)
- (unknown_st_complaint, block_overflow_complaint)
- (basic_type_complaint, unknown_type_qual_complaint)
- (array_index_type_complaint, bad_tag_guess_complaint)
- (block_member_complaint, stEnd_complaint)
- (unknown_mdebug_symtype_complaint, stab_unknown_complaint)
- (pdr_for_nonsymbol_complaint, pdr_static_symbol_complaint)
- (bad_setjmp_pdr_complaint, bad_fbitfield_complaint)
- (bad_continued_complaint, bad_rfd_entry_complaint)
- (unexpected_type_code_complaint, unable_to_cross_ref_complaint)
- (bad_indirect_xref_complaint, illegal_forward_tq0_complaint)
- (illegal_forward_bt_complaint, bad_linetable_guess_complaint)
- (bad_ext_ifd_complaint, bad_ext_iss_complaint): Delete deprecated
- complaint structs.
- (index_complaint, unknown_ext_complaint, basic_type_complaint)
- (bad_tag_guess_complaint, bad_rfd_entry_complaint)
- (unexpected_type_code_complaint)
- (function_outside_compilation_unit_complaint): New functions.
- (parse_symbol, parse_type, upgrade_type, parse_procedure)
- (parse_partial_symbols, psymtab_to_symtab_1, cross_ref, add_symbol):
- Replace calls to complain() with, possibly indirect calls to
- complaint().
- * objc-lang.c (noclass_lookup_complaint, nosel_lookup_complaint):
- Delete deprecated complaint structs.
- (lookup__objc_class, lookup_child_selector): Replace complain()
- with complaint().
- * remote-vx.c (cant_contact_target): Delete deprecated complaint
- struct.
- (vx_lookup_symbol): Replace complain() with complaint().
- * stabsread.c (invalid_cpp_abbrev_complaint)
- (invalid_cpp_type_complaint, member_fn_complaint)
- (const_vol_complaint, error_type_complaint)
- (invalid_member_complaint, range_type_base_complaint)
- (reg_value_complaint, vtbl_notfound_complaint)
- (unrecognized_cplus_name_complaint, rs6000_builtin_complaint)
- (unresolved_sym_chain_complaint, stabs_general_complaint)
- (lrs_general_complaint, multiply_defined_struct): Delete
- deprecated complaint structs.
- (invalid_cpp_abbrev_complaint, ref_value_complaint)
- (stabs_general_complaint, lrs_general_complaint)
- (msg_unknown_complaint): New functions.
- (dbx_lookup_type, read_cfront_baseclasses)
- (read_cfront_member_functions, resolve_symbol_reference)
- (define_symbol, resolve_live_range, add_live_range, read_type)
- (rs6000_builtin_type, read_member_functions, read_cpp_abbrev)
- (read_one_struct_field, read_baseclasses, read_tilde_fields)
- (read_cfront_static_fields, attach_fields_to_type)
- (complain_about_struct_wipeout, read_range_type)
- (common_block_start, common_block_end, cleanup_undefined_types)
- (scan_file_globals): Replace complain() with complaint().
- * stabsread.h (unknown_symtype_complaint, unknown_symchar_complaint):
- Delete deprecated complaint struct declarations.
- * xcoffread.c (storclass_complaint, bf_notfound_complaint)
- (ef_complaint, eb_complaint): Delete deprecated complaint structs.
- (bf_not_found_complaint, ef_complaint, eb_complaint)
- (function_outside_compilation_unit_complaint): New functions.
- (record_include_begin, record_include_end, enter_line_range)
- (xcoff_next_symbol_text, read_xcoff_symtab, process_xcoff_symbol)
- (read_symbol, read_symbol_lineno, scan_xcoff_symtab) Replace
- complain() with complaint().
-
-2002-12-16 Andrew Cagney <ac131313@redhat.com>
-
- * config/arc/arc.mt, config/arc/tm-arc.h: Delete.
- * config/d30v/d30v.mt, config/d30v/tm-d30v.h: Delete.
- * config/fr30/fr30.mt, config/fr30/tm-fr30.h: Delete.
- * config/i386/i386aix.mh, config/i386/i386aix.mt: Delete.
- * config/i386/i386m3.mh, config/i386/i386m3.mt: Delete.
- * config/i386/i386mach.mh, config/i386/i386os9k.mt: Delete.
- * config/i386/nm-i386aix.h, config/i386/nm-i386mach.h: Delete.
- * config/i386/nm-m3.h, config/i386/tm-i386aix.h: Delete.
- * config/i386/tm-i386m3.h, config/i386/tm-i386mk.h: Delete.
- * config/i386/xm-i386aix.h, config/i386/xm-i386m3.h: Delete.
- * config/i386/xm-i386mach.h, config/i386/xm-i386mk.h: Delete.
- * config/i960/mon960.mt, config/i960/nindy960.mt: Delete.
- * config/i960/tm-i960.h, config/i960/tm-mon960.h: Delete.
- * config/i960/tm-nindy960.h, config/i960/tm-vx960.h: Delete.
- * config/i960/vxworks960.mt, config/m68k/apollo68b.mh: Delete.
- * config/m68k/apollo68b.mt, config/m68k/apollo68v.mh: Delete.
- * config/m68k/hp300bsd.mh, config/m68k/hp300bsd.mt: Delete.
- * config/m68k/hp300hpux.mh, config/m68k/hp300hpux.mt: Delete.
- * config/m88k/delta88.mh, config/m88k/delta88.mt: Delete.
- * config/m88k/delta88v4.mh, config/m88k/delta88v4.mt: Delete.
- * config/m88k/m88k.mh, config/m88k/m88k.mt: Delete.
- * config/m88k/nm-delta88v4.h, config/m88k/nm-m88k.h: Delete.
- * config/m88k/tm-delta88.h, config/m88k/tm-delta88v4.h: Delete.
- * config/m88k/tm-m88k.h, config/m88k/xm-delta88.h: Delete.
- * config/m88k/xm-dgux.h: Delete.
- * fr30-tdep.c, i386aix-nat.c, i386m3-nat.c: Delete.
- * i386mach-nat.c, i960-tdep.c, m88k-nat.c: Delete.
- * os9kread.c, remote-bug.c, remote-nindy.c: Delete.
- * remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete.
- * d30v-tdep.c, arc-tdep.c, cxux-nat.c, dst.h, dstread.c: Delete.
- * ch-exp.c, ch-lang.c, ch-lang.h, ch-typeprint.c: Delete.
- * ch-valprint.c: Delete.
-
-2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+2003-02-07 David Carlton <carlton@math.stanford.edu>
+
+ * Merge with mainline; tag is carlton_dictionary-20030207-merge.
+
+2003-02-07 Andrew Cagney <ac131313@redhat.com>
+
+ * sol-thread.c, hpux-thread.c: Include "gdb_stat.h" instead of
+ <sys/stat.h>.
+ * Makefile.in (sol-thread.o, hpux-thread.o): Update dependencies.
+
+2003-02-06 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (symm-nat.o): Update dependencies.
+ (sparc-nat.o, procfs.o, proc-api.o, ppc-linux-nat.o): Ditto.
+ (lynx-nat.o, ia64-linux-nat.): Ditto.
+ * symm-nat.c, sparc-nat.c, procfs.c, proc-api.c: Include
+ "gdb_wait.h" instead of <wait.h> or <sys/wait.h>.
+ * ppc-linux-nat.c, lynx-nat.c, ia64-linux-nat.c: Ditto.
+
+ * Makefile.in (inflow_h): Define.
+ (procfs.o, inflow.o, procfs.o): Update dependencies.
+ * inftarg.c (child_stop): Delete extern declaration of
+ inferior_process_group. Include "inflow.h".
+ * procfs.c (procfs_stop): Ditto. Include "inflow.h".
+ * inflow.c (PROCESS_GROUP_TYPE): Move definitions from here ...
+ * inflow.h (PROCESS_GROUP_TYPE): ... to here. New file.
+ (our_process_group, inferior_process_group): Extern declarations.
+
+ * procfs.c: Include "gdb_assert.h".
+
+ * linux-proc.c: Include "gdb_stat.h" instead of <sys/stat.h>.
+ * cp-valprint.c (cp_print_value_fields): Eliminate STREQN.
+ * jv-typeprint.c (java_type_print_base): Ditto.
+ * typeprint.c (typedef_print): Eliminate STREQ.
+ * cli/cli-script.c (define_command, define_command): Ditto.
+ * main.c (captured_main): Ditto.
+ * values.c (lookup_internalvar): Ditto.
+ * utils.c (safe_strerror, parse_escape): Eliminate assignment
+ within `if' conditional.
+ * linespec.c (decode_line_2): Ditto.
+ * cli/cli-dump.c (bfd_openr_with_cleanup): Ditto.
+ (bfd_openw_with_cleanup): Ditto.
+
+2003-02-07 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_init_abi): Set extract_return_value to
+ legacy_extract_return_value and store_return_value to
+ legacy_return_value.
+
+2003-02-06 Raoul Gough <RaoulGough@yahoo.co.uk>
+
+ * win32-nat.c (get_relocated_section_addrs): New function. Find
+ section load addresses for symbol handling in relocated DLLs.
+ (solib_symbols_add): Open a bfd and call get_relocated_section_addrs.
+
+2003-02-05 Fred Fish <fnf@intrinsity.com>
+
+ * remote-e7000.c (e7000_drain_command): Fix precedence problem with
+ '=' and '!='.
+ * rdi-share/ardi.c (wait_for_debug_message): Fix precedence problem
+ with '&' and '=='.
+ (angel_RDI_info): Ditto.
+ * infttrace.c (threads_continue_all_but_one): Fix precedence problem
+ with '&' and '!='.
+ (threads_continue_all_with_signals): Ditto.
+
+2003-02-05 Jim Ingham <jingham@apple.com>
+ Keith Seitz <keiths@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (SUBDIR_CLI_OBS): Add "cli-interp.o".
+ (SUBDIR_CLI_SRCS): Add "cli/cli-interp.c".
+ (SUBDIR_MI_OBS): Add "mi-interp.o".
+ (SUBDIR_MI_SRCS): Add "mi/mi-interp.c".
+ (SFILES): Add "interps.c".
+ (COMMON_OBS): Add "interps.o".
+ (interps_h, mi_main_h): Define.
+ (interps.o, cli-interp.o, mi-interp.o): Add dependencies.
+ (mi-main.o, main.o, event-top.o): Update dependencies.
+ * cli/cli-interp.c: New file.
+ * interps.h, interps.c: New files.
+ * top.c: (gdb_init): Don't install the default interpreter, handed
+ by captured_main.
+ * main.c: Include "interps.h".
+ (interpreter_p): Note that it should malloc'ed.
+ (captured_command_loop): Call current_interp_command_loop.
+ (captured_main): Initialize interpreter_p to INTERP_CONSOLE. Use
+ xfree and xstrdup when updating interpreter_p. Install the
+ default interpreter. Add hack to stop mi1's copyright notice
+ being encoded.
+ * event-top.h (gdb_setup_readline): Declare.
+ (gdb_disable_readline): Declare.
+ * event-top.c: Include "interps.h".
+ (display_gdb_prompt): Call current_interp_display_prompt_p.
+ (gdb_setup_readline): Initialize gdb_stdout, gdb_stderr,
+ gdb_stdlog, and gdb_stdtarg.
+ (_initialize_event_loop): Don't call gdb_setup_readline.
+ * cli-out.c (cli_out_set_stream): New function.
+ * cli-out.h (cli_out_set_stream): Declare.
+
+2003-02-06 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.tgt (i[3456]86-*-sysv4.2*, i[3456]86-*-sysv4*,
+ i[3456]86-*-sysv5*, i[3456]86-*-sco3.2v5*): Remove. These are all
+ handled fine by i[3456]86-*sco* and i[3456]86-sysv*.
+ * config/i386/i386sco5.mt, config/i386/i386v4.mt,
+ config/i386/i386v42mp.mt: Removed.
+
+2003-02-05 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.tgt (*-*-solaris*): Set gdb_osabi to
+ GDB_OSABI_SOLARIS.
+
+2003-02-05 Michael Chastain <mec@shout.net>
+
+ * PROBLEMS (i[3456]86-*-linux*): Warn about binutils
+ 2.12.1 and earlier versions.
+
+2003-02-05 Andrew Cagney <ac131313@redhat.com>
+
+ Remove orphaned hosts, targets and files.
+ * config/i386/gdbserve.mt, config/m68k/nm-apollo68b.h: Delete.
+ * config/m68k/nm-hp300bsd.h, config/m68k/tm-apollo68b.h: Delete.
+ * config/m68k/tm-es1800.h, config/m68k/tm-hp300bsd.h: Delete.
+ * config/m68k/tm-mac.h, config/m68k/xm-apollo68b.h: Delete.
+ * config/pa/hpux1020.mt, config/pa/hpux11.mt: Delete.
+ * config/pa/hpux11w.mt, config/powerpc/gdbserve.mt: Delete.
+ * config/powerpc/ppcle-eabi.mt, config/powerpc/ppcle-sim.mt: Delete.
+ * config/powerpc/tm-ppc-sim.h, config/sparc/sp64sim.mt: Delete.
+ * config/sparc/tm-sp64sim.h: Delete.
+ * configure.host: Delete strongarm-*-*, xscale-*-*, and arm*-*-*
+ hosts.
+ * configure.tgt: Delete i[3456]86-*-sco3.2v4*, and
+ mips*-dec-mach3* targets.
+
+2003-02-04 Michael Chastain <mec@shout.net>
+
+ * NEWS: Fix typo: sepcifying -> specifying.
+
+2003-02-04 Michael Chastain <mec@shout.net>
+
+ * dwarfread.c: Add documentation on the state of dwarf-1,
+ looking towards obsoletion.
+
+2003-02-03 Michael Chastain <mec@shout.net>
+
+ * config/djgpp/fnchange.lst: Add gdb/testsuite/gdb.c++/pr-1023.cc,
+ gdb/testsuite/gdb.c++/pr-1023.exp.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * values.c: Delete code conditional on IS_TRAPPED_INTERNALVAR.
+ * TODO: Delete reference to IS_TRAPPED_INTERNALVAR.
+
+ * utils.c (init_page_info): Delete reference to MPW in comments.
+ * main.c (captured_main): Delete #ifdef MPW.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Note that the m32r-*-elf* is obsolete.
+ * monitor.c (monitor_expect): Obsolete reference to m32r.
+ * configure.tgt: Mark m32r-*-elf* as obsolete.
+ * MAINTAINERS: Mark m32k as obsolete.
+ * m32r-rom.c: Obsolete file.
+ * config/m32r/m32r.mt: Obsolete file.
+ * config/m32r/tm-m32r.h: Obsolete file.
+ * m32r-stub.c: Obsolete file.
+ * m32r-tdep.c: Obsolete file.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that the z8k-zilog-none is obsolete.
+ * MAINTAINERS: Mark z8k as obsolete.
+ * configure.tgt: Obsolete the z8k-*-coff* target.
+ * config/z8k/z8k.mt: Obsolete file.
+ * config/z8k/tm-z8k.h: Obsolete file.
+ * z8k-tdep.c: Obsolete file.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that the mn10200-elf is obsolete.
+ * configure.tgt: Obsolete mn10200-*-* target.
+ * breakpoint.c (update_breakpoints_after_exec): Update comment to
+ mention that the mn10200 is obsolete.
+ * breakpoint.h: Ditto.
+ * MAINTAINERS: Mark the mn10200-elf as obsolete.
+ * config/mn10200/mn10200.mt: Obsolete file.
+ * config/mn10200/tm-mn10200.h: Obsolete file.
+ * mn10200-tdep.c: Obsolete file.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mark h8500 as obsolete.
+ * configure.tgt (h8500-*-*): Mark h8500 code as obsolete.
+ * findvar.c (value_from_register): Ditto.
+ * h8500-tdep.c: Mark file as obsolete.
+ * config/h8500/h8500.mt: Ditto.
+ * config/h8500/tm-h8500.h: Ditto.
+ * NEWS: Mention that h8500 is obsolete.
- * infrun.c (handle_inferior_event): Rearrange code to resume if
- no catchpoint triggers for an event.
+2003-02-04 David Carlton <carlton@math.stanford.edu>
-2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+ * objfiles.c (allocate_objfile): Always set name. Add comment at
+ start of function.
+ * jv-lang.c (get_dynamics_objfile): Add comment.
- * infrun.c (handle_inferior_event): Merge TARGET_WAITKIND_FORKED
- and TARGET_WAITKIND_VFORKED cases.
+2003-02-04 David Carlton <carlton@math.stanford.edu>
-2002-12-15 Daniel Jacobowitz <drow@mvista.com>
-
- * infrun.c (handle_inferior_event): Assume that catchpoints
- are not affected by DECR_PC_AFTER_BREAK.
-
-2002-12-15 Daniel Jacobowitz <drow@mvista.com>
-
- * target.c (update_current_target): Don't inherit DONT_USE.
- * target.h (struct target_ops): Remove DONT_USE.
- (target_next): Remove macro.
-
-2002-12-15 Mark Kettenis <kettenis@gnu.org>
+ * symtab.h (SYMBOL_LINKAGE_NAME): Delete.
+ * printcmd.c (build_address_symbolic): Replace uses of
+ SYMBOL_LINKAGE_NAME by equivalent uses of SYMBOL_SOURCE_NAME,
+ SYMBOL_NAME, and asm_demangle.
+ Update copyright.
- * ui-out.c (MAX_UI_OUT_LEVELS): Raise to 6. Fixes PR cli/654.
+2003-02-04 David Carlton <carlton@math.stanford.edu>
-2002-12-14 Richard Earnshaw <rearnsha@arm.com>
+ * linespec.c (decode_compound): Extract code into
+ lookup_prefix_sym.
+ (lookup_prefix_sym): New function.
- * arm-tdep.c (convert_from_extended): New argument to hold the
- type of floating point result we want to convert to. Make input
- argument const. Fix all callers.
- (convert_to_extended): Similarly.
- (arm_extract_return_value): Now takes a regcache argument. Change
- code to use regcache accessor functions. Correctly extract
- smaller-than-word results on big-endian machines.
- (arm_store_return_value): Now takes a regcache argument. Change
- code to use regcache accessor functions. Correctly zero/sign extend
- smaller than word results before storing into r0.
- (arm_gdbarch_init): Register new-style extract_return_value and
- store_return_value functions.
+2003-02-04 David Carlton <carlton@math.stanford.edu>
-2002-12-13 Michael Snyder <msnyder@to-limbo.toronto.redhat.com>
+ * gdbtypes.h: Delete INTEGER_COERCION_BADNESS,
+ FLOAT_COERCION_BADNESS.
+ * gdbtypes.c (rank_one_type): Replace all uses of
+ INTEGER_COERCION_BADNESS by INTEGER_CONVERSION_BADNESS.
- * thread-db.c (thread_from_lwp): Uniquify error msg.
- (lwp_from_thread): Ditto.
- (check_event): Ditto.
- (find_new_threads_callback): Ditto.
- (thread_db_pid_to_str): Ditto.
+2003-02-04 Jim Blandy <jimb@redhat.com>
-2002-12-13 Andrew Cagney <ac131313@redhat.com>
+ * dwarf2read.c (dwarf2_locate_sections): When we find a macro info
+ section, let dwarf_macinfo_section point to it, not
+ dwarf_loc_section.
- * frame.h (get_frame_saved_regs): Declare.
- (frame_saved_regs_zalloc): Change return type to CORE_ADDR
- pointer.
- * frame.c (get_frame_saved_regs): New function.
- (frame_saved_regs_zalloc): Return the allocated saved_regs.
+2003-02-04 Daniel Jacobowitz <drow@mvista.com>
-2002-12-13 Andrew Cagney <ac131313@redhat.com>
+ Pointed out by Anton Blanchard <anton@samba.org>.
+ * ppc-linux-tdep.c (insn_is_sigreturn): New function.
+ (ppc_linux_at_sigtramp_return_path): Use it.
- * frame.c (deprecated_update_current_frame_pc_hack): New
- function.
- * frame.h (deprecated_update_current_frame_pc_hack): Declare.
- * infrun.c (normal_stop): Use said function instead of directly
- modifying the frame's PC.
-
-2002-12-13 Alexandre Oliva <aoliva@redhat.com>
-
- * frame.h (frame_id_unwind_ftype): Fix typo in return type.
-
-2002-12-13 Kevin Buettner <kevinb@redhat.com>
-
- * config/mips/tm-mips.h, config/mips/tm-irix3.h,
- config/mips/tm-irix6.h (NUM_REGS): Delete.
- * mips-tdep.c (mips_gdbarch_init): Call set_gdbarch_num_regs().
- (temp_saved_regs): Declare as a pointer rather than an array.
- (mips32_heuristic_proc_desc, heuristic_proc_desc): Make sure
- that ``temp_saved_regs'' has storage allocated to it and that
- it's the correct size.
-
-2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * defs.h (init_last_source_visited): New prototype.
- (add_path): Ditto.
- * source.c (add_path): New function that adds to a specified path.
- (mod_path): Change to call add_path.
- (init_last_source_visited): New function to allow interfaces to
- initialize static variable: last_source_visited. Part of fix
- for PR gdb/741.
- * Makefile.in: Add support for mi/mi-cmd-env.c.
-
-2002-12-13 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (frame_id_unwind): Declare.
- (struct frame_info): Add fields id_unwind, id_unwind_cache_p and
- id_unwind_cache.
- (frame_id_unwind_ftype): Declare.
- * frame.c (frame_id_unwind): New function.
- (set_unwind_by_pc): Add unwind_id parameter. Initialized.
- (create_new_frame, get_prev_frame): Pass id_unwind to
- set_unwind_by_pc.
- (frame_saved_regs_id_unwind): New function.
- (frame_saved_regs_id_unwind): New function.
- * dummy-frame.c (dummy_frame_id_unwind): New function.
- (struct dummy_frame): Add field id.
- (generic_push_dummy_frame): Initialize `id'.
- * dummy-frame.h (dummy_frame_id_unwind): Declare.
-
-2002-12-13 Andrew Cagney <ac131313@redhat.com>
-
- * infcmd.c (run_stack_dummy): Create a frame ID directly and then
- pass that to set_momentary_breakpoint. Move comments to where they
- belong.
- * frame.h (set_current_frame): Delete declaration.
- * frame.c (set_current_frame): Delete function.
-
-2002-12-13 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (frame_extra_info_zalloc): New function.
- * frame.h (frame_extra_info_zalloc): Declare.
-
-2002-12-13 Joel Brobecker <brobecker@gnat.com>
-
- * hppa-tdep.c (hppa_pop_frame): Fix a compilation error introduced
- in the previous prototype change to set_momentary_breakpoint.
-
-2002-12-12 Daniel Jacobowitz <drow@mvista.com>
-
- * infrun.c (pending_follow): Remove saw_parent_fork, saw_child_fork,
- and saw_child_exec.
- (follow_fork, init_wait_for_inferior, handle_inferior_event): Remove
- references to saw_parent_fork, saw_child_fork, and saw_child_exec.
- (stop_stepping): Remove outdated check for child vfork events.
-
-2002-12-12 Andrew Cagney <ac131313@redhat.com>
-
- * GDB 5.3 released from gdb_5_3-branch.
-
-2002-12-11 Daniel Jacobowitz <drow@mvista.com>
-
- * corelow.c (init_core_ops): Delete references to to_require_attach
- and to_require_detach.
- * exec.c (init_exec_ops): Likewise.
- * hppah-nat.c (child_follow_fork): Call hppa_require_attach and
- hppa_require_detach directly.
- * inferior.h (REQUIRE_ATTACH, REQUIRE_DETACH): Delete.
- * inftarg.c (child_detach): Remove.
- (child_detach_from_process): Rename to child_detach, remove
- after_fork argument.
- (child_attach): Remove.
- (child_attach_to_process): Rename to child_attach, remove after_fork
- argument.
- (init_child_ops): Delete references to to_require_attach
- and to_require_detach.
- * infttrace.c (hppa_require_attach): Update comment.
- * target.c (cleanup_target, update_current_target)
- (init_dummy_target, setup_target_debug): Delete references to
- to_require_attach and to_require_detach.
- (find_default_require_detach, find_default_require_attach)
- (debug_to_require_attach, debug_to_require_detach): Remove
- functions.
- * target.h (struct target_ops): Remove to_require_attach
- and to_require_detach.
- (target_require_attach, target_require_detach): Delete macros.
- (find_default_require_detach, find_default_require_attach): Delete
- prototypes.
- * config/pa/nm-hppah.h (REQUIRE_ATTACH, REQUIRE_DETACH): Delete.
-
-2002-12-11 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (get_frame_extra_info): New function.
- * frame.h (get_frame_extra_info): Declare.
-
-2002-12-11 Andrew Cagney <ac131313@redhat.com>
-
- * breakpoint.h (struct breakpoint): Replace frame with frame_id.
- (set_momentary_breaokpoint): Replace `struct frame_info' parameter
- with `struct frame_id'.
- (set_longjmp_resume_breakpoint): Ditto.
- * infrun.c (handle_inferior_event): Update.
- * breakpoint.c (watch_command_1, until_break_command): Update.
- * infrun.c (handle_inferior_event, check_sigtramp2): Update.
- (handle_inferior_event, step_over_function): Update.
- * breakpoint.c (bpstat_stop_status, print_one_breakpoint): Update.
- (set_raw_breakpoint, set_longjmp_resume_breakpoint): Update.
- (set_momentary_breakpoint, deprecated_frame_in_dummy): Update.
- * infcmd.c (finish_command, run_stack_dummy): Update.
-
-2002-12-11 Kevin Buettner <kevinb@redhat.com>
-
- * dwarf2read.c (dwarf2_const_ignored, dwarf2_volatile_ignored)
- (dwarf2_non_const_array_bound_ignored)
- (dwarf2_missing_line_number_section)
- (dwarf2_statement_list_fits_in_line_number_section)
- (dwarf2_mangled_line_number_section, dwarf2_unsupported_die_ref_attr)
- (dwarf2_unsupported_stack_op, dwarf2_complex_location_expr)
- (dwarf2_unsupported_tag, dwarf2_unsupported_at_encoding)
- (dwarf2_unsupported_at_frame_base, dwarf2_unexpected_tag)
- (dwarf2_missing_at_frame_base, dwarf2_bad_static_member_name)
- (dwarf2_unsupported_accessibility, dwarf2_bad_member_name_complaint)
- (dwarf2_missing_member_fn_type_complaint)
- (dwarf2_vtbl_not_found_complaint, dwarf2_absolute_sibling_complaint)
- (dwarf2_const_value_length_mismatch)
- (dwarf2_unsupported_const_value_attr, dwarf2_misplaced_line_number)
- (dwarf2_line_header_too_long, dwarf2_missing_macinfo_section)
- (dwarf2_macros_too_long, dwarf2_macros_not_terminated)
- (dwarf2_macro_outside_file, dwarf2_macro_unmatched_end_file)
- (dwarf2_macro_malformed_definition, dwarf2_macro_spaces_in_definition)
- (dwarf2_invalid_attrib_class, dwarf2_invalid_pointer_size): Delete
- complaints using deprecated struct..
- (dwarf2_non_const_array_bound_ignored_complaint)
- (dwarf2_complex_location_expr_complaint)
- (dwarf2_unsupported_at_frame_base_complaint)
- (dwarf2_const_value_length_mismatch_complaint)
- (dwarf2_macros_too_long_complaint)
- (dwarf2_macro_malformed_definition_complaint)
- (dwarf2_invalid_attrib_class_complaint): New functions.
- (read_func_scope, dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
- (read_structure_scope, read_array_type, read_common_block)
- (read_tag_pointer_type, read_base_type, read_partial_die)
- (dwarf_decode_line_header, check_cu_functions, dwarf_decode_lines)
- (new_symbol, dwarf2_const_value, read_type_die)
- (dwarf2_get_ref_die_offset, decode_locdesc, consume_improper_spaces)
- (parse_macro_definition, dwarf_decode_macros): Replace calls to
- complain() with, possibly indirect, calls to complaint().
-
-2002-12-11 Andrew Cagney <cagney@redhat.com>
-
- * frame.c (deprecated_get_frame_saved_regs): Rename
- get_frame_saved_regs.
- * frame.h (deprecated_get_frame_saved_regs): Update declaration.
- * sparc-tdep.c: Update.
- * hppa-tdep.c: Update.
- * h8500-tdep.c: Update.
-
-2002-12-11 Kevin Buettner <kevinb@redhat.com>
-
- * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME)
- (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS): Use ``const char *'' instead of
- ``char *'' for return and parameter types.
- * gdbarch.h, gdbarch.c: Regenerate.
- * gdbtypes.h, gdbtypes.c (address_space_int_to_name): Change
- return type from ``char *'' to ``const char *''.
- * c-typeprint.c (c_type_print_modifier): Make ``address_space_id''
- const.
+2003-02-04 Daniel Jacobowitz <drow@mvista.com>
-2002-12-11 Mark Kettenis <kettenis@gnu.org>
+ * defs.h (streq): Add prototype.
+ * utils.c (streq): New function.
- * i386-tdep.c: Include "dummy-frame.h".
- (i386_frame_chain, i386_frame_saved_pc): Replace
- DEPRECATED_PC_IN_CALL_DUMMY with call to pc_in_dummy_frame.
- (i386_gdbarch_init): Don't set deprecated_pc_in_call_dummy.
+ * dwarf2read.c (new_symbol): Use SYMBOL_SET_NAMES instead of
+ SYMBOL_NAME and SYMBOL_INIT_DEMANGLED_NAME.
+ * mdebugread.c (new_symbol): Likewise.
+ * stabsread.c (define_symbol): Likewise.
+ * coffread.c (process_coff_symbol): Likewise.
+ * dwarfread.c (new_symbol): Likewise.
-2002-12-10 Andrew Cagney <cagney@redhat.com>
+ * minsyms.c (prim_record_minimal_symbol_and_info): Use
+ SYMBOL_SET_NAMES instead of setting SYMBOL_NAME. Set the language
+ here.
+ (install_minimal_symbols): Don't set SYMBOL_LANGUAGE or call
+ SYMBOL_INIT_DEMANGLED_NAME.
+ * objfiles.c: Include "hashtab.h".
+ (allocate_objfile): Call htab_set_functions_ex for the
+ demangled_names_hash.
+ (free_objfile): Call htab_delete for the demangled_names_hash.
+ * objfiles.h (struct htab): Add declaration.
+ (struct objfile): Add demangled_names_hash.
+ * symfile.c: Include "hashtab.h".
+ (reread_symbols): Call htab_delete for the demangled_names_hash.
+ (add_psymbol_to_list): Use SYMBOL_SET_NAMES instead of putting
+ SYMBOL_NAME in the bcache.
+ * symtab.c: Include "hashtab.h". Update comments.
+ (create_demangled_names_hash, symbol_set_names): New functions.
+ (symbol_find_demangled_name): New function, broken out from
+ symbol_init_demangled_names.
+ (symbol_init_demangled_names): Use it.
+ * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Add missing parentheses.
+ (SYMBOL_SET_NAMES): New macro.
+ (symbol_set_names): Add prototype.
+
+2003-02-03 Jim Blandy <jimb@redhat.com>
- * gdbarch.sh (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
- Change to a function with predicate.
- * gdbarch.h, gdbarch.c: Re-generate.
- * frame.c (get_prev_frame): Update. Test
- DEPRECATED_INIT_FRAME_PC_P.
- * config/sparc/tm-sparc.h (DEPRECATED_INIT_FRAME_PC): Update.
- * config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC): Update.
- * config/mn10200/tm-mn10200.h (DEPRECATED_INIT_FRAME_PC): Update.
- * alpha-tdep.c (alpha_gdbarch_init): Update.
- * mn10300-tdep.c (mn10300_gdbarch_init): Update.
- * mips-tdep.c (mips_gdbarch_init): Update.
- * i386-interix-tdep.c (i386_interix_init_abi): Update.
- * arm-tdep.c: Update comments.
- * h8300-tdep.c (h8300_gdbarch_init): Explicitly set init_frame_pc.
- * config/m32r/tm-m32r.h (DEPRECATED_INIT_FRAME_PC): Ditto.
- * frv-tdep.c (frv_gdbarch_init): Ditto.
- * x86-64-tdep.c (x86_64_init_abi): Ditto.
- * ia64-tdep.c (ia64_gdbarch_init): Ditto.
- * s390-tdep.c (s390_gdbarch_init): Ditto.
- * v850-tdep.c (v850_gdbarch_init): Ditto.
- * vax-tdep.c (vax_gdbarch_init): Ditto.
- * sh-tdep.c (sh_gdbarch_init): Ditto.
- * ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
- * mcore-tdep.c (mcore_gdbarch_init): Ditto.
- * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
- * i386-tdep.c (i386_gdbarch_init): Ditto.
- * d10v-tdep.c (d10v_gdbarch_init): Ditto.
- * cris-tdep.c (cris_gdbarch_init): Ditto.
- * avr-tdep.c (avr_gdbarch_init): Ditto.
- * arm-tdep.c (arm_gdbarch_init): Ditto.
- * config/z8k/tm-z8k.h (INIT_FRAME_PC_FIRST): Delete macro.
- (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
-
-2002-12-10 Daniel Jacobowitz <drow@mvista.com>
-
- * config/pa/nm-hppah.h (CHILD_POST_FOLLOW_VFORK): Change to
- CHILD_FOLLOW_FORK.
- * hppah-nat.c (saved_vfork_pid): Add.
- (child_post_follow_vfork): Remove.
- (child_follow_fork): New function.
- (child_wait): Call detach_breakpoints after receiving the child vfork.
- Call child_resume directly instead of going through resume ().
- Make sure we have the exec before reporting the vfork.
- * inferior.h (follow_inferior_reset_breakpoints): Add prototype.
- * infrun.c (follow_fork, follow_vfork, follow_inferior_fork): Remove.
- (follow_fork): New function. Call target_follow_fork.
- (follow_inferior_reset_breakpoints): New function broken out from
- old follow_inferior_fork.
- (resume): Remove hack to follow exec after vfork.
- * inftarg.c (child_post_follow_vfork): Remove.
- (child_follow_fork): New function.
- (init_child_ops): Replace to_post_follow_vfork with to_follow_fork.
- * target.c (cleanup_target): Replace to_post_follow_vfork with
- to_follow_fork.
- (update_current_target): Likewise.
- (setup_target_debug): Likewise.
- (debug_to_post_follow_vfork): Remove.
- (debug_to_follow_fork): New function.
- * target.h (struct target_ops): Replace to_post_folow_vfork with
- to_follow_fork.
- (child_post_follow_vfork): Remove prototype.
- (child_follow_fork): Add prototype.
- (target_post_follow_vfork): Remove macro.
- (target_follow_fork): Add macro.
-
-2002-12-10 Daniel Jacobowitz <drow@mvista.com>
-
- * hppah-nat.c (saved_child_execd_pathname, saved_vfork_state): New.
- (child_post_follow_vfork): Cancel pending exec event if we follow
- the parent.
- (child_wait): Only return TARGET_WAITKIND_VFORKED when all necessary
- events have been processed. Return a fake TARGET_WAITKIND_EXECD
- event at the following wait call if necessary.
- * infrun.c (follow_vfork): Don't follow_exec here.
- (handle_inferior_event): Add comment to TARGET_WAITKIND_EXECD
- case about HP/UX 10.20. Remove code pushed down to
- hppah-nat.c:child_wait.
- * infttrace.c (child_resume): Use TT_PROC_CONTINUE if
- vfork_in_flight is set.
-
-2002-12-10 Daniel Jacobowitz <drow@mvista.com>
-
- * hppah-nat.c (child_wait): Return TARGET_WAITKIND_IGNORE
- for the parent's fork event.
- * infrun.c (handle_inferior_event): Only expect one fork event.
- Call prepare_to_wait for TARGET_WAITKIND_IGNORE. Update comment.
- * target.h: Update comment for TARGET_WAITKIND_IGNORE.
-
-2002-12-10 Andrew Cagney <ac131313@redhat.com>
-
- * PROBLEMS: Delete reference to PR gdb/725.
+ Use a single, consistent representation for an empty minimal
+ symbol table in an objfile.
+ * objfiles.c (terminate_minimal_symbol_table): New function.
+ (allocate_objfile): Call it.
+ * objfiles.h (terminate_minimal_symbol_table): New declaration.
+ (ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
+ non-NULL.
+ * minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
+ objfile has minimal symbols, compare minimal_symbol_count to zero,
+ instead of comparing msymbols with NULL.
+ * objfiles.c (have_minimal_symbols): Same.
+ * solib-sunos.c (solib_add_common_symbols): Call
+ terminate_minimal_symbol_table.
+ * symfile.c (reread_symbols): Same.
- * MAINTAINERS (gdb.c++): Add David Carlton.
-
-2002-12-09 David Carlton <carlton@math.stanford.edu>
-
- * cli/cli-setshow.c: #include <readline/tilde.h> after defs.h.
- * cli/cli-cmds.c: Ditto.
-
-2002-12-09 Andrew Cagney <cagney@redhat.com>
+2003-02-03 Kevin Buettner <kevinb@redhat.com>
+
+ * s390-tdep.c (s390_address_class_type_flags)
+ (s390_address_class_type_flags_to_name)
+ (s390_address_class_name_to_type_flags): New functions.
+ (s390_gdbarch_init): Define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME,
+ ADDRESS_CLASS_NAME_TO_TYPE_FLAGS, and ADDRESS_CLASS_TYPE_FLAGS.
+
+2003-02-03 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c: Fix spell-o in comment.
+
+2003-02-03 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (pointer_encoding): Added new parameter.
+ * dwarf2cfi.c, dwarf2read.c: Changed all warnings and
+ error messages to contain BFD filename.
+
+2003-02-02 Elena Zannoni <ezannoni@redhat.com>
+
+ Fix PR gdb/742 gdb/743 gdb/877
+ * disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
+ (do_mixed_source_and_assembly): Use
+ make_cleanup_ui_out_tuple_begin_end and
+ make_cleanup_ui_out_tuple_begin_end.
+ (do_mixed_source_and_assembly): Ditto.
+ * thread.c (do_captured_list_thread_ids): Ditto.
+ * ui-out.h (ui_out_table_begin, ui_out_list_begin,
+ ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
+ ui_out_tuple_end): Delete prototypes.
+ * ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
+ ui_out_list_end, ui_out_tuple_end): Delete.
+
+ From Kevin Buettner <kevinb@redhat.com>:
+ * ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
+ * ui-out.c (make_cleanup_ui_out_table_begin_end)
+ (do_cleanup_table_end): New functions.
+ * breakpoint.c (print_it_typical, print_one_breakpoint, mention):
+ Use cleanups to invoke_ui_out_tuple_end().
+ (breakpoint_1): Use cleanup to invoke ui_out_table_end().
+ * cli/cli-setshow.c (cmd_show_list): Use
+ make_cleanup_ui_out_tuple_begin_end.
+
+2003-02-02 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (frame_unwind_register): New function.
+ (frame_unwind_unsigned_register): Use.
+ (frame_unwind_signed_register): Use.
+ (frame_read_register): New function.
+ * frame.h (frame_unwind_register): Declare.
+ (frame_read_register): Declare.
+
+ * d10v-tdep.c (d10v_frame_pop): Rewrite. Use regcache_cooked_write
+ and frame_unwind_register instead of read_memory, write_register
+ and deprecated_write_register_bytes.
+
+2003-02-02 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h: Note that namelen can be negative.
+ * frame.c (frame_map_name_to_regnum): When LEN is negative, use
+ NAME's length.
+
+ * NEWS: Mention that the d10v's `regs' command is deprecated.
+ * d10v-tdep.c (d10v_gdbarch_init): Set print_registers_info.
+ (d10v_print_registers_info): New function.
+ (show_regs): Call d10v_print_registers_info.
+ (_initialize_d10v_tdep): Mark "show regs" command as deprecated.
+
+2003-02-02 Mark Kettenis <kettenis@gnu.org>
+
+ * stack.c (print_frame_info): Restore call to annotate_frame_begin
+ lost in the previous patch.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-11-09 Jason Molenda (jason-cl@molenda.com)
+ * stack.c (print_frame_info_base): Output complete FRAME tuple
+ for synthesized frames.
+
+2003-02-02 Andrew Cagney <ac131313@redhat.com>
+
+ * mips-nat.c (zerobuf): Delete.
+ (fetch_inferior_registers): Alloc local zerobuf.
+ (fetch_core_registers): Alloc local zerobuf.
+ * d10v-tdep.c (show_regs): Don't allocate a dynamic array using
+ MAX_REGISTER_RAW_SIZE or MAX_REGISTER_VIRTUAL_SIZE.
+ * thread-db.c (thread_db_store_registers): Ditto.
+ * sh-tdep.c (sh_do_register): Ditto.
+ * rom68k-rom.c (rom68k_supply_one_register): Ditto.
+ * remote-sim.c (gdbsim_store_register): Ditto.
+ * remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
+ * remote-e7000.c (fetch_regs_from_dump): Ditto.
+ * monitor.c (monitor_supply_register): Ditto.
+ * mipsv4-nat.c (supply_gregset, supply_fpregset): Ditto.
+ * mips-nat.c (fetch_inferior_registers): Ditto.
+ * m68klinux-nat.c (fetch_register): Ditto.
+ * lynx-nat.c (fetch_inferior_registers): Ditto.
+ (fetch_inferior_registers): Ditto.
+ * irix4-nat.c (supply_gregset, supply_fpregset): Ditto.
+ * hpux-thread.c (hpux_thread_fetch_registers): Ditto.
+ (hpux_thread_store_registers): Ditto.
+ * hppah-nat.c (fetch_register): Ditto.
+ * hppab-nat.c (fetch_register): Ditto.
+ * hppa-tdep.c (pa_register_look_aside): Ditto.
+ (pa_print_fp_reg, pa_strcat_fp_reg): Ditto.
+ * dve3900-rom.c (fetch_bitmapped_register): Ditto.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh: Explictly specify all method levels. When a
+ variable with an empty level, provide a non-multi-arch default.
+ (BELIEVE_PCC_PROMOTION_TYPE): Set level to empty.
+ * gdbarch.h: Re-generate.
+ * stabsread.c (BELIEVE_PCC_PROMOTION_TYPE): Delete. Always defined.
+ * config/m68k/tm-sun3.h (BELIEVE_PCC_PROMOTION_TYPE): Define as 1
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (host_pointer_to_address): Delete declaration.
+ (address_to_host_pointer): Delete declaration.
+ * utils.c (host_pointer_to_address): Delete function.
+ (address_to_host_pointer): Delete function.
+ * procfs.c (procfs_address_to_host_pointer): New function.
+ * procfs.c (proc_set_watchpoint): Use.
+ (procfs_can_use_hw_breakpoint): Update comments.
+ * somsolib.c (hpux_address_to_host_pointer_hack): New function.
+ (som_solib_add): Use.
+ * hppa-tdep.c (hppa_pointer_to_address_hack): New function.
+ * hppa-tdep.c (unwind_command): Use.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_dirent.h: Mark up valid uses of <dirent.h>, d_namelen and
+ strlen d_name.
+
+ * main.c (captured_main): Delete #ifdef ADDITIONAL_OPTIONS,
+ ADDITIONAL_OPTION_CASES, and ADDITIONAL_OPTION_HANDLER code.
+ (print_gdb_help): Delete #ifdef ADDITIONAL_OPTION_HELP code.
+ * stabsread.c (DBX_PARM_SYMBOL_CLASS): Delete macro.
+ (define_symbol): Update.
+ * symfile.c (generic_load): Remove references to nindy.
+ * symtab.c: Remove references to nindy.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (print_float_info): Delete code conditional on
+ FLOAT_INFO.
+ * config/nm-lynx.h: Delete #undef FLOAT_INFO. Update copyright.
+ * config/m68k/nm-apollo68b.h: Ditto.
+ * config/i386/tm-ptx.h (FLOAT_INFO): Delete. Update copyright.
+ * config/ns32k/nm-nbsd.h (FLOAT_INFO): Ditto.
+ * config/i386/tm-symmetry.h (FLOAT_INFO): Ditto.
+
+2003-02-01 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386os9k.h: Removed.
+
+ * configure.host (i[3456]86-*-isc*): Set gdb_host to i386v.
+ Remove i[3456]86-*-sysv3.2* and i[3456]86-*-sysv32* entries since
+ they're identical to i[3456]86-*-sysv* now.
+ * config/i386/i386v32.mh: Removed.
+ * config/i386/xm-i386v32.h: Removed.
+ * config/i386/xm-i386sco.h (U_FPSTATE): Remove macro.
+
+ * config/i386/i386mk.mt, config/i386/i386mk.mh: Removed.
+
+ * config/i386/i386dgux.mh: Removed.
+ * configure.host (i[3456]86-*-dgux): Set gdb_host to i386v4.
+
+ * configure.in: Fix typo.
+ * configure: Regenerated.
- * gdbarch.sh (gdbarch_dump): Print NAME_OF_MALLOC using %s. Wrap
- function address in <>.
- * gdbarch.c: Re-generate.
+2003-01-31 David Carlton <carlton@math.stanford.edu>
-2002-12-09 David Carlton <carlton@math.stanford.edu>
+ * dwarf2read.c (dwarf2_locate_sections): Set
+ dwarf_ranges_section.
+
+2003-01-31 Andrew Cagney <ac131313@redhat.com>
+
+ * objc-exp.y, c-exp.y, f-exp.y: Remove PTR casts.
+ * utils.c: Update comments documenting legitimate uses of PTR.
+
+ * utils.c: Re-indent.
+
+ * config/djgpp/fnchange.lst: Delete nindy files.
+ * nindy-share/ttyflush.c, nindy-share/stop.h: Delete files.
+ * nindy-share/nindy.c, nindy-share/env.h: Delete files.
+ * nindy-share/coff.h, nindy-share/block_io.h: Delete files.
+ * nindy-share/b.out.h, nindy-share/VERSION: Delete files.
+ * nindy-share/README, nindy-share/Onindy.c: Delete files.
+ * nindy-tdep.c, nindy-share/Makefile: Delete files.
+ * Makefile.in (init.c): Remove nindy references.
+ (saber_gdb): Delete rule.
+ (ALLDEPFILES): Delete hp300ux-nat.c, nindy-tdep.c,
+ nindy-share/Onindy.c, nindy-share/nindy.c, nindy-share/ttyflush.c,
+ and a68v-nat.c.
+ (hp300ux-nat.o, a68v-nat.o, ptx4-nat.o): Delete rules.
+ (Onindy.o, nindy.o, ttyflush.o, nindy-tdep.o): Delete rules.
+ (HFILES_NO_SRCDIR): Delete nindy-share/b.out.h,
+ nindy-share/block_io.h, nindy-share/coff.h, nindy-share/env.h, and
+ nindy-share/stop.h.
+ * hp300ux-nat.c, a68v-nat.c, ptx4-nat.c: Delete files.
+ * saber.suppress: Delete file.
+
+2003-01-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * dbxread.c (stabs_data): New static variable.
+ (fill_symbuf): Support an in-memory buffer for stabs data.
+ (stabs_seek): New function.
+ (dbx_psymtab_to_symtab): Relocate the stabs data if necessary.
+ (read_ofile_symtab): Use stabs_seek.
+ (elfstab_build_psymtabs): Take an asection* instead of
+ an offset and size. Relocate the stabs data if necessary.
+ Save the section* for dbx_psymtab_to_symtab.
+ * dwarf2read.c: Add section variables for each debug section.
+ (dwarf2_locate_sections): Fill them in.
+ (dwarf2_read_section): Take an asection* argument.
+ Relocate the section contents if necessary.
+ (dwarf2_build_psymtabs, dwarf2_build_psymtabs_easy): Update callers.
+ * dwarf2cfi.c (parse_frame_info): Take a section argument and pass
+ it to dwarf2_read_section.
+ (dwarf2_build_frame_info): Update callers.
+ * elfread.c (elf_symfile_read): Update call to
+ elfstab_build_psymtabs.
+ * gdb-stabs.h (struct dbx_symfile_info): Add stab_section.
+ (DBX_STAB_SECTION): New macro.
+ * stabsread.h (elfstab_build_psymtabs): Update prototype.
+ * symfile.c (symfile_dummy_outputs): New function.
+ (symfile_relocate_debug_section): New function.
+ * symfile.h (symfile_relocate_debug_section): Add prototype.
+
+2003-01-31 Richard Henderson <rth@redhat.com>
+
+ * alpha-nat.c (REGISTER_PTRACE_ADDR): Merge into ...
+ (register_addr): ... here. Support ALPHA_UNIQUE_REGNUM.
+ (fetch_elf_core_registers): Support ALPHA_UNIQUE_REGNUM.
+ * alpha-tdep.c (alpha_register_name): Add "unique".
+ * alpha-tdep.h (ALPHA_NUM_REGS): Increment.
+ (ALPHA_UNIQUE_REGNUM): New.
+ * config/alpha/nm-linux.h (ALPHA_UNIQUE_PTRACE_ADDR): New.
+
+2003-01-31 Andrew Cagney <ac131313@redhat.com>
+
+ * README: Remove reference to Ericsson 1800 monitor.
+ * Makefile.in (remote-es.o): Delete rule.
+ (ALLDEPFILES): Delete remote-es.c.
+ * remote-es.c: Delete file.
+ * config/m68k/es1800.mt: Delete file.
+ * config/djgpp/fnchange.lst: Update.
+ * configure.tgt: Delete m68*-ericsson-* target.
- * p-exp.y: Rename TRUE and FALSE to TRUEKEYWORD and FALSEKEYWORD.
+2003-01-31 Adam Fedor <fedor@gnu.org>
-2002-12-09 David Carlton <carlton@math.stanford.edu>
+ * infrun.c (handle_inferior_event): Rename 'tmp' to real_stop_pc.
+ Remove duplicate/shadowing variable of same name.
- * linespec.c (symtab_from_filename): New function.
- (decode_line_1): Move code into symtab_from_filename.
+2003-01-30 Jim Blandy <jimb@redhat.com>
-2002-12-09 Kevin Buettner <kevinb@redhat.com>
+ * symfile.c (find_separate_debug_file): Assert that the objfile's
+ directory name we compute ends with a slash, and then assume that
+ that's so everywhere we use it.
- * lin-lwp.c (strsignal): Make extern declaration match that of glibc.
+2003-01-30 Daniel Jacobowitz <drow@mvista.com>
-2002-12-07 Andrew Cagney <ac131313@redhat.com>
+ * valops.c (value_assign): Flush frame cache after stores to memory
+ also.
- * f-valprint.c (info_common_command): Use get_frame_pc.
- * std-regs.c (value_of_builtin_frame_pc_reg): Ditto.
- * ax-gdb.c (agent_command): Ditto.
- * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
- (rs6000_pop_frame): Ditto.
- (rs6000_frameless_function_invocation): Ditto.
- (rs6000_frame_saved_pc, frame_get_saved_regs): Ditto.
- (frame_initial_stack_address, rs6000_frame_chain): Ditto.
- * macroscope.c (default_macro_scope): Ditto.
- * stack.c (print_frame_info_base): Ditto.
- (print_frame, frame_info, print_frame_label_vars): Ditto.
- (return_command, func_command, get_frame_language): Ditto.
- * infcmd.c (finish_command): Ditto.
- * dummy-frame.c (cached_find_dummy_frame): Ditto.
- * breakpoint.c (deprecated_frame_in_dummy): Ditto.
- (break_at_finish_at_depth_command_1): Ditto.
- (break_at_finish_command_1): Ditto.
- (until_break_command, get_catch_sals): Ditto.
- * blockframe.c (func_frame_chain_valid): Ditto.
- (frameless_look_for_prologue): Ditto.
- (frame_address_in_block, generic_func_frame_chain_valid): Ditto.
+2003-01-30 Andrew Cagney <ac131313@redhat.com>
-2002-12-08 Andrew Cagney <ac131313@redhat.com>
+ * Makefile.in (mon960-rom.o): Delete rule.
+ * mon960-rom.c: Delete file.
- * config/rs6000/tm-rs6000.h (init_frame_pc_noop): Add declaration.
- * dwarf2cfi.c (cfi_init_frame_pc): Cast the PC to a pointer.
+2003-01-30 Andrew Cagney <ac131313@redhat.com>
-2002-12-08 Andrew Cagney <ac131313@redhat.com>
+ * d10v-tdep.c: Include "frame-unwind.h".
+ (d10v_gdbarch_init): Append d10v_frame_p to the unwind predicate
+ list.
+ (next_addr, uses_frame): Delete.
+ (struct d10v_unwind_cache): Define.
+ (prologue_find_regs): Add struct d10v_unwind_cache info parameter.
+ Use info instead of next_addr and uses_frame globals.
+ (d10v_frame_init_saved_regs): Delete function.
+ (d10v_init_extra_frame_info): Delete function.
+ (d10v_gdbarch_init): Do not initialize init_extra_frame_info,
+ frame_init_saved_regs or pop_frame, frame_chain, frame_chain_valid,
+ init_frame_pc or frame_saved_pc.
+ (d10v_pop_frame): Delete function.
+ (do_d10v_pop_frame): Delete function.
+ (d10v_frame_chain): Delete function.
+ (d10v_frame_chain_valid): Delete function.
+ (d10v_frame_pc_unwind): New function.
+ (d10v_frame_id_unwind): New function.
+ (saved_regs_unwinder): New function.
+ (d10v_frame_register_unwind): New function.
+ (d10v_frame_pop): New function.
+ (d10v_frame_unwind): New variable.
+ (d10v_frame_p): New function.
+ (d10v_frame_saved_pc): Delete function.
+ * Makefile.in (d10v-tdep.o): Update dependencies.
+
+2003-01-30 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/tm-hppa64.h (CALL_DUMMY_LOCATION): Remove #undef
+ causing some regressions due to a change in the default value
+ for this macro.
+
+2003-01-29 Richard Henderson <rth@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Daniel Jacobowitz <drow@mvista.com>
- * gdbarch.sh (INIT_FRAME_PC_FIRST, INIT_FRAME_PC_DEFAULT): Convert
- to pure functions.
+ Fix PR gdb/961.
+ * dwarf2read.c (dwarf_ranges_offset, dwarf_ranges_size): New
+ variables.
+ (RANGES_SECTION): New.
+ (dwarf_ranges_buffer): New variable.
+ (struct comp_unit_head): Add member "die".
+ (struct dwarf2_pinfo): Add dwarf_ranges_buffer, dwarf_ranges_size.
+ (DWARF_RANGES_BUFFER, DWARF_RANGES_SIZE): New.
+ (dwarf2_has_info): Init dwarf_ranges_offset and dwarf_ranges_size.
+ (dwarf2_locate_sections): Likewise.
+ (dwarf2_build_psymtabs): Read .debug_ranges.
+ (dwarf2_build_psymtabs_hard): Swap dwarf_ranges out.
+ (psymtab_to_symtab_1): Swap dwarf_ranges in. Set cu_header.die.
+ (dwarf2_get_pc_bounds): New cu_header argument; adjust all callers.
+ Look for DW_AT_ranges and return the bounding box.
+
+2003-01-29 Brian Ford <ford@vss.fsi.com>
+
+ * win32-nat.c (cygwin_pid): Removed as unused.
+ (child_attach): Try fall back to Cygwin pid.
+
+2003-01-29 Jim Blandy <jimb@redhat.com>
+
+ * objfiles.h (struct objfile): Doc fix.
+
+2003-01-29 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (frame_saved_regs_id_unwind): Assert FRAME_CHAIN_P.
+ (legacy_get_prev_frame): Assert FRAME_CHAIN_P.
+ (get_prev_frame): When FRAME_CHAIN_P, call legacy_get_prev_frame.
+ (frame_saved_regs_pc_unwind): Assert FRAME_SAVED_PC_P.
+ * gdbarch.sh (FRAME_CHAIN): Change to a function with predicate.
+ (FRAME_SAVED_PC): Change to a function with predicate.
* gdbarch.h, gdbarch.c: Re-generate.
- * frame.c (get_prev_frame): Explictly assign prev's pc with value
- returned by INIT_FRAME_PC_FIRST and INIT_EXTRA_FRAME_INFO.
-
- * arch-utils.h (init_frame_pc_default, init_frame_pc_noop): Change
- declaration to a function returning a CORE_ADDR.
- * x86-64-tdep.h (x86_64_init_frame_pc): Ditto.
- * arch-utils.c (init_frame_pc_noop): Return the PC value.
- (init_frame_pc_default): Ditto.
- * x86-64-linux-tdep.c (x86_64_init_frame_pc): Ditto.
- * s390-tdep.c (s390_init_frame_pc_first): Ditto.
- * mips-tdep.c (mips_init_frame_pc_first): Ditto.
- * dwarf2cfi.h (cfi_init_frame_pc): Ditto.
- * dwarf2cfi.c (cfi_init_frame_pc): Ditto.
- * alpha-tdep.c (alpha_init_frame_pc_first): Ditto.
-
- * i386-interix-tdep.c (i386_interix_init_abi): Set init_frame_pc
- to init_frame_pc_noop.
- (i386_interix_init_frame_pc): Delete function.
- * z8k-tdep.c (init_frame_pc): Delete function.
- * config/z8k/tm-z8k.h (INIT_FRAME_PC): Define as init_frame_pc_noop.
- (INIT_FRAME_PC_FIRST): Ditto.
- * config/mn10200/tm-mn10200.h (INIT_FRAME_PC): Ditto.
- (INIT_FRAME_PC_FIRST): Ditto.
- * config/sparc/tm-sparc.h (INIT_FRAME_PC): Ditto.
- * config/rs6000/tm-rs6000.h (INIT_FRAME_PC): Redefine as
- init_frame_pc_noop.
- (INIT_FRAME_PC_FIRST): Convert to an expression.
- * config/sparc/tm-sparc.h (INIT_FRAME_PC_FIRST): Ditto.
-
-2002-12-08 Andrew Cagney <ac131313@redhat.com>
-
- * blockframe.c: Use get_frame_base instead of directly accessing
- the `struct frame_info' member frame.
- * f-valprint.c, std-regs.c, rs6000-tdep.c: Ditto.
- * stack.c, dummy-frame.c, breakpoint.c: Ditto.
-
-2002-12-08 Elena Zannoni <ezannoni@redhat.com>
-
- * Makefile.in (readline_h): Define.
- (completer.o): Depend on readline_h.
- (corelow.o): Ditto.
- (event-top.o): Ditto.
- (exec.o): Ditto.
- (solib.o): Ditto.
- (source.o): Ditto.
- (symfile.o): Ditto.
- (symmisc.o): Ditto.
- (top.o): Ditto.
- (tracepoint.o): Ditto.
- (utils.o): Ditto.
- (cli-dump.o): Ditto.
- (tui-hooks.o): Ditto.
- (tuiWin.o): Ditto.
-
-2002-12-08 Elena Zannoni <ezannoni@redhat.com>
-
- More cleanup from import of readline 4.3.
- * completer.h (complete_line, readline_line_completion_function):
- Update prototypes.
- (line_completion_function): Removed, not used outside of completer.c.
- * completer.c (readline_line_completion_function,
- complete_function, line_completion_function): Use const for first
- parameter.
- (line_completion_function): Make static.
- (filename_completer): filename_completion_function is now called
- rl_filename_completion_function
- * corelow.c: Include <readline/readline.h>.
- * exec.c: Ditto.
- * solib.c: Ditto.
- * source.c: Ditto.
- * symfile.c: Ditto.
- * symmisc.c: Ditto.
- * top.c (init_main): No need to coerce
- readline_line_completion_function anymore.
- * cli/cli-dump.c: Include <readline/readline.h>.
-
-2002-12-08 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (frame_info): Use get_prev_frame.
- * blockframe.c (frame_address_in_block): Ditto.
- * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
- (rs6000_frameless_function_invocation): Ditto.
- (rs6000_frame_saved_pc): Ditto.
- (rs6000_frame_chain): Ditto.
- * arch-utils.c (init_frame_pc_default): Ditto.
-
-2002-12-08 Andrew Cagney <ac131313@redhat.com>
-
- * config/mn10200/tm-mn10200.h (DEPRECATED_PC_IN_CALL_DUMMY):
- Delete redundant definition.
-
-2002-12-08 Elena Zannoni <ezannoni@redhat.com>
-
- Import of readline 4.3:
- * cli/cli-cmds.c: Include readline/tilde.h.
- * cli/cli-setshow.c: Ditto.
- * defs.h: Don't declare tilde_expand anymore, since readline
- exports it.
-
-2002-12-08 Elena Zannoni <ezannoni@redhat.com>
-
- * Makefile.in (thread-db.o): Add explicit rule to ignore the use of
- -Werror on this file.
-
-2002-12-07 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (TARGET_FLOAT_FORMAT): Use the macro when printing
- the format name.
- (TARGET_DOUBLE_FORMAT, TARGET_LONG_DOUBLE_FORMAT): Ditto.
- * gdbarch.c: Regenerate.
-
-2002-12-06 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (DEPRECATED_INIT_FRAME_PC_FIRST): Rename
- INIT_FRAME_PC_FIRST. Change to a function with predicate. Do not
- provide a default value.
- * gdbarch.h, gdbarch.c: Regenerate.
- * frame.c (get_prev_frame): Update. Check
- DEPRECATED_INIT_FRAME_PC_FIRST_P.
- * s390-tdep.c (s390_gdbarch_init): Update.
- * mips-tdep.c (mips_gdbarch_init): Update.
- * config/sparc/tm-sparc.h (DEPRECATED_INIT_FRAME_PC_FIRST): Update.
- * config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC_FIRST): Update.
- * alpha-tdep.c (alpha_gdbarch_init): Update.
-
-2002-12-06 Elena Zannoni <ezannoni@redhat.com>
-
- * ia64-linux-nat.c: Include gdb_string.h.
- * alpha-nat.c: Ditto.
- * ppc-linux-nat.c: Ditto.
- * Makefile.in (ia64-linux-nat.o, alpha-nat.o, ppc-linux-nat.o):
- Update dependencies.
-
-2002-12-05 Andrew Cagney <ac131313@redhat.com>
-
- * gdbthread.h: Include "frame.h".
- (struct thread_info): Replace step_frame_address with
- step_frame_id.
- * inferior.h: Include "frame.h".
- (step_frame_id): Replace external variable step_frame_address.
- * gdbthread.h (save_infrun_state): Replace step_frame_address
- parameter with step_frame_id parameter.
- (load_infrun_state): Ditto.
- * Makefile.in (gdbthread_h, inferior_h): Add $(frame_h).
- * infcmd.c (step_frame_id, step_1, step_once): Update.
- * thread.c (load_infrun_state, save_infrun_state): Update.
- * infrun.c (clear_proceed_status, save_inferior_status): Update.
- (handle_inferior_event, step_over_function): Update.
- (normal_stop, context_switch, restore_inferior_status): Update.
- (struct inferior_status): Replace step_frame_address with
- step_frame_id.
-
-2002-12-05 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (dwarf2_add_field): Treat a field that is a
- DW_TAG_member as well as a declaration as being a C++ static data
- member.
- (read_structure_scope): Combine tests for DW_TAG_member and
- DW_TAG_variable.
-
-2002-12-05 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (decode_compound): New function.
- (decode_line_1): Move code into decode_compound.
-
-2002-12-05 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_local): Add 'static_block'
- argument.
- (lookup_symbol_aux): Do the 'field_of_this' check before checking
- the static block. See PR gdb/804.
-
-2002-12-05 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_block): New function.
- (lookup_symbol_aux_local): Move code into lookup_symbol_aux_block.
-
-2002-12-05 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh: Dump the predicate function and macro values.
- (read): Print error on standard error.
- * gdbarch.c: Regenerate.
-
-2002-12-04 Kevin Buettner <kevinb@redhat.com>
-
- * Makefile.in (mips_tdep_h): Define.
- (mips-tdep.o): Add mips_tdep_h to dependency list.
- * mips-tdep.h: New file.
- * mips-tdep.c (mips-tdep.h): Include.
- (enum mips_abi): Move to mips-tdep.h.
- (mips_abi): New function.
-
-2002-12-04 David Carlton <carlton@math.stanford.edu>
-
- * Makefile.in (f-exp.tab.c): Don't depend on c-exp.tab.c.
-
-2002-12-04 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux): Move minsym code into a separate
- function.
- (lookup_symbol_aux_minsyms): New function.
-2002-12-04 J. Brobecker <brobecker@gnat.com>
+2003-01-28 Andrew Cagney <ac131313@redhat.com>
- * pa64solib.c: s/boolean/int/. Fixes a build failure on hppa64-hpux.
+ * hppah-nat.c (child_pid_to_exec_file): Don't use boolean.
-2002-12-04 J. Brobecker <brobecker@gnat.com>
+ * complaints.c (complain): Delete function.
+ * complaints.h (struct deprecated_complaint): Delete definition.
+ (complain): Delete declaration.
- * config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Renamed from IN_SIGTRAMP,
- which is an obsolete macro name.
+2003-01-28 Kevin Buettner <kevinb@redhat.com>
-2002-12-04 Daniel Jacobowitz <drow@mvista.com>
+ * mips-tdep.c (mips_init_extra_frame_info): Return early for
+ dummy frames.
- * doublest.c (convert_floatformat_to_doublest): Cast exp_bias to int.
- * config/alpha/alpha-linux.mh (MH_CFLAGS): Add -mieee.
+2003-01-27 Andrew Cagney <ac131313@redhat.com>
-2002-12-03 H.J. Lu (hjl@gnu.org)
-
- * breakpoint.c (create_thread_event_breakpoint): Use xasprintf.
- (create_breakpoints): Make sure the addr_string field is not
- NULL.
-
-2002-12-03 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-nat.c (fetch_inferior_registers)
- (store_inferior_registers): Add comment on problem of LWP vs
- threads.
-
- From 2002-11-21 Daniel Jacobowitz <drow@mvista.com>
- * lin-lwp.c (lin_lwp_fetch_registers): Remove.
- (lin_lwp_store_registers): Remove.
- (init_lin_lwp_ops): Use fetch_inferior_registers
- and store_inferior_registers directly.
- * sparc-nat.c (fetch_inferior_registers): Honor LWP ID.
- (store_inferior_registers): Likewise.
- Fix PR gdb/725.
-
-2002-12-03 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (get_frame_id): Convert to a function.
- (null_frame_id, frame_id_p): Declare.
- (frame_id_eq, frame_id_inner): Declare.
- (frame_id_build): New function.
- * frame.c (get_frame_id): Update. Use null_frame_id.
- (frame_find_by_id): Rewrite using frame_id_p, frame_id_eq and
- frame_id_inner.
- (null_frame_id, frame_id_p): Define.
- (frame_id_eq, frame_id_inner): Define.
- (frame_id_build): New function.
- * varobj.c (varobj_create): Update.
- (varobj_update): Update.
- * valops.c (value_assign): Update.
- (new_root_variable): Update.
- * infrun.c (save_inferior_status): Update.
- * breakpoint.c (watch_command_1): Update.
-
-2002-12-03 J. Brobecker <brobecker@gnat.com>
-
- * config/pa/tm-hppah.h (SNAP1): Remove unused macro.
- (SNAP2): Likewise.
-
-2002-12-03 Andrew Cagney <cagney@redhat.com>
-
- * NEWS: Mention Daniel Jacobowitz's multi-threaded shared library
- patch.
-
- * PROBLEMS: Mention PR gdb/725.
-
-2002-12-03 Andreas Schwab <schwab@suse.de>
-
- * infcmd.c (construct_inferior_arguments): Handle empty arguments.
-
-2002-12-02 Adam Fedor <fedor@gnu.org>
- Klee Dienes <kdienes@apple.com>
-
- * objc-lang.c (objc_printstr): Add width arg to match
- printstr prototype.
- (compare_selectors): Add 'const' to arg types.
- (compare_classes): Likewise.
- (find_imps): Cast msym pointer to avoid compiler warning.
- (print_object_command): Validate the address before
- passing it to the print routine.
- (find_objc_msgcall_submethod): Change function argument to
- return an int.
- * objc-lang.h: Add 'extern' to all function declarations.
- (value_nsstring): Add declaration.
-
-2002-12-02 J. Brobecker <brobecker@gnat.com>
-
- * somsolib.c (dld_cache): Replace boolean by int for field is_valid.
- Fixes a build failure on HP/UX.
-
- * hpread.c (told_objfile): Replace boolean type by int. Fixes a build
- failure on HP/UX.
- (hpread_has_name): Advance declaration to avoid a compilation warning.
- (pst_syms_count): Add missing variable type. By change, the compiler
- was defaulting to int, which seems a good choice. Fixes a compilation
- warning.
- (pst_syms_size): Likewise.
-
-2002-12-02 J. Brobecker <brobecker@gnat.com>
-
- * hppa-tdep.c: Add #include "osabi.h" (for hppa_gdbarch_init).
- (hppa_gdbarch_init): Detect osabi from objfile. Will be needed
- later to set the proper gdbarch methods depending on the osabi.
- * Makefile.in (hppa-tdep.o): Add dependency on osabi.h.
-
-2002-12-02 J. Brobecker <brobecker@gnat.com>
-
- * osabi.h (gdb_osabi): Add two new enum values for HPUX ELF and SOM.
- * osabi.c (gdb_osabi_name): Add strings images for the two new
- enum values.
- (generic_elf_osabi_sniffer): Handle HPUX objfiles.
-
-2002-12-02 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Java): Global maintainers are responible for Java.
- (Past Maintainers): Mention both Anthony Green and Per Bothner as
- part Java maintainers.
-
-2002-12-02 J. Brobecker <brobecker@gnat.com>
-
- * xcoffread.c (read_symbol_lineno): Replace boolean by int.
- Fixes a compilation failure on AiX.
-
-2002-12-02 J. Brobecker <brobecker@gnat.com>
-
- * config/powerpc/aix432.mh (NATDEPFILES): Add a comment explaining
- why aix-thread.o is not listed.
-
-2002-12-01 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Rename
- PC_IN_CALL_DUMMY. Change to predicate. Always allow call.
- * gdbarch.h, gdbarch.c: Re-generate.
- * config/sparc/tm-sparc.h, config/sparc/tm-sp64.h: Update.
- * config/mn10200/tm-mn10200.h, config/h8500/tm-h8500.h: Update.
- * config/pa/tm-hppa.h, frame.h: Update.
- * x86-64-tdep.c, vax-tdep.c, sparc-tdep.c: Update.
- * s390-tdep.c, ns32k-tdep.c, mn10300-tdep.c: Update.
- * m68k-tdep.c, i386-tdep.c, frv-tdep.c: Update.
- * cris-tdep.c, alpha-tdep.c: Update.
- * frame.c (set_unwind_by_pc, create_new_frame): Use either
- DEPRECATED_PC_IN_CALL_DUMMY or pc_in_dummy_frame.
- (get_prev_frame): Ditto.
-
-2002-11-30 Andrew Cagney <cagney@redhat.com>
-
- * exec.c (xfer_memory): Replace boolean with int.
- * p-exp.y: Use 0 instead of false.
- * corelow.c (gdb_check_format): Change return type to int from
- boolean.
- * utils.c: Don't include <curses.h> or <term.h> first.
-
-2002-11-29 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11-tdep.c (m68hc11_register_raw_size): Remove.
- (m68hc11_register_byte): Remove.
- (m68hc11_gdbarch_init): Don't set the above.
-
-2002-11-29 Andrew Cagney <cagney@redhat.com>
-
- * remote-mips.c (mips_initialize): Force a selected frame rebuild
- by calling get_selected_frame.
- * ocd.c (ocd_start_remote): Use get_selected frame instead of
- set_current_frame, create_new_frame, select_frame and
- get_current_frame.
- * remote-e7000.c (e7000_start_remote): Ditto.
- * remote-mips.c (common_open): Ditto
- * remote-rdp.c (remote_rdp_open): Ditto.
-
-2002-11-29 Andreas Schwab <schwab@suse.de>
-
- * m68k-tdep.c (m68k_frame_chain, m68k_frame_saved_pc)
- (altos_skip_prologue, delta68_frame_saved_pc, isi_frame_num_args)
- (delta68_frame_num_args, news_frame_num_args, m68k_skip_prologue)
- (m68k_frame_init_saved_regs, m68k_saved_pc_after_call): Use
- read_memory_unsigned_integer instead of read_memory_integer when
- dealing with addresses and instruction opcodes.
- * m68klinux-tdep.c (m68k_linux_sigtramp_saved_pc)
- (m68k_linux_frame_saved_pc): Likewise.
-
-2002-11-29 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (selected_frame, select_frame): Move from here ...
- * frame.c (selected_frame, select_frame): ... to here. Include
- "language.h".
+ * sentinel-frame.h, sentinel-frame.c: New files.
* Makefile.in (frame.o): Update dependencies.
- * frame.c (get_selected_frame): New function.
- * frame.h (get_selected_frame): Declare.
- (deprecated_selected_frame): Rename selected_frame.
- * ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
- * eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
- * h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
- * inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
- * mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
- * remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
- * stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
- * z8k-tdep.c, cli/cli-cmds.c: Update.
-
-2002-11-29 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (get_selected_block): Add comments.
-
-2002-11-28 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (pc_notcurrent): New function.
- (find_frame_sal): New function.
- * frame.h (find_frame_sal): Declare.
- (struct symtab_and_line): Add opaque declaration.
- * stack.c (print_frame_info_base): Use find_frame_sal instead of
- find_pc_line.
- (frame_info): Ditto.
- * ada-lang.c (find_printable_frame): Ditto.
-
-2002-11-28 J. Brobecker <brobecker@gnat.com>
-
- * configure.in: Check that the pthdebug library is recent enough
- before enabling thread support on native AiX.
- * configure: Regenerate.
-
- * config/powerpc/aix432.mh (NATDEPFILES): Remove aix-thread.o
- from the list of object files as it is now appended by configure
- if thread support is enabled.
- (NAT_CLIBS): Removed as -lpthdebug is also appended by configure
- if thread support is enabled.
-
-2002-11-28 Andrew Cagney <cagney@redhat.com>
-
- * stack.c (get_selected_block): In-line get_current_block.
- * frame.h (get_current_block): Delete declaration.
- * blockframe.c (get_current_block): Delete function.
-
-2002-11-28 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Rename
- USE_GENERIC_DUMMY_FRAMES.
- * gdbarch.h, gdbarch.c: Regenerate.
- * valops.c, frame.c: Update.
- * config/z8k/tm-z8k.h, config/mn10200/tm-mn10200.h: Update.
- * config/m32r/tm-m32r.h, config/h8500/tm-h8500.h: Update.
- * config/pa/tm-hppa.h, blockframe.c: Update.
- * vax-tdep.c, sparc-tdep.c, ns32k-tdep.c: Ditto.
- * m68k-tdep.c, alpha-tdep.c: Ditto.
-
- * arm-tdep.c: Eliminate USE_GENERIC_DUMMY_FRAMES as always 1.
- * mips-tdep.c: Ditto.
-
-2002-11-27 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (CALL_DUMMY_LOCATION): Default to AT_ENTRY_POINT.
- (USE_GENERIC_DUMMY_FRAMES): Default to true.
- (PC_IN_CALL_DUMMY): Default to generic_pc_in_call_dummy.
- * gdbarch.c, gdbarch.h: Re-generate.
- * inferior.h (USE_GENERIC_DUMMY_FRAMES): Delete macro definition.
- (CALL_DUMMY_LOCATION): Delete macro definition.
- (PC_IN_CALL_DUMMY): Delete macro definitions.
-
- * arm-tdep.c (arm_gdbarch_init): Do not set pc_in_call_dummy,
- default is already generic_pc_in_call_dummy.
- * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
- * v850-tdep.c (v850_gdbarch_init): Ditto.
- * sh-tdep.c (sh_gdbarch_init): Ditto.
- * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
- * mips-tdep.c (mips_gdbarch_init): Ditto.
- * mcore-tdep.c (mcore_gdbarch_init): Ditto.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
- * ia64-tdep.c (ia64_gdbarch_init): Ditto.
- * h8300-tdep.c (h8300_gdbarch_init): Ditto.
- * d10v-tdep.c (d10v_gdbarch_init): Ditto.
- * avr-tdep.c (avr_gdbarch_init): Ditto.
-
- * arm-tdep.c (arm_gdbarch_init): Do not set
- use_generic_dummy_frames, default is already 1.
- * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
- * x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
- * v850-tdep.c (v850_gdbarch_init): Ditto.
- * sh-tdep.c (sh_gdbarch_init): Ditto.
- * s390-tdep.c (s390_gdbarch_init): Ditto.
- * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
- * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
- * mips-tdep.c (mips_gdbarch_init): Ditto.
- * mcore-tdep.c (mcore_gdbarch_init): Ditto.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
- * ia64-tdep.c (ia64_gdbarch_init): Ditto.
- * i386-tdep.c (i386_gdbarch_init): Ditto.
- * h8300-tdep.c (h8300_gdbarch_init): Ditto.
- * frv-tdep.c (frv_gdbarch_init): Ditto.
- * d10v-tdep.c (d10v_gdbarch_init): Ditto.
- * cris-tdep.c (cris_gdbarch_init): Ditto.
- * avr-tdep.c (avr_gdbarch_init): Ditto.
-
- * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
- call_dummy_location, default is already AT_ENTRY_POINT.
- * x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
- * v850-tdep.c (v850_gdbarch_init): Ditto.
- * sparc-tdep.c (sparc_gdbarch_init): Ditto.
- * sh-tdep.c (sh_gdbarch_init): Ditto.
- * s390-tdep.c (s390_gdbarch_init): Ditto.
- * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
- * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
- * mips-tdep.c (mips_gdbarch_init): Ditto.
- * mcore-tdep.c (mcore_gdbarch_init): Ditto.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
- * ia64-tdep.c (ia64_gdbarch_init): Ditto.
- * i386-tdep.c (i386_gdbarch_init): Ditto.
- * h8300-tdep.c (h8300_gdbarch_init): Ditto.
- * frv-tdep.c (frv_gdbarch_init): Ditto.
- * d10v-tdep.c (d10v_gdbarch_init): Ditto.
- * cris-tdep.c (cris_gdbarch_init): Ditto.
- * avr-tdep.c (avr_gdbarch_init): Ditto.
- * arm-tdep.c (arm_gdbarch_init): Ditto.
- * alpha-tdep.c (alpha_gdbarch_init): Ditto.
-
-2002-11-28 Andrew Cagney <cagney@redhat.com>
-
- * frame.h: Update comments on set_current_frame, create_new_frame,
- flush_cached_frames, reinit_frame_cache, select_frame and
- selected_frame.
-
-2002-11-27 Andrew Cagney <cagney@redhat.com>
-
- * config/z8k/tm-z8k.h (PC_IN_CALL_DUMMY): Update definition to use
- deprecated pc_in_call_dummy function.
- * config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Ditto.
- * config/sparc/tm-sp64.h (PC_IN_CALL_DUMMY): Ditto.
- * config/pa/tm-hppa.h (PC_IN_CALL_DUMMY): Ditto.
- * config/mn10200/tm-mn10200.h (PC_IN_CALL_DUMMY): Ditto.
- * config/h8500/tm-h8500.h (PC_IN_CALL_DUMMY): Ditto.
-
-2002-11-26 Martin M. Hunt <hunt@redhat.com>
-
- * Makefile.in: Remove Tix dependencies.
- * acinclude.m4: Ditto.
- * aclocal.m4: Ditto.
- * configure.in: Ditto.
- * configure: Regenerated.
-
-2002-11-26 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (TARGET_FLOAT_FORMAT): Print the float format name.
- (TARGET_DOUBLE_FORMAT, TARGET_LONG_DOUBLE_FORMAT): Ditto.
- * gdbarch.c: Re-generate.
-
-2002-11-26 Andrew Cagney <ac131313@redhat.com>
-
- * config/h8500/tm-h8500.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
- (USE_GENERIC_DUMMY_FRAMES): Define as zero.
- (PC_IN_CALL_DUMMY): Define as pc_in_call_dummy_on_stack.
- * config/mn10200/tm-mn10200.h (PC_IN_CALL_DUMMY): Define as
- pc_in_call_dummy_at_entry_point.
- * config/pa/tm-hppa.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
- (USE_GENERIC_DUMMY_FRAMES): Define as zero.
- (PC_IN_CALL_DUMMY): Define as pc_in_call_dummy_on_stack.
- * config/pa/tm-hppa64.h (CALL_DUMMY_LOCATION): Delete undefine.
- * config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Define as
- pc_in_call_dummy_on_stack.
- * config/sparc/tm-sp64.h (PC_IN_CALL_DUMMY): Redefine as
- pc_in_call_dummy_at_entry_point and pc_in_call_dummy_on_stack.
- * config/z8k/tm-z8k.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
- (USE_GENERIC_DUMMY_FRAMES): Define as zero.
- (PC_IN_CALL_DUMMY): Defile as pc_in_call_dummy_on_stack.
-
-2002-11-26 Andrew Cagney <ac131313@redhat.com>
-
- * inferior.h (deprecated_pc_in_call_dummy_before_text_end): Rename
- pc_in_call_dummy_before_text_end
- (deprecated_pc_in_call_dummy_after_text_end): Rename
- pc_in_call_dummy_after_text_end.
- (deprecated_pc_in_call_dummy_on_stack): Rename
- pc_in_call_dummy_on_stack.
- (deprecated_pc_in_call_dummy_at_entry_point): Rename
- pc_in_call_dummy_at_entry_point.
- * m68k-tdep.c (m68k_gdbarch_init): Update.
- * s390-tdep.c (s390_gdbarch_init): Update.
- * x86-64-tdep.c (x86_64_gdbarch_init): Update.
- * vax-tdep.c (vax_gdbarch_init): Update.
- * sparc-tdep.c (sparc_gdbarch_init): Update.
- * ns32k-tdep.c (ns32k_gdbarch_init): Update.
- * mn10300-tdep.c (mn10300_gdbarch_init): Update.
- * i386-tdep.c (i386_gdbarch_init): Update.
- * frv-tdep.c (frv_gdbarch_init): Update.
- * cris-tdep.c (cris_gdbarch_init): Update.
- * config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Update.
- * blockframe.c (deprecated_pc_in_call_dummy_before_text_end)
- (deprecated_pc_in_call_dummy_after_text_end)
- (deprecated_pc_in_call_dummy_on_stack)
- (deprecated_pc_in_call_dummy_at_entry_point): Update.
- * alpha-tdep.c (alpha_gdbarch_init): Update.
-
-2002-11-25 Daniel Jacobowitz <drow@mvista.com>
-
- * acconfig.h (HAVE_PREAD64): Add.
- * configure.in: Check for pread64.
+ (SFILES): Add sentinel-frame.c.
+ (sentinel_frame_h): Define.
+ (COMMON_OBS): Add sentinel-frame.o.
+ (sentinel-frame.o): Specify dependencies.
+ * frame.c: Include "sentinel-frame.h".
+ (frame_register_unwind): Rewrite assuming that there is always a a
+ ->next frame.
+ (frame_register, generic_unwind_get_saved_register): Ditto.
+ (frame_read_unsigned_register, frame_read_signed_register): Ditto.
+ (create_sentinel_frame, unwind_to_current_frame): New functions.
+ (get_current_frame): Rewrite using create_sentinel_frame and
+ unwind_to_current_frame. When possible, always create a frame.
+ (create_new_frame): Set next to the sentinel frame.
+ (get_next_frame): Rewrite. Don't go below the level 0 frame.
+ (deprecated_update_frame_pc_hack): Update the next frame's PC and
+ ID cache when necessary.
+ (frame_saved_regs_id_unwind): Use frame_relative_level.
+ (deprecated_generic_get_saved_register): Use frame_relative_level,
+ get_frame_saved_regs, get_frame_pc, get_frame_base and
+ get_next_frame.
+ (frame_saved_regs_register_unwind): Use get_frame_saved_regs and
+ frame_register.
+
+2003-01-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb_indent.sh: Add -T bfd and -T asection to the indent arguments.
+
+2003-01-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * maint.c [! (HAVE_MONSTARTUP && HAVE__MCLEANUP)]
+ (maintenance_set_profile_cmd): Use error () instead of warning ().
+
+2003-01-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.in: Check that -pg works if using --enable-profiling.
+ Check for monstartup and _mcleanup regardless of --enable-profiling.
+ * maint.c: Check for monstartup and _mcleanup before using them.
* config.in: Regenerated.
* configure: Regenerated.
- * lin-lwp.c (lin_lwp_xfer_memory): Call linux_proc_xfer_memory.
- * linux-proc.c (linux_proc_xfer_memory): New function.
- * config/nm-linux.h (linux_proc_xfer_memory): Add prototype.
-
-2002-11-25 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (scan_partial_symbols): Descend into namespace
- pdi's with no name.
-
-2002-11-25 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Mark h8500 as broken. Breakage occured Fri Nov 5
- 16:32:04 1999 Andrew Cagney <cagney@b1.cygnus.com>.
-
-2002-11-25 Jim Blandy <jimb@redhat.com>
-
- * symfile.c (init_objfile_sect_indices): New function.
- (default_symfile_offsets): Move the section-index-initializing
- stuff into init_objfile_sect_indices, and call that.
-
- * symtab.h (SIZEOF_N_SECTION_OFFSETS): New macro.
- (SIZEOF_SECTION_OFFSETS): Use SIZEOF_N_SECTION_OFFSETS.
-
- * symfile.c (syms_from_objfile): Adjust indentation.
-
- * symfile.c (symbol_file_add): Flush gdb_stdout even if from_tty
- || info_verbose isn't true.
-
-2002-11-24 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS): Change
- default to get_frame_base.
- * gdbarch.h, gdbarch.c: Regenerate.
- * arch-utils.c (default_frame_address): Delete function.
- * arch-utils.h (default_frame_address): Delete declaration
-
-2002-11-24 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * varobj.c (find_frame_addr_in_frame_chain):
- Use get_frame_base instead of FRAME_FP,
- obvious fix.
-
-2002-11-19 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (FRAME_FP): Delete macro.
- (get_frame_base): New function declaration.
- * frame.c (get_frame_base): New function.
- (get_frame_id): Use ->frame.
- (frame_find_by_id): Rewrite to use get_frame_id.
- * blockframe.c: Use get_frame_base instead of FRAME_FP.
- * cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
- * hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
- * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
- * mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
- * sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
- * v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
-
-2002-11-24 Andrew Cagney <ac131313@redhat.com>
-
- * arm-tdep.c (arm_gdbarch_init): Do not set get_saved_register.
-
-2002-11-24 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (set_unwind_by_pc): Revert change below, use
- PC_IN_CALL_DUMMY.
- (get_prev_frame): Ditto.
-
-2002-11-24 Andrew Cagney <ac131313@redhat.com>
-
- * dummy-frame.c (pc_in_dummy_frame): New function.
- (generic_pc_in_call_dummy): Call pc_in_dummy_frame.
- (find_dummy_frame): Update comment.
- (generic_pop_current_frame): Use get_frame_type.
- * dummy-frame.h (pc_in_dummy_frame): Declare.
- * frame.c (set_unwind_by_pc): Use pc_in_dummy_frame.
- (create_new_frame): Use pc_in_dummy_frame.
- (get_prev_frame): Use pc_in_dummy_frame.
- (frame_saved_regs_register_unwind): Use get_prev_frame.
- (deprecated_generic_get_saved_register): Use get_prev_frame.
-
-2002-11-23 Andrew Cagney <ac131313@redhat.com>
-
- * blockframe.c (find_frame_addr_in_frame_chain): Move function
- from here ...
- * varobj.c (find_frame_addr_in_frame_chain): ... to here.
- (varobj_create): Note that frame ID should be used.
- * frame.h (find_frame_addr_in_frame_chain): Delete declaration.
-
-2002-11-23 Andrew Cagney <ac131313@redhat.com>
-
- * breakpoint.c: Include "gdb_assert.h".
- (deprecated_frame_in_dummy): Assert that generic dummy frames are
- not being used.
- * Makefile.in (breakpoint.o): Update dependencies.
- * ada-lang.c (find_printable_frame): Use get_frame_type instead of
- deprecated_frame_in_dummy.
- * stack.c (print_frame_info_base): Ditto.
- (frame_info): Ditto.
- (print_frame_info_base): Ditto. Delete dead code.
-
-2002-11-23 Andreas Schwab <schwab@suse.de>
-
- * Makefile.in (m68k_tdep_h): Define.
- (abug-rom.o, cpu32bug-rom.o, dbug-rom.o, m68k-tdep.o, m68klinux-nat.o)
- (remote-est.o, rom68k-rom.o): Add $(m68k_tdep_h).
- * m68k-tdep.c: Move register number enum ...
- * m68k-tdep.h: ... to this new file and rename the constants from
- E_* to M68K_*. All uses changed.
- * config/m68k/tm-m68k.h (D0_REGNUM, A0_REGNUM): Remove definitions.
- * abug-rom.c: Include "m68k-tdep.h". Use
- M68K_D0_REGNUM/M68K_A0_REGNUM instead of D0_REGNUM/A0_REGNUM.
- * cpu32bug-rom.c: Likewise.
- * dbug-rom.c: Likewise.
- * m68k-tdep.c: Likewise.
- * m68klinux-nat.c: Likewise.
- * remote-est.c: Likewise.
- * rom68k-rom.c: Likewise.
- * config/m68k/tm-linux.h: Likewise.
-
-2002-11-23 Andrew Cagney <ac131313@redhat.com>
-
- * arm-tdep.c (arm_gdbarch_init): Remove old style non-generic
- dummy frame initialization code.
- * mips-tdep.c (mips_gdbarch_init): Ditto.
-
-2002-11-22 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (child_attach): Reset saw_create counter or subsequent
- attach will hang.
-
-2002-11-22 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS): Default
- to default_frame_address.
- * gdbarch.h, gdbarch.c: Re-generate.
-
- * d10v-tdep.c (d10v_gdbarch_init): Do not set frame_args_address
- or frame_locals_address to default_frame_address.
- * m68k-tdep.c (m68k_gdbarch_init): Update.
- * i386-tdep.c (i386_gdbarch_init): Update.
- * frv-tdep.c (frv_gdbarch_init): Update.
- * sh-tdep.c (sh_gdbarch_init): Update.
- * v850-tdep.c (v850_gdbarch_init): Update.
- * sparc-tdep.c (sparc_gdbarch_init): Update.
- * mips-tdep.c (mips_gdbarch_init): Update.
- * mn10300-tdep.c (mn10300_gdbarch_init): Update.
- * x86-64-tdep.c (x86_64_gdbarch_init): Update.
- * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
-
- * cris-tdep.c (cris_frame_args_address): Delete function.
- (cris_frame_locals_address): Delete function.
- (cris_gdbarch_init): Do not set frame_args_address or
- frame_locals_address.
-
-2002-11-22 Michael Snyder <msnyder@redhat.com>
-
- * thread-db.c (thread_db_load): Tell the user what's going on
- if dlopen fails on libthread_db.
-
-2002-11-23 Andreas Schwab <schwab@suse.de>
-
- * m68k-tdep.c (m68k_register_virtual_type): Use architecture
- invariant return values.
-
-2002-11-22 Andreas Schwab <schwab@suse.de>
-
- * valops.c (value_slice): Move declaration of `offset' to avoid
- warning.
-
-2002-11-22 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (psapi_get_dll_name): Fix a compiler warning.
- (struct so_stuff): Add end_addr field.
- (register_loaded_dll): Calculate and store end address of loaded dll.
- (solib_address): New function.
- (child_solib_loaded_library_pathname): Pass carefully constructed
- section info to safe_symbol_file_add rather than ignoring it.
- (get_child_debug_event): Call re_enable_breakpoints_in_shlibs when a
- DLL is loaded.
- (do_initial_child_stuff): Call disable_breakpoints_in_shlibs.
- (child_create_inferior): Fix a compiler warning.
- * config/i386/tm-cygwin.h (PC_SOLIB): Define new macro.
- (solib_address): Declare new function.
-
-2002-11-22 Andreas Schwab <schwab@suse.de>
-
- * m68k-tdep.c (m68k_register_virtual_type): Return int for SR, FPC
- and FPS registers.
-
-2002-11-21 Daniel Jacobowitz <drow@mvista.com>
-
- * maint.c (_initialize_maint_cmds): Fix typo. From
- Francesco Potorti` <pot@gnu.org>.
-
-2002-11-21 Andrew Cagney <cagney@redhat.com>
-
- * mips-tdep.c (mips_dump_tdep): Delete references to
- GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC.
- * config/mips/tm-mips.h (GDB_TARGET_MASK_DISAS_PC): Delete macro.
- (GDB_TARGET_UNMASK_DISAS_PC): Delete macro.
- * printcmd.c (build_address_symbolic): Delete calls to
- GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC.
- (address_info): Ditto.
- Fix PR gdb/773.
-
-2002-11-19 Klee Dienes <kdienes@apple.com>
- Adam Fedor <fedor@gnu.org>
-
- * completer.c (skip_quoted_chars): Renamed from skip_chars. Add
- the ability to explicitly specify the quote characters and word
- break characters; if NULL is specified for either, use the old
- behavior of using the characters used by the completer.
- (skip_chars): New function. Convenience wrapper around
- skip_quoted_chars to provide the original skip_chars behavior.
- * completer.h (skip_quoted_chars): Add prototype.
-
-2002-11-19 Andrew Cagney <ac131313@redhat.com>
-
- Problems reported by Paul Eggert.
- * gdbarch.sh: Use `sort -k 3`. Fix PR gdb/527.
-
-2002-11-19 Andreas Schwab <schwab@suse.de>
-
- * m68klinux-nat.c (IS_SIGTRAMP, IS_RT_SIGTRAMP)
- (m68k_linux_in_sigtramp, SIGCONTEXT_PC_OFFSET)
- (UCONTEXT_PC_OFFSET, m68k_linux_sigtramp_saved_pc)
- (m68k_linux_frame_saved_pc): Move to ...
- * m68klinux-tdep.c: ... here. New file.
- * Makefile.in (m68klinux-tdep.o): Add dependencies.
- * config/m68k/linux.mt (TDEPFILES): Add m68klinux-tdep.o.
-
-2002-11-19 Adam Fedor <fedor@gnu.org>
-
- * objc-exp.y: Revert to old skip_quoted usage.
-
-2002-11-19 Adam Fedor <fedor@gnu.org>
-
- * Makefile.in (SFILES): Add objc-exp.y objc-lang.c.
- (objc_lang_h): Define.
- (YYFILES): Add objc-exp.tab.c.
- (local-maintainer-clean): Remove objc-exp.tab.c.
- (objc-exp.tab.c, objc-exp.tab.o, objc-lang.o): New target.
-
-2002-11-19 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-exp.y (typecast rule): Add automatic dereference of
- pascal classes if needed.
- (THIS): Set current_type.
- Automatically dereference pascal classes.
- (typebase rule): Add ^typebase recognition.
-
-2002-11-18 Adam Fedor <fedor@gnu.org>
-
- * expprint.c (print_subexp): Handle OP_OBJC_NSSTRING,
- OP_OBJC_MSGCALL, and OP_OBJC_SELF.
- (op_name): Handle OP_OBJC_SELF.
- * Makefile.in (expprint.o): Add additional depends.
-
-2002-11-18 Adam Fedor <fedor@gnu.org>
-
- * expression.h: Rename ObjC ops to OP_OBJC_MSGCALL,
- OP_OBJC_SELECTOR, OP_OBJC_NSSTRING, and OP_OBJC_SELF.
- * parse.c (length_of_subexp, prefixify_subexp): Likewise.
- * objc-exp.y: Likewise.
-
-2002-11-18 Adam Fedor <fedor@gnu.org>
-
- * gdb/parser-defs.h: (struct objc_class_str): New structure
- for parsing ObjC classes.
-
-2002-11-18 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (frame_relative_level): Copy function from here ...
- * frame.c (frame_relative_level): ...to here.
-
-2002-11-18 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (enum frame_type): Define.
- (get_frame_type): Declare.
- (struct frame_info): Add field `type'. Delete field
- signal_handler_caller.
- (deprecated_set_frame_signal_handler_caller): Declare.
- * frame.c (get_frame_type): New function.
- (deprecated_set_frame_type): New function.
- (create_new_frame): Set the frame's type.
- (get_prev_frame): Similar.
- * sparc-tdep.c: Use get_frame_type instead of signal_handler_caller.
- * s390-tdep.c: Ditto.
- * m68klinux-nat.c: Ditto.
- * ns32k-tdep.c: Ditto.
- * x86-64-linux-tdep.c: Ditto.
- * vax-tdep.c: Ditto.
- * rs6000-tdep.c: Ditto.
- * ppc-linux-tdep.c: Ditto.
- * i386-interix-tdep.c: Ditto.
- * mips-tdep.c: Ditto.
- * m68k-tdep.c: Ditto.
- * hppa-tdep.c: Ditto.
- * ia64-tdep.c: Ditto.
- * cris-tdep.c: Ditto.
- * arm-tdep.c: Ditto.
- * alpha-tdep.c: Ditto.
- * i386-tdep.c: Ditto.
- * stack.c: Ditto.
- * ada-lang.c: Ditto.
- * blockframe.c: Update.
- * i386-interix-tdep.c (i386_interix_back_one_frame): Use
- deprecated_set_frame_type instead of signal_handler_caller.
- * ppc-linux-tdep.c (ppc_linux_init_extra_frame_info): Ditto.
- * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
- * breakpoint.h: Delete FIXME suggesting get_frame_type.
-
-2002-11-18 Klee Dienes <kdienes@apple.com>
-
- * Makefile.in (buildsym.o): Add dependency for gdb_assert.h.
-
-2002-11-18 Klee Dienes <kdienes@apple.com>
-
- * buildsym.c (pop_context): Add comment.
-
-2002-11-18 Klee Dienes <kdienes@apple.com>
-
- * buildsym.h (pop_context): Convert to function, defined in
- buildsym.c.
- * buildsym.c: Include gdb_assert.h.
- (pop_context): Implement as C function. Add check for stack
- underflow.
- * dbxread.c (process_one_symbol): Complain and stop processing
- that symbol if we are already at the top of the context stack for
- a function-end N_FUN (this would imply an umatched RBRAC). Ditto
- when processing N_RBRAC.
-
-2002-11-16 Daniel Jacobowitz <drow@mvista.com>
-
- * config/pa/nm-hppah.h (CHILD_POST_FOLLOW_INFERIOR_BY_CLONE): Don't
- define.
- (struct target_waitstatus): Add opaque definition.
- * corelow.c (init_core_ops): Don't set to_clone_and_follow_inferior.
- * exec.c (init_exec_ops): Likewise.
- * fork-child.c (clone_and_follow_inferior): Remove.
- * hppah-nat.c (child_post_follow_inferior_by_clone): Remove.
- * inferior.h (clone_and_follow_inferior): Remove prototype.
- * infrun.c (follow_fork_mode_both): Remove.
- (follow_fork_mode_kind_names): Remove commented out "both".
- (follow_inferior_fork): Remove follow_fork_mode_both support.
- * inftarg.c (child_clone_and_follow_inferior): Remove.
- (child_post_follow_inferior_by_clone): Remove.
- (init_child_ops): Don't set to_clone_and_follow_inferior
- or to_post_follow_inferior_by_clone.
- * target.c (default_clone_and_follow_inferior): Remove.
- (cleanup_target): Don't set to_clone_and_follow_inferior
- or to_post_follow_inferior_by_clone.
- (find_default_clone_and_follow_inferior): Remove.
- (init_dummy_target): Don't set to_clone_and_follow_inferior.
- (debug_to_clone_and_follow_inferior): Remove.
- (debug_to_post_follow_inferior_by_clone): Remove.
- (setup_target_debug): Don't set to_clone_and_follow_inferior
- or to_post_follow_inferior_by_clone.
- * target.h (struct target_ops): Remove to_clone_and_follow_inferior
- and to_post_follow_inferior_by_clone.
- (child_clone_and_follow_inferior): Remove prototype.
- (child_post_follow_inferior_by_clone): Remove prototype.
- (target_clone_and_follow_inferior): Remove macro.
- (target_post_follow_inferior_by_clone): Remove macro.
- (find_default_clone_and_follow_inferior): Remove prototype.
-
-2002-11-16 Daniel Jacobowitz <drow@mvista.com>
-
- * breakpoint.c (bpstat_stop_status): Call inferior_has_forked,
- inferior_has_vforked, and inferior_has_execd instead of
- target_has_forked, target_has_vforked, and target_has_execd.
- * config/pa/nm-hppah.h (CHILD_HAS_FORKED, CHILD_HAS_VFORKED)
- (CHILD_HAS_EXECD, CHILD_HAS_SYSCALL_EVENT): Don't define.
- (CHILD_WAIT): Define.
- (child_wait): Add prototype.
- * hppah-nat.c (hpux_has_forked): Rename from child_has_forked.
- Add prototype.
- (hpux_has_vforked): Likewise, from child_has_vforked.
- (hpux_has_execd): Likewise, from child_has_execd.
- (hpux_has_syscall_event): Likewise, from child_has_syscall_event.
- (not_same_real_pid, child_wait): New, copied from inftarg.c.
- Call hpux_has_forked, hpux_has_vforked, hpux_has_execd,
- and hpux_has_syscall_event instead of the target hooks.
- * infrun.c (inferior_has_forked, inferior_has_vforked)
- (inferior_has_execd): New functions.
- * inftarg.c (not_same_real_pid): Remove.
- (child_wait): Remove references to not_same_real_pid,
- target_has_forked, target_has_vforked, target_has_execd,
- and target_has_syscall_event.
- (child_has_forked, child_has_vforked, child_has_execd)
- (child_has_syscall_event): Remove.
- (init_child_ops): Remove references to child_has_forked,
- child_has_vforked, child_has_execd, and child_has_syscall_event.
- * infttrace.c (hpux_has_forked): Rename from child_has_forked.
- (hpux_has_vforked): Likewise, from child_has_vforked.
- (hpux_has_execd): Likewise, from child_has_execd.
- (hpux_has_syscall_event): Likewise, from child_has_syscall_event.
- * target.c (cleanup_target): Remove references to
- to_has_forked, to_has_vforked, to_has_execd, and
- to_has_syscall_event.
- (update_current_target): Likewise.
- (setup_target_debug): Likewise.
- (debug_to_has_forked): Remove.
- (debug_to_has_vforked): Remove.
- (debug_to_has_execd): Remove.
- (debug_to_has_syscall_event): Remove.
- * target.h (struct target_ops): Remove to_has_forked.
- to_has_vforked, to_has_execd, and to_has_syscall_event.
- (child_has_forked, child_has_vforked, child_has_execd)
- (child_has_syscall_event): Remove prototypes.
- (inferior_has_forked, inferior_has_vforked, inferior_has_execd): Add
- prototypes.
- (target_has_forked, target_has_vforked, target_has_execd)
- (target_has_syscall_event): Remove macros.
-
-2002-11-16 Daniel Jacobowitz <drow@mvista.com>
-
- * hppah-nat.c (child_can_follow_vfork_prior_to_exec): Remove.
- * inftarg.c (child_can_follow_vfork_prior_to_exec): Remove.
- (init_child_ops): Don't initialize to_can_follow_vfork_prior_to_exec.
- * infttrace.c (child_can_follow_vfork_prior_to_exec): Remove.
- * target.c (cleanup_target): Remove reference to
- to_can_follow_vfork_prior_to_exec.
- (update_current_target): Likewise.
- (debug_to_can_follow_vfork_prior_to_exec): Remove.
- (setup_target_debug): Remove reference to
- to_can_follow_vfork_prior_to_exec.
- * target.h (struct target_ops): Remove
- to_can_follow_vfork_prior_to_exec.
- (child_can_follow_vfork_prior_to_exec): Remove prototype.
- (target_can_follow_vfork_prior_to_exec): Remove definition.
- * config/pa/nm-hppah.h (CHILD_CAN_FOLLOW_VFORK_PRIOR_TO_EXEC): Don't
- define.
- * infrun.c (follow_vfork_when_exec): Remove.
- (follow_inferior_fork): Remove references to follow_vfork_when_exec.
- (follow_exec): Likewise.
- (handle_inferior_event): Likewise.
- (keep_going): Likewise.
-
-2002-11-15 Andrew Cagney <cagney@redhat.com>
-
- * frame.c (generic_unwind_get_saved_register): Make static.
- * frame.h (generic_unwind_get_saved_register): Delete declaration.
- * avr-tdep.c (avr_gdbarch_init): Do not set get_saved_register,
- defaults to generic_unwind_get_saved_register.
- * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
- * h8300-tdep.c (h8300_gdbarch_init): Ditto.
- * frv-tdep.c (frv_gdbarch_init): Ditto.
- * i386-tdep.c (i386_gdbarch_init): Ditto.
- * s390-tdep.c (s390_gdbarch_init): Ditto.
- * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
- * v850-tdep.c (v850_gdbarch_init): Ditto.
- * mcore-tdep.c (mcore_gdbarch_init): Ditto.
- * d10v-tdep.c (d10v_gdbarch_init): Ditto.
- * config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Delete macro.
-
-2002-11-15 Andrew Cagney <cagney@redhat.com>
-
- * x86-64-linux-nat.c (i386_sse_regnum_p): New function. Copy from
- i386-tdep.c.
-
-2002-11-15 Andrew Cagney <cagney@redhat.com>
-
- * frame.h (sigtramp_saved_pc): Delete declaration.
- * blockframe.c (sigtramp_saved_pc): Delete function.
- * ns32k-tdep.c (ns32k_sigtramp_saved_pc): New function.
- (ns32k_frame_saved_pc): Call ns32k_sigtramp_saved_pc.
- * vax-tdep.c (vax_sigtramp_saved_pc): New function.
- (vax_frame_saved_pc): Call vax_sigtramp_saved_pc.
-
-2002-11-15 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (frame_pc_unwind): New function.
- (frame_saved_regs_pc_unwind): New function.
- (frame_register_unwind): Pass unwind_cache instead of
- register_unwind_cache.
- (set_unwind_by_pc): Add unwind_pc parameter, set.
- (create_new_frame): Pass frame->pc_unwind to set_unwind_by_pc.
- (get_prev_frame): Ditto.
- * frame.h (frame_pc_unwind_ftype): Declare.
- (struct frame_info): Add pc_unwind, pc_unwind_cache_p and
- pc_unwind_cache. Rename register_unwind_cache to unwind_cache.
- (frame_pc_unwind): Declare.
- * dummy-frame.c (dummy_frame_pc_unwind): New function.
- (struct dummy_frame): Add comment mentioning that values are for
- previous frame.
- * dummy-frame.h (dummy_frame_pc_unwind): Declare.
- * blockframe.c (file_frame_chain_valid): Use frame_pc_unwind.
- (generic_file_frame_chain_valid): Ditto.
- * stack.c (frame_info): Ditto.
-
-2002-11-15 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (locate_first_half): New function.
- (decode_line_1): Move code into locate_first_half.
-
-2002-11-15 Andrew Cagney <ac131313@redhat.com>
-
- * complaints.h: Add comment explaining how to eliminate a
- deprecated_complain call.
- * complaints.h: Fix spelling errors.
-
-2002-11-15 David Carlton <carlton@math.stanford.edu>
-
- * printcmd.c: Remove #include "disasm.h".
-
-2002-12-20 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_minsyms): Don't call
- lookup_symbol_aux from within this.
- * values.c (value_static_field): lookup_symbol_linkage.
- (value_fn_field): lookup_symbol_linkage.
- * valops.c (value_struct_elt_for_reference): lookup_symbol_linkage.
- * blockframe.c (inside_main_func): lookup_symbol_linkage.
- * source.c (select_source_symtab): lookup_symbol_linkage.
- * nlmread.c (nlm_symfile_read): Call lookup_symbol_linkage.
- * nindy-tdep.c (nindy_frame_chain_valid): Call
- lookup_symbol_linkage.
- * linespec.c (count_methods): Call lookup_symbol_linkage.
- (add_matching_methods): Ditto.
- (add_constructors): Ditto.
- * hppa-tdep.c (find_stub_with_shl_get): Call
- lookup_symbol_linkage. Delete symbol2.
- (initialize_hp_cxx_exception_support): Call lookup_symbol_linkage.
- * cli/cli-cmds.c (edit_command): SYMBOL_PRINT_NAME.
- (list_command): SYMBOL_PRINT_NAME.
- * valops.c (value_of_variable): SYMBOL_PRINT_NAME
- (hand_function_call): SYMBOL_PRINT_NAME.
- * typeprint.c (typedef_print): SYMBOL_PRINT_NAME.
- * tracepoint.c (tracepoints_info): SYMBOL_PRINT_NAME.
- * symtab.c (lookup_partial_symbol): SYMBOL_BEST_NAME.
- (compare_search_syms): SYMBOL_BEST_NAME.
- (print_symbol_info): SYMBOL_PRINT_NAME.
- (print_msymbol_info): SYMBOL_PRINT_NAME.
- (rbreak_command): SYMBOL_PRINT_NAME.
- * symmisc.c (print_symbol): SYMBOL_PRINT_NAME.
- * stack.c (print_frame): SYMBOL_PRINT_NAME.
- (frame_info): SYMBOL_PRINT_NAME.
- (print_block_frame_locals): SYMBOL_PRINT_NAME.
- (print_block_frame_labels): SYMBOL_PRINT_NAME.
- (print_frame_arg_vars): SYMBOL_PRINT_NAME.
- (return_command): SYMBOL_PRINT_NAME.
- * stabsread.c (define_symbol): SYMBOL_PRINT_NAME.
- * p-valprint.c (pascal_val_print): SYMBOL_PRINT_NAME.
- * printcmd.c (build_address_symbolic): SYMBOL_PRINT_NAME.
- (sym_info): SYMBOL_PRINT_NAME.
- (print_frame_args): SYMBOL_PRINT_NAME.
- * objc-lang.c (compare_selectors): SYMBOL_BEST_NAME.
- (compare_classes): SYMBOL_BEST_NAME.
- * maint.c (maintenance_translate_address): SYMBOL_PRINT_NAME.
- * linespec.c (find_method): SYMBOL_PRINT_NAME.
- (select_symbols): SYMBOL_PRINT_NAME.
- * infcmd.c (jump_command): SYMBOL_PRINT_NAME.
- * findvar.c (locate_var_value): SYMBOL_PRINT_NAME.
- * expprint.c (print_subexp): SYMBOL_PRINT_NAME.
- * c-valprint.c (c_val_print): SYMBOL_PRINT_NAME.
- * buildsym.c (finish_block): SYMBOL_PRINT_NAME.
- * breakpoint.c (print_one_breakpoint): SYMBOL_PRINT_NAME.
- * ax-gdb.c (gen_var_ref): SYMBOL_PRINT_NAME.
- * ada-typeprint.c (ada_typedef_print): SYMBOL_PRINT_NAME.
- * ada-lang.c (user_select_syms): Use SYMBOL_PRINT_NAME instead of
- SYMBOL_SOURCE_NAME.
- (user_select_syms):
- (ada_finish_decode_line_1): Use SYMBOL_BEST_NAME instead of
- SYMBOL_SOURCE_NAME.
- * symtab.h (SYMBOL_PRINT_NAME): Rename from SYMBOL_SOURCE_NAME.
- * symfile.c (compare_symbols): Use SYMBOL_BEST_NAME, not
- SYMBOL_SOURCE_NAME.
- (compare_psymbols): Ditto.
- * symtab.c (lookup_symbol_linkage): New function.
- * symtab.h: Declare lookup_symbol_linkage.
- * c-valprint.c (c_val_print): Call lookup_symbol_minsym.
- * symtab.c (lookup_symbol_aux_minsyms): Call minsym_static.
- * minsyms.c (minsym_static): New function.
- * symtab.h: Declare minsym_static.
- * symtab.c (lookup_symbol_minsym): New function.
- (search_symbols): Call lookup_symbol_minsym instead of
- lookup_symbol.
- (lookup_symbol_namespace): Don't take apart NAME.
- * symtab.h: Declare lookup_symbol_minsym.
- * printcmd.c (build_address_symbolic): Don't use old version of
- SYMBOL_LINKAGE_NAME.
- * symtab.c (lookup_block_symbol): Change mangled names to linkage
- name, and use SYMBOL_LINKAGE_NAME as appropriate.
- * symtab.h (SYMBOL_LINKAGE_NAME): New macro, with a different
- meaning from the old macro of the same name. Also, add comments
- about proper uses of names.
-
-2002-12-18 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_file): Call
- cp_lookup_possible_namespace_symbol.
- * dwarf2read.c (add_partial_symbol): Sometimes check for possible
- namespace symbols.
- * cp-support.c (maintenance_print_namespace): Handle
- possible_namespace_block, too.
- (cp_lookup_possible_namespace_symbol): New function.
- * cp-support.h: Declare cp_check_possible_namespace_symbols,
- cp_lookup_possible_namespace_symbol.
- * cp-support.c (check_one_possible_namespace_symbol): New
- function.
- (cp_check_possible_namespace_symbols): New function.
- (check_possible_namespace_symbols_loop): New function.
- * symfile.h: Update declaration for add_psymbol_to_list.
- * symfile.c (psymbol_init_demangled_name): New function.
- (add_psymbol_to_list): Change SYMBOL_INIT_LANGUAGE_SPECIFIC to
- psymbol_init_demangled_name.
- (add_psymbol_to_list): Return a const struct psymbol *.
- * Makefile.in (dwarf2read.o): Don't depend on bcache_h.
- * dwarf2read.c: Don't #include "bcache.h"
- * cp-support.c (get_namespace_block): Allocate blocks via
- allocate_block.
- (initialize_namespace_blocks): New function.
- New variable possible_namespace_block.
- (get_namespace_block): Call initialize_namespace_blocks.
- (free_namespace_blocks): Rename from free_namespace_block; handle
- possible_namespace_block, too.
- (get_possible_namespace_block): New function.
- * jv-lang.c (get_java_class_symtab): Ditto.
- * block.c (allocate_block): New function.
- * block.h: Declare allocate_block.
-
-2002-12-17 David Carlton <carlton@math.stanford.edu>
-
- * c-exp.y (yylex): Modify the #if 1 block to handle nested types
- in a more honest manner.
- * symtab.c (lookup_nested_type): New function.
- * symtab.h: Declare lookup_nested_type.
-
-2002-12-16 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_partial_symbol): Don't search past the end of
- the partial symbols.
- * Makefile.in (f-exp.tab.c): Don't depend on c-exp.tab.c.
- * dwarf2read.c (new_symbol): Only make global symbols associated
- to structures, etc. if the current language is C++.
- (add_partial_symbol): Ditto (for partial symbols).
-
-2002-11-29 David Carlton <carlton@bactrian.org>
-
- * dwarf2read.c (add_partial_symbol): Add partial symbols
- corresponding to classes, etc. to global list.
- (new_symbol): Ditto, mutatis mutandem.
-
-2002-11-27 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (add_partial_enumeration): New function.
- (scan_partial_symbols): Call add_partial_enumeration.
- (locate_pdi_sibling): New function.
- (scan_partial_symbols): Call locate_pdi_sibling. Get rid of
- nesting_level.
- (pdi_needs_namespace): New function.
- (add_partial_symbol): Add 'namespace' arg; calculate full name
- when appropriate.
- (scan_partial_symbols): Update calls to add_partial_symbol.
- (add_partial_enumeration): Ditto.
- (read_enumeration): Add processing_current_prefix to name when
- appropriate.
- (new_symbol): Set names of enumerators and typedefs appropriately
- if processing_has_namespace_info.
- * symtab.c (lookup_symbol_namespace): Rename 'namespace' argument
- to 'namespace_name'.
- * symtab.h: Ditto.
- * symtab.c (lookup_symbol_namespace): Delete FIXME comments; add a
- new one.
- (lookup_symbol_aux_file): New function.
- (lookup_symbol_aux): Delete FIXME comment.
- (lookup_symbol_aux): Don't search static block explicitly; delete
- FIXME comments.
- * valops.c (value_namespace_elt): Update call to
- lookup_symbol_namespace.
- * symtab.h: Update declaration for lookup_symbol_namespace.
- * symtab.c (lookup_symbol_namespace): Delete 'using' argument and
- add 'block' argument; get using directives via iterators.
- (lookup_symbol_aux_using_loop): Delete 'using' argument and add
- 'block' argument.
- (lookup_symbol_aux_using): Don't calculate using directives.
- * block.c (block_using_iterator_first): New function.
- (block_using_iterator_next): Ditto.
- * block.h: Add comment.
- (struct block_using_iterator): New struct.
- Declare block_using_iterator_first, block_using_iterator_next.
-
-2002-11-26 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (read_structure_scope): Set type name and
- processing_current_prefix appropriately.
- (new_symbol): Make sure that, in symbols associated to class
- types, the name includes appropriate namespaces.
- * buildsym.h: Rename processing_current_namespace to
- processing_current_prefix.
- * buildsym.c (finish_block): Ditto.
- * dwarf2read.c (psymtab_to_symtab_1): Ditto.
- (read_namespace): Ditto. Also rename previous_namespace to
- previous_prefix.
-
- Now come a thousand and one const correctness fixes:
- * p-typeprint.c (pascal_print_type): Const.
- (pascal_type_print_method_args): Const.
- * p-lang.h: Const.
- * m2-typeprint.c (m2_print_type): Const.
- * valops.c (hand_function_call): Const.
- * jv-lang.c (java_primitive_type_from_name): Const.
- * jv-lang.h: Const.
- * jv-typeprint.c (java_print_type): Const.
- * language.c: (unk_lang_print_type): Const.
- * stack.c (frame_info): Const.
- * linespec.c (find_methods): Const.
- (find_method_name): Const
- * f-lang.h: Const.
- * f-typeprint.c (f_print_type): Const.
- * c-typeprint.c (c_print_type): Const.
- * c-lang.h: Const.
- * gdbtypes.h: Const.
- * gdbtypes.c (lookup_primitive_typename): Const.
- * stack.c (print_frame): Const.
- (func_command): Delete pointless cast.
- * linespec.c (find_method_name): Const.
- * language.h: Const.
- * symfile.c (compare_psymbols): Const.
- * symtab.c (completion_list_add_name): Const.
- * breakpoint.c (break_at_finish_at_depth_command_1): Remove
- useless cast.
- (break_at_finish_command_1): Ditto.
- * typeprint.c (type_print): Const.
- * symtab.h: Const.
- * symtab.c (gdb_mangle_name): Const.
- (symbol_init_demangled_name): Const.
- (symbol_demangled_name): Const.
- * defs.h: Const.
- * printcmd.c (build_address_symbolic): Const.
- * valops.c (search_struct_method): Const.
- * cp-valprint.c (cp_is_vtbl_ptr_type): Const.
- (cp_print_value): Const.
- (cp_print_class_member): Const.
- * c-typeprint.c (cp_type_print_derivation_info): Const.
- (c_type_print_varspec_prefix): Const.
- (c_type_print_base): Const.
- * p-valprint.c (pascal_object_is_vtbl_ptr_type): Const.
- (pascal_object_print_value): Const.
- (pascal_object_print_class_member): Const.
- * p-typeprint.c (pascal_type_print_derivation_info): Const.
- (pascal_type_print_varspec_prefix): Const.
- (pascal_type_print_base): Const.
- * jv-typeprint.c (java_type_print_base): Const.
- * jv-lang.h (java_demangle_type_signature): Const.
- * jv-lang.c (java_demangle_type_signature): Const.
- (java_demangled_signature_length): Const.
- (java_demangled_signature_copy): Const.
- * jv-typeprint.c (java_type_print_derivation_info): Const.
- * jv-valprint.c (java_value_print): Const.
- (java_print_value_fields): Const.
- * jv-lang.c (is_object_type): Const.
- (evaluate_subexp_java): Const.
- * stabsread.c (read_cpp_abbrev): Const.
- (complain_about_struct_wipeout): Const.
- (cleanup_undefined_types): Const.
- * gdbtypes.h: Const.
- * gdbtypes.c (add_name): Second arg const.
- (lookup_typename): Const.
- (lookup_unsigned_typename): Const.
- (lookup_signed_typename): Const.
- * linespec.c (find_methods): const char *class_name.
- * symtab.c (gdb_mangle_name): const char *newname.
- * valops.c (destructor_name_p): const char *dname.
- (search_struct_field): First arg const.
- * gdbtypes.c (check_typedef): const char *name (multiple places).
- (cfront_mangle_name): const char *newname.
- * gdbtypes.c (add_mangled_type): const char *tname.
- * valops.c (find_overload_match): const char *obj_type_name.
- * utils.c (gdb_print_host_address): Make first arg const.
- * defs.h: Declare first arg of gdb_print_host_address to be
- const.
- * valarith.c (find_size_for_pointer_math): const char *name.
-
-2002-11-24 David Carlton <carlton@bactrian.org>
-
- * Makefile.in (c-typeprint.o): Depend on gdb_assert_h.
- * c-typeprint.c: #include "gdb_assert.h"
- * gdbtypes.c (recursive_dump_type): Handle TYPE_CODE_NAMESPACE.
- * c-typeprint.c (c_type_print_varspec_prefix): Ditto.
- (c_type_print_varspec_suffix): Ditto.
- (c_type_print_base): Ditto.
- * typeprint.c (print_type_scalar): Ditto.
- * printcmd.c (print_formatted): Ditto.
- * language.c (structured_type): Ditto.
- * cp-support.c (cp_check_namespace_symbol): Allocate type via
- init_type.
- * gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE.
- * valops.c (value_namespace_elt): Handle sym == NULL.
-
-2002-11-22 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (examine_compound_token): Rewrite as switch
- statement, and add FIXME comment.
- * frame.h: Make arg of block_innermost_frame const.
- * blockframe.c (block_innermost_frame): Make arg const.
- * block.h: Make args to block_function, contained_in const.
- * block.c (block_function): Make arg const.
- (contained_in): Ditto.
- * value.h: Make arg of symbol_read_needs_frame const.
- * findvar.c (symbol_read_needs_frame): Make arg const.
- * symtab.h: Make first arg of symbol_demangled_name const.
- * symtab.c (symbol_demangled_name): Make arg const.
- * value.h: Make first arg of read_var_value const.
- * findvar.c (read_var_value): Make first arg const.
- * Makefile.in (valops.o): Depend on cp_support_h.
- * valops.c: #include "cp-support.h"
- * symtab.h: Add FIXME about name of namespace_enum.
- Add opaque declaration of struct using_direct_node.
- * symtab.c (lookup_symbol_namespace): Make extern; rename args.
- * symtab.h: Declare lookup_symbol_namespace.
- * valops.c (value_struct_elt_for_reference): Make 'name' a const
- char *.
- (value_namespace_elt): New function.
- * expprint.c (print_subexp): Ditto.
- (dump_subexp): Ditto.
- * parse.c (length_of_subexp): Ditto.
- (prefixify_subexp): Ditto.
- * expression.h: Update comment to reflect the block in OP_SCOPE.
- * c-exp.y: Set block in OP_SCOPE expression.
- * jv-exp.y (push_qualified_expression_name): Put a NULL block in
- OP_SCOPE expression.
- * objc-exp.y: Ditto.
- * p-exp.y: Ditto.
- * eval.c (evaluate_subexp_standard): Handle OP_SCOPE via
- value_aggregate_elt.
- * value.h: Add declaration for value_aggregate_elt; delete
- declaration for value_struct_elt_for_reference.
- * valops.c (value_aggregate_elt): New function.
- (value_struct_elt_for_reference): Make static. Don't check type
- of curtype.
- * c-exp.y: Accept TYPE_CODE_NAMESPACE in qualified_name.
- * cp-support.c (cp_check_namespace_symbol): Set TYPE_NAME (type).
-
-2002-11-21 David Carlton <carlton@math.stanford.edu>
-
- * cp-support.c (get_namespace_objfile): Set
- namespace_objfile->name.
- * dwarf2read.c (scan_partial_symbols): Allow empty pdi.name if
- we're reading a namespace.
- * Makefile.in (dwarf2read.o): Depend on cp_support_h.
- * dwarf2read.c (scan_partial_symbols): Add 'namespace' arg.
- (dwarf2_build_psymtabs_hard): Update call to
- scan_partial_symbols.
- (add_partial_namespace): New function.
- (scan_partial_symbols): Call add_partial_namespace.
- #include "cp-support.h"
- * cp-support.c: Add me to contributors.
- * cp-support.h: Ditto.
- * buildsym.c (scan_for_anonymous_namespaces): Convert for loop
- into a clearer while loop.
- (finish_block): Ditto.
-
-2002-11-20 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (scan_partial_symbols): Move lowpc, highpc initial
- and final setting to dwarf2_build_psymtabs_hard.
- (dwarf2_build_psymtabs_hard): Set lowpc, highpc outside of
- scan_partial_symbols.
- (scan_partial_symbols): Handle namespaces by calling ourself
- recursively.
- * Makefile.in (cp-support.o): Depend on gdbcmd_h.
- * cp-support.c (_initialize_cp_support): New function.
- (maintenance_print_namespace): New function.
- #include "gdbcmd.h"
- * cp-support.h: Add opaque declaration for 'struct symbol'.
- * symfile.h: Add comment saying that you must first include
- symtab.h.
- * Makefile.in (cp-support.o): Depend on dictionary_h.
- * cp-support.c: #include "dictionary.h"
- * gdbtypes.h: Add TYPE_CODE_NAMESPACE to enum type_code.
- * cp-support.h: Add declaration for cp_check_namespace_symbol.
- * Makefile.in (cp-support.o): Depend on gdbtypes_h.
- * cp-support.c: New variable namespace_objfile.
- (get_namespace_objfile): New function.
- (cp_check_namespace_symbol): New function.
- #include "gdbtypes.h"
- * Makefile.in (cp-support.o): Depend on symfile_h, symtab_h,
- block_h, objfiles_h.
- * cp-support.c: Add declaration for find_last_component.
- #include "symfile.h", "symtab.h", "block.h", "objfiles.h".
- New variable namespace_block.
- (get_namespace_block): New function.
- (free_namespace_block): New function.
-
-2002-11-19 David Carlton <carlton@math.stanford.edu>
-
- * block.c: Whitespace cleanup.
- * buildsym.c (finish_block): Delete #if'd out code.
- * symtab.c (lookup_symbol_namespace): Add comment.
- * dwarf2read.c (scan_partial_symbols): Fix typo.
-
-2002-11-15 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux): Get at static block via
- block_static_block.
- (lookup_symbol_aux_local): Delete static_block argument, and use
- block_static_block.
- * block.h: Declare block_static_block.
- * block.c (block_static_block): New function.
- * linespec.c (decode_all_digits): Move up definition of
- need_canonical.
-
- * Merge from mainline; tag is carlton_dictionary-20021115-merge.
-
-2002-11-14 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h: Move the most relevant interface functions to the start
- of the file.
-
-2002-11-14 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.h (deprecated_registers): Rename registers.
- * a68v-nat.c, alpha-nat.c, arch-utils.c, core-sol2.c: Update.
- * hp300ux-nat.c, hppab-nat.c, hppah-nat.c: Update.
- * hppam3-nat.c, hpux-thread.c, i386gnu-nat.c: Update.
- * ia64-aix-nat.c, ia64-linux-nat.c, ia64-tdep.c: Update.
- * irix4-nat.c, irix5-nat.c, lynx-nat.c, m68k-tdep.c: Update.
- * m68knbsd-nat.c, mips-linux-tdep.c, mipsm3-nat.c: Update.
- * mipsv4-nat.c, ns32knbsd-nat.c, ppc-bdm.c: Update.
- * ppc-sysv-tdep.c, ptx4-nat.c, regcache.c, remote-es.c: Update.
- * remote-sds.c, remote-vx68.c, remote-vxmips.c: Update.
- * remote-vxsparc.c, rs6000-tdep.c, sol-thread.c: Update.
- * sparc-nat.c, sparc-tdep.c, sun3-nat.c, symm-nat.c: Update.
- * v850ice.c: Update.
-
-Wed Nov 13 19:51:05 2002 Andrew Cagney <cagney@redhat.com>
-
- * utils.c (gdb_realpath): Add comment mentioning realpath with a
- NULL buffer.
-
-2002-11-13 Andrew Cagney <cagney@redhat.com>
-
- * regcache.h (deprecated_read_register_bytes): Rename
- read_register_bytes.
- (deprecated_write_register_bytes): Rename write_register_bytes.
- * alpha-tdep.c, arm-tdep.c, cris-tdep.c, d10v-tdep.c: Update.
- * dwarf2cfi.c, frv-tdep.c, hppa-tdep.c, ia64-tdep.c: Update.
- * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Update.
- * ns32k-tdep.c, regcache.c, remote-sds.c, remote-vx.c: Update.
- * remote.c, rs6000-tdep.c, s390-tdep.c, sh-tdep.c: Update.
- * sparc-tdep.c, v850-tdep.c, vax-tdep.c, x86-64-tdep.c: Update.
- * xstormy16-tdep.c, z8k-tdep.c, config/nm-gnu.h: Update.
- * config/nm-m3.h, config/h8500/tm-h8500.h: Update.
- * config/i386/nm-ptx4.h, config/i386/nm-symmetry.h: Update.
- * config/m32r/tm-m32r.h, config/m68k/nm-sun3.h: Update.
- * config/m68k/tm-delta68.h, config/m68k/tm-linux.h: Update.
- * config/mn10200/tm-mn10200.h, config/pa/tm-hppa64.h: Update.
- * config/sparc/nm-nbsd.h, config/sparc/nm-sun4os4.h: Update.
- * config/sparc/nm-sun4sol2.h, config/sparc/tm-sparclet.h: Update.
-
-2002-11-13 Jim Blandy <jimb@redhat.com>
-
- * findvar.c (read_var_value): Doc fix.
-
-2002-11-13 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (struct regcache): Replace passthough_p with
- readonly_p.
- (regcache_xmalloc): Initialize readonly_p.
- (build_regcache): Initialize readonly_p.
- (regcache_save): New function.
- (regcache_restore): New function.
- (regcache_cpy): Re-implement using regcache_save and
- regcache_restore.
- (regcache_raw_read): Update.
- (regcache_cooked_read): When a read-only cache, checked for cached
- pseudo register values.
- (regcache_raw_write): Assert that the cache is not read-only.
- Remove code handling a non-passthrough cache.
- * regcache.h (regcache_save): Declare.
- (regcache_restore): Declare.
-
-2002-11-13 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (struct regcache_descr): Add fields
- sizeof_cooked_registers and sizeof_cooked_register_valid_p.
- (init_legacy_regcache_descr): Compute the size of a cooked
- register cache and then assign that to sizeof_raw_registers. Set
- sizeof_raw_register_valid_p to sizeof_cooked_register_valid_p
- (init_legacy_regcache_descr): Ditto.
-
-2002-11-13 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (register_buffer): Move to near start of file, update
- description.
- (regcache_raw_read): Use.
- (regcache_raw_write): Use.
- (struct regcache): Rename raw_registers to registers and
- raw_register_valid_p to register_valid_p.
- (regcache_xmalloc): Update.
- (regcache_xfree): Update.
- (register_buffer): Update.
- (regcache_cpy): Update.
- (regcache_cpy_no_passthrough): Update.
- (regcache_valid_p): Update.
- (deprecated_grub_regcache_for_registers): Update.
- (deprecated_grub_regcache_for_register_valid): Update.
- (set_register_cached): Update.
- (regcache_raw_write): Update.
-
-2002-11-13 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-exp.y (name_not_typename): Use copy_name to
- set current_type variable for fields of THIS.
-
-2002-11-12 Daniel Jacobowitz <drow@mvista.com>
-
- * gnu-nat.c (init_gnu_ops): Remove NULL initializations.
- * monitor.c (init_base_monitor_ops): Likewise.
- * ppc-bdm.c (init_bdm_ppc_ops): Likewise.
- * remote-array.c (init_array_ops): Likewise.
- * remote-e7000.c (init_e7000_ops): Likewise.
- * remote-es.c (init_es1800_ops): Likewise.
- (init_es1800_child_ops): Likewise.
- * remote-rdp.c (init_remote_rdp_ops): Likewise.
- * remote-sim.c (init_gdbsim_ops): Likewise.
- * remote-st.c (init_st2000_ops): Likewise.
- * sol-thread.c (init_sol_core_ops): Likewise.
- (init_sol_thread_ops): Likewise.
- * v850ice.c (init_850ice_ops): Likewise.
- * win32-nat.c (init_child_ops): Likewise.
- * wince.c (init_child_ops): Likewise.
-
-2002-11-12 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c (gdb_realpath): Make rp a constant pointer.
-
-2002-11-12 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c (gdb_realpath): Rewrite. Try, in order: realpath() with
- a constant buffer; cannonicalize_file_name(); realpath() with a
- pathconf() defined buffer, xstrdup().
-
-2002-11-12 Andrew Cagney <ac131313@redhat.com>
-
- * config/djgpp/fnchange.lst: Fix typo, hang1.c to hang1.C; hang2.c
- to hang2.C; hang3.c to hang3.C.
-
-2002-11-11 Elena Zannoni <ezannoni@redhat.com>
-
- * findvar.c (read_var_value): Reenable TLS code.
-
-2002-11-11 Elena Zannoni <ezannoni@redhat.com>
- Jim Blandy <jimb@redhat.com>
-
- * gdb_thread_db.h (enum): Add TD_NOTALLOC.
- * target.c (update_current_target): Add
- to_get_thread_local_address.
- * target.h (to_get_thread_local_address): Export.
- (target_get_thread_local_address): Define.
- (target_get_thread_local_address_p): Define.
- * thread-db.c: Include solib-svr4.h.
- (td_thr_tls_get_addr_p): Define.
- (thread_db_load): Get a pointer to td_thr_tls_get_addr.
- (thread_db_get_thread_local_address): New function.
- (init_thread_db_ops): Initialize to_get_thread_local_address.
- * configure.in: Add test for TD_NOTALLOC in thread_db.h.
- * configure: Regenerate.
- * config.in: Regenerate.
-
-2002-11-11 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (set_flags): New function.
- (decode_line_1): Move code into set_flags.
-
-2002-11-11 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (decode_line_1): Move chunks of code to separate
- functions.
- (initialize_defaults): New function.
- (decode_indirect): New function.
-
-2002-11-11 Andrew Cagney <ac131313@redhat.com>
-
- * blockframe.c (sigtramp_saved_pc): Fix tipo. void_func_ptr
- instead of void_code_ptr.
- (sigtramp_saved_pc): Ditto.
-
- * x86-64-tdep.c (i386_fp_regnum_p): Copy i386-tdep.c's
- i386_fp_regnum_p.
-
-2002-11-10 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.h (struct main_type): Move artificial flag out of
- loc. New member of ``struct field'' named static_kind. Reduce
- overloaded meaning of bitsize.
- (FIELD_ARTIFICIAL, SET_FIELD_PHYSNAME, SET_FIELD_PHYSADDR)
- (TYPE_FIELD_STATIC, TYPE_FIELD_STATIC_HAS_ADDR): Likewise.
- (FIELD_STATIC_KIND, TYPE_FIELD_STATIC_KIND): New macros.
-
- * ada-lang.c (fill_in_ada_prototype): Initialize static_kind for
- new fields.
- (template_to_fixed_record_type, template_to_static_fixed_type)
- (to_record_with_fixed_variant_part): Likewise.
- * coffread.c (coff_read_struct_type, coff_read_enum_type): Likewise.
- * dwarf2read.c (dwarf2_add_field, read_enumeration): Likewise.
- * dwarfread.c (struct_type, enum_type): Likewise.
- * hpread.c (hpread_read_enum_type)
- (hpread_read_function_type, hpread_read_doc_function_type)
- (hpread_read_struct_type): Likewise.
- * mdebugread.c (parse_symbol): Likewise.
-
-2002-11-10 Andrew Cagney <ac131313@redhat.com>
-
- * breakpoint.h (deprecated_frame_in_dummy): Rename frame_in_dummy.
- * stack.c (print_frame_info_base): Update.
- (print_frame_info_base, frame_info): Update.
- * sparc-tdep.c (sparc_init_extra_frame_info): Update.
- (sparc_frame_saved_pc): Update.
- * ada-lang.c (find_printable_frame): Update.
- * breakpoint.c (deprecated_frame_in_dummy): Update.
-
-2002-11-09 Mark Kettenis <kettenis@gnu.org>
-
- * i386-linux-nat.c (ORIG_EAX): Define to -1 if not already
- defined.
- (regmap): Extend to cover all registers.
- (PT_READ_U, PT_WRITE_U, PTRACE_XFER_TYPE,
- OLD_CANNOT_FETCH_REGISTERS, OLD_CANNOT_STORE_REGISTERS): Remove
- definitions.
- (fetch_register, sore_register): Simplify.
- (old_fetch_inferior_registers, old_store_inferior_registers):
- Remove functions.
- (cannot_fetch_register, cannot_store_register): Change
- implementation to use regmap array to decide which registers
- cannot be fetched/stored. This removes $orig_eax from the
- registers that cannot be fetched/stored.
- (fetch_inferior_registers): Call fetch_register directly instead
- of calling old_fetch_inferior_registers.
- (store_inferior_registers): Call store_register directly instead
- of calling old_store_inferior_registers.
- (i386_linux_dr_get): Replace PT_READ_U with PTRACE_PEEKUSER.
- (i386_linux_dr_set): Replace PT_WRITE_U with PTRACE_POKEUSER.
- * config/i386/nm-linux.h (U_REGS_OFFSET): Remove definition.
-
-2002-11-09 Klee Dienes <kdienes@apple.com>
-
- * i387-tdep.c (i387_supply_register): When called with NULL as a
- buffer, mark the register as not provided (to mirror the behavior
- of supply_register).
- (i387_supply_fxsave): Ditto.
- (i387_supply_fsave): Ditto (inherits the behavior from
- i387_supply_register).
-
-2002-11-09 Klee Dienes <kdienes@apple.com>
-
- * blockframe.c (sigtramp_saved_pc): Use
- builtin_type_void_code_ptr, not builtin_type_void_data_ptr (we are
- extracting the PC). Use TYPE_LENGTH (builtin_type_void_code_ptr)
- instead of (TARGET_PTR_BIT / TARGET_CHAR_BIT).
-
-2002-11-09 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (get_prev_frame): Test prev_p to identify a previously
- unwound frame. Initialize prev_p.
- * frame.h (struct frame_info): Add field prev_p. Expand prev/next
- comment.
-
-2002-11-09 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (get_prev_frame): Cleanups. Eliminate redundant tests
- for a NULL NEXT_FRAME. Simplify fromleaf initialization. Add
- more comments. Zap dead code.
-
-2002-11-09 Mark Kettenis <kettenis@gnu.org>
-
- * infcmd.c (print_vector_info, print_float_info): Move code that
- checks whether the target has any registers and whether there is a
- selected frame up, such that it is also used if a target provides
- multi-arch definitions of these functions.
-
-2002-11-08 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (DESTDIR): Define.
- (install-only, install-gdbtk, uninstall-gdbtk): Add $(DESTDIR)
- prefix.
-
- * config/djgpp/fnchange.lst: 8.3 proof i386obsd-nat.c and
- i386obsd-tdep.c. Rename to "gdb.cxx", paths containing "gdb.c++".
-
-2002-11-08 Andrew Cagney <ac131313@redhat.com>
-
- * i386-linux-tdep.c: Include "reggroups.h".
- (i386_linux_register_reggroup_p): New function.
- (i386_linux_init_abi): Set register_reggroup_p to
- i386_linux_register_reggroup_p.
- * i386-tdep.h (i386_register_reggroup_p): Declare.
- * i386-tdep.c: Include "reggroups.h".
- (i386_init_reggroups): New function.
- (i386_add_reggroups): New function.
- (i386_register_reggroup_p): New function.
- (i386_sse_reggroup, i386_mmx_reggroup): New variables.
- (_initialize_i386_tdep): Call i386_init_reggroups.
- (i386_gdbarch_init): Set register_reggroup_p and add in the i386
- specific reggroups.
-
-2002-11-09 Mark Kettenis <kettenis@gnu.org>
-
- * infptrace.c (child_xfer_memory): Make use of the new PT_IO
- request that's available in *BSD.
- * i386-tdep.h (IS_FPU_CTRL_REGNUM): Remove.
-
- * i387-tdep.c (i387_fill_fxsave): Use FOOFF_REGNUM instead of
- FDOFF_REGNUM.
-
-2002-11-08 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (set_unwind_by_pc): Use dummy_frame_register_unwind.
- * dummy-frame.c (find_dummy_frame): Rename
- generic_find_dummy_frame, make static. Return the dummy frame
- instead of the regcache.
- (generic_find_dummy_frame): Re-implement using find_dummy_frame,
- (cached_find_dummy_frame): New function. Use find_dummy_frame.
- (dummy_frame_register_unwind): Rename
- generic_call_dummy_register_unwind. Use cached_find_dummy_frame.
- * dummy-frame.h (dummy_frame_register_unwind): Rename
- generic_call_dummy_register_unwind.
+2003-01-24 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb/sh-tdep.c (sh_sh2e_register_name): New.
+ (sh2e_show_regs): New.
+ (sh_gdbarch_init): Handle bfd_mach_sh2e.
+ * config/sh/tm-sh.h: Added sh2e to comments.
+
+2003-01-23 Jim Blandy <jimb@redhat.com>
+
+ * symfile.c (syms_from_objfile): Don't print the "(no debugging
+ symbols found)" message here; we haven't checked for a separate
+ debug info file yet, so we don't know yet.
+ (symbol_file_add_with_addrs_or_offsets): Print it here, after
+ we've looked everywhere. Also, there's no need to print a special
+ message when we're loading the separate debug info file: the one
+ symbol_file_add prints is fine.
+
+2003-01-23 Alexander Larsson <alexl@redhat.com>
+ Jim Blandy <jimb@redhat.com>
+
+ Add support for executables whose debug info has been separated
+ out into a separate file, leaving only a link behind.
+ * objfiles.h (struct objfile): New fields: separate_debug_objfile
+ and separate_debug_objfile_backlink.
+ (put_objfile_before): New declaration.
+ * symfile.c: #include "filenames.h".
+ (symbol_file_add_with_addrs_or_offsets): If this objfile has its
+ debug info in a separate file, read that, too. Save the addrs
+ argument, so we can use it again to read the separated debug info;
+ syms_from_objfile modifies the table we pass it.
+ (reread_symbols): After re-reading an objfile, call
+ reread_separate_symbols to refresh its separate debug info
+ objfile, if it has one.
+ (reread_separate_symbols, find_separate_debug_file,
+ get_debug_link_info, separate_debug_file_exists): New functions.
+ (debug_file_directory): New global var.
+ (_initialize_symfile): Initialize debug_file_directory, and
+ provide the new `set debug-file-directory' command to let the user
+ change it.
+ * objfiles.c (free_objfile): If this objfile has its debug info in
+ a separate objfile, free that one too. If this is itself a
+ separate debug info objfile, clear our parent's backlink.
+ (put_objfile_before): New function.
+ * utils.c (gnu_debuglink_crc32): New function.
+ * defs.h (gnu_debuglink_crc32): New declaration.
+ * Makefile.in (symfile.o): Note dependency on "filenames.h".
+ * configure.in: Handle --with-separate-debug-dir config option.
+ * acinclude.m4 (AC_DEFINE_DIR): New macro.
+ * acconfig.h (DEBUGDIR): New macro.
+ * configure, aclocal.m4, config.in: Regenerated.
+
+2003-01-22 Jim Blandy <jimb@redhat.com>
+
+ * symfile.c (symbol_file_add_with_addrs_or_offsets): New function,
+ like the old symbol_file_add, but taking new arguments: you can
+ now pass in either a `struct section_addr_info' list to say where
+ each section is loaded, or a `struct section_offsets' table. Pass
+ these new arguments through to syms_from_objfile as appropriate.
+ (symbol_file_add): Just call symbol_file_add_with_addrs_or_offsets,
+ with the appropriate quiescent values for the new arguments.
+
+ * symfile.c: #include "gdb_assert.h".
+ (syms_from_objfile): Add the ability to pass in a section offset
+ table directly, as an alternative to the section_addr_info table.
+ Document arguments better.
+ (symbol_file_add): Pass extra arguments to syms_from_objfile.
+ * symfile.h (syms_from_objfile): Update declaration.
+ * rs6000-nat.c (objfile_symbol_add): Pass new arguments to
+ syms_from_objfile.
+ * Makefile.in (symfile.o): List dependency on $(gdb_assert_h).
+
+2003-01-22 Daniel Jacobowitz <drow@mvista.com>
+
+ Original patch by Tom Tromey <tromey@cygnus.com> and
+ Jason Molenda <jmolenda@apple.com>.
+ * Makefile.in (PROFILE_CFLAGS): Substitute from configure.
+ (INTERNAL_LDFLAGS): Don't include PROFILE_CFLAGS.
+ * NEWS: Mention profiling.
+ * configure.in (--enable-gdbtk): Fix typo.
+ (--enable-profiling): New. Set PROFILE_CFLAGS.
+ * maint.c (maintenance_set_profile_cmd): Remove NOTYET.
+ Fill in function.
+ (profiling_state): New variable.
+ (mcleanup_wrapper): New function.
+ (_initialize_maint): Remove NOTYET, fix call to
+ add_setshow_boolean_cmd for "maint set profile".
+ * configure: Regenerated.
-2002-11-08 Mark Kettenis <kettenis@gnu.org>
+2003-01-21 Martin M. Hunt <hunt@redhat.com>
- * config/i386/tm-i386v42mp.h: Remove file. Move its contents,
- except the inclusion of "i386/tm-i386.h", to...
- * config/i386/nm-i386v42mp.h: ...here.
- * config/i386/i386v42mp.mt (TM_FILE): Set to tm-i386.h.
+ * Makefile.in (install-gdbtk): Install PNG images too.
-2002-11-08 Andrew Cagney <ac131313@redhat.com>
+2003-01-21 Andrew Cagney <ac131313@redhat.com>
+ * exec.c (text_start): Delete global variable.
+ (exec_file_attach): Make text_start local to the function.
+ * inferior.h (BEFORE_TEXT_END, AFTER_TEXT_END): Delete macros.
+ * valops.c (hand_function_call): Delete code that handles
+ BEFORE_TEXT_END and AFTER_TEXT_END.
+ * gdbarch.sh (CALL_DUMMY_LENGTH): Test call_dummy_length instead
+ of CALL_DUMMY_LOCATION.
+ * gdbarch.c: Regenerate.
+ * inferior.h (deprecated_pc_in_call_dummy_before_text_end)
+ (deprecated_pc_in_call_dummy_after_text_end): Delete declaration.
+ * blockframe.c (deprecated_pc_in_call_dummy_before_text_end)
+ (deprecated_pc_in_call_dummy_after_text_end): Delete functions.
+ (text_end): Delete extern declaration.
+
+2003-01-21 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (FRAME_OBSTACK_ZALLOC): Define.
+ * blockframe.c (backtrace_below_main): Move to "frame.c".
+ (frame_chain_valid): Delete check for backtrace_below_main.
+ (_initialize_blockframe): Delete initialization, move ``set
+ backtrace-below-main'' command to "frame.c".
+ (do_flush_frames_sfunc): Delete function.
+ * frame.c: Include "command.h" and "gdbcmd.h".
+ (frame_type_from_pc): New function.
+ (create_new_frame): Use frame_type_from_pc.
+ (legacy_get_prev_frame): New function.
+ (get_prev_frame): Rewrite. When an old style frame, call
+ legacy_get_prev_frame. Otherwize, unwind the PC first.
+ (_initialize_frame): Add ``set backtrace-below-main'' command.
* Makefile.in (frame.o): Update dependencies.
- * blockframe.c (current_frame, frame_obstack_alloc)
- (frame_saved_regs_zalloc, get_current_frame)
- (set_current_frame, create_new_frame)
- (set_unwind_by_pc, get_next_frame)
- (flush_cached_frames, reinit_frame_cache)
- (frame_saved_regs_register_unwind)
- (deprecated_generic_get_saved_register)
- (get_prev_frame, get_frame_pc, get_frame_saved_regs)
- (_initialize_blockframe): Move frame code from here...
- * frame.c: ...to here. Include "gdb_obstack.h", "gdbcore.h",
- "annotate.h" and "dummy-frame.h".
- (_initialize_frame): New function.
-
-2002-11-08 Jim Blandy <jimb@redhat.com>
-
- * dwarf2read.c (read_func_scope): Restore list_in_scope properly
- when we finish a function a context.
- * buildsym.h (outermost_context_p): New macro.
- (Bug analyzed by David Edelsohn.)
-
-2002-11-08 Andrew Cagney <ac131313@redhat.com>
-
- * blockframe.c: Include "dummy-frame.h".
- (struct dummy_frame, dummy_frame_stack)
- (generic_find_dummy_frame, deprecated_generic_find_dummy_frame)
- (generic_pc_in_call_dummy, deprecated_read_register_dummy)
- (generic_push_dummy_frame, generic_save_dummy_frame_tos)
- (generic_save_call_dummy_addr, generic_pop_current_frame)
- (generic_pop_dummy_frame, generic_fix_call_dummy)
- (generic_fix_call_dummy, generic_call_dummy_register_unwind): Move
- dummy frame code from here...
- * dummy-frame.c: ...to here. New file.
- * dummy-frame.h: New file.
- (generic_call_dummy_register_unwind): Declare.
- (generic_find_dummy_frame): Declare.
- * Makefile.in (SFILES): Add dummy-frame.c.
- (dummy-frame.o): Specify dependencies.
- (dummy_frame_h): Define.
- (COMMON_OBS): Add dummy-frame.o.
- (blockframe.o): Update dependencies.
-
-2002-11-08 Jim Blandy <jimb@redhat.com>
-
- * dwarf2read.c (read_func_scope): Restore local_symbols and
- param_symbols after we finish the function context. (Based on a
- patch from David Edelsohn.)
-
-2002-11-08 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (symbol_found): New function.
- (minsym_found): New function.
- (decode_line_1): Separate out some code into separate functions.
-
-2002-11-08 Joel Brobecker <brobecker@gnat.com>
-
- * i386-tdep.c (i386_frameless_signal_p): Make non static for
- the benefit of the interix target.
- * i386-tdep.h (i386_frameless_signal_p): Declare.
-
-2002-11-08 Andrew Cagney <ac131313@redhat.com>
-
- * i386-tdep.h (i386_linux_orig_eax_regnum_p): Delete stray
- declaration that snuck in from change below.
-
-2002-11-06 Andrew Cagney <cagney@redhat.com>
-
- * i386-tdep.c (i386_mmx_regnum_p): Rename mmx_regnum_p. Update
- all callers.
- (i386_fp_regnum_p): New function. Use instead of FP_REGNUM_P.
- (i386_fpc_regnum_p): New function. Use instead of FPC_REGNUM_P.
- (i386_sse_regnum_p): New function. Use instead of SSE_REGNUM_P.
- (i386_mxcsr_regnum_p): new function. Use instead of
- MXCSR_REGNUM_P.
- * i386-tdep.h (SSE_REGNUM_P): Delete macro.
- (i386_sse_regnum_p): Declare.
- (i386_mxcsr_regnum_p): Declare.
- (FP_REGNUM_P, FPC_REGNUM_P): Delete macros.
- (i386_fp_regnum_p, i386_fpc_regnum_p): Declare.
- (IS_FP_REGNUM): Update definition.
- (IS_FPU_CTRL_REGNUM): Update definition..
- (IS_SSE_REGNUM): Update definition..
- * i386v-nat.c (register_u_addr): Update.
- * go32-nat.c (fetch_register): Update.
- (store_register): Update.
-
-2002-11-07 Joel Brobecker <brobecker@gnat.com>
-
- Preparation work to convert the hppa targets to multiarch partial.
-
- * hppa-tdep.c: Add new functions replacing macro bodies from
- config/pa/tm-hppa.h. These function will be used to initialize
- the gdbarch structure. Import some comments from tm-hppa.h,
- and place them where appropriate, to avoid loosing them when
- we cleanup this file.
- (hppa_reg_struct_has_addr): New function.
- (hppa_inner_than): New function.
- (hppa_stack_align): New function.
- (hppa_pc_requires_run_before_use): New function.
- (hppa_instruction_nullified): New function.
- (hppa_register_byte): New function.
- (hppa_register_virtual_type): New function.
- (hppa_store_struct_return): New function.
- (hppa_cannot_store_register): New function.
- (hppa_frame_args_address): New function.
- (hppa_frame_locals_address): New function.
- (hppa_smash_text_address): New function.
- (hppa_coerce_float_to_double): New function. Requires the inclusion
- of "language.h".
-
- * Makefile.in (hppa-tdep.o): Add dependency on language.h.
-
- * tm-hppa.h (REG_STRUCT_HAS_ADDR): Change the definition of this
- gdbarch-eligible macro to a call to the new associated function
- created in hppa-tdep.c.
- (INNER_THAN): Likewise.
- (STACK_ALIGN): Likewise.
- (PC_REQUIRES_RUN_BEFORE_USE): Likewise.
- (INSTRUCTION_NULLIFIED): Likewise.
- (REGISTER_BYTE): Likewise.
- (REGISTER_VIRTUAL_TYPE): Likewise.
- (STORE_STRUCT_RETURN): Likewise.
- (CANNOT_STORE_REGISTER): Likewise.
- (FRAME_ARGS_ADDRESS): Likewise.
- (FRAME_LOCALS_ADDRESS): Likewise.
- (SMASH_TEXT_ADDRESS): Likewise.
- (COERCE_FLOAT_TO_DOUBLE): Likewise.
- (ABOUT_TO_RETURN): Delete, as no longer used.
-
-2002-11-07 Fernando Nasser <fnasser@redhat.com>
-
- * printcmd.c (disassemble_command): Remove obsolete function.
- (_initialize_printcmd): Do not create disassemble command here.
- * cli/cli-cmds.c (disassemble_command): New function. Implements
- disassemble command.
- (init_cli_cmds): Create disassemble command here instead.
-
-2002-11-07 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Add Daniel Jacobowitz to global maintainers list.
-
-2002-11-07 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.h (regcache_cooked_read_using_offset_hack)
- (regcache_cooked_write_using_offset_hack): Delete declarations.
- (register_changed): Delete declaration.
- * regcache.c (regcache_cooked_read_using_offset_hack)
- (regcache_cooked_write_using_offset_hack): Delete functions.
- (cooked_xfer_using_offset_hack): Delete function.
- (register_changed): Delete function.
-
-2002-11-07 Jim Blandy <jimb@redhat.com>
-
- * macroscope.c: #include "complaints.h".
- (sal_macro_scope): Cope with filenames that appear in the symtabs,
- but not in the macro table.
- * Makefile.in (macroscope.o): Record dependency.
-
-2002-11-07 Joel Brobecker <brobecker@gnat.com>
-
- * PROBLEMS: Document gdb/816 (unable to read core file on alpha-osf).
-
-2002-11-07 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.c (deprecated_registers_fetched): Update.
- * regcache.h (deprecated_registers_fetched): Rename
- registers_fetched.
- * remote-vxsparc.c (vx_read_register): Update.
- * remote-vxmips.c (vx_read_register): Update.
- * remote-vx68.c (vx_read_register): Update.
- * irix5-nat.c (fetch_core_registers): Update.
- * mipsm3-nat.c (fetch_inferior_registers): Update.
- * sun3-nat.c (fetch_inferior_registers): Update.
- * symm-nat.c (fetch_inferior_registers): Update.
- * ns32knbsd-nat.c (fetch_inferior_registers): Update.
- (fetch_core_registers): Update.
- (fetch_kcore_registers): Update.
- * mips-nat.c (fetch_inferior_registers): Update.
- * corelow.c (get_core_registers): Update.
- * a68v-nat.c (fetch_inferior_registers): Update.
-
-2002-11-06 Joel Brobecker <brobecker@gnat.com>
-
- Put in place the framework necessary for multiarching the hppa targets.
- * hppa-tdep.c (hppa_gdbarch_init): New function.
- (hppa_dump_tdep): New function.
- (_initialize_hppa_tdep): Register the hppa gdbarch init function and
- tdep structure dumper.
- * config/pa/tm-hppa.h (GDB_MULTI_ARCH): New macro, defined to 0
- until the multi-arching conversion has partially been completed.
-
-2002-11-06 Andrew Cagney <ac131313@redhat.com>
-
- * valops.c (value_assign): Merge lval_register case into
- lval_reg_frame_relative. Use frame_register and
- regcache_cooked_write instead of get_saved_register and
- write_register_bytes. After flushing the register cache, try to
- re-select the selected frame.
-
-2002-11-06 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.h (deprecated_register_valid): Rename register_valid.
- * regcache.c: Update.
- * ia64-aix-nat.c: Update.
- * i386gnu-nat.c: Update.
- * alpha-nat.c: Update.
- * sparc-nat.c: Update.
- * lynx-nat.c: Update.
- * remote-mips.c: Update.
-
-2002-11-06 Joel Brobecker <brobecker@gnat.com>
-
- * hppa-tdep.c (_initialize_hppa_tdep): Move function body
- to end of file, to be more consistent with the pratice followed
- by other targets.
-
-2002-11-06 Andrew Cagney <ac131313@redhat.com>
-
- * infcmd.c: Include "reggroups.h" and <ctype.h>.
- (print_float_info): Print registers in float_reggroup.
- (print_vector_info): Print registers in vector_reggroup.
- (default_print_registers_info): When all, print registers in
- all_reggroup. Otherwize, print registers in general_reggroup.
- (registers_info): Rewrite. Add support for register groups.
- Eliminate a goto.
-
-2002-11-06 Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.c (methods_info): Delete. It has been ifdeffed out for
- ages.
- (symtab_symbol_info): Remove eons old ifdeffed out code.
- (_initialize_symtab): Remove prehistoric disabled 'info methods'
- command.
-
-2002-11-06 Theodore A. Roth <troth@openavr.org>
-
- * c-exp.y: Add missing semi-colons.
- * f-exp.y: Add missing semi-colons.
- * m2-exp.y: Add missing semi-colons.
- * p-exp.y: Add missing semi-colons.
- Add empty action to start rule to avoid a type clash error when
- building with bison >= 1.50.
-
-2002-11-06 Jim Blandy <jimb@redhat.com>
-
- * macrotab.h (struct macro_source_file): Doc fix.
-
-2002-11-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * varobj.c (child_exists, cplus_number_of_children): Change
- STREQ macro references to strcmp.
- (cplus_name_of_child): Change code to handle the fact that
- fields are not necessarily contiguous with regards to their
- access control. This is a fix for PR gdb/792.
-
-2002-11-05 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (GET_SAVED_REGISTER): Change to a predicate function.
- * gdbarch.h, gdbarch.c: Regnerate.
- * frame.h (frame_register): Declare.
- * frame.c (frame_register): New function.
- (get_saved_register): Test GET_SAVED_REGISTER_P before calling
- GET_SAVED_REGISTER, otherwize call
- generic_unwind_get_saved_register.
- (frame_register_read): Use frame_register instead of
- get_saved_register.
-
-2002-11-05 Elena Zannoni <ezannoni@redhat.com>
-
- From Jim Ingham <jingham@apple.com>:
- * event-top.c (gdb_disable_readline): New function.
- (_initialize_event_loop): Move comment.
-
-2002-11-05 Elena Zannoni <ezannoni@redhat.com>
-
- * event-loop.c (start_event_loop): Add comment.
- Update copyright.
-
-2002-11-05 Andrew Cagney <ac131313@redhat.com>
-
- * infcmd.c (default_print_registers_info): Do not call
- PRINT_REGISTER_HOOK.
-
-2002-11-05 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-tdep.c (sparc_print_register_hook): Make static.
- (sparc_print_registers_info): New function.
- (sparc_do_registers_info): New function.
- (sparclet_print_registers_info): New function.
- (sparclet_do_registers_info): New function.
- (do_sparc_print_registers_info): New function.
- (sparc_print_registers): New static function, clone of infcmd.c's
- default_print_registers_info.
- * config/sparc/tm-sparclet.h (PRINT_REGISTER_HOOK): Delete macro.
- (sparclet_do_registers_info): Declare.
- (DEPRECATED_DO_REGISTERS_INFO): Re-define.
- * config/sparc/tm-sparc.h (DEPRECATED_DO_REGISTERS_INFO):
- Re-define.
- (sparc_do_registers_info): Declare.
- (PRINT_REGISTER_HOOK): Delete macro.
- (sparc_print_register_hook): Delete declaration.
-2002-11-05 David Carlton <carlton@math.stanford.edu>
+2003-01-19 Andrew Cagney <ac131313@redhat.com>
- * symtab.c (lookup_symbol_aux): Move chunks of code into separate
- functions.
- (lookup_symbol_aux_local): New function.
- (lookup_symbol_aux_symtabs): New function.
- (lookup_symbol_aux_psymtabs): New function.
+ * config/pa/tm-hppa.h (DEPRECATED_DO_REGISTERS_INFO): Rename
+ DEPRECATED_REGISTERS_INFO.
-2002-11-05 David Carlton <carlton@math.stanford.edu>
+2003-01-19 Andrew Cagney <ac131313@redhat.com>
- * symtab.c (lookup_symbol_aux): In minsym sections, don't use the
- previous values of 'objfile' and 'block'.
+ * MAINTAINERS: Replace `Blanket Write Privs' with `Global
+ Maintainers'. Update `Various Maintainers'.
-2002-11-05 Pierre Muller <muller@ics.u-strasbg.fr>
+2003-01-19 Andrew Cagney <ac131313@redhat.com>
- * values.c (value_change_enclosing_type): Set
- enclosing_type field correctly also for the case where
- more memory needs to be allocated.
-
-2002-11-03 Mark Kettenis <kettenis@gnu.org>
-
- * i387-tdep.c (i387_print_float_info): Call fputs_filtered instead
- of puts_filtered.
-
- * i387-tdep.c (i387_print_float_info): Replace calls to
- register_read and deprecated_read_register_gen with calls to
- frame_register_read, and make the necessary adjustments to the
- surrounding code.
-
-2002-11-02 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (register_reggroup_p): Allow default value.
+ * frame.c (frame_saved_regs_pop): Assert POP_FRAME_P.
+ * gdbarch.sh (POP_FRAME): Change to function with predicate.
+ Suppress actual parameters when `-'.
* gdbarch.h, gdbarch.c: Regenerate.
-2002-11-02 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.h: Add coment indicating replacements for deprecated
- functions.
-
-2002-11-02 Andrew Cagney <cagney@redhat.com>
-
- * reggroups.h, reggroups.c: New files.
- * regcache.c: Include "reggroups.h".
- (enum regcache_dump_what): Add `regcache_dump_groups'.
- (regcache_dump): Contract size of the "Type" column. When
- specified, dump the register's groups.
- (maintenance_print_register_groups): New function.
- (_initialize_regcache): Add command `maint print register-groups'.
- * Makefile.in (COMMON_OBS): Add reggroups.o
- (SFILES): Add reggroups.c.
- (reggroups_h): Define.
- (regcache.o, gdbarch.o): Update dependencies.
- (reggroups.o): Specify dependencies.
- * gdbarch.sh (register_reggroup_p): Add pure multi-arch method.
- Add opaque declaration for `struct reggroup' in generated .h file.
- Include "reggroups.h" in generated .c file.
- gdbarch.h, gdbarch.c: Re-generate.
-
-2002-11-02 Andrew Cagney <cagney@redhat.com>
-
- * regcache.h (deprecated_read_register_gen): Rename
- read_register_gen.
- (deprecated_write_register_gen): Rename write_register_gen.
- * i387-tdep.c: Update.
- * x86-64-linux-nat.c: Update
- * wince.c: Update.
- * thread-db.c: Update.
- * win32-nat.c: Update.
- * mips-tdep.c: Update.
- * d10v-tdep.c: Update.
- * cris-tdep.c: Update.
- * remote-sim.c: Update.
- * remote-rdi.c: Update.
- * remote-rdp.c: Update.
- * frame.c: Update.
- * target.c: Update.
- * blockframe.c: Update.
- * x86-64-tdep.c: Update.
- * xstormy16-tdep.c: Update.
- * sh-tdep.c: Update.
- * s390-tdep.c: Update.
- * rs6000-tdep.c: Update.
- * sparc-tdep.c: Update.
- * i386-tdep.c: Update.
- * dwarf2cfi.c: Update.
- * regcache.c: Update.
-
-2002-11-01 Joel Brobecker <brobecker@gnat.com>
-
- New interix-specific files:
- * config/i386/nm-interix.h: New file.
- * config/i386/interix.mh: New file.
- * config/i386/interix.mt: New file.
- * i386-interix-nat.c: New file.
- * i386-interix-tdep.c: New file.
-
-2002-11-01 Andrew Cagney <cagney@redhat.com>
-
- * frame.h (deprecated_generic_get_saved_register): Rename
- generic_get_saved_register.
- * blockframe.c (deprecated_generic_get_saved_register): Update.
- * xstormy16-tdep.c (xstormy16_get_saved_register): Update.
- (xstormy16_frame_saved_register): Update.
- * sh-tdep.c (sh_gdbarch_init): Update.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
- * ia64-tdep.c (ia64_get_saved_register): Update.
- * cris-tdep.c (cris_gdbarch_init): Update.
- * config/m32r/tm-m32r.h (GET_SAVED_REGISTER): Update.
- * arm-tdep.c (arm_gdbarch_init): Update.
-
-2002-10-31 Daniel Jacobowitz <drow@mvista.com>
-
- * lin-lwp.c (lin_lwp_resume): Remove resume_all test for !step.
-
-2002-10-31 Daniel Jacobowitz <drow@mvista.com>
-
- * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
- trampolines in sigaction.
-
-2002-10-31 Andrew Cagney <cagney@redhat.com>
-
- * h8300-tdep.c: Include "gdb_assert.h".
- (h8300_print_register): Add gdbarch, file and frame parameters.
- Use frame_read_unsigned_register to read the register's value.
- Use fprintf_filtered to display output.
- (h8300_print_registers_info): Replace h8300_do_registers_info.
- (h8300_gdbarch_init): Set print_registers_info.
-
-2002-10-31 Andrew Cagney <cagney@redhat.com>
-
- * frame.c (frame_read_unsigned_register): New function.
- (frame_read_signed_register): New function.
- * frame.h (frame_read_unsigned_register): Declare.
- (frame_read_signed_register): Declare.
-
-2002-10-31 Andrew Cagney <cagney@redhat.com>
-
- * h8500-tdep.c (h8500_print_registers_info): New static function,
- clone of infcmd.c's default_print_registers_info.
- (h8500_do_registers_info): New funtion.
- (h8500_print_register_hook): Rename print_register_hook, make
- static.
-
- * config/h8500/tm-h8500.h: Update copyright.
- (DEPRECATED_DO_REGISTERS_INFO): Define.
- (h8500_do_registers_info: Declare.
- (PRINT_REGISTER_HOOK): Delete macro.
- (print_register_hook): Delete function.
-
-2002-10-31 Andrew Cagney <cagney@redhat.com>
-
- * z8k-tdep.c (z8k_print_register_hook): Make static.
- (z8k_print_registers_info): New static function, clone of
- infcmd.c's default_print_registers_info.
- (z8k_do_registers_info): New function. Wrap
- z8k_print_registers_info.
- * config/z8k/tm-z8k.h: Update copyright.
- (PRINT_REGISTER_HOOK): Delete macro.
- (z8k_print_register_hook): Delete declaration.
- (DEPRECATED_DO_REGISTERS_INFO): Define.
- (z8k_do_registers_info): Declare.
-
-2002-10-30 Joel Brobecker <brobecker@gnat.com>
-
- * hppa-tdep.c (find_function_in_inferior): Remove this extern,
- as this is already provided by value.h, and was actually causing
- a compilation error because of a conflict in parameter type
- declaration due to a missing const keyword.
- (low_text_segment_addres): Fix a compilation warning.
-
-2002-10-29 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-linux-nat.c (mips_linux_cannot_fetch_register): Don't fetch
- registers without a name.
- (mips_linux_cannot_store_register): Don't store registers without
- a name.
-
-2002-10-28 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (find_addr_symbol): Delete. (It was already commented
- out.)
- * symtab.h: Delete prototype for find_addr_symbol.
-
-2002-10-26 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (DEPRECATED_DO_REGISTERS_INFO): Rename
- DO_REGISTERS_INFO.
- gdbarch.h, gdbarch.c: Re-generate.
- * infcmd.c (default_print_registers_info): Update reference.
- * mips-tdep.c (mips_gdbarch_init): Set deprecated_do_registers_info.
- (mips_dump_tdep): Do not print DO_REGISTERS_INFO.
- * sh-tdep.c (sh_gdbarch_init): Ditto.
- * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
- * h8300-tdep.c (h8300_gdbarch_init): Ditto.
-
-2002-10-26 Mark Kettenis <kettenis@gnu.org>
-
- * x86-64-tdep.c (x86_64_init_abi): Set init_extra_frame_info to
- cfi_init_extra_frame_info.
- * x86-64-tdep.h (x86_64_init_extra_frame_info): Remove prototype.
- * x86-64-linux-tdep.c (x86_64_init_extra_frame_info): Remove function.
-
- * x86-64-tdep.c (x86_64_init_abi): Add calls to override the i386
- target where necessary. Add more comments and remove the ones
- that don't provide any useful information.
-
- * i386-tdep.c (i386_frame_saved_pc): Replace call to
- deprecated_read_register_dummy with
- frame_unwind_unsigned_register.
-
- * i386-tdep.c (i386_extract_struct_value_address): Use
- regcache_raw_read_unsigned instead of
- regcache_cooked_read_unsigned since we know that the register
- we're reading isn't a pseudo register. Rename variable 'val' into
- the more descriptive 'addr'.
-
- * x86-64-tdep.c: Fix some formatting problems, mostly in comments.
- (x86_64_push_return_address): Add comment.
- (x86_64_pop_frame): Make static.
- (examine_argument): Clarify comment.
- (x86_64_skip_prologue): Make prolog_expact variable static.
-
- * dwarf2cfi.c: Fix some formatting problems.
- (context_cpy, read_encoded_pointer): Clarify comments.
-
- * x86-64-tdep.c (x86_64_breakpoint_from_pc): Constify.
- (x86_64_init_abi): Move set_gdbarch_* calls that overlap with the
- i386 target back into x86_64_gdbarch_init. Add some comments and
- remove meaningless ones.
-
-2002-10-25 Andrew Cagney <cagney@redhat.com>
-
- * complaints.h (struct deprecated_complaint): Rename `struct
- complaint'.
- * complaints.c (complain): Update.
- * remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete
- incorrect comment indicating that "symfile.h" was being included
- for the `struct complaint' definition.
- * remote-vx.c: Update.
- * objc-lang.c: Update.
- * xcoffread.c: Update.
- * hpread.c: Update.
- * mdebugread.c: Update.
- * stabsread.c: Update.
- * dwarf2read.c: Update.
- * dwarfread.c: Update.
- * elfread.c: Update.
- * coffread.c: Update.
- * stabsread.h: Update.
- * dbxread.c: Update.
- * buildsym.c: Update.
- * gdbtypes.c: Update.
- * macrotab.c: Update.
-
-2002-11-14 David Carlton <carlton@math.stanford.edu>
-
- * Makefile.in (symtab.o): Depend on gdb_assert_h.
- * symtab.c: #include "gdb_assert.h"
- * Makefile.in (namespace): Add 'namespace' target.
- * buildsym.c (finish_block): Comment out the using declarations
- generation.
- * block.h: Make argument to block_scope const.
- * block.c (block_scope): Make argument const.
- * symtab.c (lookup_symbol_aux_using): Gather usings via
- block_all_usings.
- (lookup_symbol_namespace): Rename from
- lookup_symbol_aux_using_loop.
- (lookup_symbol_aux_using_loop): New function.
- * block.h: Declare block_all_usings.
- * block.c (block_all_usings): New function.
- * symtab.c (lookup_symbol_aux_nonlocal): Delete FIXME comment.
- * buildsym.c (finish_block): Add FIXME comment.
-
-2002-11-13 David Carlton <carlton@math.stanford.edu>
-
- * buildsym.c (finish_block): Initialize block_scope (block) in
- C++ function blocks.
- * dwarf2read.c: Delete variable current_namespace.
- (psymtab_to_symtab_1): Rename current_namespace to
- processing_current_namespace.
- (read_namespace): Ditto.
- * buildsym.h: New variable processing_current_namespace.
- * block.h: Declarations for block_scope and block_set_scope.
- * block.c (block_scope): New function.
- (block_set_scope): New function.
- * cp-support.h (struct namespace_info): Add 'scope' member.
- * buildsym.c (finish_block): Replace BLOCK_USING by
- block_set_using.
- (end_symtab): Ditto.
- * block.h: Declaration for block_set_using.
- * block.c (block_set_using): New function.
- (block_initialize_namespace): New function.
- * symtab.c (lookup_symbol_aux_using): Replace BLOCK_USING by
- block_using.
- * buildsym.c (finish_block): Set BLOCK_NAMESPACE to NULL, not
- BLOCK_USING.
- * jv-lang.c (get_java_class_symtab): Ditto.
- * block.h: Declaration for block_using.
- * block.c (block_using): New function.
- * Makefile.in (block.o): New rule; also add block.c to SFILES and
- block.o to COMMON_OBS.
- * block.c: New file.
- * symtab.c (contained_in): Move to block.c.
- (block_function): Ditto.
- * block.h (struct block): Have the language-specific stuff contain
- a struct namespace_info.
- (BLOCK_NAMESPACE): New macro.
- (BLOCK_USING): Delete.
- * linespec.c (decode_variable): Add comment before
- decode_variable.
- * cp-support.h (struct namespace_info): New struct.
-
-2002-11-06 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c: Delete declaration of operator_chars.
-
- * symtab.c (lookup_symbol_aux): Add comment.
-
- * linespec.c: Update copyright notice.
- (examine_compound_token): Rename from dl1_examine_compound_token.
- Misc. cleanups.
- (locate_class_sym): Rename from dl1_locate_class_sym.
- (decode_compound): Misc. cleanup.
- (symbol_found): Rename from dl1_symbol_found; misc. cleanup.
- (find_next_token): Rename from dl1_find_next_token; misc. cleanup.
- (find_method): Rename from dl1_find_method. Delete sym_arr
- argument. Misc. cleanup.
- (count_methods): Rename from dl1_find_method. Reorder arguments
- to match find_methods. Misc. cleanup.
- (find_method_name): New function.
- (add_matching_methods): New function.
- (add_constructors): New fnuction.
- (find_methods): Separate out some of code into find_method_name,
- add_matching_methods, and add_constructors; misc. cleanup.
- (is_all_digits): Rename from dl1_is_all_digits.
- (decode_all_digits): Rename from dl1_all_digits. Don't set
- defaults: we already did that in initialize_defaults.
- (skip_digits): Rename from dl1_skip_digits.
- (handle_filename): Rename from dl1_handle_filename;
- misc. cleanup.
- (minsym_found): Rename from dl1_minsym_found; misc. cleanup.
- (decode_dollar): Rename from dl1_decode_dollar; misc. cleanup.
- (build_canonical_line_spec): Misc. cleanup.
- (find_toplevel_char): Move; change 0 to NULL.
- (decode_variable): Rename from dl1_variable; misc. cleanup.
- (select_symbols): Rename from decode_line_2; misc. cleanup; fork
- out some code into select_symbols_args.
- (select_symbols_args): New function.
- (decode_line_1): Misc. cleanup.
-
-2002-11-05 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (locate_first_half): Rename from
- dl1_locate_first_half; miscellaneous cleanup.
- (decode_compound): Rename from dl1_compound; miscellaneous
- cleanup.
-
-2002-11-04 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (initialize_defaults): Rename from
- dl1_initialize_defaults.
- (set_flags): Rename from dl1_set_flags.
- (decode_line_1): Set flags before decoding indirect.
- (decode_indirect): Rename from dl1_indirect.
- (set_flags): Miscellaneous cleanup.
- (decode_indirect): Miscellaneous cleanup.
- Move around some functions and declarations.
-
-2002-11-01 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (dl1_set_flags): Change arguments.
- (dl1_compound): Rename from dl1_multipart_compound, and shuffle
- components.
- (dl1_examine_compound_token): Change call structure.
- (dl1_find_method): Ditto.
- (dl1_handle_filename): Ditto.
- (dl1_is_all_digits): New function.
- (dl1_all_digits): Ditto.
- (dl1_skip_digits): Ditto.
- (dl1_dollar): Ditto.
- (dl1_variable): Ditto.
- (dl1_symbol_found): Ditto.
- (dl1_minsym_found): Ditto.
- (decode_line_1): Slim down dramatically.
-
-2002-10-31 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (dl1_handle_multipart): New function.
- (dl1_multipart_compound): Ditto.
- (dl1_examine_compound_token): Ditto.
- (dl1_locate_class_sym): Ditto.
- (dl1_find_next_token): Ditto.
- (dl1_find_method): Ditto.
- (dl1_count_methods): Ditto.
- (dl1_handle_filename): Ditto.
- (decode_line_1): Call dl1_handle_multipart.
- (cplusplus_error): Declare to be NORETURN.
-
-2002-10-28 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c (dl1_initialize_defaults): New function.
- (dl1_indirect): Ditto.
- (dl1_set_flags): Ditto.
- (dl1_locate_first_half): Ditto.
- (decode_line_1): Call the above functions.
- * symtab.c (lookup_symbol_aux_minsyms): Add block_index argument,
- and delete is_a_field_of_this argument.
- (lookup_symbol_aux_nonlocal): Add call to
- lookup_symbol_aux_minsyms, and expand HP comment.
- (lookup_symbol_aux): Delete calls to lookup_symbol_aux_minsyms.
- Expand on comment before lookup_transparent_type.
-
-2002-10-25 David Carlton <carlton@math.stanford.edu>
-
- * ada-lang.c (standard_lookup): Set last argument to lookup_symbol
- to NULL.
- * p-valprint.c (pascal_val_print): Ditto.
- * objc-lang.c (find_imps): Ditto.
- * c-valprint.c (c_val_print): Ditto.
-
-2002-10-25 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_block): New function.
- (lookup_symbol_aux_local): Call lookup_symbol_aux_block.
- (lookup_symbol_aux): Ditto.
-
- * Merge from mainline; tag is carlton_dictionary-20021025-merge.
-
-2002-10-25 Mark Kettenis <kettenis@gnu.org>
-
- * x86-64-tdep.c (x86_64_gdbarch_init): Make a bit more similar to
- the version in i386-tdep.c. Move set_gdbarch_* calls out into...
- (x86_64_init_abi): ...new function.
-
- * Makefile.in (i386v-nat.o): Add $(i386_tdep_h).
- * i386v-nat.c: Include "i386-tdep.h".
-
-2002-10-25 Andrew Cagney <cagney@redhat.com>
-
- * gdbtypes.c (address_space_name_to_int): Update.
- (address_space_int_to_name): Update.
- * gdbarch.sh (address_class_type_flags_to_name): Change to a pure
- multi-arch predicate.
- (address_class_name_to_type_flags): Ditto.
- * gdbarch.h, gdbarch.c: Re-generate.
-
- * MAINTAINERS: Check all warnings when h8300hms and alpha-elf.
-
-2002-10-24 Martin M. Hunt <hunt@redhat.com>
-
- * utils.c (string_to_core_addr): Revert patch from 11 Oct.
-
-2002-10-24 Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.h (INIT_SAL): Delete macro.
- (init_sal): Export.
- * symtab.c (init_sal): New function.
-
- * ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
- to init_sal function call.
- (find_sal_from_funcs_and_line): Ditto.
- (all_sals_for_line): Ditto.
- * breakpoint.c (create_internal_breakpoint): Ditto.
- (create_fork_vfork_event_catchpoint): Ditto.
- (create_exec_event_catchpoint): Ditto.
- (parse_breakpoint_sals): Ditto.
- (watch_command_1): Ditto.
- (handle_gnu_4_16_catch_command): Ditto.
- (clear_command): Ditto.
- * hppa-tdep.c (child_enable_exception_callback): Ditto.
- * infcmd.c (run_stack_dummy): Ditto.
- * infrun.c (process_event_stop_test): Ditto.
- (check_sigtramp2): Ditto.
- (step_over_function): Ditto.
- * linespec.c (decode_line_2): Ditto.
- (decode_line_1): Ditto.
- * source.c (line_info): Ditto.
- * symtab.c (find_pc_sect_line): Ditto.
-
-2002-10-24 Michal Ludvig <mludvig@suse.cz>
-
- * dwarf2cfi.c (struct context)
- (struct context_reg): Moved to dwarf2cfi.h
- (context_alloc, frame_state_alloc, context_cpy):
- Made extern instead of static, removed prototypes.
- * dwarf2cfi.h (struct context)
- (struct context_reg): New, moved from dwarf2cfi.c
- (context_alloc, frame_state_alloc, context_cpy):
- New prototypes.
- * x86-64-linux-tdep.c (x86_64_linux_sigtramp_saved_pc):
- Changed from static to extern.
- (LINUX_SIGINFO_SIZE, LINUX_SIGCONTEXT_PC_OFFSET)
- (LINUX_SIGCONTEXT_FP_OFFSET)
- (LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Adjusted.
- (x86_64_linux_in_sigtramp, x86_64_linux_frame_chain)
- (x86_64_init_frame_pc, x86_64_init_extra_frame_info): New.
- * x86-64-tdep.c (x86_64_gdbarch_init): Several
- set_gdbarch_*() calls now use x86-64 specific functions
- instead of DWARF2 CFI ones.
- * x86-64-tdep.h (x86_64_linux_in_sigtramp)
- (x86_64_linux_frame_chain, x86_64_init_frame_pc)
- (x86_64_init_extra_frame_info): New prototypes.
-
-2002-10-23 David Carlton <carlton@math.stanford.edu>
-
- * linespec.c: #include "parser-defs.h".
- Delete prototype for find_template_name_end.
- * Makefile.in (linespec.o): Depend on $(parser_defs_h).
-
-2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: add recent mi fixes.
- * varobj.c (struct varobj): Add new "updated" flag.
- (new_variable): Default "updated" flag to 0.
- (varobj_set_value): Set "updated" flag to 1 if value
- changes.
- (varobj_update): Check varobj "updated" flag before
- comparing old and refreshed values. Fix for
- PR gdb/702.
-
-2002-10-23 David Carlton <carlton@math.stanford.edu>
-
- * parse.c (parse_exp_1): Use BLOCK_START.
- * x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END,
- SYMBOL_BLOCK_VALUE.
- * objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
-
-2002-10-23 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c: Delete cplusplus_hint.
- Delete prototype for find_template_name_end.
-
-2002-10-23 Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.h: Update comment.
-
-2002-10-23 Michael Snyder <msnyder@redhat.com>
-
- * printcmd.c (address_info): Restore quotes in output.
- * valops.c (value_of_local): Restore quotes in error message.
-
-2002-10-23 Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.c (symbol_demangled_name): New function.
- * symtab.h (SYMBOL_DEMANGLED_NAME): Simplify macro, by
- turning most of it into a function.
- (symbol_demangled_name): Export.
-
-2002-10-23 Michael Snyder <msnyder@redhat.com>
-
- * valops.c (value_of_local): Restore quotes in error message.
-
-2002-10-23 Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.c (symbol_init_language_specific): New function.
- * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): Simplify macro, by
- turning most of it into a function.
- (symbol_init_language_specific): Export.
-
-2002-10-23 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (dwarf_tag_name): Add DWARF 3 names.
- (dwarf_attr_name): Ditto.
- (dwarf_type_encoding_name): Ditto.
- (scan_partial_symbols): Descend into DW_TAG_namespace entries.
- (process_die): Handle DW_TAG_namespace,
- DW_TAG_imported_declaration, DW_TAG_imported_module.
- (read_namespace): New function.
-
-2002-10-22 Joel Brobecker <brobecker@gnat.com>
-
- * configure.in: Define NEW_PROC_API on Interix too.
- * configure: Regenerate.
-
-2002-10-21 Joel Brobecker <brobecker@gnat.com>
-
- * configure: Regenerate using the proper version of autoconf.
-
-2002-10-21 Elena Zannoni <ezannoni@redhat.com>
-
- * findvar.c (read_var_value): Temporarily disable TLS code, until
- complete TLS support is added.
-
-2002-10-21 Jim Blandy <jimb@redhat.com>
- Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC
- for thread local storage locations.
- (struct symbol): Add objfile field.
- (SYMBOL_OBJFILE): Define.
- * dwarf2read.c (is_thread_local): New static variable.
- (new_symbol): If variable is in thread local fill in address class
- and objfile appropriately.
- (decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address
- stack operation.
- * printcmd.c (address_info): Print the information for thread
- local storage variable.
- * findvar.c (read_var_value): In case of thread local variable,
- defer to the target vector code to compute address.
-
-2002-10-21 Elena Zannoni <ezannoni@redhat.com>
-
- * solib-svr4.c (svr4_fetch_objfile_link_map): New function.
- * solib-svr4.h (svr4_fetch_objfile_link_map): Export.
-
-2002-10-21 Elena Zannoni <ezannoni@redhat.com>
-
- * symtab.h (address_class): Rename
- LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC.
- * hpread.c (hpread_process_one_debug_symbol): Ditto.
- * printcmd.c (address_info): Ditto.
- * findvar.c (symbol_read_needs_frame, read_var_value): Ditto.
-
-2002-10-20 Mark Kettenis <kettenis@gnu.org>
-
- * i386bsd-nat.c (i386bsd_dr_set, i386bsd_dr_get_status): Use
- DBREG_DRX macro to acces debug registers.
-
- * Makefile.in (i386obsd-tdep.o): New target.
-
- * solib-sunos.c: Include "bcache.h" and "regcache.h".
- * Makefile.in (solib-sunos.o): Add $(bcache_h) and $(regcache_h).
-
- * configure.tgt (i[3456]86-*-openbsd*): Set gdb_target to obds.
- * config/i386/obsd.mt: New file.
- * i386bsd-nat.c (_initialize_i386bsd_nat): Introduce
- i386obsd_sc_pc_offset and i386obsd_sc_sp_offset;
- * i386obsd-nat.c (_initialize_i386obsd_nat): Set
- i386obsd_sigtramp_start and i386obsd_sigtramp_end instead of
- i386nbsd_sigtramp_start and i386nbsd_sigtramp_end.
- * i386obsd-tdep.c: New file.
-
-2002-10-19 Adam Fedor <fedor@gnu.org>
-
- * objc-exp.y (name_not_typename): Fix invalid comment.
-
-2002-10-20 Mark Kettenis <kettenis@gnu.org>
-
- * solib-sunos.c (allocate_rt_common_objfile): Use bcache_xmalloc
- to allocate partial syms and macro byte caches.
-
-2002-10-18 David Carlton <carlton@math.stanford.edu>
-
- * symtab.h: Delete 'struct source' and 'struct sourcevector'.
-
-2002-10-18 Adam Fedor <fedor@gnu.org>
-
- * stabsread.c (find_name_end): New function.
- (define_symbol): Use it.
-
-2002-10-18 Daniel Jacobowitz <drow@mvista.com>
-
- * config/alpha/nm-fbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
- * config/alpha/nm-linux.h (CANNOT_STEP_BREAKPOINT): Define to 1.
- * config/alpha/nm-nbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
- * config/alpha/nm-osf.h (CANNOT_STEP_BREAKPOINT): Define to 1.
-
-2002-10-17 David Carlton <carlton@math.stanford.edu>
-
- * symfile.h: Add opaque declaration for struct obstack.
- Declare obsavestring to take a const char *.
- * symfile.c (obsavestring): Make first argument a const char *.
-
-2002-10-16 Adam Fedor <fedor@gnu.org>
+2003-01-19 Andrew Cagney <ac131313@redhat.com>
+
+ * d10v-tdep.c (d10v_frame_saved_pc, d10v_frame_chain): Restore
+ code handling dummy frames.
+
+2003-01-19 Andrew Cagney <ac131313@redhat.com>
+
+ * frame-unwind.h (frame_unwind_pop_ftype): Declare.
+ (struct frame_unwind): Add field pop.
+ * frame.h (frame_pop): Declare.
+ * frame.c (frame_saved_regs_pop): New function.
+ (trad_frame_unwinder): Add frame_saved_regs_pop.
+ (frame_pop): New function.
+ * dummy-frame.c (dummy_frame_pop): New function.
+ (discard_innermost_dummy): New function.
+ (generic_pop_dummy_frame): Use discard_innermost_dummy.
+ (dummy_frame_unwind): Add dummy_frame_pop.
+ * infrun.c (normal_stop): Call frame_pop instead of POP_FRAME.
+ * valops.c (hand_function_call): Ditto.
+ * stack.c (return_command): Ditto.
+
+2003-01-18 Andrew Cagney <ac131313@redhat.com>
+
+ * cris-tdep.c: Fix function declaration indentation.
+ * dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto.
+ * mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto.
+ * rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto.
+ * symfile.h, symtab.h, target.c, target.h, value.h: Ditto.
+ * xcoffread.c, config/pa/tm-hppa.h: Ditto.
+ * config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
+
+2003-01-18 Michael Chastain <mec@shout.net>
+
+ * README (Unpacking and Installation -- quick overview):
+ Warn against ".../gdb-5.3/gdb/configure".
+
+2003-01-18 Andrew Cagney <ac131313@redhat.com>
+
+ * dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
+ (dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
+ (struct frame_unwind): Declare opaque.
+ (dummy_frame_p): Declare function.
+ * dummy-frame.c (dummy_frame_id_unwind): Make static.
+ (dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
+ * dummy-frame.c: Include "frame-unwind.h".
+ (dummy_frame_p): New function.
+ (dummy_frame_unwind): New variable.
+ * frame.c: Include "frame-unwind.h".
+ (frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
+ to use the new unwind field.
+ (set_unwind_by_pc): Delete function.
+ (create_new_frame, get_prev_frame): Set unwind field using
+ frame_unwind_find_by_pc.
+ (trad_frame_unwind, trad_frame_unwinder): New variables.
+ * frame.h (trad_frame_unwind): Declare variable.
+ (frame_id_unwind_ftype): Delete declaration.
+ (frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
+ (struct frame_unwind): Declare opaque.
+ (struct frame_info): Replace the fields id_unwind, pc_unwind and
+ register_unwind with a single unwind pointer.
+ * frame-unwind.h, frame-unwind.c: New files.
+ * Makefile.in (SFILES): Add frame-unwind.c.
+ (frame_unwind_h): Define.
+ (COMMON_OBS): Add frame-unwind.o.
+ (frame-unwind.o): Specify dependencies.
+ (frame.o, dummy-frame.o): Update dependencies.
+
+2003-01-18 Andrew Cagney <ac131313@redhat.com>
+
+ * ada-valprint.c: Eliminate PTR.
+ * breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
+ * defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
+ * exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
+ * objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
+ * remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
+ * solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
+ * symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
+
+2003-01-17 Andrew Cagney <ac131313@redhat.com>
+
+ * main.c (captured_main): Don't use PTR.
+ * cp-valprint.c (cp_print_class_method): Replace STREQ with strcmp.
+ * gdbtypes.c (lookup_primitive_typename): Ditto.
+ (lookup_struct_elt_type): Ditto.
+ * f-valprint.c (info_common_command): Ditto.
+ (list_all_visible_commons): Ditto.
+ * jv-typeprint.c (java_type_print_base): Ditto.
+
+ * config/djgpp/fnchange.lst: Rename mi1-var-block.exp,
+ mi1-var-child.exp, mi1-var-cmd.exp and mi1-var-display.exp.
+ Rename opcodes/iq2000-desc.c and opcodes/iq2000-dis.c. Rename
+ i386-interix-nat.c and i386-interix-tdep.c. Rename
+ m68klinux-nat.c and m68klinux-tdep.c. Rename
+ config/mips/tm-linux.h and config/mips/tm-linux64.h. Rename
+ bfd/po/.cvsignore and opcodes/po/.cvsignore. Rename
+ gdb/objc-exp.tab.c and gdb/ada-exp.tab.c
+ * main.c (captured_main): Use xfree, not free.
+
+2003-01-16 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (frame_id_unwind_ftype): Change type so that the frame's
+ ID back using a parameter.
+ * frame.c (frame_id_unwind): Update call.
+ (frame_saved_regs_id_unwind): Update.
+ * dummy-frame.c (dummy_frame_id_unwind): Update function.
+ * dummy-frame.h (struct frame_id): Add opaque declaration.
+ (dummy_frame_id_unwind): Update declaration.
+
+2003-01-15 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c: Delete reference to PRINT_REGISTER_HOOK.
+
+2003-01-15 Stephen P. Smith <ischis2@cox.net>
+
+ * MAINTAINERS (Stephen P. Smith): Updated email address.
+
+2003-01-14 Elena Zannoni <ezannoni@redhat.com>
+
+ Fix PR gdb/898
+ * breakpoint.c (until_break_command): Add new argument. Use it to
+ decide whether to stop only at the current frame or not.
+ * breakpoint.h (until_break_command): Update prototype.
+ * infcmd.c (until_command): Add new argument to until_break_command
+ call.
+ (advance_command): New function.
+ (_initialize_infcmd): Update help string for 'until' command.
+ Add new 'advance' command.
- * breakpoint.c (parse_breakpoint_sals): Ignore ObjC method
- names when matching breakpoints in current file.
+2003-01-14 David Carlton <carlton@math.stanford.edu>
-2002-10-16 Kevin Buettner <kevinb@redhat.com>
+ * linespec.c (decode_line_1): Normalize comments.
+ (set_flags): Ditto.
+ (locate_first_half): Ditto.
+ (decode_compound): Ditto.
+ (symtab_from_filename): Ditto.
+ (decode_all_digits): Ditto.
+ (decode_dollar): Ditto.
+ (find_methods): Ditto.
+ (find_toplevel_char): Ditto.
+
+2003-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ * ax-gdb.c, c-valprint.c, charset.c, corefile.c: Update copyright.
+ * demangle.c, disasm.c, dwarf2cfi.c, dwarfread.c: Update copyright.
+ * elfread.c, eval.c, expprint.c, expression.h: Update copyright.
+ * f-typeprint.c, findvar.c, gcore.c, gdb_mbuild.sh: Update copyright.
+ * gdbtypes.h, gnu-v2-abi.c, inferior.h, inftarg.c: Update copyright.
+ * language.c, language.h, m32r-tdep.c: Update copyright.
+ * mn10200-tdep.c, scm-lang.c, scm-lang.h: Update copyright.
+ * somsolib.c, somsolib.h, symfile.c, symtab.h: Update copyright.
+ * thread-db.c, typeprint.c, utils.c, valarith.c: Update copyright.
+ * values.c, win32-nat.c, x86-64-linux-nat.c: Update copyright.
+ * x86-64-linux-tdep.c, z8k-tdep.c: Update copyright.
+ * cli/cli-decode.h, config/h8500/tm-h8500.h: Update copyright.
+
+2003-01-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * stabsread.h (process_later, resolve_cfront_continuation):
+ Obsolete.
+ Update copyright years.
+ * buildsym.c (start_subfile): Obsolete comment pertinent to Cfront.
+ Update copyright year.
+ * dbxread.c(struct cont_elem): Obsolete.
+ (process_later, process_now): Obsolete functions.
+ (read_dbx_symtab, read_ofile_symtab): Obsolete cfront support.
+ Update copyright year.
+ * gdbtypes.c (INIT_EXTRA, ADD_EXTRA): Obsolete macros.
+ (add_name, add_mangled_type, cfront_mangle_name): Obsolete functions.
+ * mdebugread.c (parse_type): Obsolete comment pertinent to Cfront.
+ (parse_partial_symbols): Obsolete cfront support.
+ * stabsread.c
+ (CFRONT_VISIBILITY_PRIVATE,CFRONT_VISIBILITY_PUBLIC): Obsolete
+ macros.
+ (get_substring, get_cfront_method_physname, msg_unknown_complaint,
+ read_cfront_baseclasses, read_cfront_member_functions,
+ resolve_cfront_continuation,read_cfront_static_fields,
+ copy_cfront_struct_fields): Obsolete functions.
+ (define_symbol, read_one_struct_field): Obsolete cfront support.
+ * xcoffread.c (scan_xcoff_symtab): Obsolete CFront support.
+ Update Copyright year.
- * dwarf2read.c (dwarf2_invalid_pointer_size): New complaint.
- (read_tag_pointer_type): Add address class support.
- * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS)
- (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, ADDRESS_CLASS_NAME_TO_TYPE_FLAGS):
- New methods.
+2003-01-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * stack.c (print_frame_info, print_stack_frame_base_stub,
+ print_stack_frame_base, show_and_print_stack_frame_stub,
+ show_and_print_stack_frame, print_only_stack_frame_stub,
+ print_only_stack_frame): Delete functions.
+ (print_stack_frame_stub): Call print_frame_info instead of
+ print_frame_info_base.
+ (print_frame_info_base): Rename to print_frame_info.
+ (backtrace_command_1): Call print_frame_info, instead of
+ print_frame_info_base.
+ (current_frame_command): Call print_stack_frame, instead of
+ print_only_stack_frame.
+ (frame_command): Call print_stack_frame, instead of
+ show_and_print_stack_frame.
+ (up_command): Ditto.
+ (down_command): Ditto.
+ * frame.h (print_only_stack_frame): Delete prototype.
+ * infrun.c (normal_stop): Call print_stack_frame, instead of
+ show_and_print_stack_frame.
+ * thread.c (info_threads_command): Call print_stack_frame, instead
+ of print_only_stack_frame.
+
+2003-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ * README (Graphical interface to GDB): Update URL. Point at
+ gdb/links/.
+
+ * gdb_indent.sh: Update to version 2.2.9. Warn when not exact
+ version match.
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.c (find_pc_sect_line): Don't consider end-of-function
+ lines.
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * thread-db.c (attach_thread): Prototype.
+ (struct private_thread_info): Remove lwpid. Add thread handle (th),
+ thread information (ti), and valid flags (th_valid, ti_valid).
+ (attach_thread): Move target_pid_to_str call to after the thread
+ is added to GDB's list. Initialize the cache.
+ (thread_get_info_callback, thread_db_map_id2thr)
+ (thread_db_get_info): New functions.
+ (thread_from_lwp, lwp_from_thread, thread_db_fetch_registers)
+ (thread_db_store_registers, thread_db_thread_alive)
+ (thread_db_get_thread_local_address): Use them.
+ (thread_db_pid_to_str): Likewise. Return "Missing" instead
+ of calling error() for threads in unknown state.
+
+ (clear_lwpid_callback): New function.
+ (thread_db_resume): Use it to clear the cache.
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * lin-lwp.c (struct private_thread_info, find_lwp_callback): Remove.
+ (resume_callback): Remove dead code.
+
+2003-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_INIT_SAVED_REGS): Change to function with
+ predicate.
* gdbarch.h, gdbarch.c: Regenerate.
- * gdbtypes.c (address_space_name_to_int, address_space_int_to_name)
- (make_type_with_address_space, recursive_type_dump): Add address
- class support.
- * gdbtypes.h (TYPE_FLAG_ADDRESS_CLASS_1, TYPE_FLAG_ADDRESS_CLASS_2)
- (TYPE_FLAG_ADDRESS_CLASS_ALL, TYPE_ADDRESS_CLASS_1)
- (TYPE_ADDRESS_CLASS_2, TYPE_ADDRESS_CLASS_ALL): New defines
-
-2002-10-16 Klee Dienes <kdienes@apple.com>
-
- * stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2]
- to get the last character of a char[] buffer, not
- name[sizeof(vptr_name)-1].
-
-2002-10-14 Adam Fedor <fedor@gnu.org>
-
- * symtab.h: New objc_specific struct.
- (SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC.
- (SYMBOL_DEMANGLED_NAME): Likewise.
-
-2002-10-14 Adam Fedor <fedor@gnu.org>
-
- * symfile.c (init_filename_language_table): Add ObjC file extension.
-
-2002-10-14 Adam Fedor <fedor@gnu.org>
-
- * utils.c (puts_filtered_tabular): New function.
- (fprintf_symbol_filtered): Get ObjC demangled name.
- * defs.h (puts_filtered_tabular): Declared.
+ * stack.c (frame_info): Only initialize the saved registers when
+ FRAME_INIT_SAVED_REGS_P.
+ * frame.c (frame_saved_regs_register_unwind): Assert
+ FRAME_INIT_SAVED_REGS_P.
+ (deprecated_generic_get_saved_register): Ditto.
-2002-10-14 Kevin Buettner <kevinb@redhat.com>
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
- * c-lang.h (c_type_print_varspec_prefix): Delete.
- * c-typeprint.c (c_type_print_varspec_prefix): Make static. Add
- ``need_post_space'' parameter. Adjust all callers.
+ * source.c (openp): Squelch warning about "filename".
-2002-10-14 Daniel Jacobowitz <drow@mvista.com>
-
- * config/mips/nm-irix4.h (HAVE_NONSTEPPABLE_WATCHPOINT): Define to 1.
- * config/mips/nm-irix5.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
- * config/mips/tm-embed.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
- * config/pa/nm-hppah.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
-2002-10-13 Adam Fedor <fedor@gnu.org>
+ * source.c (openp): If the file does not exist don't necessarily
+ search the path.
- * source.c (print_source_lines): Update comments.
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
-2002-10-13 Adam Fedor <fedor@gnu.org>
+ Fix PR gdb/872.
+ * gdbtypes.c (init_type): Mark "char" as TYPE_FLAG_NOSIGN.
+ (integer_types_same_name_p): New function.
+ (rank_one_type): Use it.
+ * stabsread.c (read_range_type): Mark "char" as TYPE_FLAG_NOSIGN.
- * valops.c (value_of_local): New function.
- (value_of_this): Use it.
- * value.h (value_of_local): Declared.
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
-2002-10-13 Adam Fedor <fedor@gnu.org>
-
- * parse.c: (length_of_subexp, prefixify_subexp): Handle
- OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
-
-2002-10-12 Adam Fedor <fedor@gnu.org>
-
- * language.c (binop_result_type): Add language_objc to case.
- (integral_type): Likewise.
- (character_type): Likewise.
- (string_type): Likewise.
- (boolean_type): Likewise.
- (structured_type): Likewise.
- (binop_type_check): Likewise.
-
-2002-10-11 Adam Fedor <fedor@gnu.org>
-
- * printcmd.c (address_info): Print 'self' for ObjC.
-
-2002-10-11 Adam Fedor <fedor@gnu.org>
-
- * expression.h: New ops OP_NSSTRING, OP_SELECTOR, OP_MSGCALL, and
- OP_SELF.
-
-2002-10-11 Adam Fedor <fedor@gnu.org>
-
- * language.h (CAST_IS_CONVERSION): Add language_objc.
-
-2002-10-11 Adam Fedor <fedor@gnu.org>
-
- * defs.h (enum language): Add language_objc.
-
-2002-10-11 Klee Dienes <kdienes@apple.com>
-
- * corefile.c (read_memory_typed_address): New function.
- * gdbcore.h (read_memory_typed_address): Add prototype.
- * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address
- to read a value destined for a CORE_ADDR, not read_memory_integer.
- * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
- (f77_get_dynamic_lowerbound): Ditto.
-
-2002-10-25 David Carlton <carlton@math.stanford.edu>
-
- * cp-support.c: Add comment to demangled name pitfalls.
- * symtab.c (lookup_transparent_type): Add FIXME comment at
- beginning.
-
-2002-10-23 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c: Delete cplusplus_hint.
- Delete prototype for find_template_name_end.
- * dwarf2read.c (scan_partial_symbols): Add in a gdb_assert from a
- later version of my namespace_minimal patch.
-
-2002-10-22 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (scan_partial_symbols): Clarify some comments.
- * symtab.c (lookup_symbol_aux): Always call
- lookup_symbol_aux_using to search global symtabs/psymtabs.
- (lookup_symbol_aux_local): Add static_block argument.
- * buildsym.c (add_symbol_to_list): Do a quick scan for "(anonymous
- namespace)" before calling scan_for_anonymous_namespaces.
- (scan_for_anonymous_namespaces): Delete FIXME comment.
-
-2002-10-21 David Carlton <carlton@math.stanford.edu>
-
- * buildsym.c (add_symbol_to_list): Expand comment.
- * objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
- * Makefile.in (x86-64-tdep.o): Depend on block_h.
- * x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END and
- SYMBOL_BLOCK_VALUE.
-
-2002-10-18 David Carlton <carlton@math.stanford.edu>
-
- * Makefile.in (block_h): New variable.
- Updated dependencies to reflect it.
- * parse.c (parse_exp_1): Use BLOCK_START.
- #include "block.h"
- * p-exp.tab.c: Regenerated.
- * m2-exp.tab.c: Ditto.
- * jv-exp.tab.c: Ditto.
- * f-exp.tab.c: Ditto.
- * c-exp.tab.c: Ditto.
- * ada-exp.tab.c: Ditto.
- * ada-lang.c: #include "block.h"
- * p-exp.y: Ditto.
- * objc-exp.y: Ditto.
- * m2-exp.y: Ditto.
- * jv-exp.y: Ditto.
- * f-exp.y: Ditto.
- * c-exp.y: Ditto.
- * ada-exp.y: Ditto.
- * values.c: Ditto.
- * valops.c: Ditto.
- * tracepoint.c: Ditto.
- * symtab.c: Ditto.
- * symmisc.c: Ditto.
- * symfile.c: Ditto.
- * stack.c: Ditto.
- * printcmd.c: Ditto.
- * objfiles.c: Ditto.
- * objc-lang.c: Ditto.
- * nlmread.c: Ditto.
- * mips-tdep.c: Ditto.
- * mdebugread.c: Ditto.
- * linespec.c: Ditto.
- * jv-lang.c: Ditto.
- * infcmd.c: Ditto.
- * f-valprint.c: Ditto.
- * findvar.c: Ditto.
- * expprint.c: Ditto.
- * coffread.c: Ditto.
- * buildsym.c: Ditto.
- * breakpoint.c: Ditto.
- * blockframe.c: Ditto.
- * ax-gdb.c: Ditto.
- * alpha-tdep.c: Ditto.
- * block.h: New file.
- * symtab.h: Moved struct block, struct blockvector, and related
- macros and function declarations to block.h.
- * dwarf2read.c (process_die): Set processing_has_namespace_info if
- we run into DW_TAG_namespace, DW_TAG_imported_declaration, or
- DW_TAG_imported_module.
- New variable current_namespace.
- (psymtab_to_symtab_1): Set current_namespace to "".
- (dwarf2_name): New function.
- (dwarf2_add_member_fn): Get name via dwarf2_name.
- (read_typedef): Ditto.
- (read_file_scope): Ditto.
- (dwarf2_add_field): Ditto.
- (read_structure_scope): Ditto.
- (read_enumeration): Ditto.
- (dwarf2_extension): New function.
- (read_namespace): Set current_namespace correctly; also, if we're
- entering an anonymous namespace, add an appropriate using
- directive.
- * buildsym.c (start_symtab): Reset processing_has_namespace_info
- to 0.
- (add_symbol_to_list): Only scan for anonymous namespaces if
- !processing_has_namespace_info.
- * buildsym.h: Add new flag processing_has_namespace_info.
-
-2002-10-16 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (dwarf_tag_name): Add DWARF 3 names.
- (dwarf_attr_name): Ditto.
- (dwarf_type_encoding_name): Ditto.
- (scan_partial_symbols): Descend into DW_TAG_namespace entries.
- (process_die): Handle DW_TAG_namespace,
- DW_TAG_imported_declaration, DW_TAG_imported_module.
- (read_namespace): New function.
-
-2002-10-15 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_using_loop): prefix_len should be <=
- outer_length.
- (lookup_symbol_aux_using_loop): Don't skip colons in rest_of_outer
- if we've used all of outer.
- * cp-support.h: Rename declaration of cp_add_using to
- cp_add_using_obstack.
- * cp-support.c (cp_add_using_obstack): Rename from cp_add_using.
- * buildsym.h: Rename arguments in declaration of
- add_using_directive.
- * buildsym.c (add_using_directive): Finish definition, rename
- arguments.
- * cp-support.h: Add declaration for cp_add_using_xmalloc.
- * cp-support.c (cp_add_using_xmalloc): New function.
- * buildsym.c (copy_usings_to_obstack): New function.
- (end_symtab): Set STATIC_BLOCK's BLOCK_USING using
- copy_usings_to_obstack.
-
-2002-10-14 David Carlton <carlton@math.stanford.edu>
-
- * buildsym.c (add_using_directive): Rewrite to match new version
- of struct using_direct.
- (finish_block): Ditto.
- * symtab.c (lookup_symbol_aux_using_loop): Add 'prefix_len'
- argument; rewrite to match new version of struct using_direct.
- * cp-support.h: Update declaration for cp_add_using.
- * cp-support.c (cp_add_using): Rewrite to match new version of
- struct using_direct.
- * cp-support.h (struct using_direct): Rewrite struct.
- * buildsym.h: Declaration for add_using_directive.
- * buildsym.c: New variable 'using_list'.
- (start_symtab): Initialize using_list.
- (end_symtab): Initialize BLOCK_USING of STATIC_BLOCK.
- (scan_for_anonymous_namespaces): New function.
- (add_symbol_to_list): In C++ case, look for anonymous namespaces.
- (add_using_directive): New function.
-
-2002-10-11 David Carlton <carlton@math.stanford.edu>
-
- * jv-lang.c (get_java_class_symtab): Initialize BLOCK_USING (bl)
- to NULL.
- * cp-support.c: Change all uses of 'struct using_data' and 'struct
- using_data_node' to 'struct using_direct' and 'struct
- using_direct_node'.
- (cp_free_usings): Fix loop.
- * symtab.c: Ditto.
- * symtab.h: Ditto
- * cp-support.h: Delete declarations for commented-out functions.
- Rename 'struct using_data' and 'struct using_data_node' to 'struct
- using_direct' and 'struct using_direct_node'.
- * cp-support.c: Delete commented-out functions.
-
-2002-10-10 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c (lookup_symbol_aux_using_loop): New function.
- (lookup_symbol_aux_nonlocal): New function.
- (lookup_symbol_aux): Call lookup_symbol_aux_nonlocal instead of
- lookup_symbol_aux_symtabs and lookup_symbol_aux_psymtabs.
-
- * Makefile.in (symtab.o): Depend on $(cp_support_h).
-
- * symtab.c: #include "cp-support.h"
-
- * cp-support.h: Declare cp_copy_usings, cp_free_usings.
-
- * cp-support.c (cp_free_usings): New function.
- (cp_copy_usings): New function.
-
- * symtab.c (lookup_symbol_aux): Call lookup_symbol_aux_using to
- apply using directives.
- (lookup_symbol_aux_using): New function.
-
-2002-10-09 David Carlton <carlton@math.stanford.edu>
-
- * cp-support.c: Comment out cp_find_last_component and
- cp_locate_arguments.
- Add comments warning about pitfals involving demangled names.
- * buildsym.c (finish_block): Grab the namespace names from the
- front instead of from the back.
- * Makefile.in (cp-support.o): Depend on gdb_assert_h.
- * cp-support.c: #include "gdb_assert.h"
- * cp-support.h: Declare cp_find_first_component.
- * cp-support.c (cp_find_first_component): New function.
- * buildsym.c (finish_block): Don't add namespace using stuff
- unless there's a demangled name to work with.
- (finish_block): Delete unused variable 'j'.
- (finish_block): Move declaration of iter earlier to pacify GCC.
-
-2002-10-08 David Carlton <carlton@math.stanford.edu>
-
- * symfile.c (obsavestring): Make first argument a const char *.
- * symfile.h: Add opaque declaration for 'struct obstack'.
- Make obsavestring take a const char * as its first argument.
- * Makefile.in (cp-support.o): Correct dependencies.
- * cp-support.h: Declare cp_add_using.
- * cp-support.c: #include "gdb_obstack.h"
- (cp_add_using): New function.
- * Makefile.in (buildsym.o): Depend on $(cp_support_h).
- * buildsym.c (finish_block): Add 'using' directives for
- functions.
- #include "cp-support.h"
- * cp-support.h: Add function declarations.
- * cp-support.c (cp_locate_arguments): New function.
- (cp_find_last_component): New function.
- * symtab.h (struct block): Add comment.
-
-2002-10-07 David Carlton <carlton@math.stanford.edu>
-
- * buildsym.c (finish_block): Initialize BLOCK_USING to NULL.
- * symtab.h (struct block): Delete last remnants of non-dictionary
- symbol lists.
- (struct block): Add field 'language_specific' and accessor macro
- BLOCK_USING.
- * cp-support.h (struct using_data): New struct.
- (struct using_data_node): New struct.
-
-2002-09-30 David Carlton <carlton@math.stanford.edu>
-
- * dictionary.h: Augment comment above dict_lookup.
- * dictionary.c (struct dict_vtbl): Delete 'lookup' member, and
- move add_symbol to precede the iterators.
- Make corresponding changes to dict_hashed_vtbl, dict_linear_vtbl,
- dict_linear_expandable_vtbl.
- (dict_lookup): Implement by means of dict_iterator_name_first.
- (iter_name_first_hashed): Don't use lookup_hashed to implement.
- (lookup_hashed): Delete.
- (lookup_linear): Delete.
- * symtab.c (lookup_symbol_aux_global_symtabs): Delete 'block'
- argument, rename local variable 'b' to 'block', and make it point
- to a const struct block.
- (lookup_symbol_aux_minsym_non_hpuxhppa): Ditto.
- (lookup_symbol_aux_global_psymtabs): Ditto.
- (lookup_symbol_aux_static_symtabs): Ditto.
- (lookup_symbol_aux_static_psymtabs): Ditto.
- (lookup_symbol_aux_minsym_hpuxhppa): Ditto.
- (lookup_symbol_aux): Correct calls to above functions.
- (lookup_symbol_aux_minsym_non_hpuxhppa): When recursively calling
- lookup_symbol_aux, pass 'NULL' as block argument.
- (lookup_symbol_aux_minsym_hpuxhppa): Ditto.
- (lookup_symbol_aux_global_symtabs): Don't initialize objfile and
- s.
- (lookup_symbol_aux_minsym_non_hpuxhppa): Don't initialize s.
- (lookup_symbol_aux_global_psymtabs): Ditto.
- (lookup_symbol_aux_static_symtabs): Ditto.
- (lookup_symbol_aux_static_psymtabs): Ditto.
- (lookup_symbol_aux_minsym_hpuxhppa): Ditto.
- (lookup_symbol_aux_global_psymtabs): Don't initialize objfile.
- (lookup_symbol_aux_static_symtabs): Ditto.
- (lookup_symbol_aux_static_psymtabs): Ditto.
- (lookup_symbol_aux_minsym_hpuxhppa): Delete local variable
- objfile.
- (lookup_symbol_aux_static_symtabs): Delete, to be replaced by
- lookup_symbol_aux_symtabs.
- (lookup_symbol_aux_global_symtabs): Ditto.
- (lookup_symbol_aux_symtabs): New function.
- (lookup_symbol_aux_psymtabs): New function.
- (lookup_symbol_aux_global_psymtabs): Delete, to be replaced by
- lookup_symbol_aux_psymtabs.
- (lookup_symbol_aux_static_psymtabs): Ditto.
- (lookup_symbol_aux_minsym_hpuxhppa): Delete, to be replaced by
- lookup_symbol_aux_minsyms.
- (lookup_symbol_aux_minsym_non_hpuxhppa): Ditto.
- (lookup_symbol_aux_minsyms): New function.
- (lookup_symbol_aux): Replace function calls by calls to functions
- with new names.
- (lookup_symbol_aux): Search global psymtabs before minimal
- symbols.
- * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
- * ppc-sysv-tdep.c: #include "gdb_string.h".
-
-2002-09-27 David Carlton <carlton@math.stanford.edu>
-
- * symtab.c: Run through gdb_indent.sh.
- (lookup_symbol_aux): Delete code that isn't called.
- (lookup_symbol_aux): Don't declare variables 'register'.
- (lookup_symbol_aux): Move each chunk of code into its own
- function.
- (lookup_symbol_aux_local): New function.
- (lookup_symbol_aux_global_symtabs): New function.
- (lookup_symbol_aux_minsym_non_hpuxhppa): New function.
- (lookup_symbol_aux_global_psymtabs): New function.
- (lookup_symbol_aux_static_symtabs): New function.
- (lookup_symbol_aux_static_psymtabs): New function.
- (lookup_symbol_aux_minsym_hpuxhppa): New function.
- (lookup_symbol_aux_global_psymtabs): Remove embedded newlines from
- strings because CC mode can't deal with them.
- (lookup_symbol_aux_static_psymtabs): Ditto.
- (lookup_symbol_aux): Delete local variables that are now
- obsolete.
- * remote-sds.c (getmessage): Add semicolon after 'retry' label to
- pacify GCC.
-
-2002-10-11 Martin M. Hunt <hunt@redhat.com>
-
- * utils.c (string_to_core_addr): After turning string into
- a number, convert to a CORE_ADDR using INTEGER_TO_ADDRESS
- which will do necessary sign-extension, etc.
-
-2002-10-11 Daniel Jacobowitz <drow@mvista.com>
-
- * c-exp.y (THIS): Delete token and grammar rule.
- (yylex): Don't return THIS.
- * cp-valprint.c (vtbl_ptr_name_old): Delete.
- (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old.
- * demangle.c (cplus_markers): Update comment. Put '$'
- first. Remove CPLUS_MARKER.
- (_initialize_demangler): Don't call set_cplus_marker_for_demangling.
- * jv-exp.y (THIS): Delete token and grammar rule.
- (yylex): Don't return THIS.
- * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER.
- * objc-exp.y (THIS): Delete token and grammar rule.
- (yylex): Don't return THIS.
- * p-exp.y (yylex): Remove reference to CPLUS_MARKER.
- * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'.
- (read_member_functions): Likewise for opname.
- (read_tilde_fields): Use is_cplus_marker.
-
- * defs.h (CPLUS_MARKER): Don't define.
- * config/tm-sysv4.h (CPLUS_MARKER): Likewise.
- * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise.
- * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise.
- * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise.
- * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise.
-
- * config/i386/tm-i386v4.h: Delete file.
- * config/djgpp/fnchange.lst: Delete tm-i386v4.h.
- * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead.
- * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead.
- * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead.
- * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h.
- * config/i386/i386sco5.mt (TM_FILE): Likewise.
- * config/i386/i386v4.mt (TM_FILE): Likewise.
- * config/i386/ncr3000.mt (TM_FILE): Likewise.
-
-2002-10-10 Marko Mlinar <markom@opencores.org>
-
- * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C,
- accidentially not commited 2002-10-09
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-10-09 Marko Mlinar <markom@opencores.org>
-
- * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C.
- * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Add.
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-10-08 Petr Sorfa <petrs@caldera.com>
-
- Revised and re-submitted by John Wolfe <jlw@caldera.com>
-
- Move the Dwarf 2 abbrev table to a per-compilation-unit structure,
- so we can work on more than one compilation unit at a time. This
- helps prepare GDB to handle inter-CU die references.
- * dwarf2read.c (ABBREV_HASH_SIZE): moved definition forward in
- the code to be defined before struct comp_unit_head.
- (comp_unit_head): Added new members - offset, cu_head,
- begin_die, next and dwarf2_abbrevs.
- (dwarf2_abbrevs): Removed single static var; now member of
- struct comp_unit_head.
- dwarf2_build_psymtabs_hard): Complete new struct comp_unit_head
- members.
- (psymtab_to_symtab_1): Changed to work with the new
- struct comp_unit_head.
- (dwarf2_read_abbrevs): Now accepts a cu_header parameter and
- constructs the dwarf2_abbrevs[] inside the cu_header.
- (dwarf2_empty_abbrev_table): Now expects a ptr to a
- dwarf2_abbrev table to clean up.
- (dwarf2_lookup_abbrev): Now accepts a cu_header parameter and
- handling of dwarf2_abbrevs inside the cu_header.
- (read_partial_die): Now supports the call to the new
- dwarf2_lookup_abbrev.
- (read_full_die): Now supports the call to the new
- dwarf2_lookup_abbrev.
-
-2002-10-06 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (install-gdbtk): Add missing continuation backslash to
- insure that shell variables, such as "transformed_name" are propagated
- to later shell statements in rule.
-
-2002-10-06 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/nm-i386sco.h: Add protection against
- multiple-inclusion. Include "i386/nm-i386v.h".
- (REGISTER_U_ADDR): Remove define.
- (i386_register_u_addr): Remove prototype.
-
-2002-10-04 Michael Snyder <msnyder@redhat.com>
-
- * m32r-stub.c (handle_exception): Make sure exception is "trap"
- before treating it as a single-step event.
-
-2002-10-03 Adam Fedor <fedor@gnu.org>
-
- * objc-lang.c: ARI fixes. Change string.h to gdb_string.h.
- (objc_demangle): Remove assignment in if statements, Replace
- free with xfree.
- (add_msglist): Likewise.
- (end_msglist): Likewise.
- (complare_selectors): Likewise.
- (selectors_info): Likewise.
- (compare_classes): Likewise.
- (classes_info): Likewise.
- (print_object_command): Likewise.
- (find_objc_msgcall_submethod): Replace PTR with void *.
- * objc-lang.h: Remove check for __STDC__.
-
-2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * ui-out.h (ui_out_field_fmt_int): New prototype.
- * ui-out.c (ui_out_field_fmt_int): New function allowing specification
- of field width and alignment.
- * stack.c (print_frame_info_base): When printing frame level, use
- ui_out_field_fmt_int with a width of 2 and left alignment. Fix for
- PR gdb/192
-
-2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * MAINTAINERS: Add self to Write After Approval list.
-
-2002-10-02 Elena Zannoni <ezannoni@redhat.com>
-
- * infcmd.c (interrupt_target_command_wrapper): Delete.
- (interrupt_target_command): Make non static.
- (nofp_registers_info): Make static.
- * stack.c (return_command_wrapper): Delete.
- (return_command): Make non static.
-
-2002-10-02 Elena Zannoni <ezannoni@redhat.com>
-
- * event-top.c (gdb_setup_readline): New function. Code moved from
- _initialize_event_loop().
- (_initialize_event_loop): Call gdb_setup_readline().
-
-2002-10-02 Andrew Cagney <ac131313@redhat.com>
-
- * infrun.c (resume): Convert #ifdef CANNOT_STEP_BREAKPOINT into C.
- * gdbarch.sh (CANNOT_STEP_BREAKPOINT): Add.
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-10-02 Daniel Jacobowitz <drow@mvista.com>
-
- Fix PR gdb/778
- * gdbtypes.c (fill_in_vptr_fieldno): Call check_typedef
- before recursing.
- * gnu-v3-abi.c (gnuv3_virtual_fn_field): Check return value
- of fill_in_vptr_fieldno.
-
-2002-10-02 Elena Zannoni <ezannoni@redhat.com>
-
- * inferior.h (registers_info, stepi_command, nexti_command,
- continue_command, interrupt_target_command): Export from infcmd.c.
- * frame.h (args_info, selected_frame_level_changed_hook,
- return_command): Export from stack.c.
- * v850ice.c (stepi_command, nexti_command, continue_command): use
- prototypes from inferior.h.
- * tracepoint.c (registers_info, args_info, locals_info): Use
- prototypes from frame.h and inferior.h.
- * Makefile.in (mi-main.o): Add dependency on frame.h.
+ * Makefile.in (TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE): New
+ variables.
+ (main.o): Custom rule which uses $(TARGET_SYSTEM_ROOT_DEFINE).
+ * configure.in: Add --with-sysroot.
+ * configure: Regenerated.
+ * main.c (gdb_sysroot): New variable.
+ (captured_main): Initialize gdb_sysroot.
+ * defs.h (gdb_sysroot): New extern declaration.
+ * solib.c (_initialize_solib): Initialize solib_absolute_prefix.
-2002-10-02 Andrew Cagney <ac131313@redhat.com>
+2003-01-12 Michael Chastain <mec@shout.net>
- * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return
- value in register 3 adjusted by ppc_gp0_regnum.
+ * config/djgpp/fnchange.lst: add gdb/ChangeLog-2002.
- * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum.
+2003-01-12 Michael Chastain <mec@shout.net>
-2002-10-02 Marko Mlinar <markom@opencores.org>
+ * top.c (print_gdb_version): Bump copyright year to 2003.
- * MAINTAINERS: Add myself to the Write After Approval list.
+2003-01-12 David Carlton <carlton@bactrian.org>
-2002-10-01 Alexandre Oliva <aoliva@redhat.com>
+ * linespec.c (symtab_from_filename): Rename variable 's' to
+ 'file_symtab'.
- * mips-tdep.c (mips_find_abi_section): .mdebug.abi64 is the name
- of the section for the N64 ABI, fixed.
+2003-01-12 Andrew Cagney <ac131313@redhat.com>
- * config/mips/tm-irix6.h: Include solib.h.
+ * d10v-tdep.c (d10v_init_extra_frame_info): Remove checks for a
+ dummy frame.
+ (d10v_frame_saved_pc, d10v_frame_chain): Ditto.
-2002-10-01 Elena Zannoni <ezannoni@redhat.com>
+2003-01-12 Andrew Cagney <ac131313@redhat.com>
- * dwarf2read.c (dwarf_stack_op_name): Recognize more dwarf3 and
- GNU operators.
+ * d10v-tdep.c: Include "gdb_assert.h".
+ (d10v_store_return_value): Rewrite to match current interface.
+ (d10v_extract_struct_value_address): Ditto.
+ (d10v_extract_return_value): Ditto.
+ (d10v_gdbarch_init): Set store_restore_value,
+ extract_struct_value_address and extract_return_value.
-2002-10-01 Andrew Cagney <ac131313@redhat.com>
+2003-01-12 J. Brobecker <brobecker@gnat.com>
- * NEWS: Mention that MI syntax, selected by "mi" changed to "mi2"
- and that "mi0" syntax has been removed.
+ * hpread.c (set_namestring): New procedure replacing the
+ SET_NAMESTRING macro.
+ (hpread_build_psymtabs): Replace calls to SET_NAMESTRING
+ by calls to set_namestring.
-2002-09-30 David Carlton <carlton@math.stanford.edu>
+2003-01-11 J. Brobecker <brobecker@gnat.com>
- * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
- * ppc-sysv-tdep.c: #include "gdb_string.h".
- * remote-sds.c (getmessage): Add semicolon after 'retry' label to
- pacify GCC.
+ * hpread.c (SET_NAMESTRING): Remove an incorrect cast to fix
+ a compilation warning.
+ (hpread_process_one_debug_symbol): Likewise.
-2002-10-01 Andrew Cagney <ac131313@redhat.com>
+2003-01-10 David Carlton <carlton@math.stanford.edu>
- * rs6000-tdep.c (rs6000_gdbarch_init): For powerpc:7400, fix
- "vrsave"'s register number.
+ * linespec.c (decode_line_1): Rename variable 's' to
+ 'file_symtab'.
+ (decode_all_digits): Rename argument 's' to 'file_symtab'.
+ (decode_dollar): Ditto.
+ (decode_variable): Ditto.
+ (symbol_found): Ditto.
-2002-09-30 Andrew Cagney <ac131313@redhat.com>
+2003-01-09 Michael Chastain <mec@shout.net>
- * mips-tdep.c (mips_frame_saved_pc): When a generic dummy frame,
- use frame_unwind_signed_register to obtain the PC.
- (mips_frame_chain): Handle a generic dummy frame.
- (mips_init_extra_frame_info): When a generic dummy frame, don't
- re-compute the frame base.
- (mips_pop_frame): Handle generic dummy frames.
- (mips_gdbarch_init): When generic dummy frames, set
- use_generic_dummy_frames, push_dummy_frame to
- generic_push_dummy_frame, pc_in_call_dummy to
- generic_pc_in_call_dummy, and save_dummy_frame_top_of_stack to
- generic_save_dummy_frame_tos.
+ * config/djgpp/fnchange.lst: update file list for testsuite/gdb.c++.
-2002-09-30 Andrew Cagney <ac131313@redhat.com>
+2003-01-07 Corinna Vinschen <vinschen@redhat.com>
- * blockframe.c (generic_find_dummy_frame): Rewrite. Only test
- against TOP when TOP was explictly set.
- (generic_push_dummy_frame): Set TOP to zero.
+ * win32-nat.c (set_process_privilege): New function.
+ (child_attach): Call set_process_privilege() to enable the
+ SE_DEBUG_NAME user privilege if available in process token.
-2002-09-30 Elena Zannoni <ezannoni@redhat.com>
+2003-01-10 J. Brobecker <brobecker@gnat.com>
- * event-loop.c (start_event_loop): Rename variable 'result' to
- 'gdb_result', to avoid conflicts with upcoming intepreters changes.
+ * hpread.c (hpread_process_one_debug_symbol): Fix a small
+ compilation error in the previous revision.
-2002-09-30 Keith Seitz <keiths@redhat.com>
+2003-01-09 David Carlton <carlton@math.stanford.edu>
- * gdb-events.sh (selected_thread_changed): New event.
- * gdb-events.c: Regenerated.
- * gdb-events.h: Regenerated.
+ * linespec.c: Update copyright.
-2002-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+2003-01-09 Daniel Jacobowitz <drow@mvista.com>
- * MAINTAINERS: Add self to Write After Approval list.
+ * lin-lwp.c (child_wait): Ignore exit statuses for processes other
+ than inferior_ptid.
+ (lin_lwp_wait): Ignore exit statuses for unknown LWPs.
-2002-09-30 Fernando Nasser <fnasser@redhat.com>
+2003-01-09 Andrew Cagney <ac131313@redhat.com>
- * disasm.c: New file.
- * disasm.h: New file.
- * mi/mi-cmd-disas.c (gdb_dis_asm_read_memory): Moved to disasm.c.
- (compare_lines): Ditto.
- (dump_insns): Ditto.
- (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout
- argument.
- (do_assembly_only): Ditto.
- (do_disassembly): Renamed to gdb_disassembly and moved to
- disasm.c. Sdded uiout argument.
- * Makefile.in: Add new files. Reorder SFILES list. Update
- dependencies. Include libgdb.a later in the insight executable.
+ * frame.h (frame_obstack_zalloc): Replace frame_obstack_alloc.
+ Update comments.
+ * frame.c (frame_obstack_zalloc): Replace frame_obstack_alloc.
+ (frame_saved_regs_zalloc): Update.
+ (frame_saved_regs_register_unwind): Update.
+ (create_new_frame): Update.
+ (get_prev_frame): Update.
+ (frame_extra_info_zalloc): Update.
+ (deprecated_get_frame_saved_regs): Update.
+ * dwarf2cfi.c (cfi_init_extra_frame_info): Update.
+ * cris-tdep.c: Update comment.
-2002-09-29 Andrew Cagney <ac131313@redhat.com>
+ * somsolib.h: Fix function indentation.
+ * disasm.c, buildsym.c, buildsym.h: Eliminate PTR.
+ * gnu-v2-abi.c, f-typeprint.c, x86-64-linux-tdep.c: Eliminate STREQ.
+ * demangle.c, ax-gdb.c, c-valprint.c: Eliminate STREQ.
+ * alpha-osf1-tdep.c, corefile.c: Eliminate STREQ.
+ * somsolib.c, inftarg.c: Remove assignment in if conditional.
- * config/djgpp/fnchange.lst: Rename bfd/elf64-alpha.c and
- bfd/elf64-alpha-fbsd.c.
+ * infrun.c (follow_fork): Use ISO C definition.
+ * expprint.c (print_subexp): Use xfree instead of free.
+ * charset.c: Include "gdb_string.h" instead of <string.h>.
+ (register_iconv_charsets): Use ISO C definition.
+ (host_charset, target_charset): Ditto.
+ * Makefile.in (charset.o): Update dependencies.
+ (mi-cmd-env.o): Update dependencies.
-2002-09-29 Andrew Cagney <ac131313@redhat.com>
+2003-01-08 Andrew Cagney <cagney@redhat.com>
- * config/djgpp/fnchange.lst: Rename i386gnu-nat.c and
- i386gnu-tdep.c.
+ * alpha-linux-tdep.c (alpha_linux_sigcontext_addr): Use
+ get_frame_base.
-2002-09-29 Andrew Cagney <ac131313@redhat.com>
+2003-01-08 Andrew Cagney <ac131313@redhat.com>
- * gnu-nat.h (debug): Use __FILE__ and __LINE__ instead of
- __FUNCTION__.
- * gnu-nat.c (do_mach_notify_no_senders): Replace __FUNCTION__ with
- function name.
- (do_mach_notify_port_deleted, do_mach_notify_msg_accepted): Ditto.
- (do_mach_notify_port_destroyed, do_mach_notify_send_once): Ditto.
- (S_proc_setmsgport_reply, S_proc_getmsgport_reply): Ditto.
- (S_msg_sig_post_reply): Ditto.
-
-2002-09-28 Corinna Vinschen <vinschen@redhat.com>
-
- * sh-tdep.c (sh_use_struct_convention): Use definition according
- to ABI.
- (sh_push_arguments): Store in register with correct endianess.
- (sh_default_store_return_value): Ditto.
- (sh_gdbarch_init): Set sizeof long double to 8.
-
-2002-09-27 Mark Kettenis <kettenis@gnu.org>
-
- * defs.h: Move inclusion of "ansidecl.h" before "gdb_locale.h".
- Fix some whitespace problems.
-
-2002-09-27 David Carlton <carlton@math.stanford.edu>
+ * gdb_mbuild.sh: Add --keep option. When specified, keep the
+ build directories. Save edited gdb output in Mbuild.log. If a
+ build fails, remove any final GDB executable.
- * Makefile.in (cris-tdep.o): Depend on gdb_string_h.
- (mcore-tdep.o): Ditto.
- (ns32k-tdep.o): Ditto.
- (ns32knbsd-tdep.o): Ditto.
- (sh3-rom.o): Ditto.
- (vax-tdep.o): Ditto.
- * cris-tdep.c: #include "gdb_string.h"
- * mcore-tdep.c: Ditto.
- * ns32k-tdep.c: Ditto.
- * ns32knbsd-tdep.c: Ditto.
- * sh3-rom.c: Ditto.
- * vax-tdep.c: Ditto.
-
-2002-09-27 David Carlton <carlton@math.stanford.edu>
-
- * config/djgpp/fnchange.lst: Add entries for
- gdb/testsuite/gdb.c++/m-static files.
-
-2002-09-27 Jim Wilson <wilson@redhat.com>
-
- * MAINTAINERS: Add myself to the Write After Approval list.
-
-2002-09-26 Martin M. Hunt <hunt@redhat.com>
-
- * mips-tdep.c (find_proc_desc): Initialize startaddr.
-
-
-2002-09-26 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy
- frame.
-
-2002-09-26 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_extract_struct_value_address): Return 0.
- (rs6000_struct_return_address): Delete variable.
- (rs6000_store_struct_return): Update.
- (rs6000_gdbarch_init): Set extract_struct_value_address instead of
- deprecated_extract_struct_value_address.
- (rs6000_frame_align): New function.
- (rs6000_gdbarch_init): Set frame_align.
-
-2002-09-26 Andrew Cagney <ac131313@redhat.com>
-
- From Grace Sainsbury <graces@redhat.com>:
- * Makefile.in (gdbtk-main.o): New target.
- (gdb.o): New target.
- (main_h): Define.
- (main.o): Update dependencies.
- (gdb$(EXEEXT)): Add gdb.o.
- (SUBDIR_GDBTK_SRCS): Add gdbtk-main.c.
- (SUBDIR_GDBTK_ALL, SUBDIR_GDBTK_UNINSTALL): Set.
- (SUBDIR_GDBTK_CLEAN): Set.
- (install-gdbtk): Install the insight binary.
- (uninstall-gdbtk): New target.
- (all-gdbtk, clean-gdbtk): New rule.
- * top.c (use_windows): Default to zero.
- * main.c: Include "main.h".
- (main): Delete.
- (struct captured_main_args): Delete.
- (gdb_main): New function.
- * main.h: New file.
- * gdb.c: New File.
-
-2002-09-25 Andrew Cagney <cagney@redhat.com>
-
- * frame.c: Include "gdb_string.h" and "builtin-regs.h".
- (frame_map_regnum_to_name): New function.
- (frame_map_name_to_regnum): New function.
- * frame.h (frame_map_name_to_regnum): Declare.
- (frame_map_regnum_to_name): Declare.
- * builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
- * builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
- * parse.c: Do not include "builtin-regs.h".
- (target_map_name_to_register): Delete function.
- (write_dollar_variable): Use frame_map_name_to_regnum.
- * parser-defs.h (target_map_name_to_register): Delete declaration.
- * expprint.c: Include "frame.h".
- (print_subexp): Use frame_map_regnum_to_name.
- * eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
- * infcmd.c (registers_info): Use frame_map_name_to_regnum.
-
-2002-09-25 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_frame_saved_pc): If the link register
- wasn't saved, and the next innermost frame is a dummy, return the
- dummy frame's link register.
-
-2002-09-24 Jim Blandy <jimb@redhat.com>
-
- Fix from Paul Breed:
- * main.c (captured_main): Add a `break' after the case for 'b'.
-
-2002-09-24 Keith Seitz <keiths@redhat.com>
-
- * varobj.c (c_type_of_child): Use get_target_type instead
- of TYPE_TARGET_TYPE.
-
-2002-09-22 Fernando Nasser <fnasser@redhat.com>
-
- * source.c (get_current_or_default_source_symtab_and_line): Remove
- function.
- (set_default_source_symtab_and_line): New function. Attempts to
- determine a source file to list lines from if one is not currently
- defined.
- (get_current_source_symtab_and_line): Initialize sal.pc and
- sal.end fields.
- (set_current_source_symtab_and_line): Mark argument as const.
- * source.h: Update declarations and comments.
- * linespec.c (decode_line_1): Replace call to removed routine above.
- * stack.c (print_frame_info_base): Ditto.
- * cli/cli-cmds.c (edit_command): Ditto.
- (list_command): Ditto.
-
-2002-09-22 Fernando Nasser <fnasser@redhat.com>
-
- * source.c (get_current_or_default_source_symtab_and_line): Initialize
- sal.pc and sal.end fields.
- (get_current_or_default_source_symtab_and_line): Ditto.
- * breakpoint.c (parse_breakpoint_sals): Use correct accessor function
- so we do not cause a new source symtab to be searched for (reverting an
- unintentional change from the 2002-09-20 patch).
- * scm-lang.c (scm_unpac): Ditto.
-
-2002-09-21 Andrew Cagney <cagney@redhat.com>
-
- * complaints.c (symfile_explanations): Remove new-line from
- ``isolated_message''.
- (vcomplaint): When ISOLATED_MESSAGE, force a line break.
- (clear_complaints): When a SUBSEQUENT_MESSAGE, force a line break.
-
-2002-09-20 Nick Clifton <nickc@redhat.com>
-
- * NEWS: Announce that V850EA ISA is no longer supported.
- * v850-tdep.c: Remove reference to bfd_mach_v850ea.
-
-2002-09-20 David Carlton <carlton@math.stanford.edu>
-
- * Makefile.in (c-lang.o): Correct dependencies.
- (utils.o): Gather dependencies.
- (charset.o): Move.
- * c-lang.c: #include "gdb_string.h"
-
-2002-09-26 David Carlton <carlton@math.stanford.edu>
-
- * dictionary.c (dict_iter_name_first): New function.
- (dict_iter_name_next): New function.
- Initialize new members of dict_hashed_vtbl, dict_linear_vtbl, and
- dict_linear_expandable_vtbl.
- (iter_name_first_hashed): New function.
- (iter_name_next_hashed): New function.
- (iter_name_first_linear): New function.
- (iter_name_next_linear): New function.
- (lookup_hashed): Rewrite following new declaration/semantics.
- (lookup_linear): Ditto.
- (dict_lookup): Ditto.
- * symtab.c (lookup_block_symbol): Rewrite to use
- dict_iter_name_first and dict_iter_name_next instead of
- dict_lookup.
- * dictionary.c (struct dict_vtbl): Change member 'lookup'; new
- members 'iter_name_first' and 'iter_name_next'.
- * dictionary.h: Delete all traces of block stuff.
- Change declaration for dict_lookup; new declarations
- dict_iter_name_first and dict_iter_name_next.
- * dictionary.c: Delete all traces of block stuff.
- * symtab.h (SYMBOL_BEST_NAME): New macro.
- (SYMBOL_SOURCE_NAME): Rewrite in terms of SYMBOL_BEST_NAME.
- (SYMBOL_LINKAGE_NAME): Ditto.
- Comment questioning SYMBOL_MATCHES_NAME and
- SYMBOL_MATCHES_REGEXP.
- * Makefile.in (ns32knbsd-tdep.o): Depend on gdb_string_h.
- * ns32knbsd-tdep.c: #include "gdb_string.h"
-
-2002-09-25 David Carlton <carlton@math.stanford.edu>
-
- * dictionary.c: Commented what needs to be done to add stuff to
- this file.
- * dictionary.h: Expand on namespace_enum comment.
- * Makefile.in (cris-tdep.o): Depend on gdb_string_h.
- (mcore-tdep.o): Ditto.
- (ns32k-tdep.o): Ditto.
- (sh3-rom.o): Ditto.
- (vax-tdep.o): Ditto.
- * cris-tdep.c: #include "gdb_string.h"
- * mcore-tdep.c: Ditto.
- * ns32k-tdep.c: Ditto.
- * sh3-rom.c: Ditto.
- * vax-tdep.c: Ditto.
-
-2002-09-24 David Carlton <carlton@math.stanford.edu>
-
- * dictionary.c: Comment out block-specific stuff.
- * jv-lang.c (get_java_class_symtab): Allocate GLOBAL_BLOCK on
- obstack.
- (free_class_block): Don't free GLOBAL_BLOCK.
- * dictionary.h: Comment out block-specific stuff.
- * symtab.h: Comment out the members of struct block that
- BLOCK_DICT obsoletes, and their accessors.
- * Makefile.in (buildsym.o): Depend on gdb_assert_h.
- * buildsym.c (finish_block): Don't count number of symbols.
- (finish_block): Replace BLOCK_SYM reference with use of iterator.
- #include "gdb_assert.h"
- * symfile.c (free_named_symtabs): Fix calls to dict_empty
- (which would seem to be #if'd out; oops...).
- * buildsym.c (finish_block): Don't set BLOCK_HASHTABLE.
- * jv-lang.c (get_java_class_symtab): Don't set BLOCK_HASHTABLE and
- BLOCK_NSYMS.
- * mdebugread.c (new_block): Allocate BLOCK_DICT via
- dict_create_linear_expandable.
- (add_symbol): Add symbol via dict_add_symbol; no need to chase
- pointers.
- (fixup_sigtramp): Add symbol via dict_add_symbol.
- (new_symtab): Add FIXME comment on freeing blocks.
- * jv-lang.c (get_java_class_symtab): Allocate GLOBAL_BLOCK's dict
- using dict_create_linear_expandable.
- (add_class_symtab_symbol): Add symbol using dict_add_symbol.
- * dictionary.c (struct dictionary_linear_expandable): New struct.
- (struct dictionary): Added member 'linear_expandable'.
- (DICT_LINEAR_EXPANDABLE_MAXSYMS): New macro.
- New variable dict_block_vtbl. Made all the _vtbl variables static.
- Renamed all 'maxsyms' to 'capacity'.
- (dict_create_linear_expandable): New function.
- (add_symbol_linear_expandable): New function.
- (free_linear_expandable): New function.
- * jv-lang.c (get_java_class_symtab): Create static block's
- dictionary with dict_create_linear.
- * buildsym.c (finish_block): Create function blocks' dictionaries
- with dict_create_linear.
- * dictionary.c (lookup_linear): New function.
- (iterator_first_linear): New function.
- (iterator_next_linear): New function.
- * dictionary.h: Moved comment.
- * dictionary.c (struct dictionary_linear): New struct.
- (struct dictionary): Added 'linear' member.
- (DICT_LINEAR_NSYMS): New macro.
- (DICT_LINEAR_SYMS): New macro.
- (DICT_LINEAR_SYM): New macro.
- New variable dict_linear_vtbl.
- (dict_create_linear): New function.
-
-2002-09-23 David Carlton <carlton@math.stanford.edu>
-
- * dictionary.c (struct dict_vtbl): 'add_symbol' field.
- (add_symbol_generic): New function.
- (free_obstack): New function.
- (dict_create_hashed): New function.
- (lookup_hashed): New function.
- (iterator_first_hashed): New function.
- (iterator_hashed_advance): New function.
- (iterator_next_hashed): New function.
- * dictionary.h: A few more declarations.
- * mdebugread.c (parse_symbol): Use dict_iterator when finding
- parameters.
- * Makefile.in (valops.o): Depend on dictionary_h.
- * valops.c (value_of_this): Check empty block via dict_empty.
- #include "dictionary.h"
- * symfile.c (free_named_symtabs): Check empty block via dict_empty.
- * dictionary.h: Declare dict_empty.
- * symmisc.c (dump_symtab): Don't print out number of
- symbols/buckets.
- * printcmd.c (print_frame_args): Delete assertion that block isn't
- a hashtable.
- * symmisc.c (free_symtab_block): Update to use dictionary
- methods.
- * symtab.h (struct symtab): Comment on free_contents.
- * jv-lang.c (get_java_class_symtab): Set class_symtab->free_code.
- * mdebugread.c (add_symbol): Delete 'nsyms' variable.
- (fixup_sigtramp): Add symbol via dict_add_symbol_block.
- * Makefile.in (mi-cmd-stack.o): Depend on dictionary_h.
- * ada-lang.c (symtab_for_sym): Update uses of ALL_BLOCK_SYMBOLS.
- (ada_add_block_symbols): Ditto.
- (debug_print_block): Ditto.
- (fill_in_ada_prototype): Ditto.
- * breakpoint.c (get_catch_sals): Ditto.
- * coffread.c (patch_opaque_types): Ditto.
- * tracepoint.c (add_local_symbols): Ditto.
- (scope_info): Ditto.
- * symtab.c (find_pc_sect_symtab): Ditto.
- (search_symbols): Ditto.
- (make_symbol_completion_list): Ditto.
- (find_addr_symbol): Ditto.
- (make_file_symbol_completion_list): Ditto.
- (make_symbol_overload_list): Ditto.
- * symmisc.c (dump_symtab): Ditto.
- * stack.c (print_block_frame_locals): Ditto.
- (print_block_frame_labels): Ditto.
- (print_frame_arg_vars): Ditto.
- * printcmd.c (print_frame_args): Ditto.
- * objfiles.c (objfile_relocate): Ditto.
- * mdebugread.c (mylookup_symbol): Ditto.
- * Makefile.in (ada-lang.o): Depend on dictionary_h.
- * Makefile.in (tracepoint.o): Ditto.
- * Makefile.in (symmisc.o): Ditto.
- * Makefile.in (stack.o): Ditto.
- * Makefile.in (printcmd.o): Ditto.
- * Makefile.in (objfiles.o): Ditto.
- * Makefile.in (coffread.o): Ditto.
- * Makefile.in (breakpoint.o): Ditto.
- * ada-lang.c: #include "dictionary.h"
- * tracepoint.c: Ditto.
- * symmisc.c: Ditto.
- * stack.c: Ditto.
- * printcmd.c: Ditto.
- * objfiles.c: Ditto.
- * coffread.c: Ditto.
- * breakpoint.c: Ditto.
- * symtab.h: Comment out ALL_BLOCK_SYMBOLS. (Moved to
- dictionary.h.)
- * dictionary.c: Dict_iterator accessor macros.
- (struct dict_vtbl): Add iterator_first, iterator_next.
- (dict_iterator_first): New function.
- (dict_iterator_next): New function.
- (iterator_first_block): New function.
- (iterator_next_block): New function.
- (iterator_block_hashed_advance): New function.
- * dictionary.h: Add dict_iterator stuff.
- * Makefile.in (symtab.o): Depend on dictionary_h.
- * symtab.c: #include "dictionary.h"
- * dictionary.c: Move down #include "dictionary.h", for now...
- (free_block): Rename from dict_free_block.
- (struct dict_vtbl): Add LOOKUP member.
- (dict_lookup): New function.
- (lookup_block): New function.
- * dictionary.h: Declare dict_lookup.
- * symtab.c (lookup_block_symbol): Use dict_lookup.
-
-2002-09-20 David Carlton <carlton@math.stanford.edu>
-
- * jv-lang.c (get_java_class_symtab): Use xmalloc to allocate
- GLOBAL_BLOCK rather than xmmalloc.
- (free_class_block): Use xfree rather than xmfree.
- * mdebugread.c: #include "dictionary.h"
- (new_block): Remove argument. Initialize BLOCK_DICT.
- (parse_symbol): Update call to new_block.
- (new_symtab): Ditto.
- (fixup_sigtramp): Ditto.
- Delete MAXSYMS member of struct parse_stack.
- (psymtab_to_symtab_1): Don't set maxsyms.
- (new_symtab): Remove maxsyms argument.
- (psymtab_to_symtab_1): Update call to new_symtab.
- (shrink_block): Delete function.
- (add_symbol): Add symbols via dict_add_symbol_block.
- * jv-lang.c (add_class_symtab_symbol): Add symbols via
- dict_add_symbol_block.
- Delete variable class_symtab_space.
- * Makefile.in (jv-lang.o): Add dictionary_h.
- * jv-lang.c: #include "dictionary.h"
- * symmisc.c (free_symtab): Call free_func rather than freeing free_ptr.
- * jv-lang.c (get_java_class_symtab): Initialize free_func rather
- than free_ptr.
- (free_class_block): New function.
- (add_class_symtab_symbol): Delete reference to free_ptr.
- * buildsym.c (end_symtab): Initialize free_func rather than free_ptr.
- * symtab.h (struct symtab): Replace free_ptr by free_func.
- * jv-lang.c (get_java_class_symtab): Add DICT_BLOCK assignments.
- * Makefile.in (buildsym.o): Add dictionary_h.
- * buildsym.c (finish_block): Initialize BLOCK_DICT (block).
- #include "dictionary.h"
- * symtab.h (struct block): Add 'dict' member.
- (BLOCK_DICT): New macro.
- * dictionary.c: New file.
- * dictionary.h: New file.
- * Makefile.in (SFILES): Add dictionary.c
- (dictionary_h): New variable.
- (COMMON_OBS): Add dictionary.o.
- (dictionary.o): New rule.
- (carlton): New rule.
-
-2002-09-18 David Carlton <carlton@math.stanford.edu>
-
- * symtab.h: Delete BLOCK_SHOULD_SORT.
- * symtab.c (lookup_block_symbol): Assume non-hashed blocks aren't
- sorted.
- * ada-lang.c (ada_add_block_symbols): Ditto.
- * symfile.h: Delete prototypes for sort_block_syms and
- sort_symtab_syms.
- * symfile.c: Delete functions sort_block_syms and
- sort_symtab_syms.
- * coffread.c (coff_symfile_read): Remove call to
- sort_symtab_syms.
- * xcoffread.c (xcoff_psymtab_to_symtab_1): Ditto.
- * mdebugread.c (psymtab_to_symtab_1): Ditto.
- * hpread.c (hpread_psymtab_to_symtab_1): Ditto.
- * dwarfread.c (psymtab_to_symtab_1): Ditto.
- * dwarf2read.c (psymtab_to_symtab_1): Ditto.
- * dbxread.c (dbx_psymtab_to_symtab_1): Ditto.
-
-2002-09-20 Fernando Nasser <fnasser@redhat.com>
-
- From 2002-07-02 George Helffrich <george@gly.bris.ac.uk>
- * cli/cli-cmds.c (list_command): New function. Implements the new
- cli edit command.
- (_init_cli_cmds): Add new command definition.
- * gdb.1: Document edit command.
- * doc/gdb.texinfo: Document edit command.
-
-2002-09-20 Fernando Nasser <fnasser@redhat.com>
-
- * source.c: Make global variables current_source_symtab and
- current_source_line static.
- (list_command): Moved to cli/cli-cmds.c.
- (ambiguous_line_spec): Moved to cli/cli-cmds.c.
- (get_first_line_listed): New accessor function.
- (get_lines_to_list): New accessor function.
- (get_current_source_symtab_and_line): New function. Retrieves the
- position in the source code that we consider current.
- (get_current_or_default_source_symtab_and_line): New function.
- Like the above but attempts to determine a default position if one
- is not currently defined.
- (set_current_source_symtab_and_line): New function. Sets the source
- code position considered current and returns the previously set one.
- (clear_current_source_symtab_and_line): Reset stored information about
- a current source line.
- (_initialize_source): Remove registration for the "list" command and
- its alias.
- * source.h: Add declarations for the new functions above.
- * symtab.h: Remove declarations for the global variables mentioned
- above.
- * breakpoint.c (parse_breakpoint_sals): Use accessor functions to
- obtain current source line.
- * linespec.c (decode_line_1): Ditto.
- * macroscope.c (default_macro_scope): Ditto.
- * scm-lang.c (scm_unpac): Ditto.
- * stack.c (print_frame_info_base): Ditto.
- * symfile.c (clear_symtab_users): Ditto.
- * symtab.c (decode_line_spec): Ditto.
- * cli/cli-cmds.c (list_command): Moved here from source.c.
- (ambiguous_line_spec): Moved here from source.c.
- (_init_cli_cmds): Add definition for "list" and its alias.
- * Makefile.in: Update dependencies.
+2003-01-08 Andrew Cagney <ac131313@redhat.com>
-2002-09-20 Corinna Vinschen <vinschen@redhat.com>
-
- * h8300-tdep.c (h8300_examine_prologue): Match saved regs location
- with what gcc thinks is correct.
-
-2002-09-20 Corinna Vinschen <vinschen@redhat.com>
-
- * h8300-tdep.c (h8300_examine_prologue): Fix loop for saved regs in
- multiple register push instruction.
-
-2002-09-19 Jim Blandy <jimb@redhat.com>
-
- Add support for distinct host and target character sets.
- * charset.c, charset.h: New files.
- * c-exp.y: #include "charset.h".
- (yylex): Convert character and string literals to the target
- character set, before returning them as the semantic value of the
- token.
- * c-lang.c: #include "charset.h".
- (c_emit_char): Use charset-specific methods to recognize
- characters with backslash escape forms, to decide which characters
- to print literally and which to print using numeric escape
- sequences, and to convert target characters to host characters
- before printing.
- * utils.c: #include "charset.h".
- (no_control_char_error): New function.
- (parse_escape): Use charset-specific methods to recognize
- backslash escapes, parse `control character' notation, and convert
- characters from the host character set to the target character set.
- * configure.in: Set the default host character set.
- Check where to find iconv, and what its argument types might be.
- * acinclude.m4 (AM_ICONV): New macro, borrowed from GCC.
- * Makefile.in (SFILES): List charset.c.
- (COMMON_OBS): List charset.o.
- (charset.o): New rule.
- (charset_h): New header dependency variable.
- (c-lang.o, utils.o, c-exp.tab.o): Note dependency on $(charset_h).
- (LIBICONV): New variable, set by configure.
- (CLIBS): Include $(LIBICONV) here.
- * aclocal.m4, config.in, configure: Regenerated.
-
-2002-09-19 Joel Brobecker <brobecker@gnat.com>
-
- * ada-exp.y: Add missing semicolons to end rules. Fixes a
- bison 1.35 warning.
-
-2002-09-19 Richard Earnshaw <rearnsha@arm.com>
-
- * gdb_mbuild.sh: New file.
-
-2002-09-19 Andrew Cagney <ac131313@redhat.com>
-
- * objc-exp.y, objc-lang.h, objc-lang.c: Fix copyright notice.
-
-2002-09-18 Andrew Cagney <ac131313@redhat.com>
-
- * breakpoint.c, c-exp.y, defs.h, elfread.c, expression.h,
- jv-exp.y, language.c, language.h, p-exp.y, parse.c, parser-defs.h,
- printcmd.c, source.c, stabsread.c, symfile.c, symtab.h, utils.c,
- valops.c, value.h: Revert previous change.
-
-2002-09-18 Michael Snyder <msnyder@redhat.com>
-
- Preliminary support for Objective-C:
- * defs.h (language_objc): New enum value.
- (puts_filtered_tabular): Declaration only, exported from utils.c.
- (skip_quoted): Delete, declared in completer.h.
- * c-exp.y: Include completer.h.
- * p-exp.y: Ditto.
- * jv-exp.y: Ditto.
- * expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING):
- New operator enum values.
- * language.h (CAST_IS_CONVERSION): Test for language_objc.
- * language.c (binop_result_type): Handle language_objc case.
- (integral_type, character_type, string_type, boolean_type,
- structured_type, binop_type_check): Ditto.
- * symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define.
- (struct objc_specific): Add to general_symbol_info.
- (SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization.
- (SYMBOL_DEMANGLED_NAME): Handle objc case.
- * parser-defs.h (struct objc_class_str): New struct type.
- (start_msglist, end_msglist, add_msglist): Declaration only,
- exported from objc-lang.c.
- * value.h (value_of_local, value_nsstring,
- call_function_by_hand_expecting_type): Exported from valops.c.
- * valops.c (find_function_addr): Export.
- (call_function_by_hand_expecting_type): New function.
- (value_of_local): New function.
- * symfile.c (init_filename_language_table): Add ".m" extension
- for Objective-C.
- * utils.c (puts_filtered_tabular): New function.
- (fprintf_symbol_filtered): Add objc demangling support (disabled).
- (set/show demangle): Extend help-string to refer to ObjC.
- * elfread.c (elf_symtab_read): Skip Objective-C special symbols.
- * stabsread.c (symbol_reference_defined): Objective-C symbols
- may contain colons: make allowances when scanning stabs strings
- for colons.
- (objc_find_colon): New function.
- * printcmd.c (address_info): If language == objc then print
- "self" instead of "this".
- * parse.c (length_of_subexp): Handle new operators OP_MSGCALL,
- OP_NSSTRING, and OP_SELF.
- (prefixify_subexp): Ditto.
- * source.c (print_source_lines): Mention objc in comment.
- * breakpoint.c (parse_breakpoint_sals): Recognize Objective-C
- method names.
-
-2002-09-18 Andrew Cagney <ac131313@redhat.com>
-
- * complaints.h: Update copyright.
- (struct complaints): Declare.
- (struct complaint): Make `message' constant.
- (internal_complaint): Declare.
- (complaint): Declare.
- (complaint_root): Delete declaration.
- (symfile_complaints): Delete declaration.
- (struct complaints): Add opaque declaration.
- (clear_complaints): Add a complaints parameter.
- * complaints.c: Update copyright.
- (enum complaint_series): Define.
- (complaint_root): Delete.
- (struct complaints): Define.
- (complaint_sentinel, symfile_complaint_book): New variables.
- (symfile_explanations, symfile_complaints): New variables.
- New variables.
- (get_complaints): New function.
- (vcomplaint): New function.
- (complaint): New function.
- (internal_complaint): New function.
- (complain): Call vcomplain with symfile_complaint.
- (clear_complaints): Rewrite.
- (_initialize_complaints): Use add_setshow_command.
- * Makefile.in (complaints.o): Update dependencies.
- * symfile.c (syms_from_objfile): Add symfile_complaints parameter
- to call to clear_complaints.
- (new_symfile_objfile, reread_symbols): Ditto.
- (oldsyms_complaint): Delete.
- (empty_symtab_complaint, unknown_option_complaint): Delete.
- (free_named_symtabs): Use complaint instead of complain.
-
-2002-09-18 Michael Snyder <msnyder@redhat.com>
-
- Contributed by Apple Computer, Inc. Merged with current sources
- by Adam Fedor <fedor@doc.com> [cagney].
-
- * objc-lang.c: First clean-up round: comments, indentation.
- * objc-lang.h: Ditto.
- * objc-lang.y: Ditto.
+ * gdb_mbuild.sh: Edit the output of `maint print architecture'
+ replacing hex constants with function names and stripping leading
+ file name directory prefixes.
-2002-09-18 Andrew Cagney <ac131313@redhat.com>
+2003-01-08 Andrew Cagney <cagney@redhat.com>
- * maint.c (maintenance_internal_error): Print the parameter as the
- error message.
- (maintenance_internal_warning): New function.
- (_initialize_maint_cmds): Add command `maint internal-warning'.
+ * gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and
+ get_frame_base.
- * defs.h (internal_warning, internal_vwarning): Declare.
- * utils.c (struct internal_problem): Define.
- (internal_vproblem): New function.
- (internal_warning): New function.
- (internal_vwarning): New function.
- (internal_warning_problem, internal_error_problem): New variables.
- (internal_verror): Just call internal_vproblem.
+2003-01-08 David Carlton <carlton@math.stanford.edu>
-2002-09-18 Michael Snyder <msnyder@redhat.com>
+ * linespec.c (decode_line_1): Move code into decode_variable.
+ (decode_variable): New function.
- * objc-lang.c: New file, support for Objective-C.
- Preliminary check-in, not yet integrated into gdb.
- * objc-lang.h: New file.
- * objc-exp.y: New file.
+2003-01-08 Andrew Cagney <ac131313@redhat.com>
-2002-09-18 Andrew Cagney <ac131313@redhat.com>
+ * mn10300-tdep.c (analyze_dummy_frame): Fix typo.
- * infrun.c (signal_stop_update): Convert definition to ISO C.
- (signal_print_update): Ditto.
- (signal_pass_update): Ditto.
- * inflow.c (terminal_save_ours): Ditto.
+2003-01-08 Andrew Cagney <cagney@redhat.com>
- * h8300-tdep.c (h8300_gdbarch_init): Use C instead of C++
- comments.
+ * cris-tdep.c (cris_frame_init_saved_regs): Use
+ get_frame_saved_regs and SIZEOF_FRAME_SAVED_REGS when copying a
+ saved_regs buffer.
+ * sh-tdep.c (sh_nofp_frame_init_saved_regs): Ditto.
+ (sh64_nofp_frame_init_saved_regs): Ditto.
+ (sh_fp_frame_init_saved_regs): Ditto.
+ * arm-tdep.c: Use deprecated_set_frame_saved_regs_hack.
+ * mips-tdep.c (mips_init_extra_frame_info): Ditto.
+ * mcore-tdep.c (analyze_dummy_frame): Ditto.
+ * mn10300-tdep.c (analyze_dummy_frame): Ditto.
+
+2003-01-08 Daniel Jacobowitz <drow@mvista.com>
+
+ * minsyms.c (lookup_minimal_symbol): Update comment.
+ (lookup_minimal_symbol_text): Update comment. Use the hash table.
+ (lookup_minimal_symbol_solib_trampoline): Likewise.
+
+2003-01-08 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (d10v_init_extra_frame_info): Use
+ frame_relative_level.
+
+ * alpha-tdep.c: Use get_frame_extra_info.
+ * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
+ * h8300-tdep.c, ia64-tdep.c, m68hc11-tdep.c, mcore-tdep.c: Ditto.
+ * mips-tdep.c, mn10300-tdep.c, s390-tdep.c, sh-tdep.c: Ditto.
+ * sparc-tdep.c, xstormy16-tdep.c: Ditto.
+
+ * alpha-tdep.c: Use get_next_frame.
+ * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
+ * dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto.
+ * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Ditto.
+ * mips-tdep.c, mn10200-tdep.c, mn10300-tdep.c: Ditto.
+ * ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto.
+ * v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto.
+ * xstormy16-tdep.c: Ditto.
- * config/djgpp/fnchange.lst: Handle name clashes between
- bfd/coff-tic30.c, bfd/coff-tic4x.c, bfd/coff-tic54x.c and
- bfd/coff-tic80.c.
-
- * i386-linux-tdep.h: Fix tipo.
-
-2002-09-18 Adam Fedor <fedor@gnu.org>
-
- * MAINTAINERS: Add myself to the Write After Approval list.
-
-2002-09-18 Jim Blandy <jimb@redhat.com>
-
- * dbxread.c, mdebugread.c: Revert my change of 2001-10-23. Moving
- texthigh and textlow to reader-specific structs caused
- objfile_relocate to miss them. This is fixable, but the work that
- the change was supposed to prepare GDB for never got done anyway.
-
-2002-09-18 David Carlton <carlton@math.stanford.edu>
-
- * MAINTAINERS: Alphabetize Write After Approval list.
-
-2002-09-18 Daniel Jacobowitz <drow@mvista.com>
-
- Fix PR gdb/709
- * values.c (value_static_field): Call read_var_value.
-
-2002-09-18 Andrew Cagney <ac131313@redhat.com>
-
- * valops.c (hand_function_call): Align the initial stack pointer
- and STRUCT_ADDR using frame_align. When STRUCT_RETURN and
- FRAME_ALIGN_P, use STRUCT_ADDR to obtain the called function's
- return value.
- * mips-tdep.c (mips_frame_align): New function.
- (mips_gdbarch_init): Set frame_align.
- * gdbarch.sh (FRAME_ALIGN): New method.
- * gdbarch.h, gdbarch.c: Re-generate.
+2003-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * alpha-tdep.c: Use get_frame_base.
+ * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
+ * h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto.
+ * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
+ * mn10300-tdep.c, ns32k-tdep.c, s390-tdep.c, sh-tdep.c: Ditto.
+ * sparc-tdep.c, v850-tdep.c, vax-tdep.c: Ditto.
+ * x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
+ * config/h8500/tm-h8500.h, config/mn10200/tm-mn10200.h: Ditto.
+ * config/sparc/tm-sparc.h: Ditto.
+
+2003-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (deprecated_get_frame_context): New function.
+ (deprecated_set_frame_context): New function.
+ * frame.h (deprecated_get_frame_context): Declare.
+ (deprecated_set_frame_context): Declare.
+ * dwarf2cfi.c (UNWIND_CONTEXT): Use deprecated_get_frame_context.
+ (cfi_init_extra_frame_info): Use deprecated_set_frame_context.
+
+2003-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (deprecated_set_frame_next_hack): New function.
+ (deprecated_set_frame_prev_hack): New function.
+ * frame.h (deprecated_set_frame_next_hack): Declare.
+ (deprecated_set_frame_prev_hack): Declare.
+ * mcore-tdep.c (analyze_dummy_frame): Use
+ deprecated_set_frame_next_hack and deprecated_set_frame_prev_hack.
+ * mn10300-tdep.c (analyze_dummy_frame): Ditto.
-2002-09-18 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-linux-nat.c (x86_64_regmap): Added CS and SS
- registers.
-
-2002-09-17 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Mention that MIPS $fp behavior changed.
- * mipsnbsd-tdep.c (mipsnbsd_cannot_fetch_register): Delete
- reference to FP_REGNUM.
- (mipsnbsd_cannot_store_register): Ditto.
- * mips-linux-nat.c: Update copyright.
- (mips_linux_cannot_fetch_register): Delete reference to FP_REGNUM.
- (mips_linux_cannot_store_register): Ditto.
- * mips-linux-tdep.c (supply_gregset): Ditto. Update copyright.
- * config/mips/tm-mips.h: Update copyright.
- (FP_REGNUM): Delete macro.
- (MIPS_REGISTER_NAMES): Replace "fp" with "".
- * config/mips/tm-irix6.h (FP_REGNUM): Delete macro.
- * mips-tdep.c (mips_gdbarch_init): Set read_fp to mips_read_sp.
- (mips_r3041_reg_names, mips_r3051_reg_names)
- (mips_r3081_reg_names): Replace "fp" with "".
- Fix PR gdb/480.
-
-2002-09-17 Theodore A. Roth <troth@verinet.com>
-
- * gdb/avr-tdep.c(avr_scan_prologue): Fix bad call to
- generic_read_register_dummy() (PR gdb/703).
- (avr_push_return_address): #if 0 out unused vars.
- (avr_gdbarch_init): Enable use of avr_push_return_address().
-
-2002-09-17 Michael Snyder <msnyder@redhat.com>
-
- * m32r-stub.c (restore_and_return): Postpone restoring of PSW.
- RTE will take care of it.
-
-2002-09-17 Andrew Cagney <ac131313@redhat.com>
-
- * arch-utils.c (legacy_virtual_frame_pointer): If FP_REGNUM is
- invalid, return SP_REGNUM.
-
-2002-09-17 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_pop_frame): Read saved values of floating
- point registers without sign extension.
-
-2002-09-17 Andrew Cagney <cagney@redhat.com>
-
- * blockframe.c (deprecated_read_register_dummy): Rename
- generic_read_register_dummy.
- * frame.c (frame_unwind_signed_register): New function.
- (frame_unwind_unsigned_register): New function.
- * frame.h (frame_unwind_signed_register): Declare.
- (frame_unwind_unsigned_register): Declare.
- (deprecated_read_register_dummy): Rename
- generic_read_register_dummy.
-
- * h8300-tdep.c (h8300_frame_chain): Update.
- (h8300_frame_saved_pc): Update.
- * xstormy16-tdep.c (xstormy16_frame_saved_pc): Update.
- * rs6000-tdep.c (rs6000_frame_saved_pc): Update.
- * s390-tdep.c (s390_frame_saved_pc_nofix): Update.
- (s390_frame_chain): Update.
- * v850-tdep.c (v850_find_callers_reg): Update.
- (v850_frame_saved_pc): Update.
- * m32r-tdep.c (m32r_init_extra_frame_info): Update.
- (m32r_find_callers_reg): Update.
- (m32r_frame_saved_pc): Update.
- * sh-tdep.c (sh_find_callers_reg): Update.
- (sh64_get_saved_pr): Update.
- (sh_init_extra_frame_info): Update.
- (sh_init_extra_frame_info): Update.
- (sh64_init_extra_frame_info): Update.
- (sh64_init_extra_frame_info): Update.
- * mcore-tdep.c (mcore_find_callers_reg): Update.
- (mcore_frame_saved_pc): Update.
- (mcore_init_extra_frame_info): Update.
- * i386-tdep.c (i386_frame_saved_pc): Update.
- * ia64-tdep.c (ia64_frame_saved_pc): Update.
- (ia64_init_extra_frame_info): Update.
- (ia64_init_extra_frame_info): Update.
- * d10v-tdep.c (d10v_frame_saved_pc): Update.
- * cris-tdep.c (cris_init_extra_frame_info): Update.
- * avr-tdep.c (avr_frame_chain): Update.
- (avr_init_extra_frame_info): Update.
- (avr_frame_saved_pc): Update.
- * arm-tdep.c (arm_find_callers_reg): Update.
- (arm_init_extra_frame_info): Update.
- (arm_frame_saved_pc): Update.
-
-2002-09-17 Tom Tromey <tromey@redhat.com>
-
- * c-lang.c (c_emit_char): Don't treat \0 specially unless quoter
- is "'".
-
-2002-09-17 Corinna Vinschen <vinschen@redhat.com>
-
- * MAINTAINERS: Remove "non multi-arched" text from h8300.
- * h8300-tdep.c (h8300_next_prologue_insn) Renamed from
- NEXT_PROLOGUE_INSN.
- (h8300_examine_prologue): Call h8300_next_prologue_insn instead of
- NEXT_PROLOGUE_INSN.
-
-2002-09-16 Joel Brobecker <brobecker@gnat.com>
-
- * osfsolib.c: Remove file, replaced by solib-osf.c.
- * Makefile.in: Remove compilation rules for osfsolib.c.
-
-2002-09-16 David Carlton <carlton@math.stanford.edu>
-
- * cp-valprint.c (cp_print_class_method): Correct args to
- check_stub_method_group.
-
-2002-09-16 Corinna Vinschen <vinschen@redhat.com>
-
- * h8300-tdep.c: Multiarch. Drop `set machine' command in favor of
- `set architecture'. Unify naming convention of functions.
- (h8300_skip_prologue): Improve prologue analysis.
- (h8300_push_arguments): Rewritten to more closely match GCC's
- bizarre argument-passing behavior, along with the comment describing
- said behavior.
- * remote-hms.c (hms_regnames): Don't use NUM_REGS in definition.
- * config/h8300/tm-h8300.h: Multiarch. Just keep stuff needed by
- sim, remote-e7000.c, remote-hms.c and remote.c
-
-2002-09-15 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.c (gdb_print_insn_i386): Removed.
- (i386_print_insn): New function.
- (i386_gdbarch_init): Set print_insn to i386_print_insns.
- (_initialize_i386_tdep): Don't initialize tm_print_insn and
- tm_print_insn_info.
-
-2002-09-14 Mark Kettenis <kettenis@gnu.org>
-
- * gdbtypes.c (check_stub_method_group): Initialize found_stub to
- zero.
-
-2002-09-14 Corinna Vinschen <vinschen@redhat.com>
-
- * arch-utils.c (legacy_pc_in_sigtramp): Move preprocessor expression
- for IN_SIGTRAMP to here. Use IN_SIGTRAMP only if it's defined.
- Guard usage of SIGTRAMP_START() by using SIGTRAMP_START_P.
-
-2002-09-13 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (child_create_inferior): Honor 'tty' command.
-
-2002-09-13 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.c (check_stub_method): Make static.
- (check_stub_method_group): New function.
- * gdbtypes.h: Update prototypes.
- * cp-support.c: New file.
- * cp-support.h: New file.
-
- * stabsread.c: Include "cp-abi.h" and "cp-support.h".
- (update_method_name_from_physname): New function.
- (read_member_functions): Correct method names for operators
- and v3 constructors/destructors. Separate v2 constructors and
- destructors.
- * Makefile.in (stabsread.o): Update dependencies.
- (SFILES): Add cp-support.c.
- (COMMON_OBS): Add cp-support.o.
- (cp_support_h, cp-support.o): Add.
-
- * cp-valprint.c (cp_print_class_method): Call
- check_stub_method_group instead of check_stub_method. Remove
- extraneous QUITs.
- * p-valprint.c (pascal_object_print_class_method): Likewise.
- * valops.c (search_struct_method): Likewise.
- (find_method_list, value_struct_elt_for_reference): Likewise.
-
-2002-09-13 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (SIGTRAMP_END): Change to a predicate function.
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-09-13 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (find_saved_register): Delete function.
- * frame.h (find_saved_register): Delete declaration.
- Fix PR gdb/631.
-
-Fri Sep 13 14:59:55 2002 Andrew Cagney <cagney@redhat.com>
-
- * mips-tdep.c (read_next_frame_reg): Re-hack using
- frame_register_unwind.
-
-Fri Sep 13 07:42:09 2002 Andrew Cagney <cagney@redhat.com>
-
- * mips-tdep.c (mips_get_saved_register): Re-hack using
- frame_register_unwind.
-
-2002-09-12 Joel Brobecker <brobecker@gnat.com>
+2003-01-07 David Carlton <carlton@math.stanford.edu>
- * gdbarch.sh (NAME_OF_MALLOC): New variable in the architecture
- vector. Will be useful for Interix.
+ * linespec.c (decode_line_1): Move code into decode_dollar.
+ (decode_dollar): New function.
+
+2003-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * arm-tdep.c (arm_init_extra_frame_info): Use
+ deprecated_update_frame_base_hack.
+ * xstormy16-tdep.c (xstormy16_scan_prologue): Ditto.
+ * mn10300-tdep.c (analyze_dummy_frame): Ditto.
+ (fix_frame_pointer): Ditto.
+ (mn10300_analyze_prologue): Ditto.
+
+2003-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * xstormy16-tdep.c (xstormy16_init_extra_frame_info): Allocate
+ extra_info using frame_extra_info_zalloc.
+ * sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
+ * sh-tdep.c (sh_init_extra_frame_info): Ditto.
+ (sh64_init_extra_frame_info): Ditto.
+ * mn10300-tdep.c (mn10300_init_extra_frame_info): Ditto.
+ * s390-tdep.c (s390_init_extra_frame_info): Ditto.
+ * mips-tdep.c (mips_init_extra_frame_info): Ditto.
+ * mcore-tdep.c (mcore_init_extra_frame_info): Ditto.
+ * frv-tdep.c (frv_init_extra_frame_info): Ditto.
+ * m68hc11-tdep.c (m68hc11_init_extra_frame_info): Ditto.
+ * ia64-tdep.c (ia64_init_extra_frame_info): Ditto.
+ * h8300-tdep.c (h8300_init_extra_frame_info): Ditto.
+ * d10v-tdep.c (d10v_init_extra_frame_info): Ditto.
+ * cris-tdep.c (cris_init_extra_frame_info): Ditto.
+ * arm-tdep.c (arm_init_extra_frame_info): Ditto.
+ * alpha-tdep.c (alpha_init_extra_frame_info): Ditto.
+
+ * mn10300-tdep.c (analyze_dummy_frame): Use
+ deprecated_set_frame_extra_info_hack.
+ * mcore-tdep.c (analyze_dummy_frame): Ditto.
+
+2003-01-07 J. Brobecker <brobecker@gnat.com>
+
+ * mdebugread.c (parse_symbol): Skip stProc entries which storage
+ class is not scText. These do not define "real" procedures.
+ (parse_partial_symbols): Likewise.
+
+2003-01-06 Michael Snyder <msnyder@redhat.com>
+
+ * lin-lwp.c: Added or elaborated on "debug lin-lwp" info.
+
+2003-01-06 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (deprecated_frame_xmalloc_with_cleanup): Declare.
+ * frame.c (deprecated_frame_xmalloc_with_cleanup): New function.
+ * arm-tdep.c (arm_frame_chain): Allocate caller_fi using
+ deprecated_frame_xmalloc_with_cleanup.
+ * m32r-tdep.c (m32r_virtual_frame_pointer): Allocate `fi' using
+ deprecated_frame_xmalloc.
+ * mcore-tdep.c (analyze_dummy_frame): Ditto for dummy.
+ * mn10200-tdep.c (mn10200_frame_chain): Ditto for dummy_frame.
+
+2003-01-06 Andrew Cagney <cagney@redhat.com>
+
+ * x86-64-linux-tdep.c: Include "osabi.h".
+ * Makefile.in (x86-64-linux-tdep.o): Update dependencies.
+
+ * sparc-tdep.c (sparc_dump_tdep): Fix typo, match -> mach.
+
+2003-01-06 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS (Target Instruction Set Architectures): Update
+ arm-elf. Can be built with -Werror, has been multiarched.
+
+ * value.h (unpack_long): Make buffer parameter constant.
+ (unpack_double, unpack_pointer, unpack_field_as_long): Ditto.
+ * scm-lang.h (scm_parse): Ditto.
+ * defs.h (extract_typed_address, extract_address): Ditto.
+ (extract_long_unsigned_integer): Ditto.
+ * inferior.h (unsigned_pointer_to_address): Ditto.
+ (signed_pointer_to_address): Ditto.
+ * gdbarch.sh (POINTER_TO_ADDRESS): Ditto.
* gdbarch.h, gdbarch.c: Regenerate.
+ * findvar.c (extract_long_unsigned_integer): Update.
+ (extract_address): Update.
+ (extract_typed_address): Update.
+ (unsigned_pointer_to_address): Update.
+ * values.c (unpack_long): Update.
+ (unpack_double): Update.
+ (unpack_pointer): Update.
+ (unpack_field_as_long): Update.
+ * d10v-tdep.c (d10v_pointer_to_address): Update.
+ * avr-tdep.c (avr_pointer_to_address): Update.
+ * scm-lang.c (scm_unpack): Update.
+ * findvar.c (signed_pointer_to_address): Update.
+
+2003-01-06 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore
+ since it is in i386-tdep.c.
+
+2003-01-06 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Fix a small compilation
+ failure introduced in the previous change.
+
+2003-01-05 Michael Chastain <mec@shout.net>
+
+ * README: Remove references to deleted remote-*.c files:
+ remote-adapt.c, remote-eb.c, remote-mm.c, remote-nindy.c,
+ remote-nrom.c, remote-os9k.c, remote-udi.c.
+
+2003-01-05 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_get_longjmp_target): Make usable on x86-64.
+ * x86-64-tdep.c (x86_64_init_abi): Remove FIXME about
+ i386_get_longjmp_target.
+
+2003-01-05 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (prologue_cache): Change to a pointer.
+ (_initialize_arm_tdep): Allocate prologue_cache.
+ (check_prologue_cache): Update.
+ (save_prologue_cache): Update.
+ (arm_gdbarch_init): Update.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * stabsread.c (update_method_name_from_physname): Call complaint()
+ instead of error.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * arm-tdep.c (arm_frame_chain_valid): Remove unnecessary test.
+ * d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests.
+ * hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test.
+
+ * blockframe.c: Include "gdbcmd.h" and "command.h".
+ (backtrace_below_main): New variable.
+ (file_frame_chain_valid, func_frame_chain_valid)
+ (nonnull_frame_chain_valid, generic_file_frame_chain_valid)
+ (generic_func_frame_chain_valid): Remove functions.
+ (frame_chain_valid, do_flush_frames_sfunc): New functions.
+ (_initialize_blockframe): New function.
+ * Makefile.in (blockframe.o): Update dependencies.
+ * frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME
+ comment. Call frame_chain_valid ().
+ * frame.h: Remove old prototypes. Add prototype for
+ frame_chain_valid and update comments to match.
+ * gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function.
+ Remove old comment.
+ * gdbarch.h: Regenerated.
+ * gdbarch.c: Regenerated.
+
+ * alpha-tdep.c (alpha_gdbarch_init): Don't call
+ set_gdbarch_frame_chain_valid.
+ * avr-tdep.c (avr_gdbarch_init): Likewise.
+ * cris-tdep.c (cris_gdbarch_init): Likewise.
+ * frv-tdep.c (frv_gdbarch_init): Likewise.
+ * h8300-tdep.c (h8300_gdbarch_init): Likewise.
+ * i386-tdep.c (i386_svr4_init_abi): Likewise.
+ (i386_nw_init_abi): Likewise.
+ (i386_gdbarch_init): Likewise.
+ * ia64-tdep.c (ia64_gdbarch_init): Likewise.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
+ * m68k-tdep.c (m68k_gdbarch_init): Likewise.
+ * mcore-tdep.c (mcore_gdbarch_init): Likewise.
+ * mips-tdep.c (mips_gdbarch_init): Likewise.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Likewise.
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Likewise.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
+ * s390-tdep.c (s390_gdbarch_init): Likewise.
+ * sh-tdep.c (sh_gdbarch_init): Likewise.
+ * sparc-tdep.c (sparc_gdbarch_init): Likewise.
+ * v850-tdep.c (v850_gdbarch_init): Likewise.
+ * vax-tdep.c (vax_gdbarch_init): Likewise.
+ * x86-64-tdep.c (x86_64_init_abi): Likewise.
+
+ * config/m32r/tm-m32r.h (FRAME_CHAIN_VALID): Don't define.
+ * config/m68k/tm-apollo68b.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-m68kv4.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-monitor.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-os68k.h (FRAME_CHAIN_VALID): Likewise.
+ * config/m68k/tm-vx68.h (FRAME_CHAIN_VALID): Likewise.
+ * config/mn10200/tm-mn10200.h (FRAME_CHAIN_VALID): Likewise.
+ * config/sparc/tm-sparclite.h (FRAME_CHAIN_VALID): Likewise.
- * valops.c (value_allocate_space_in_inferior): Replace hard-coded
- name of the malloc function by NAME_OF_MALLOC.
-
-2002-09-12 Joel Brobecker <brobecker@gnat.com>
-
- * value.h (find_function_in_inferior): Add const keyword to
- one of the parameters. Allows us to invoke this function with
- a const char *.
- * valops.c (find_function_in_inferior): Likewise.
-
-2002-09-12 Joel Brobecker <brobecker@gnat.com>
-
- * exec.c (xfer_memory): Fix compilation warning with old versions
- of GCC.
- * tracepoint.c (trace_find_tracepoint_command): Likewise.
-
-2002-09-12 David Carlton <carlton@math.stanford.edu>
-
- * symtab.h: Run through gdb_indent.h.
- Add 2002 to Copyright year list.
-
-2002-09-12 Alan Modra <amodra@bigpond.net.au>
-
- * x86-64-tdep.c (_initialize_x86_64_tdep): Don't use hard-coded
- mach constants.
- * MAINTAINERS: Add myself to write after approval list.
-
-2002-09-11 J. Brobecker <brobecker@gnat.com>
-
- * osabi.c (gdb_osabi_name): Add entry for GDB_OSABI_INTERIX.
-
-2002-09-11 J. Brobecker <brobecker@gnat.com>
-
- * osabi.h (gdb_osabi): Add new GDB_OSABI_INTERIX enum value for
- Interix.
-
-2002-06-05 Paul N. Hilfinger <hilfingr@otisco.mckusick.com>
-
- * procfs.c (do_detach): Clear current signal, not just fault.
- Corrects problem with breakpoint trap signal leaking to detached
- process on Tru64.
-
-2002-09-10 Michael Snyder <msnyder@redhat.com>
-
- * buildsym.c (finish_block): Protect against null pointer.
-
-2002-09-10 Andrew Cagney <cagney@redhat.com>
-
- * infcmd.c (default_print_registers_info): Send all output to
- ``file'' instead of ``gdb_stdout''.
-
-2002-09-10 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_extract_struct_value_address): Make val a
- LONGEST, and use signed register read (addresses are sign-
- extended for mips).
-
-2002-09-10 Stephane Carrez <stcarrez@nerim.fr>
-
- * event-loop.c (gdb_do_one_event): Make public.
- * event-loop.h (gdb_do_one_event): Declare.
-
-2002-09-10 Jeff Law <law@redhat.com>
-
- * infttrace.c (child_resume): Simplify and rework to avoid
- TT_PROC_CONTINUE.
-
-2002-09-09 Fred Fish <fnf@intrinsity.com>
-
- * printcmd.c (print_scalar_formatted): "len" is the number of
- target bytes, NOT the number of target bits.
-
-2002-09-09 Elena Zannoni <ezannoni@redhat.com>
-
- From: Emmanuel Thome' <thome@lix.polytechnique.fr>
- * top.c (init_main): Set rl_terminal_name.
-
-2002-09-08 Aidan Skinner <aidan@velvet.net>
-
- * ada-lang.c (ada_array_bound, ada_type_match,
- _initialize_ada_language): Fix K&R definitions.
- * ada-tasks.c (get_current_task): Fix K&R definitions.
- * ada-valprint.c (adjust_type_signedness): Fix K&R definitions.
-
-2002-09-07 Christopher Faylor <cgf@redhat.com>
-
- * MAINTAINERS: Remove CE from list of maintainership responsibilities.
- Add XP.
-
-2002-09-06 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.c (i386_register_virtual_type,
- i386_register_convertible, i386_register_convert_to_virtual,
- i386_register_comvert_to_raw): Use FP_REGNUM_P and SSE_REGNUM_P
- instead of IS_FP_REGNUM and IS_SSE_REGNUM.
- (i386_gdbarch_init): Fix comment. Add comments on calls that set
- sp_regnum, fp_regnum, pc_regnum, ps_regnum and fp0_regnum.
- Don't set push_arguments twice.
-
- * i386bsd-tdep.c (i386bsd_init_abi): Set sigtramp_start and
- sigtramp_end to i386bsd_sigtramp_start and i386bsd_sigtramp_end.
- * i386nbsd-tdep.c (i386nbsd_init_abi): Set sigtramp_start and
- sigtramp_end to NULL.
- * config/i386/tm-fbsd.h (SIGTRAMP_START, SIGTRAMP_END): Remove
- defines.
- (i386bsd_sigtramp_start, i386_sigtramp_end): Remove prototypes.
-
- * i386nbsd-tdep.c (i386nbsd_pc_in_sigtramp): Remove spurious
- whitespace.
-
- * gdbarch.sh (SIGTRAMP_START, SIGTRAMP_END): New methods.
- * gdbarch.h, gdbarch.c: Re-generate.
- * blockframe.c (find_pc_sect_partial_function): Convert to use
- SIGTRAMP_START_P predicate.
-
-2002-09-05 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.c (arm_init_extra_frame_info): Distinguish between
- generic_dummy_frame method and old method. Also distinguish
- between ARM_FP_REGNUM and THUMB_FP_REGNUM.
- (arm_extract_return_value): Use new regcache method.
-
- * mips-tdep.c (mips_n32n64_push_arguments): Remove alignment
- adjustment that doesn't conform to the ABI.
- (mips_extract_struct_value_address): Retrieve V0_REGNUM from
- saved regcache, not from current regcache.
-
-2002-09-05 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Update for 5.3. Add new section ``Changes since 5.3''.
- * README: Update.
-
-2002-09-04 Jason Thorpe <thorpej@wasabisystems.com>
-
- * arm-tdep.c (arm_addr_bits_remove): Don't check for Thumb mode
- if arm_apcs_32 is false.
-
-2002-09-04 Andrew Cagney <ac131313@redhat.com>
-
- GDB 5.3 branch created.
-
-2002-09-03 Theodore A. Roth <troth@verinet.com>
-
- * gdb/avr-tdep.c (avr_gdbarch_init): Use
- generic_unwind_get_saved_register.
-
-2002-09-03 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (dwarf2_add_member_fn): Add the 'type'
- argument (PR gdb/653). Update call to smash_to_method_type.
- (read_structure_scope): Update call to dwarf2_add_member_fn.
-
-2002-09-03 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-linux-tdep.c: Include gdb_string.h
- * x86-64-linux-nat.c: Ditto.
-
-2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ada-exp.y (yyname, yyrule): Remap global variables that appear
- when YYDEBUG is set to 1.
- * c-exp.y: Likewise.
- * f-exp.y: Likewise.
- * jv-exp.y: Likewise.
- * m2-exp.y: Likewise.
- * p-exp.y: Likewise.
-
-2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (i386nbsd-tdep.o): Add $(solib_svr4_h) to
- dependency list.
- * i386nbsd-tdep.c (i386nbsdelf_init_abi): Set
- solib_svr4_fetch_link_map_offsets to
- nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
- * config/i386/nbsd.mt (TDEPFILES): Add solib.o and solib-svr4.o.
- * config/i386/nbsdaout.mh (NATDEPFILES): Remove solib.o.
- * config/i386/nbsdelf.mh (NATDEPFILES): Remove solib.o,
- solib-svr4.o, and solib-legacy.o.
- * config/i386/tm-nbsd.h: Include solib.h.
-
-2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * configure.tgt (i[3456]86-*-netbsdelf*): Merge with...
- (i[3456]86-*-netbsd*): ...this. Set gdb_target to nbsd.
- (i[3456]86-*-openbsd*): Make this a separate entry. Add a
- comment noting that this needs its own target configuration.
- * config/i386/nbsd.mt: New file.
- * config/i386/nbsdaout.mt: Remove.
- * config/i386/nbsdelf.mt: Ditto.
- * config/i386/tm-nbsdaout.h: Ditto.
-
-2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * i386nbsd-tdep.c (i386nbsd_sigtramp_offset): New function.
- (i386nbsd_pc_in_sigtramp): Rewrite to use i386nbsd_sigtramp_offset.
- (i386nbsd_init_abi): Don't initialize tdep->sigtramp_start or
- tdep->sigtramp_end.
- (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end): Remove.
- * config/i386/tm-nbsd.h (SIGTRAMP_START, SIGTRAMP_END)
- (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove.
-
-2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (i386nbsd-tdep.o): Add $(arch_utils_h),
- $(i386_tdep_h), and $(nbsd_tdep_h) to dependency list.
- * i386-tdep.h (i386bsd_init_abi): New prototype.
- * i386bsd-tdep.c (i386bsd_init_abi): Remove "static" from
- function declaration.
- (_initialize_i386bsd_tdep): Don't register OS ABI handlers
- for NetBSD-a.out or NetBSD-ELF.
- (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end)
- (i386nbsd_sc_pc_offset, i386nbsd_sc_sp_offset)
- (i386nbsd_init_abi, i386nbsdelf_init_abi): Move to...
- * i386nbsd-tdep.c: ...here. Include arch-utils.h, i386-tdep.h,
- and nbsd-tdep.h.
- (i386nbsd_pc_in_sigtramp): New function.
- (i386nbsd_init_abi): Set gdbarch_pc_in_sigtramp to
- i386nbsd_pc_in_sigtramp.
- (_initialize_i386nbsd_tdep): Register i386nbsd_init_abi
- and i386nbsdelf_init_abi OS ABI handlers.
- * config/i386/nbsdaout.mt (TDEPFILES): Add nbsd-tdep.o.
- * config/i386/nbsdelf.mt (TDEPFILES): Likewise.
-
-2002-09-02 Mark Kettenis <kettenis@gnu.org>
-
- * i386-linux-nat.c (dummy_sse_values): Only try to fill in the SSE
- registers if the target really has them.
-
-2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (mipsnbsd-tdep.o): Use $(nbsd_tdep_h) rather
- than nbsd-tdep.h.
-
-2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (alphanbsd-tdep.o): Add $(frame_h) to dependency
- list.
- * alphanbsd-tdep.c (alphanbsd_sigcontext_addr)
- (alphanbsd_skip_sigtramp_frame): New functions.
- (alphanbsd_init_abi): Set tdep->skip_sigtramp_frame to
- alphanbsd_skip_sigtramp_frame. Set tdep->sigcontext_addr
- to alphanbsd_sigcontext_addr.
-
-2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (mipsnbsd-tdep.o): Add nbsd-tdep.h to dependency
- list.
- (nbsd-tdep.o): Add $(gdb_string_h) to dependency list.
- * alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): Use
- nbsd_pc_in_sigtramp.
- * mipsnbsd-tdep.c: Include nbsd-tdep.h.
- (mipsnbsd_pc_in_sigtramp): Use nbsd_pc_in_sigtramp.
- * nbsd-tdep.c: Include gdb_string.h.
- (nbsd_pc_in_sigtramp): New function.
- * nbsd-tdep.h (nbsd_pc_in_sigtramp): New prototype.
- * ppcnbsd-tdep.c (ppcnbsd_pc_in_sigtramp): New function.
- (ppcnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
- ppcnbsd_pc_in_sigtramp.
- * shnbsd-tdep.c (shnbsd_pc_in_sigtramp): New function.
- (shnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
- shnbsd_pc_in_sigtramp.
- * sparcnbsd-tdep.c (sparcnbsd_init_abi_elf): Set
- gdbarch_pc_in_sigtramp to nbsd_pc_in_sigtramp.
- * config/mips/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
-
-2002-08-30 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * breakpoint.c (breakpoint_init_inferior): Reset the val field of
- watchpoints to NULL.
- (insert_breakpoints): set val field of watchpoints if NULL.
-
-
-2002-08-29 Jim Blandy <jimb@redhat.com>
-
- * symtab.c (lookup_symbol_aux): In the cases where we find a
- minimal symbol of an appropriate name and use its address to
- select a symtab to read and search, use `name' (as passed to us)
- as the demangled name when searching the symtab's global and
- static blocks, not the minsym's name.
-
-2002-08-29 Keith Seitz <keiths@redhat.com>
-
- * stack.c (print_frame_info_base): Always set current_source_symtab
- and current_source_line.
-
-2002-08-29 Donn Terry <donnte@microsoft.com>
-
- * proc-api.c (rw_table): Fix typo in #ifdef PCSHOLD (missing S).
-
-2002-08-28 Keith Seitz <keiths@redhat.com>
-
- * stack.c (select_frame): Add FIXME concerning selected-frame
- events.
- (select_frame_command): Send selected-frame-level-changed
- event notification, but only if the level actually changed.
- (up_silently_base): Add selected-frame-level-changed event
- notification.
- (down_silently_base): Likewise.
-
-2002-08-28 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in: Update dependencies for all gdb/*.c files.
-
-2002-08-27 Tom Tromey <tromey@redhat.com>
-
- * Makefile.in (osabi.o, i387-tdep.o, i386-linux-nat.o, lin-lwp.o,
- ax-gdb.o, signals.o, jv-valprint.o, c-valprint.o, cp-abi.o):
- Update dependencies.
- * i387-tdep.c: Include gdb_string.h.
- * osabi.c: Likewise.
- * i386-linux-nat.c: Likewise.
- * lin-lwp.c: Likewise.
- * ax-gdb.c: Likewise.
- * signals/signals.c: Likewise.
- * jv-valprint.c: Likewise.
- * p-lang.c: Likewise.
- * c-valprint.c: Likewise.
- * cp-abi.c: Likewise.
-
-2002-08-27 Elena Zannoni <ezannoni@redhat.com>
-
- * cli/cli-script.h (copy_command_lines): Export.
- * breakpoint.c: Include cli/cli-script.h.
- * Makefile.in (breakpoint.o): Update dependencies.
-
-2002-08-26 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (insert_breakpoints): Protect all references
- to 'process_warning'. Shorten long lines.
-
-2002-08-26 Joel Brobecker <brobecker@gnat.com>
-
- * cli/cli-script.c (copy_command_lines): New function.
- * defs.h (copy_command_lines): Export.
- * testsuite/gdb.base/commands.exp: New tests for commands
- attached to a temporary breakpoint, and for commands that
- delete the breakpoint they are attached to.
-
-2002-08-26 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (bpstat_stop_status): Instead of copying the
- pointer to the breakpoint commands struct, make a new copy
- of the struct and point to that.
- (bpstat_clear): Free the commands struct.
- (bpstat_clear_actions): Free the commands struct.
- (bpstat_do_actions): Free the command actions. Also execute
- the local cleanups, instead of deleting them.
- (delete_breakpoint): Leave the commands field of the bpstat
- chain alone -- it will be freed later.
-
-2002-08-26 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-tdep.c (altivec_register_p): Restore function inadvertently
- deleted in 2002-08-20 commit. This function is still used by
- ppc-linux-nat.c.
-
-2002-08-26 Keith Seitz <keiths@redhat.com>
-
- * gdb-events.sh: Add selected-frame-level-changed event.
- * gdb-events.c: Regenerated.
- * gdb-events.h: Regenerated.
-
-2002-08-26 Stephane Carrez <stcarrez@nerim.fr>
-
- Fix PR gdb/393:
- * inflow.c (terminal_save_ours): New function to save terminal
- settings.
- * inferior.h (terminal_save_ours): Declare.
- * target.c (debug_to_terminal_save_ours): New function.
- (cleanup_target): Defaults to_terminal_save_ours.
- (update_current_target): Inherit to_terminal_save_ours.
- (setup_target_debug): Set to_terminal_save_ours.
- * target.h (target_terminal_save_ours): New to save terminal settings.
- (target_ops): New member to_terminal_save_ours.
- * gnu-nat.c (init_gnu_ops): Set to_terminal_save_ours.
- * hpux-thread.c (init_hpux_thread_ops): Likewise.
- * inftarg.c (init_child_ops): Likewise.
- * m3-nat.c (init_m3_ops): Likewise.
- * procfs.c (init_procfs_ops): Likewise.
- * wince.c (init_child_ops): Likewise.
- * win32-nat.c (init_child_ops): Likewise.
- * sol-thread.c (init_sol_thread_ops): Likewise.
-
-2002-08-26 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.c (i386_store_return_value): Undeprecate. Convert to
- use regcache_* functions.
- (i386_gdbarch_init): Set store_return_value instead of
- deprecated_store_return_value.
-
- * regcache.c (regcache_raw_write_signed,
- regcache_raw_write_unsigned): New functions.
- * regcache.h (regcache_raw_write_signed,
- regcache_raw_write_unsigned): New prototypes.
-
-2002-08-25 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (c-exp.tab.o, jv-exp.tab.o, f-exp.tab.o)
- (m2-exp.tab.o, p-exp.tab.o, ada-exp.tab.o): Move to before the
- source file dependencies. Cleanup corresponding generator rules.
-
-2002-08-25 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.h (register_offset_hack): Declare.
- (regcache_cooked_read_using_offset_hack): Declare.
- (regcache_cooked_write_using_offset_hack): Declare.
-
- * regcache.c (register_offset_hack): New function.
- (regcache_cooked_read_using_offset_hack): New function.
- (regcache_cooked_write_using_offset_hack): New function.
- (regcache_dump): Check that the registers, according to their
- offset, are packed hard against each other.
- (cooked_xfer_using_offset_hack): New function.
-
-2002-08-25 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.c (struct regcache_descr): Add field register_type.
- (init_legacy_regcache_descr): Pass a pre-allocated regcache_descr
- in as a parameter
- (init_regcache_descr): Initialize register_type. Pass the descr
- to init_legacy_regcache_descr. Use register_type instead of
- REGISTER_VIRTUAL_TYPE.
- (register_type): New function.
- (regcache_dump): Replace REGISTER_VIRTUAL_TYPE with register_type.
- * regcache.h (register_type): Declare.
-
-2002-08-25 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Set store_struct_return
- instead of deprecated_store_return_value. Fix fallout from
- 2002-08-23 Andrew Cagney <cagney@redhat.com>.
-
-2002-08-25 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.c (max_register_size): New function.
- (init_legacy_regcache_descr): Ensure that max_register_size is
- large enough for REGISTER_VIRTUAL_SIZE.
- * regcache.h (max_register_size): Declare.
-
-2002-08-24 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Use deprecated version of
- store_return_value.
- (e500_extract_return_value): Change type of valbuf pointer to
- void.
-
-2002-08-24 Mark Kettenis <kettenis@gnu.org>
-
- * PROBLEMS: Clarify problems with FreeBSD's compiler and suggest
- workaround.
-
- * valprint.c (print_longest) [CC_HAS_LONG_LONG &&
- PRINTF_HAS_LONG_LONG]: Cast val_long to (long long) or (unsigned
- long long) to prevent compiler warning on 64-bit systems.
-
-2002-08-23 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (STORE_RETURN_VALUE): Add regcache parameter.
- (DEPRECATED_STORE_RETURN_VALUE): New method.
- (EXTRACT_RETURN_VALUE): Make buffer parameter a void pointer.
- * gdbarch.h, gdbarch.c: Re-generate.
-
- * values.c (set_return_value): Pass current_regcache to
- STORE_RETURN_VALUE.
- * arch-utils.h (legacy_store_return_value): Declare.
- * arch-utils.c (legacy_store_return_value): New function.
- (legacy_extract_return_value): Update parameters.
-
- * config/pa/tm-hppa.h (DEPRECATED_STORE_RETURN_VALUE): Rename
- STORE_RETURN_VALUE.
- * config/pa/tm-hppa64.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/z8k/tm-z8k.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/sparc/tm-sparclet.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/mn10200/tm-mn10200.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/m68k/tm-linux.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/m32r/tm-m32r.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/h8500/tm-h8500.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
- * config/h8300/tm-h8300.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
-
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
- * i386-tdep.c (i386_extract_return_value): Update.
- * arch-utils.c (legacy_extract_return_value): Update.
- * frv-tdep.c (frv_gdbarch_init): Update.
- * cris-tdep.c (cris_gdbarch_init): Update.
- * d10v-tdep.c (d10v_gdbarch_init): Update.
- * rs6000-tdep.c (rs6000_gdbarch_init): Update.
- * m68k-tdep.c (m68k_gdbarch_init): Update.
- * mcore-tdep.c (mcore_gdbarch_init): Update.
- * mn10300-tdep.c (mn10300_gdbarch_init): Update.
- * s390-tdep.c (s390_gdbarch_init): Update.
- * sparc-tdep.c (sparc_gdbarch_init): Update.
- * sh-tdep.c (sh_gdbarch_init): Update.
- * x86-64-tdep.c (x86_64_gdbarch_init): Update.
- * v850-tdep.c (v850_gdbarch_init): Update.
- * avr-tdep.c (avr_gdbarch_init): Update.
- * ia64-tdep.c (ia64_gdbarch_init): Update.
- * ns32k-tdep.c (ns32k_gdbarch_init): Update.
- * vax-tdep.c (vax_gdbarch_init): Update.
- * alpha-tdep.c (alpha_gdbarch_init): Update.
- * arm-tdep.c (arm_gdbarch_init): Update.
- * mips-tdep.c (mips_gdbarch_init): Update.
- * i386-tdep.c (i386_gdbarch_init): Update.
-
-2002-08-23 Andrew Cagney <ac131313@redhat.com>
-
- * config/djgpp/fnchange.lst: Add entries for bfd/elf32-ppcqnx.c,
- bfd/elf32-ppc.c, bfd/elf32-sh.c and bfd/elf32-shqnx.c.
-
-2002-08-24 Mark Kettenis <kettenis@gnu.org>
-
- * PROBLEMS: Refer to GDB 5.3 instead of 5.2. Mention FreeBSD
- problems.
-
-2002-08-23 Joel Brobecker <brobecker@gnat.com>
-
- * infrun.c (handle_inferior_event): Move a comment outside of a
- function call, in order to avoid indent reformatting this part
- of the code in an unreadable way.
-
-2002-08-23 Grace Sainsbury <graces@redhat.com>
-
- * infrun.c (normal_stop, proceed): Remove call to print_sys_errmsg
- when breakpoints fail. Move general breakpoint error messages to
- insert_breakpoints.
- * breakpoint.c (insert_breakpoints): Change warnings when
- breakpoints are nto inserted to specify the type. Remove call to
- memory_error when hardware breakpoints can't be inserted. Remove
- multiple calls to warning so all messages are sent to the user at
- once.
- (delete_breakpoints): Make insert error messsages more explicit.
-
-2002-08-23 Daniel Jacobowitz <drow@mvista.com>
-
- * ChangeLog: Move gdbserver entries after GDB 5.2 to
- gdbserver/ChangeLog.
-
-2002-08-23 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.c: Include "objfiles.h".
- (i386_svr4_init_abi): Set in_solib_call_trampoline and
- skip_trampoline_code.
- * config/i386/tm-i386v4.h: Don't include "config/tm-sysv4.h".
- (CPLUS_MARKER): Define to '.'.
-
- * linux-proc.c (struct linux_corefile_thread_data): Add num_notes
- member.
- (linux_corefile_thread_callback): Increase args->num_notes.
- (linux_make_note_section): Initialize thread_args.num_notes, and
- use it to determine whether notes for any threads were created.
-
-2002-08-23 Donn Terry <donnte@microsoft.com>
-
- * proc-api.c (rw_table): Do not include a row for PCDSTOP if the
- corresponding macro is not defined. Likewise for PCNICE, PCSHOLD
- and PCUNKILL.
- (write_with_trace): Conditionalize out the switch branch handling
- PCSHOLD if the corresponding macro is not defined. Likewise for
- PRSABORT and PRSTOP.
- This change will be needed by the Interix port.
-
-2002-08-22 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-sysv-tdep.c (ppc_sysv_abi_push_arguments): use
- write_register wherever possible instead of manipulating the
- register bytes directly.
- Assign VALUE_CONTENTS to a variable and use that.
- The GPR numbers are now dependent on the architecture.
-
-2002-08-22 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (struct rs6000_framedata): Add saved_ev and
- ev_offset fields.
- (skip_prologue): Add support for BookE/e500 instructions.
- (e500_extract_return_value): New function.
- (frame_get_saved_regs): Add support for saving ev registers and
- pseudo gpr's.
- (e500_store_return_value): New function.
- (rs6000_gdbarch_init): Move up default intializations of
- deprecated_extract_return_value and store_return_value. Overwrite
- init of store_return_value with e500 specific version.
- Set extract_return_value for e500.
-
-2002-08-22 Elena Zannoni <ezannoni@redhat.com>
-
- * blockframe.c (generic_call_dummy_register_unwind): Use
- regcache_cooked_read to catch cases in which the variable is
- stored in a pseudo register.
+2002-01-04 Daniel Jacobowitz <drow@mvista.com>
-2002-08-22 Andrew Cagney <cagney@redhat.com>
+ * Makefile.in (acconfig_h): Remove incorrect macro.
+ (config_h): Define.
+ (osabi.o): Update dependencies.
+ * configure.tgt: Set gdb_osabi based on target triplet.
+ * configure.in: Define GDB_OSABI_DEFAULT based on gdb_osabi.
+ * configure: Regenerated.
+ * config.in: Regenerated.
+ * osabi.c: Include "arch-utils.h", "gdbcmd.h", and "command.h".
+ (GDB_OSABI_DEFAULT): Define if not already defined.
+ (user_osabi_state, user_selected_osabi, gdb_osabi_available_names)
+ (set_osabi_string): New variables.
+ (gdbarch_register_osabi): Add new OS ABI to
+ gdb_osabi_available_names.
+ (gdbarch_lookup_osabi): Honor specified and default OS ABIs.
+ (set_osabi, show_osabi): New functions.
+ (_initialize_gdb_osabi): Add "set osabi" and "show osabi" commands.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * arch-utils.c (gdbarch_info_init): Set osabi to
+ GDB_OSABI_UNINITIALIZED.
+ * gdbarch.sh: Add osabi to struct gdbarch and to struct
+ gdbarch_info. Include "osabi.h" in gdbarch.c. Check osabi
+ in gdbarch_list_lookup_by_info and in gdbarch_update_p.
+ * gdbarch.c: Regenerated.
+ * gdbarch.h: Regenerated.
+ * osabi.c (gdbarch_lookup_osabi): Return GDB_OSABI_UNINITIALIZED if
+ there's no BFD.
+ (gdbarch_init_osabi): Remove osabi argument; use info.osabi.
+ * osabi.h (enum gdb_osabi): Move to defs.h.
+ (gdbarch_init_osabi): Update prototype.
+ * defs.h (enum gdb_osabi): Moved here.
+ * Makefile.in: Update dependencies.
- * NEWS: Mention that the i960 has been made obsolete.
- * Makefile.in (SFILES): Delete remote-nrom.c, remote-nindy.c and
- i960-tdep.c
- (remote-nrom.o): Obsolete target.
- (remote-nindy.o, i960-tdep.o): Ditto.
- * remote-nrom.c: Make file obsolete.
- * remote-nindy.c, remote-vx960.c: Ditto.
- * config/i960/vxworks960.mt, config/i960/nindy960.mt: Ditto.
- * config/i960/mon960.mt, config/i960/tm-i960.h: Ditto.
- * config/i960/tm-vx960.h, config/i960/tm-nindy960.h: Ditto.
- * config/i960/tm-mon960.h, i960-tdep.c: Ditto.
- * configure.tgt: Make i960-*-bout*, i960-nindy-coff*,
- i960-*-coff*, i960-nindy-elf*, i960-*-elf*, i960-*-nindy* and
- i960-*-vxworks* obsolete.
- * MAINTAINERS: Note that the i960 is obsolete.
+ * alpha-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove osabi member.
+ * alpha-tdep.c: Include "osabi.h".
+ (alpha_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ iterate over arches. Update call to gdbarch_init_osabi.
+ (alpha_dump_tdep): Don't dump osabi.
+ * alpha-linux-tdep.c: Include "osabi.h".
+ * alpha-osf1-tdep.c: Include "osabi.h".
+ * alphafbsd-tdep.c: Include "osabi.h".
+ * alphanbsd-tdep.c: Include "osabi.h".
+
+ * arm-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove osabi member.
+ * arm-tdep.c: Include "osabi.h".
+ (arm_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ iterate over arches. Update call to gdbarch_init_osabi.
+ (arm_dump_tdep): Don't dump osabi.
+ * arm-linux-tdep.c: Include "osabi.h".
+ * armnbsd-tdep.c: Include "osabi.h".
+
+ * hppa-tdep.c (hppa_gdbarch_init): Don't call gdbarch_lookup_osabi.
+ Update call to gdbarch_init_osabi.
+
+ * i386-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove osabi member.
+ * i386-tdep.c: Include "osabi.h".
+ (i386_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ iterate over arches. Update call to gdbarch_init_osabi.
+ (i386_dump_tdep): Don't dump osabi.
+ * i386-linux-tdep.c: Include "osabi.h".
+ * i386-sol2-tdep.c: Include "osabi.h".
+ * i386bsd-tdep.c: Include "osabi.h".
+ * i386gnu-tdep.c: Include "osabi.h".
+ * i386ly-tdep.c: Include "osabi.h".
+ * i386nbsd-tdep.c: Include "osabi.h".
+ * i386obsd-tdep.c: Include "osabi.h".
+
+ * mips-tdep.c (struct gdbarch_tdep): Remove osabi member.
+ (mips_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ check osabi when iterating over arches. Update call to
+ gdbarch_init_osabi.
+ (mips_dump_tdep): Don't dump osabi.
+
+ * ns32k-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Don't call
+ gdbarch_lookup_osabi. Don't iterate over arches. Don't
+ allocate tdep. Update call to gdbarch_init_osabi.
+ (ns32k_dump_tdep): Remove.
+ (_initialize_ns32k_tdep): Update call to gdbarch_register.
+ * ns32knbsd-tdep.c: Include "osabi.h".
+
+ * ppc-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove osabi member.
+ * rs6000-tdep.c: Include "osabi.h".
+ (rs6000_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't check
+ osabi when iterating over arches. Update call to
+ gdbarch_init_osabi.
+ (rs6000_dump_tdep): Don't dump osabi.
+ * ppc-linux-tdep.c: Include "osabi.h".
+ * ppcnbsd-tdep.c: Include "osabi.h".
+
+ * sh-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove osabi member.
+ * sh-tdep.c: Include "osabi.h".
+ (sh_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ iterate over arches. Update call to gdbarch_init_osabi.
+ (sh_dump_tdep): Don't dump osabi.
+ * shnbsd-tdep.c: Include "osabi.h".
+
+ * sparc-tdep.c: Include "osabi.h".
+ (sparc_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ iterate over arches. Update call to gdbarch_init_osabi.
+ (sparc_dump_tdep): Don't dump osabi. Do dump the rest of the
+ tdep structure.
+
+ * vax-tdep.h: Don't include "osabi.h".
+ (struct gdbarch_tdep): Remove.
+ * vax-tdep.c: Include "osabi.h".
+ (vax_gdbarch_init): Don't call gdbarch_lookup_osabi. Don't
+ iterate over arches. Don't allocate tdep. Update call
+ to gdbarch_init_osabi.
+ (vax_dump_tdep): Remove.
+ (_initialize_vax_tdep): Update call to gdbarch_register.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (insert_breakpoints): Skip disabled breakpoints
+ entirely.
+ (breakpoint_re_set_one): Don't fetch the value for a disabled
+ watchpoint.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * buildsym.h (processing_hp_compilation): Remove obsolete variable.
+ * gdbarch.sh Remove include of "value.h" in gdbarch.h.
+ (COERCE_FLOAT_TO_DOUBLE): Remove.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Regenerate.
+ * Makefile.in: Remove value_h from gdbarch_h.
+ * valops.c (coerce_float_to_double): New variable.
+ (default_coerce_float_to_double): Remove.
+ (standard_coerce_float_to_double): Remove.
+ (value_arg_coerce): Use coerce_float_to_double.
+ (_initialize_valops): Add "set coerce-float-to-double".
+ * value.h (default_coerce_float_to_double): Remove prototype.
+ (standard_coerce_float_to_double): Remove prototype.
+
+ * hpread.c (hpread_process_one_debug_symbol): Mark C++ functions as
+ prototyped.
+ * mdebugread.c (parse_symbol): Likewise.
+ * stabsread.c (define_symbol): Mark all functions as prototyped.
+
+ * hppa-tdep.c (hppa_coerce_float_to_double): Remove.
+ * alpha-tdep.c (alpha_gdbarch_init): Remove call to
+ set_gdbarch_coerce_float_to_double.
+ * arm-tdep.c (arm_gdbarch_init): Likewise.
+ * frv-tdep.c (frv_gdbarch_init): Likewise.
+ * h8300-tdep.c (h8300_gdbarch_init): Likewise (commented out).
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.
+ * mips-tdep.c (mips_gdbarch_init): Likewise.
+ (mips_coerce_float_to_double): Remove.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
+ (rs6000_coerce_float_to_double): Remove.
+ * s390-tdep.c (s390_gdbarch_init): Likewise.
+ * sh-tdep.c (sh_gdbarch_init): Likewise.
+ (sh_coerce_float_to_double): Remove.
+ * sparc-tdep.c (sparc_gdbarch_init): Likewise.
+ (sparc_coerce_float_to_double): Remove.
+ * v850-tdep.c (v850_gdbarch_init): Likewise.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
+ * config/m32r/tm-m32r.h (COERCE_FLOAT_TO_DOUBLE): Remove.
+ * config/pa/tm-hppa.h: (COERCE_FLOAT_TO_DOUBLE): Remove.
+ (hppa_coerce_float_to_double): Remove prototype.
+ * config/sparc/tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Remove.
-2002-08-21 Corinna Vinschen <vinschen@redhat.com
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
- * aix-thread.c (aix_thread_detach): Disable thread debugging on
- detach to allow reinitialization.
+ * regformats/reg-m68k.dat: Remove fpcode and fpflags.
-2002-08-22 Andrew Cagney <ac131313@redhat.com>
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
- * MAINTAINERS: Change the s390 target to s390-linux-gnu (second
- attempt).
+ Suggested by Stewart Brown <sb24@avaya.com>:
+ * c-typeprint.c (c_type_print_varspec_prefix): Pass value of show
+ in recursive calls. Handle TYPE_CODE_TYPEDEF.
+ (c_type_print_varspec_suffix): Likewise.
-2002-08-22 Jim Blandy <jimb@redhat.com>
+2003-01-04 Mark Kettenis <kettenis@gnu.org>
- * coffread.c (coff_symfile_read): Don't try to read the line
- number table from disk if the image file doesn't have a symbol
- table; we'll never actually look at the info anyway, and Windows
- ships DLL's with bogus file offsets for the line number data.
+ * configure.in: Don't set and AC_SUBST SUBDIRS.
+ * configure: Regenerated.
-2002-08-21 Elena Zannoni <ezannoni@redhat.com>
+ * configure.in: Remove code dealing with shared libraries.
+ * Makefile.in: Remove HLDFLAGS and HLDENV.
+ * configure: Regenerated.
- * rs6000-tdep.c (rs6000_gdbarch_init): Figure out whether we have
- an e500 executable.
+2003-01-04 Andrew Cagney <ac131313@redhat.com>
-2002-08-21 Michael Snyder <msnyder@redhat.com>
+ * frame.c (deprecated_frame_xmalloc): New function.
+ (deprecated_set_frame_saved_regs_hack): New function.
+ (deprecated_set_frame_extra_info_hack): New function.
+ * frame.h (deprecated_frame_xmalloc): Declare.
+ (deprecated_set_frame_saved_regs_hack): Declare.
+ (deprecated_set_frame_extra_info_hack): Declare.
- * mips-tdep.c (MSYMBOL_IS_SPECIAL): Replace macro with function.
- (MSYMBOL_SIZE): Replace macro with function.
- (DEFAULT_MIPS_TYPE): Delete unused macro.
- * config/mips/tm-mips.h (DEFAULT_MIPS_TYPE): Delete unused macro.
- * config/mips/tm-embed.h (DEFAULT_MIPS_TYPE): Delete unused macro.
+2003-01-04 Mark Kettenis <kettenis@gnu.org>
-2002-08-21 Jim Blandy <jimb@redhat.com>
+ * configure.in: Move code that provides the --enable-gdbtk option
+ right after the code that handles the --enable-tui option, and
+ polish it somewhat.
+ * configure: Regenerated.
- * valops.c (value_cast): Simplify and correct logic for doing a
- static cast from a pointer to a base class to a pointer to a
- derived class.
+ * configure.in: Call AC_GNU_SOURCE. Check for pread64 using
+ AC_CHECK_FUNCS and remove the old check for pread64.
+ * acinclude.m4 (AC_GNU_SOURCE): New macro.
+ * acconfig.h (_GNU_SOURCE): Add.
+ (HAVE_PREAD64): Remove.
+ * configure, aclocal.m4, config.in: Regenerated.
+
+2003-01-03 Andrew Cagney <ac131313@redhat.com>
+
+ * alpha-tdep.c: Use get_frame_saved_regs.
+ * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
+ * h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto.
+ * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Ditto.
+ * ns32k-tdep.c, s390-tdep.c, sh-tdep.c, v850-tdep.c: Ditto.
+ * vax-tdep.c, xstormy16-tdep.c: Ditto.
+
+2003-01-03 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Remove all use of the SUBDIRS variable; add
+ directories using the AC_CONFIG_SUBDIRS macro instead. Polish
+ code providing the --enable-multi-ice option, and move it right in
+ front of the code that checks whether gdbserver is supported.
+ Polish that too.
+ * configure: Regenerated.
+ * Makefile.in (SUBDIRS): Substitute @subdirs@ instead of
+ @SUBDIRS@.
-2002-08-21 Andrew Cagney <ac131313@redhat.com>
+2003-01-03 Andrew Cagney <cagney@redhat.com>
- * infcmd.c (default_print_registers_info): Replace
- do_registers_info.
- (registers_info): Use gdbarch_print_registers_info instead of
- DO_REGISTERS_INFO.
- * inferior.h (default_print_registers_info): Replace
- do_registers_info.
- * gdbarch.sh (PRINT_REGISTERS_INFO): New method.
- (DO_REGISTERS_INFO): Change to a predicate function.
- * gdbarch.h, gdbarch.c: Regenerate.
+ * alpha-tdep.c: Use deprecated_update_frame_base_hack.
+ * avr-tdep.c, cris-tdep.c: Ditto.
+ * mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
+ * sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
-2002-08-21 Keith Seitz <keiths@redhat.com>
-
- * gdb-events.sh: Add target-changed event.
- * gdb-events.c: Regenerated.
- * gdb-events.c: Regenerated.
- * valops.c (value_assign): Add target-changed event notification
- to inlval_register, lval_memory, and lval_reg_frame_relative.
-
-2002-08-21 Joel Brobecker <brobecker@gnat.com>
-
- * NEWS: Add an entry regarding the improvement of the next/step
- operation on Alpha Tru64 multi-processor machines.
-
-2002-08-21 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in: Update dependencies for mi/ cli/ and tui/
- directores.
- * Makefile.in: Update all _h macro definitions.
- * Makefile.in (install-gdbtk): Move to install section.
- (rdi-share/libangsd.a): Move to end of file.
-
-2002-08-19 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (frame_register_unwind): When a register, set addrp to
- the register's byte.
-
-2002-08-20 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): These are only
- used locally, so move them from the target machine header to here.
- (mips_set_processor_type, mips_register_name, mips32_next_pc,
- mips16_next_pc, cached_proc_desc, mips_set_processor_type):
- Make static.
- * config/mips/tm-mips.h (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Delete.
-
-2002-08-20 Andrew Cagney <cagney@redhat.com>
-
- * NEWS: Mention that the Apollo line was made obsolete.
- * configure.tgt: Make m68*-apollo*-bsd*, m68*-hp-bsd*, and
- m68*-hp-hpux* obsolete.
- * configure.host: Make m68*-apollo*-sysv*, m68*-apollo*-bsd*,
- m68*-hp-bsd* and m68*-hp-hpux* obsolete.
- * buildsym.c (make_blockvector): Make static.
- * buildsym.h (make_blockvector): Make extern declaration obsolete.
- * Makefile.in (HFILES_NO_SRCDIR): Remove dst.h
- (ALLDEPFILES): Remove dstread.c.
- (dstread.o): Obsolete make rule.
- * dstread.c: Makefile obsolete.
- * dst.h: Ditto.
- * config/m68k/hp300hpux.mt: Ditto.
- * config/m68k/hp300hpux.mh: Ditto.
- * config/m68k/hp300bsd.mt: Ditto.
- * config/m68k/hp300bsd.mh: Ditto.
- * config/m68k/apollo68b.mt: Ditto.
- * config/m68k/apollo68v.mh: Ditto.
- * config/m68k/apollo68b.mh: Ditto.
-
-2002-08-20 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_in_return_stub): Make static.
- (mips_gdbarch_init): Set in_solib_return_trampoline.
- * config/mips/tm-mips.h (IN_SOLIB_RETURN_TRAMPOLINE): Delete.
-
-2002-08-20 Michael Snyder <msnyder@redhat.com>
-
- * gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Add.
- * gdbarch.c, gdbarch.h: Regenerate.
- * arch-utils.c, arch-utils.h (generic_in_solib_return_trampoline):
- Add.
- * infrun.c (IN_SOLIB_RETURN_TRAMPOLINE): Delete default definition.
-
-2002-08-20 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_skip_stub, mips_in_call_stub): Make static.
- (mips_gdbarch_init): Set skip_trampoline_code,
- in_solib_call_trampoline.
- * config/mips/tm-mips.h (REGISTER_NAME): Delete.
- (IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE): Delete.
-
-2002-08-20 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-tdep.h (struct gdbarch_tdep): Add ev registers.
-
- * rs6000-tdep.c (rs6000_register_virtual_type): Return 64 bit
- vector type for ev registers.
- (e500_pseudo_register_read): New function.
- (e500_pseudo_register_write): New function.
- (e500_dwarf2_reg_to_regnum): New function.
- (PPC_UISA_NOFP_SPRS): New macro.
- (PPC_EV_REGS): New macro.
- (PPC_GPRS_PSEUDO_REGS): New macro.
- (registers_e500): New register set for e500.
- (variants): Add e500 variant.
- (rs6000_gdbarch_init): Move setting of pc, sp, fp regnums to
- before setting architectural dependent variations. Initialize ev
- registers numbers. Add case for e500 architecture. Set the
- number of pseudo registers.
-
-2002-08-20 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c: Clean up comments.
-
-2002-08-20 Andrew Cagney <cagney@redhat.com>
-
- * h8300-tdep.c: Re-indent file.
-
-2002-08-20 Jim Blandy <jimb@redhat.com>
-
- * Makefile.in (LDFLAGS): Allow the configure script to establish a
- default for this.
-
-2002-08-20 Keith Seitz <keiths@redhat.com>
-
- * breakpoints.c (watch_command_1): Use internal breakpoint
- when setting a watchpoint_scope breakpoint.
-
-2002-08-20 Elena Zannoni <ezannoni@redhat.com>
-
- * gdbtypes.c (build_builtin_type_vec64): Add name to type.
- (build_builtin_type_vec64i): Ditto.
- (build_builtin_type_vec128): Ditto.
- (build_builtin_type_vec128i): Ditto.
-
-2002-08-19 Michael Snyder <msnyder@redhat.com>
-
- * config/mips/tm-mips.h (ELF_MAKE_MSYMBOL_SPECIAL): Delete.
- (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Change into functions.
- (FIX_CALL_DUMMY, PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME,
- POP_FRAME, INIT_EXTRA_FRAME_INFO): Delete.
- (CALL_DUMMY_START_OFFSET, CALL_DUMMY_BREAKPOINT_OFFSET,
- CALL_DUMMY_ADDRESS): Delete.
- * mips-tdep.c (mips_elf_make_msymbol_special, mips_msymbol_size,
- mips_msymbol_is_special, mips_fix_call_dummy): New functions.
- (mips_gdbarch_init): Set elf_make_msymbol_special, pop_frame,
- push_dummy_frame, fix_call_dummy, init_extra_frame_info,
- push_return_address.
- (mips_register_raw_size, mips_eabi_use_struct_convention,
- mips_n32n64_use_struct_convention, mips_o32_use_struct_convention,
- mips_o32_reg_struct_has_addr, mips_frame_saved_pc, mips_frame_chain,
- mips_init_extra_frame_info, mips_eabi_push_arguments,
- mips_n32n64_push_arguments, mips_push_return_address,
- mips_push_dummy_frame, mips_pop_frame, mips_skip_prologue,
- mips_breakpoint_from_pc, mips_call_dummy_address): Make static.
-
-2002-08-19 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_frame_num_args): New function.
- (mips_gdbarch_init): Set frame_chain, frameless_function_invocation,
- frame_saved_pc, frame_args_address, frame_locals_address,
- frame_num_args, and frame_args_skip.
- * config/mips/tm-mips.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION,
- FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
- FRAME_NUM_ARGS, FRAME_ARGS_SKIP): Delete.
- * config/mips/tm-mipsv4.h (FRAME_CHAIN_VALID): Delete.
-
-2002-08-20 Michael Snyder <msnyder@redhat.com>
-
- * config/mips/tm-mips.h (STORE_STRUCT_RETURN): Delete.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
- * mips-tdep.c (mips_store_struct_return): New function.
- (mips_extract_struct_value_address): New function.
- (mips_gdbarch_init): Set store_struct_return and
- extract_struct_value_address.
-
-2002-08-20 David Carlton <carlton@math.stanford.edu>
-
- * dwarf2read.c (dwarf2_build_psymtabs): Check that
- dwarf_line_offset is nonzero before creating dwarf_line_buffer.
- (read_file_scope): Check that line_header is nonzero before
- decoding macro information.
-
-2002-08-20 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.h (FP_REGNUM_P): Change such that we don't incorrectly
- flag the general-purpose registers as floating-point on targets
- that don't support the floating-point registers.
-
-2002-08-20 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (altivec_register_p): Delete.
- (rs6000_do_altivec_registers): Delete.
- (rs6000_altivec_registers_info): Delete.
- (rs6000_do_registers_info): Delete.
- (_initialize_rs6000_tdep): Remove command 'info powerpc altivec'.
- (rs6000_gdbarch_init): Remove setting of do_registers_info.
-
-2002-08-20 Elena Zannoni <ezannoni@redhat.com>
-
- * infcmd.c (do_registers_info): Print vector registers in hex
- format only.
- (print_vector_info): Check that printing registers
- makes sense.
- (print_float_info): Ditto.
-
-2002-08-20 Andrew Cagney <ac131313@redhat.com>
-
- * mips-tdep.c (mips_gdbarch_init): Update.
- (mips_o32_extract_return_value): Rewrite.
- (mips_o32_store_return_value): Rewrite.
- (mips_o32_xfer_return_value): New function.
- (mips_xfer_register): Tweak debug print message. Allow for
- buf_offset when dumping the value transfered.
-
-2002-08-20 Andrew Cagney <ac131313@redhat.com>
-
- * config/mips/tm-nbsd.h (MIPS_DEFAULT_ABI): Delete.
- * config/mips/tm-linux.h (MIPS_DEFAULT_ABI): Delete.
- * config/mips/tm-irix5.h (MIPS_DEFAULT_ABI): Delete.
- * config/mips/tm-irix6.h (MIPS_DEFAULT_ABI): Delete.
- * mips-tdep.c (mips_gdbarch_init) [MIPS_DEFAULT_ABI]: Delete code.
-
-2002-08-14 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_frame_chain): Check for call-dummy frames.
-
-2002-08-19 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (struct reg): Add field to indicate a pseudo
- register.
- (P): New macro to define a register as a pseudo register.
- (R, R4, R8, R16, FR32, R64, R0): Updated.
- (struct variant): Add new fields for number of pseudo registers
- and number of total registers.
- (tot_num_registers): New macro replacing....
- (num_registers): ...deleted macro.
- (num_registers): New function.
- (num_pseudo_registers): New function.
- (variants): Update all variants to intialize new fields correctly.
- Postpone initialization of number of pseudo regs and real regs.
- (init_variants): New function.
- (rs6000_gdbarch_init): Initialize variants. Update calculation of
- registers offsets.
-
-2002-08-19 David Carlton <carlton@math.stanford.edu>
-
- * valops.c (search_struct_field): Change error message to treat
- return value of 0 from value_static_field as meaning that field is
- optimized out.
- (value_struct_elt_for_reference): Ditto.
- * values.c (value_static_field): Treat an unresolved location the
- same as a nonexistent symbol. Fix PR gdb/635.
- * gnu-v2-abi.c (gnuv2_value_rtti_type): Eliminate test for being
- enclosed. Fix PR gdb/574.
- * MAINTAINERS: Add self to Write After Approval list.
-
-2002-08-19 Andrew Cagney <ac131313@redhat.com>
-
- * mips-tdep.c (mips_xfer_register): New function.
- (mips_n32n64_extract_return_value): Rewrite.
- (mips_gdbarch_init): For N32 and N64, set extract_return_value
- instead of deprecated_extract_return_value.
-
-2002-08-19 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (TDEP): Delete macro.
- (branch_dest): Replace use of TDEP macro with its body.
- (rs6000_pop_frame): Ditto.
- (rs6000_push_arguments): Ditto.
- (rs6000_skip_trampoline_code): Ditto.
- (rs6000_frame_saved_pc): Ditto.
- (rs6000_frame_chain): Ditto.
- (rs6000_register_name): Ditto.
- (rs6000_register_byte): Ditto.
- (rs6000_register_raw_size): Ditto.
- (rs6000_register_virtual_type): Ditto.
- (rs6000_register_convertible): Ditto.
- (rs6000_convert_from_func_ptr_addr): Ditto.
-
-2002-08-19 Daniel Jacobowitz <drow@mvista.com>
-
- * config/mips/tm-linux.h (REALTIME_LO, REALTIME_HI): Define
- conditionally.
- (JB_PC, JB_ELEMENT_SIZE): Rename to MIPS_LINUX_JB_PC and
- MIPS_LINUX_JB_ELEMENT_SIZE.
- * mips-linux-tdep.c (supply_gregset, fill_gregset): Use alloca
- for MAX_REGISTER_RAW_SIZE arrays.
- (mips_linux_get_longjmp_target): Use MIPS_LINUX_JB_PC and
- MIPS_LINUX_JB_ELEMENT_SIZE.
-
-2002-08-19 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * i387-tdep.c (i387_print_float_info): Fix typo in comment.
-
-2002-08-19 Aidan Skinner <aidan@velvet.net>
-
- * Makefile.in (SFILES): Add ada-exp.y ada-lang.c ada-typeprint.c
- ada-valprint.c ada-tasks.c.
- (YYFILES): Add ada-exp.y.
- (ada-exp.tab.c ada-lex.c ada-lang.o): New target.
- (ada-tasks.o ada-typeprint.o ada-valprint.o): New target.
- (ada-exp.tab.o): New target.
-
-2002-08-18 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.c (regcache_xfer_part): New function.
- (regcache_raw_read_part): New function.
- (regcache_raw_write_part): New function.
- (regcache_cooked_read_part): New function.
- (regcache_cooked_write_part): New function.
- * regcache.h (regcache_raw_read_part): Declare.
- (regcache_raw_write_part): Declare.
- (regcache_cooked_read_part): Declare.
- (regcache_cooked_write_part): Declare.
-
-2002-08-18 Daniel Jacobowitz <drow@mvista.com>
-
- * remote.c (remote_open_1): Add async_p.
- (remote_async_open_1): Delete.
- (open_remote_target): Delete.
- (remote_open, extended_remote_open): Update calls to remote_open_1.
- (remote_async_open, extended_remote_async_open): Call
- remote_open_1 instead of remote_async_open_1.
-
-2002-08-19 Mark Kettenis <kettenis@gnu.org>
-
- * blockframe.c: Fix a few coding standard violations.
-
-2002-08-19 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/nm-i386sco5.h (START_INFERIOR_TRAPS_EXPECTED): Moved
- here from ...
- * config/i386/tm-i386sco5.h: ... here. File removed.
- * config/i386/i386sco5.mt (TM_FILE): Set to tm-i386v4.h.
-
- * config/i386/nm-i386v.h (START_INFERIOR_TRAPS_EXPECTED): New define.
- * config/i386/i386aout.mt (TDEPFILES): Add i387-tdep.o
- (TM_FILE): Set to tm-i386.h.
- * config/i386/i386v.mt (TM_FILE): Set to tm-i386.h.
- * config/i386/tm-i386v.h: Remove file.
- * config/i386/tm-ptx.h [!SEQUENT_PTX4]: Include "i386/tm-i386.h"
- instead of "i386/tm-i386v.h".
- (START_INFERIOR_TRAPS_EXPECTED): Remove define.
- * config/i386/tm-symmetry: Include "i386/tm-i386.h" instead of
- "i386/tm-i386v.h".
- (START_INFERIOR_TRAPS_EXPECTED): Remove define.
- * config/i386/tm-vxworks.h: Include "i386/tm-i386.h" instead of
- "i386/tm-i386.h".
-
-2002-08-18 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/nm-i386v.h: Add protection against
- multiple-inclusion.
- (i386_register_u_addr): Remove prototype.
- (register_u_addr): New prototype.
- (REGISTER_U_ADDR): Redefine accordingly.
- * i386v-nat.c: Improve several comments.
- (i386_register_u_addr): Change signature and rename to
- register_u_addr. Use FP_REGNUM_P. Rewrite slightly to get rid of
- ubase variable.
-
-2002-08-18 Andrew Cagney <ac131313@redhat.com>
-
- * config/mips/tm-mips.h (STORE_RETURN_VALUE): Delete macro.
- (DEPRECATED_EXTRACT_RETURN_VALUE): Delete macro.
- * mips-tdep.c (mips_gdbarch_init): Set store_return_value and
- deprecated_extract_return_value.
- (mips_o32_push_arguments, mips_o64_push_arguments): Clone and
- rename mips_o32o64_push_arguments.
- (mips_gdbarch_init): Update.
- (mips_extract_return_value): Delete.
- (mips_o32_extract_return_value): Clone mips_extract_return_value.
- (mips_o64_extract_return_value): Clone mips_extract_return_value.
- (mips_eabi_extract_return_value): Clone mips_extract_return_value.
- (mips_n32n64_extract_return_value): Clone
- mips_extract_return_value.
- (mips_store_return_value): Delete.
- (mips_o32_store_return_value): Clone mips_store_return_value.
- (mips_o64_store_return_value): Clone mips_store_return_value.
- (mips_eabi_store_return_value): Clone mips_store_return_value.
- (mips_n32n64_store_return_value): Clone mips_store_return_value.
-
-2002-08-18 Aidan Skinner <aidan@velvet.net>
-
- * ada-lang.c: Use gdb_string.h instead of <string.h>.
- * ada-typeprint.c: Use gdb_string.h instead of <string.h>.
-
-2002-08-18 Aidan Skinner <aidan@velvet.net>
-
- * ada-lang.c: Run through gdb_indent.sh.
- * ada-lang.h: Run through gdb_indent.sh.
- * ada-tasks.c: Run through gdb_indent.sh.
- * ada-typeprint.c: Run through gdb_indent.sh.
- * ada-valprint.c: Run through gdb_indent.sh.
-
-2002-08-18 Andrew Cagney <ac131313@redhat.com>
-
- * osabi.c (gdbarch_init_osabi): Don't complain about an unknown
- ABI.
-
-2002-08-18 Mark Kettenis <kettenis@gnu.org>
-
- * i386b-nat.c [FETCH_INFERIOR_REGISTERS]: Remove dead code.
-
- * config/i386/nm-i386bsd.h (FLOAT_INFO): Remove redundant #undef.
- * i386b-nat.c [FLOAT_INFO]: Remove dead code.
-
- * i386-tdep.c (i386_do_pop_frame, i386_store_return_value): Call
- write_register_gen instead of write_register_bytes.
-
- * NEWS: Mention that the i[3456]-*mach3*, i[3456]-*-mach* and
- i[3456]-*-osf1mk* configurations have been made obsolete.
- * configure.host: Make i[3456]86-*-mach3*, i[3456]86-*mach* and
- i[3456]86-*-osf1mk* hosts obsolete.
- * confighure.tgt: Make i[3456]86-*-mach3*, i[3456]86-*-osf1mk*
- targets obsolete.
- * config/i386/i386mach.mh, config/i386/nm-i386mach.h,
- config/i386/xm-i386mach.h, config/i386/i386m3.mh,
- config/i386/i386m3.mt, config/i386/nm-m3.h,
- config/i386/tm-i386m3.h, config/i386/xm-i386m3.h,
- config/i386/i386mk.mh, config/i386/i386mk.mt,
- config/i386/tm-i386mk.h, config/i386/xm-i386mk.h: Make files
- obsolete.
- * i386mach-nat.c, i386m3-nat.c: Make files obsolete.
- * Makefile.in (ALLDEPFILES): Remove i386mach.c i386m3-nat.c
- (i386mach-nat.o, i386m3-nat.o):Make targets obsolete.
-
-2002-08-18 Andrew Cagney <ac131313@redhat.com>
-
- * config/pa/tm-hppa.h (hppa_store_return_value): Declare.
- (hppa_value_returned_from_stack): Declare.
- (hppa_extract_return_value): Declare.
- * config/pa/hppa.mt: New file.
- * configure.tgt: Recognize hppa*-*-*.
- * MAINTAINERS: Change HPPA target to hppa-elf. Still broken.
-
-2002-08-18 Mark Kettenis <kettenis@gnu.org>
-
- * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Fix typo in
- comment.
-
-2002-08-17 Mark Kettenis <kettenis@gnu.org>
-
- * top.c (gdb_rl_operate_and_get_next): Make sure
- operate-and-get-next functions correctly even when the history
- list is completely filled.
-
-2002-08-18 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Target Instruction Set Architectures): Rename
- Target/Architectures. Replace vax-dec-vms5.5 with vax-netbsd.
- Replace s390-linux with s390-linux-gnu. Remove i386-aout,
- mcore-pe, mips64-elf, sparc64-elf. Remove i586-pc-msdosdjgpp,
- already listed under Host/Native.
-
- * configure.tgt: Combine i[3456]86-*-coff*, i[3456]86-*-elf*,
- i[3456]86-*-pe*, and i[3456]86-*-aout* into i[3456]86-*-*. Add
- mips*-*-*.
-
-2002-08-17 Andrew Cagney <ac131313@redhat.com>
-
- * config/ia64/ia64.mt: New file.
- * config/alpha/alpha.mt: New file.
- * MAINTAINERS: Change the alpha target to alpha-elf and IA-64 to
- ia64-linux-gnu. Mention that ia64-elf is broken.
- * configure.tgt: Add alpha*-*-* and ia64*-*-* patterns.
-
-2002-08-17 Mark Kettenis <kettenis@elgar.kettenis.dyndns.org>
-
- * i386-tdep.c (i386_svr4_init_abi, i386_nw_init_abi): Use
- generic_func_frame_valid instead of func_frame_valid.
-
-2002-08-16 Joel Brobecker <brobecker@gnat.com>
-
- * alpha-osf1-tdep.c (alpha_osf1_init_abi): Unfortunately,
- procfs appears to be broken when debugging on multi-processor
- machines. So enable software single stepping in order to avoid
- using the procfs interface to do next/step operations, using
- internal breakpoints instead.
-
- * infrun.c (handle_inferior_event): Readjust the stop_pc by
- DECR_PC_AFTER_BREAK when hitting a single step breakpoint, to
- make this pc address equal to the value it would have if the
- system stepping capability was used. Also set a new flag used
- to ensure that we don't readjust the PC one more time later.
-
- * breakpoint.c (bpstat_stop_status): Do not adjust the PC
- address by DECR_PC_AFTER_BREAK when software single step is
- in use for this architecture, as this has already been taken
- care of in handle_inferior_event().
-
-2002-08-16 Joel Brobecker <brobecker@gnat.com>
-
- * infrun.c (handle_inferior_event): Minor reformatting, to make
- a rather long condition expression easier to read.
-
-2002-08-16 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (gdbtk.o): Move to end of file.
- (gdbtk-bp.o, gdbtk-cmds.o): Ditto.
- (gdbtk-hooks.o, gdbtk-register.o): Ditto.
- (gdbtk-stack.o, gdbtk-varobj.o): Ditto.
- (gdbtk-wrapper.o, gdbres.o): Ditto.
-
-2002-08-16 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (copying.o): Separate out compile rule.
- (hpux-thread.o, procfs.o, signals.o): Ditto.
- (v850ice.o, z8k-tdep.o): Ditto.
- (tui-file.o): Move to TUI section.
- (xdr_ptrace.o, xdr_rdb.o, xdr_ld.o): Move to separate section.
- (nindy.o, Onindy.o, ttyflush.o): Move to separate section.
-
-2002-08-16 Joel Brobecker <brobecker@gnat.com>
-
- * i386-tdep.c (i386_pe_skip_trampoline_code): renamed from
- skip_trampoline_code, for better namespace-proofing.
+2003-01-03 Mark Kettenis <kettenis@gnu.org>
- * i386-tdep.h (i386_pe_skip_trampoline_code): Add declaration.
-
-2002-08-16 Joel Brobecker <brobecker@gnat.com>
-
- * config/i386/tm-cygwin.h: Remove some "#if 0"'ed macros.
-
-2002-08-16 Joel Brobecker <brobecker@gnat.com>
-
- * infrun.c (handle_inferior_event): When receiving a SIGTRAP
- signal, check whether we hit a breakpoint before checking for a
- single step breakpoint. Otherwise, GDB fails to notice that a
- breakpoint has been hit when stepping onto a breakpoint.
-
-2002-08-16 Keith Seitz <keiths@redhat.com>
-
- * gdb-events.sh (clear_gdb_event_hooks): New function.
- * gdb-events.c: Regenerate.
- * gdb-events.h: Regenerate.
+ * configure.in: Remove --enable-netrom option.
+ * configure: Regenerated.
-2002-08-16 Andrew Cagney <ac131313@redhat.com>
+2003-01-03 Mark Kettenis <kettenis@gnu.org>
- * breakpoint.c (bpstat_stop_status): Rename not_a_breakpoint to
- not_a_sw_breakpoint.
- * breakpoint.h (bpstat_stop_status): Add parameter names.
+ * cli/cli-decode.h: Don't include "gdb_regex.h"; provide a forward
+ declaration for `struct re_pattern_buffer' instead.
+ * Makefile.in (cli_decode_h): Remove $(gdb_regex_h).
-2002-08-16 Grace Sainsbury <graces@redhat.com>
+2003-01-03 J. Brobecker <brobecker@gnat.com>
- * remote.c (remote_insert_hw_breakpoint)
- (remote_remove_hw_breakpoint): Fix calculation of length field
- for Z-packet.
+ * mdebugread.c (parse_symbol): Count until the stEnd matching
+ the structure name.
-2002-08-15 Michael Snyder <msnyder@redhat.com>
+2003-01-02 Mark Kettenis <kettenis@gnu.org>
- * irix5-nat.c (supply_gregset): Allocate plenty-big buffer
- (32 bytes) instead of using MAX_REGISTER_RAW_SIZE.
- (supply_fpregset): Ditto.
+ * configure.in: Remove --with-cpu option.
+ subscripts. Remove evil changequotes here.
+ * acconfig.h (TARGET_CPU_DEFAULT): Remove.
+ * config.in, configure: Regenerated.
- * config/mips/tm-mips.h (REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE,
- MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
- (TARGET_READ_SP): Delete.
- (DO_REGISTERS_INFO): Delete.
- (FUNCTION_START_OFFSET, IN_SIGTRAMP, REGISTER_VIRTUAL_SIZE):
- Delete.
- (REGISTER_CONVERT_FROM_TYPE, REGISTER_CONVERT_TO_TYPE): Convert
- from macros to functions.
-
- * mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
- (mips_register_convertible, mips_register_convert_to_virtual,
- mips_register_convert_to_raw): Make static.
- (mips_read_sp): New function.
- (mips_gdbarch_init): Set gdbarch read_sp to mips_read_sp.
- (mips_do_registers_info): Make static.
- (mips_gdbarch_init): Insert mips_do_registers_info into gdbarch.
- (in_sigtramp): Make static, rename to mips_pc_in_sigtramp.
- (mips_register_convert_from_type, mips_register_convert_to_type):
- New functions.
- (mips_gdbarch_init): Set up function_start_offset,
- register_virtual_size, pc_in_sigtramp.
-
-2002-08-15 Andrew Cagney <ac131313@redhat.com>
-
- * infcmd.c (vector_info): New function.
- (_initialize_infcmd): Add command "info vector".
- (print_vector_info): New function.
-
- * gdbarch.sh (PRINT_VECTOR_INFO): New method
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-08-15 Andrew Cagney <ac131313@redhat.com>
-
- * infcmd.c (do_registers_info): Rename parameter ``fpregs'' to
- ``print_all''. Only print vector registers when ``print_all''.
-
-2002-08-15 Andrew Cagney <ac131313@redhat.com>
+ * acconfig.h (DEFAULT_BFD_ARCH, DEFAULT_BFD_VEC): Remove.
+ * configure.in: Cleanup section that sources GDB and BFD configure
+ subscripts. Remove evil changequotes here.
+ * config.in, configure: Regenerated.
- * i387-tdep.h (i387_print_float_info): Add `args' parameter.
- * i387-tdep.c (i387_print_float_info): Add `args' parameter.
-
- * gdbarch.sh (PRINT_FLOAT_INFO): Change to a predicate method.
- Add `args' parameter.
- * gdbarch.h, gdbarch.c: Regenerate.
-
- * arm-tdep.c (arm_print_float_info): Add the parameter `args'.
-
- * infcmd.c (float_info): Call print_float_info.
- (print_float_info): New function. By default, print the
- floating-point registers.
+2003-01-02 Andrew Cagney <ac131313@redhat.com>
- * arch-utils.h (default_print_float_info): Delete declaration.
- * arch-utils.c (default_print_float_info): Delete function.
-
-2002-08-16 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/nm-i386v.h (FLOAT_INFO): Remove already commented
- out define.
-
- * i387-tdep.c (i387_print_float_info): Add comment about ignoring
- FRAME.
-
- * NEWS: Mention that the i[3456]-*-aix target has been made obsolete.
- * configure.host: Make i[3456]86-*-aix host obsolete.
- * configure.tgt: Make i[3456]86-*-aix target obsolete.
- * config/i386/i386aix.mh, config/i386/i386aix.mt,
- config/i386/nm-i386aix.h, condig/i386/tm-i386aix.h,
- config/i386/xm-i386aix.h: Make files obsolete.
- * i386aix-nat.c: Make file obsolete.
- * Makefile.in (ALLDEPFILES): Remove i386aix-nat.c.
- (i386aix-nat.o): Make target obsolete.
-
- * config/i386/nm-gnu.h: Removed.
- * config/i386/nm-i386gnu.h: New file.
- (THREAD_STATE_FLAVOR, THREAD_STATE_SIZE,
- THREAD_STATE_SET_TRACED, THREAD_STATE_CLEAR_STATE, ATTACH_DETACH):
- Moved here from ...
- * config/i386/tm-i386gnu.h: ... here. Removed.
- * config/i386/xm-i386gnu.h: Removed.
- * config/i386/i386gnu.mh (XM_FILE): Set to xm-i386.h.
- (NAT_FILE): Set to nm-i386gnu.h.
- * config/i386/i386gnu.mt (TDEPFILES): Add i386gnu-tdep.o.
- * i386-tdep.c: New file.
- * Makefile.in (ALLDEPFILES): Add i386gnu-nat.c and i386gnu-tdep.c.
- (i386gnu-tdep.o): Specify dependencies.
-
-2002-08-15 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-i386sco5.h: Include "i386/tm-i386v4.h" instead of
- "i386/tm-i386.h", "i386/tm-i386v.h" and "config/tm-sysv.h".
- Adjust a few comments to reflect reality a bit closer.
- (KERNEL_U_SIZE, TARGET_HAS_HARDWARE_WATCHPOINTS,
- TARGET_CAN_USE_HARDWARE_WATCHPOINT, HAVE_CONTINUEABLE_WATCHPOINT,
- HAVE_STEPPABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT,
- target_insert_watchpoint, target_remove_watchpoint):
- Move defines to ...
- * config/i386/nm-i386sco5.h: ... here.
- (kernel_u_size): Add prototype. Improve a few comments and add
- protection against multiple inclusion.
+ * arm-tdep.c: Use get_frame_pc and deprecated_update_frame_pc_hack
+ frame accessor methods.
+ * alpha-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
+ * dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto.
+ * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
+ * mn10200-tdep.c, mn10300-tdep.c, ns32k-tdep.c: Ditto.
+ * s390-tdep.c, sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
+ * vax-tdep.c, x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
+ * z8k-tdep.c: Ditto.
- * config/i386/nm-i386sco.h (FLOAT_INFO): Remove already commented
- out define.
-
- * uw-thread.c (SP_ARG0): Define if not already defined.
- * config/i386/tm-i386.h (SO_ARG0): Remove define.
-
- * config/i386/tm-i386v4.h (HAVE_I387_REGS): Remove define.
-
- * config/i386/tm-i386.h: Don't include "regcache.h".
-
- * i387-tdep.h (i387_print_float_info): New prototype.
- * i387-tdep.c (print_i387_value, print_i387_ext,
- print_i387_status_word, print_i387_control_word): Add `struct
- ui_file *' argument and use it for output.
- (i387_print_float_info): Renamed from i387_float_info. Add
- `struct gdbarch *' and `struct ui_file *' arguments and use the
- latter for output.
- * i386-tdep.c: Include "i387-tdep.h".
- (i386_gdbarch_init): Set print_float_info.
- * config/i386/tm-i386.h (i387_float_info): Remove prototype.
- (FLOAT_INFO): Remove define.
-
-2002-08-13 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_push_arguments): Rename to
- mips_eabi_push_arguments, and tune for EABI.
- (MIPS_REGS_HAVE_HOME_P): Delete.
- (struct gdbarch_tdep): Remove mips_regs_have_home_p field.
- (mips_gdbarch_init): Set gdbarch push_arguments for eabi.
- Delete references to mips_regs_have_home_p.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * Makefile.in (install-gdbtk): Create insight plugin directory.
- Install plugins.tcl file.
-
-2002-08-14 Keith Seitz <keiths@redhat.com>
-
- * configure.in: Move SUBDIRS to near top of the file so that
- --enable options may add things to it.
- If gdbtk is enabled, add gdbtk directory to SUBDIRS and configdirs.
- * configure: Regenerate.
-
-2002-08-13 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_o32o64_push_arguments): New function,
- cloned from mips_push_arguments, tuned for o32/o64 ABI.
- (mips_gdbarch_init): Set gdbarch_push_arguments to new func.
-
-2002-08-13 Andrew Cagney <ac131313@redhat.com>
-
- * vax-tdep.c (vax_get_saved_register): Delete function.
- (vax_gdbarch_init): Update.
- * ns32k-tdep.c (ns32k_get_saved_register): Delete function.
- (ns32k_gdbarch_init): Update.
- * alpha-tdep.c (alpha_get_saved_register): Delete function.
- (alpha_gdbarch_init): Update.
-
-2002-08-13 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (init_regcache_descr): Overallocate the
- raw_register_valid_p array including space for NUM_PSEUDO_REGS.
- (registers_changed): Replace NUM_REGS+NUM_PSEUDO_REGS with
- nr_raw_registers.
- (set_register_cached): Add range checking assertions. Use
- current_regcache.
-
-2002-08-13 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.c (i386_stab_reg_to_regnum): Return correct register
- numbers for MMX registers.
-
-2002-08-13 Andrew Cagney <cagney@redhat.com>
-
- * i386-tdep.c (i386_gdbarch_init): Use
- generic_unwind_get_saved_register.
-
-2002-08-13 Kevin Buettner <kevinb@redhat.com>
-
- * procfs.c (procfs_can_use_hw_breakpoint): New function.
- (init_procfs_ops): Define ``to_can_use_hw_breakpoint'' for procfs
- target vector.
- * config/mips/nm-irix5.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT):
- Delete. Add comment regarding this now-deleted target method.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11-tdep.c (M68HC12_NUM_PSEUDO_REGS): New define.
- (M68HC12_HARD_PC_REGNUM): Define specific PC for 68HC12 (pseudo reg).
- (m68hc11_pseudo_register_read): Compute the 68HC12 PC using the
- real PC and the page number (if it's within the memory bank window).
- (m68hc11_pseudo_register_write): Likewise when saving.
- (m68hc11_register_name): Name the virtual pc 'pc' and the real one ppc.
- (m68hc11_register_virtual_type): Return uint32 for virtual pc.
- (m68hc11_register_raw_size): And use 32-bit for it.
- (m68hc11_gdbarch_init): Use 32-bit address for 68HC12 if the
- 16K memory bank is used by the prog; also use the virtual pc.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11-tdep.c (m68hc11_elf_make_msymbol_special): New function.
- (m68hc11_gdbarch_init): Install it in gdbarch.
- (MSYMBOL_SET_RTC, MSYMBOL_SET_RTI): New to set symbol specific flags.
- (MSYMBOL_IS_RTC, MSYMBOL_IS_RTI): New to test these flags.
- (MSYMBOL_SIZE): New for documentation.
- (insn_return_kind): Enum to specify how a function returns.
- (frame_extra_info): Cleanup and record the return mode.
- (gdbarch_tdep, USE_PAGE_REGISTER): New to control the use of page
- register in address computation.
- (m68hc11_get_return_insn): New to obtain the return instruction used
- by the function.
- (m68hc11_frame_init_saved_regs): Take into account the return
- instruction used by the function for far and interrupt functions.
- (m68hc11_init_extra_frame_info): Take into account page register.
- (m68hc11_frame_args_address): Adjust according to the return mode.
- (show_regs): Print page register only when it's used.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11-tdep.c (HARD_PAGE_REGNUM): Define for 68HC12 page register.
- (M68HC11_LAST_HARD_REG, m68hc11_register_names): Update.
- (m68hc11_register_virtual_type): Return a 8-bit type for 8-bit
- registers.
- (m68hc11_register_raw_size): Likewise.
-
-2002-08-13 Andrew Cagney <cagney@redhat.com>
-
- * i386-tdep.c (i386_register_name): Handle mmx registers.
- (mmx_regnum_p): New function.
- (i386_mmx_names): New array.
- (mmx_num_regs): New variable.
- (i386_pseudo_register_read): New function.
- (i386_pseudo_register_write): New function.
- (mmx_regnum_to_fp_regnum): New function. Code from Fernando Nasser.
-
- * regcache.c (regcache_raw_read_unsigned): New function.
- (regcache_raw_read_signed): New function.
- * regcache.h (regcache_raw_read_unsigned): Declare.
- (regcache_raw_read_signed): Declare.
-
-2002-08-13 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (regcache_raw_read_as_address): Delete function.
- (regcache_cooked_read_signed): New function.
- (regcache_cooked_read_unsigned): New function.
- * regcache.h (regcache_cooked_read_signed): Declare.
- (regcache_cooked_read_unsigned): Declare.
- (regcache_raw_read_as_address): Delete declaration.
-
- * blockframe.c (generic_read_register_dummy): Use
- regcache_cooked_read_unsigned.
- * i386-tdep.c (i386_extract_struct_value_address): Use
- regcache_cooked_read_unsigned.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Set int, double and long
- double sizes according to ELF ABI flags.
- (gdbarch_tdep): Record elf_flags.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11-tdep.c (M6812_OP_PSHX, M6812_OP_PSHY): New defines.
- (m6812_prolog): They can appear in 68HC12 function prologue.
- (m68hc11_frame_chain): Cleanup.
-
-2002-08-12 Andrew Cagney <cagney@redhat.com>
-
- * i386-tdep.h (i386_register_byte, i386_register_raw_size): Delete
- declarations.
- * i386-linux-tdep.c (i386_linux_register_byte): Delete function.
- (i386_linux_register_raw_size): Delete function.
- (i386_linux_init_abi): Update.
- * i386-tdep.c (i386_register_raw_size): Delete function.
- (i386_register_byte): Delete function.
- (i386_gdbarch_init): Update.
- (i386_register_size): Delete array.
- (i386_register_offset): Delete array.
-
- * config/i386/tm-symmetry.h (REGISTER_BYTE): Delete macro.
- (REGISTER_RAW_SIZE): Delete macro.
- * config/i386/tm-ptx.h (REGISTER_RAW_SIZE): Delete macro.
- (REGISTER_BYTE): Delete macro.
-
-2002-08-11 Aidan Skinner <aidan@velvet.net>
-
- * ada-lang.c (ada_lookup_partial_symbol)
- (to_fixed_variant_branch_type) (find_line_in_linetable): Fix
- prototype names so that grep ^func works properly.
-
- * ada-lang.c (ada_array_element_type)
- (ada_lookup_partial_symbol): Fix typos in parameter list.
-
- * ada-valprint.c (val_print_packed_array_elements) (ada_val_print_1):
- Fix prototype names so that grep ^func works properly.
-
-2002-08-10 Andrew Cagney <cagney@redhat.com>
- Elena Zannoni <ezannoni@redhat.com>
- Martin M. Hunt <hunt@redhat.com>
-
- * gdbtypes.c (build_builtin_type_vec128): Set the vector bit.
- (build_builtin_type_vec128i): Set the vector bit.
- * gdbtypes.h (builtin_type_vec64, builtin_type_vec64i): Declare.
- * gdbtypes.c (builtin_type_vec64, builtin_type_vec64i): Define.
- (build_builtin_type_vec64): New function.
- (build_builtin_type_vec64i): New function.
- (build_gdbtypes): Initialize builtin_type_vec64 and
- builtin_type_vec64i.
-
-2002-08-09 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (regcache_dump): Compare the register offset
- with REGISTER_BYTE.
- * arch-utils.c (generic_register_byte): New function.
- * arch-utils.h (generic_register_byte): Declare.
- * gdbarch.sh (REGISTER_BYTE): Default to generic_register_byte.
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-08-09 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c: Include "gdbcmd.h"
- (_initialize_regcache): Add commands "maintenance print
- registers", "maintenance print raw-registers" and "maintenance
- print cooked-registers".
- (enum regcache_dump_what): Define.
- (dump_endian_bytes): New function.
- (regcache_dump): New function.
- (regcache_print): New function.
- (maintenance_print_registers): New function.
- (maintenance_print_raw_registers): New function.
- (maintenance_print_cooked_registers): New function.
- * Makefile.in (regcache.o): Update dependencies.
-
-2002-08-09 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (ROUND_DOWN, ROUND_UP): Move to global scope.
- (mips_push_arguments): Correct some comments. Use paddr_nz
- for printing addresses in debug output. Replace static
- allocation using MAX_REGISTER_RAW_SIZE with alloca.
- (mips_n32n64_push_arguments): New function, cloned from
- mips_push_arguments and tuned for the n32/n64 ABI.
- (mips_push_register): Buffer needs dynamic allocation.
- (mips_print_register): Ditto.
- (do_gp_register_row): Ditto.
- (mips_store_return_value): Ditto.
- (mips_gdbarch_init): Set gdbarch_push_arguments per ABI.
-
-2002-08-09 Don Howard <dhoward@redhat.com>
-
- * memattr.c (mem_info_command): Print special case of upper bound
- as max CORE_ADDR + 1.
-
-2002-08-08 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_n32n64_use_struct_convention): N32 only
- returns structs by ref if they're too big to fit in two registers.
-
-2002-08-09 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's
- saved regs value.
- (read_next_frame_reg): Call FRAME_INIT_SAVED_REGS instead of
- mips_find_saved_regs().
- (mips_pop_frame): Likewise.
-
-2002-08-09 Kevin Buettner <kevinb@redhat.com>
-
- * blockframe.c (frame_saved_regs_register_unwind): Revise
- PC_IN_CALL_DUMMY assertion to only apply when generic dummy
- frames are in use.
-
-2002-08-09 Grace Sainsbury <graces@redhat.com>
-
- * remote.c: (remote_wait, remote_async_wait): Add check for awatch
- T-packets; the 'a' is not taken as a register number.
- (remote_check_watch_resources, remote_stopped_by_watchpoint)
- (remote_stopped_data_address): New functions; add to target
- vector.
- (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Change
- prototypes to match other implementations of this
- function. replace integer argument with pointer -- the length
- field in the Z-packet is the length of what is pointed to or 1 if
- pointer is null. Add to target vector.
- (remote_insert_watchpoint, remote_remove_watchpoint): Add to
- target vector.
-
- From Mark Salter:
- * remote.c (remote_wait): Add support to extract optional
- watchpoint information from T-packet. Ignore unrecognized
- optional info in T-packet.
- (remote_async_wait): Ditto.
-
-2002-08-09 Corinna Vinschen <vinschen@redhat.com>
-
- * cli/cli-dump.c: Change fopen modes to use binary open modes
- as defined in include/fopen-bin.h throughout.
-
-2002-08-08 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c: Minor whitespace and indentation clean-ups.
-
-2002-08-08 Kevin Buettner <kevinb@redhat.com>
-
- * doublest.c (store_floating): Avoid floatformat_from_doublest()
- assertion failure by returning early after a warning.
-
-2002-08-08 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_find_saved_regs): Make static.
- (mips_frame_init_saved_regs): New function.
- (mips_gdbarch_init): Setup FRAME_INIT_SAVED_REGS method.
- * config/mips/tm-mips.h (FRAME_INIT_SAVED_REGS): Delete macro.
- (mips_find_saved_regs): Delete declaration.
-
-2002-08-08 Grace Sainsbury <graces@redhat.com>
-
- * remote.c (remote_wait, remote_async_wait): Change
- thread_num from int to ULONGEST.
- (unpack_varlen_hex): Change result parameter from
- int * to ULONGEST *.
-
-2002-08-08 Andrew Cagney <ac131313@redhat.com>
-
- * configure.tgt: Replace powerpc-*-sysv*, powerpc-*-elf*,
- powerpcle-*-eabi*, powerpcle-*-sysv* and powerpcle-*-elf* with
- powerpc*-*-*.
- * MAINTAINERS: Remove redundant rs6000-ibm-aix4.1 target.
-
-2002-08-08 Andrew Cagney <cagney@redhat.com>
-
- * gcore.c (override_derive_stack_segment): Delete variable.
- (preempt_derive_stack_segment): Delete function.
- (derive_stack_segment): Delete function.
- (default_derive_stack_segment): Renamed to derive_stack_segment.
- (override_derive_heap_segment): Delete variable.
- (preempt_derive_heap_segment): Delete function.
- (derive_heap_segment): Delete function.
- (default_derive_heap_segment): Rename to derive_heap_segment.
-
-2002-08-06 Michael Snyder <msnyder@redhat.com>
-
- * config/mips/tm-mips.h: Remove #define USE_STRUCT_CONVENTION.
- * mips-tdep.c (mips_EABI_use_struct_convention,
- mips_OABI_use_struct_convention, mips_NABI_use_struct_convention):
- New functions. (mips_use_struct_convention): Delete.
- (mips_gdbarch_init): set use_gdbarch_convention.
-
-2002-08-06 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c: gdbarch-ify reg_struct_has_addr.
- (mips_eabi_reg_struct_has_addr, mips_n32n64_reg_struct_has_addr,
- mips_o32_reg_struct_has_addr): New functions.
- (mips_gdbarch_init): Set gdbarch reg_struct_has_addr.
-
-2002-08-07 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.c (pseudo_register): Delete function.
- (fetch_register): Delete function.
- (store_register): Delete function.
- (regcache_raw_read, legacy_read_register_gen): Use
- target_fetch_registers instead of fetch_register.
- (legacy_write_register_gen, regcache_raw_write): Use
- target_store_register instead of store_register.
- (write_register_bytes): Ditto.
-
- * gdbarch.sh (FETCH_PSEUDO_REGISTER): Delete.
- (STORE_PSEUDO_REGISTER): Delete.
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-08-06 Corinna Vinschen <vinschen@redhat.com>
-
- * cli/cli-dump.c (add_dump_command): Explicitely use "b" flag to
- write dump file binary.
-
-2002-08-05 Michael Snyder <msnyder@redhat.com>
-
- * mips-tdep.c (mips_find_saved_regs): Adjust stack according
- to MIPS_SAVED_REGSIZE, not GDB_TARGET_IS_MIPS64. Enhance comment.
- (mips_gdbarch_init): Set N32 target to be mips64.
-
-2002-08-06 Kevin Buettner <kevinb@redhat.com>
-
- * frame.c (find_saved_register): Break out of loop once saved
- register address is found. Don't mention sparc in loop comment
- anymore.
-
-2002-08-06 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_gdbarch_init): For the N32 ABI, set
- mips_default_saved_regsize to 8.
-
-2002-08-06 Andrew Cagney <ac131313@redhat.com>
-
- * gcore.c: Do not include <sys/procfs.h>.
- * Makefile.in (gcore.o): Update dependencies.
-
-2002-08-06 Andrew Cagney <cagney@redhat.com>
-
- * configure.tgt: Make arc-*-* obsolete.
- * NEWS: Mention that arc-*-* has been identifed as obsolete.
- * MAINTAINERS: Make arc-elf obsolete.
- * arc-tdep.c: Make file obsolete.
- * config/arc/arc.mt: Ditto.
- * config/arc/tm-arc.h: Ditto.
-
-2002-08-05 Theodore A. Roth <troth@verinet.com>
-
- * avr-tdep.c (avr_skip_prologue): Fix to return the correct pc.
-
-2002-08-05 Andrew Cagney <ac131313@redhat.com>
-
- * mcore-tdep.c (mcore_gdbarch_init): Use
- generic_unwind_get_saved_register instead of
- generic_get_saved_register.
- * v850-tdep.c (v850_gdbarch_init): Ditto.
- * frv-tdep.c (frv_gdbarch_init): Ditto.
- * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
- * s390-tdep.c (s390_gdbarch_init): Ditto.
- * d10v-tdep.c (d10v_gdbarch_init): Ditto.
- * config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Ditto.
- * config/h8300/tm-h8300.h (GET_SAVED_REGISTER): Ditto.
-
-2002-08-05 Joel Brobecker <brobecker@gnat.com>
-
- * objfiles.h: Add missing #include "symfile.h"
-
- * Makefile.in (objfiles_h): Add dependency on symfile.h and dependents.
-
-2002-08-04 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-08-01 david carlton <carlton@math.stanford.edu>:
- * hpread.c (hpread_read_struct_type): Deleted superfluous setting
- of FIELD_BITSIZE.
-
-2002-08-04 Daniel Jacobowitz <drow@mvista.com>
-
- * NEWS: Cleanup and nitpick.
-
-2002-08-03 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Cleanup. Use *-linux*-gnu*. Only use `*' for headings.
-
-2002-08-03 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (gdbtk-bp.o): Update dependencies.
- (gdbtk-register.o): Ditto.
- (gdbtk-varobj.o): Ditto.
+2003-01-02 Mark Kettenis <kettenis@gnu.org>
-2002-08-03 Andrew Cagney <cagney@redhat.com>
-
- * m68hc11-tdep.c (m68hc11_pseudo_register_read): Replace
- m68hc11_fetch_pseudo_register.
- (m68hc11_pseudo_register_write): Replace
- m68hc11_store_pseudo_register.
- (m68hc11_gdbarch_init): Update.
-
-Fri Aug 2 15:53:50 2002 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh: Include "gdb_string.h".
- * gdbarch.c: Regenerate.
-
- * regcache.c: Include "gdb_string.h".
- * ax-general.c: Ditto.
- * varobj.c: Ditto.
- * std-regs.c: Ditto.
- * fbsd-proc.c: Ditto.
- * thread.c: Ditto.
+ * configure.in: Remove UI_OUT configuration code.
+ * ada-lang.c: Update assuming UI_OUT is always true.
+ * Makefile.in (UIOUT_CFLAGS): Remove.
+ * configure: Regenerated.
+ * TODO: Remove blurb about elimination of -DUI_OUT.
- * Makefile.in (regcache.o): Update dependencies.
- (thread.o, gdbarch.o): Ditto.
- (ax-general.o, gdbarch.o): Ditto.
- (varobj.o, std-regs.o): Ditto.
- (fbsd-proc.o): Specify dependencies.
+ * configure.in: Move code that provides the --enable-gdbcli,
+ --enable-gdbmi options right before the code that handles the
+ --enable-tui option. Polish a bit.
+ * configure: Regenerated.
-2002-08-02 Andrew Cagney <cagney@redhat.com>
+ * configure.in: Rewrite check for GNU regex and the
+ --without-included regex option, and move it into the "Checks for
+ library functions" section. This makes us use the system regex
+ again by default on systems with version 2 of the GNU C library.
+ This was apparently broken.
+ * gdb_regex.h [!USE_INCLUDED_REGEX] (_REGEX_RE_COMP): Define.
+ * acconfig.h (USE_INCLUDED_REGEX): Remove.
+ * config.in, configure: Regenerated.
+
+ * configure.in: Move code that provides the --enable-tui option
+ before the "Checks for libraries" section. Polish the code
+ somewhat and set need_curses to yes if we build the TUI. Rewrite
+ code that looks for a library providing termcap functionality to
+ match more closely what's done in the Readline library, and move
+ it into to the "Checks for libraries" section.
+ * configure: Regenerated.
+ * Makefile.in (TERMCAP): Remove variable.
+ * config/i386/go32.mh (TERMCAP): Remove variable.
- * regcache.c (regcache_cooked_read): Rename rawnum parameter to
- regnum.
- (regcache_cooked_write): Ditto.
+2003-01-02 Andrew Cagney <ac131313@redhat.com>
-2002-08-02 Andrew Cagney <ac131313@redhat.com>
+ * MAINTAINERS: Mention gdb_mbuild.sh.
+ * gdb_mbuild.sh: Rewrite.
- * regcache.c (regcache_cooked_read): New function.
- (regcache_cooked_write): New function.
- (read_register_gen): Rewrite using regcache_cooked_read.
- (write_register_gen): Rewrite using regcache_cooked_write.
+2003-01-02 Mark Kettenis <kettenis@gnu.org>
- * regcache.h (regcache_cooked_read, regcache_cooked_write):
- Declare.
+ * configure.in: Fix typo in last change.
+ * config.in, configure: Regenerated.
-2002-08-02 Andrew Cagney <cagney@redhat.com>
+2003-01-02 Andrew Cagney <ac131313@redhat.com>
- * gdbarch.sh (pseudo_register_read, pseudo_register_write):
- Replace the architecture methods register_read and register_write.
- * gdbarch.h, gdbarch.c: Regenerate.
- * regcache.c (init_regcache_descr): Update.
- (read_register_gen): Update.
- (write_register_gen): Update.
- (supply_register): Update comment.
-
- * sh-tdep.c (sh_gdbarch_init): Update.
- (sh_pseudo_register_read, sh64_pseudo_register_read): Add
- `regcache' and `gdbarch' parameters. Make `buffer' a void
- pointer. Update code.
- (sh_pseudo_register_write, sh64_pseudo_register_write): Add
- `regcache' and `gdbarch' parameters. Make `buffer' a constant
- void pointer. Update code.
- (sh64_register_write): Delete.
- (sh4_register_read): Delete.
- (sh64_register_read): Delete.
- (sh4_register_write): Delete.
- (sh_sh4_register_convert_to_raw): Make `from' parameter a constant
- void pointer, `to' parameter a void pointer.
- (sh_sh64_register_convert_to_raw): Ditto.
-
-2002-08-01 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_register_virtual_type): Use architecture
- invariant return values.
-
-2002-08-01 Andrew Cagney <cagney@redhat.com>
-
- * linux-proc.c: Include "gdb_string.h".
- * Makefile.in (linux-proc.o): Update dependency list.
-
-2002-08-01 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_gdbarch_init): Add comments. Fix typo in
- comment.
-
-2002-08-01 Grace Sainsbury <graces@redhat.com>
-
- * target.h: Add to_insert_hw_breakpoint, to_remove_hw_breakpoint,
- to_insert_watchpoint, to_remove_watchpoint,
- to_stopped_by_watchpoint, to_stopped_data_address,
- to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint to
- target vecctor. Define their corresponding macros so they call
- them.
-
- * target.c: Add default and debug versions of for
- to_insert_hw_breakpoint, to_remove_hw_breakpoint,
- to_insert_watchpoint, to_remove_watchpoint,
- to_stopped_by_watchpoint, to_stopped_data_address,
- to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint.
-
-2002-08-01 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_register_virtual_type): New function.
- (mips_gdbarch_init): Register mips_register_virtual_type()
- with gdbarch machinery.
- * config/mips/tm-irix6.h (mips/tm-bigmips64.h): Include
- this file instead of tm-bigmips.h.
- (MIPS_REGSIZE): Delete this macro.
- (REGISTER_VIRTUAL_TYPE): Delete macro. Undef macro so that
- multiarch version in mips-tdep.c will be found.
-
-2002-08-01 Andrew Cagney <cagney@redhat.com>
-
- * NEWS: Menion that CHILL has been made obsolete.
-
- * gdbtypes.c (chill_varying_type): Make chill references obsolete.
- * stabsread.c (read_range_type): Ditto.
- * gdbtypes.h: Ditto.
- * language.c (binop_type_check): Ditto.
- (binop_result_type): Ditto.
- (integral_type): Ditto.
- (character_type): Ditto.
- (string_type): Ditto.
- (boolean_type): Ditto.
- (structured_type): Ditto.
- (lang_bool_type): Ditto.
- (binop_type_check): Ditto.
- * language.h (_LANG_chill): Ditto.
- * dwarfread.c (set_cu_language): Ditto.
+ * valarith.c (value_binop): Delete obsolete code and comments.
+ * configure.host: Ditto.
+ * buildsym.h (make_blockvector): Ditto.
+ * buildsym.c (make_blockvector): Ditto.
+ * defs.h (enum language): Ditto.
+ (chill_demangle): Ditto.
+ * elfread.c (elf_symtab_read): Ditto.
* dwarfread.c (CHILL_PRODUCER): Ditto.
- * dwarfread.c (handle_producer): Ditto.
- * expression.h (enum exp_opcode): Ditto.
- * eval.c: Ditto for comments.
- * typeprint.c (typedef_print) [_LANG_chill]: Ditto.
+ (set_cu_language): Ditto.
+ (handle_producer): Ditto.
* expprint.c (print_subexp): Ditto.
- (print_subexp): Ditto.
- * valops.c (value_cast): Ditto.
- (search_struct_field): Ditto.
- * value.h (COERCE_VARYING_ARRAY): Ditto.
+ * gdbtypes.c (chill_varying_type): Ditto.
+ * gdbtypes.h (builtin_type_chill_bool): Ditto.
+ (builtin_type_chill_char, builtin_type_chill_long): Ditto.
+ (builtin_type_chill_ulong, builtin_type_chill_real): Ditto.
+ (chill_varying_type): Ditto.
+ * language.h (_LANG_chill): Ditto.
+ * language.c (binop_result_type, integral_type): Ditto.
+ (character_type, string_type, structured_type): Ditto.
+ (lang_bool_type, binop_type_check): Ditto.
+ * stabsread.h (os9k_stabs): Ditto.
+ * stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto.
+ (define_symbol, read_type, read_struct_fields): Ditto.
+ (read_array_type, read_enum_type, read_huge_number): Ditto.
+ (read_range_type, start_stabs): Ditto.
* symfile.c (init_filename_language_table): Ditto.
(add_psymbol_with_dem_name_to_list): Ditto.
- * valarith.c (value_binop): Ditto.
- (value_neg): Ditto.
- * valops.c (value_slice): Ditto.
- * symtab.h (union language_specific): Ditto.
- (SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
- (SYMBOL_DEMANGLED_NAME): Ditto.
+ * symtab.c (symbol_init_language_specific): Ditto.
+ (symbol_init_demangled_name, symbol_demangled_name): Ditto.
+ * symtab.h (struct general_symbol_info): Ditto.
(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
- * defs.h (enum language): Ditto.
- * symtab.c (got_symtab): Ditto.
+ * typeprint.c (typedef_print): Ditto.
* utils.c (fprintf_symbol_filtered): Ditto.
+ * valops.c (value_cast, search_struct_field, value_slice): Delete
+ obsolete code.
+ (varying_to_slice): Delete function.
+ * value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents.
+ (varying_to_slice): Delete declaration.
+ * MAINTAINERS: Update.
- * ch-typeprint.c: Make file obsolete.
- * ch-valprint.c: Make file obsolete.
- * ch-lang.h: Make file obsolete.
- * ch-exp.c: Make file obsolete.
- * ch-lang.c: Make file obsolete.
-
- * Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
- CHILL_LIB.
- (TARGET_FLAGS_TO_PASS): Ditto.
- (CHILLFLAGS): Obsolete.
- (CHILL): Obsolete.
- (CHILL_FOR_TARGET): Obsolete.
- (CHILL_LIB): Obsolete.
- (SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
- ch-valprint.c.
- (HFILES_NO_SRCDIR): Remove ch-lang.h.
- (COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
- ch-lang.o.
- (ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
- targets.
-
-2002-07-31 Joel Brobecker <brobecker@gnat.com>
-
- * dwarf2read.c (set_cu_language): Add handler for LANG_Ada95.
- This does not change anything at the moment, but will be helpful
- later when full Ada support is integrated.
-
-2002-07-31 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (_initialize_mips_tdep): Add "n64" to "set mips abi"
- help message.
-
-2002-07-31 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_push_arguments): Fetch gdbarch_tdep struct
- and save it in a local variable. Use variable in later test.
-
-2002-07-31 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (mips_find_abi_section): Add N64 ABI recognition
- test. (Thanks to Daniel Jacobowitz.)
-
-2002-07-31 Kevin Buettner <kevinb@redhat.com>
-
- * mips-tdep.c (enum mips_abi): Add MIPS_ABI_N64.
- (mips_abi_strings): Add "n64".
- (mips_gdbarch_init): Add test for n64 abi. Add MIPS_ABI_N64 case.
-
-2002-07-31 Kevin Buettner <kevinb@redhat.com>
-
- * config/mips/tm-irix6.h (MIPS_REGSIZE): Define to be 8.
- (REGISTER_VIRTUAL_TYPE): Some registers are now 64 bits wide.
-
-2002-07-31 Kevin Buettner <kevinb@redhat.com>
-
- * utils.c (host_pointer_to_address, address_to_host_pointer):
- Use gdb_assert() instead of explicit call to internal_error().
-
-2002-07-30 Kevin Buettner <kevinb@redhat.com>
-
- * Makefile.in (rs6000-nat.o): Update dependencies.
-
- From Nicholas Duffek:
- * Makefile.in (ALLDEPFILES): Add aix-thread.c.
- (aix-thread.o): New rule.
- * configure.host (gdb_host): Set to aix432 on AIX 4.3.2+.
- * config/powerpc/aix432.mh: New file.
-
-2002-07-30 Daniel Jacobowitz <drow@mvista.com>
-
- * ppc-linux-tdep.c (ELF_NGREG, ELF_NFPREG, ELF_NVRREG)
- (ELF_FPREGSET_SIZE, ELF_GREGSET_SIZE): New enums.
- (fetch_core_registers, ppc_linux_supply_gregset)
- (ppc_linux_supply_fpregset): New functions.
- (ppc_linux_regset_core_fns): New.
- (_initialize_ppc_linux_tdep): Call add_core_fns.
- * ppc-tdep.h: Add prototypes for ppc_linux_supply_fpregset
- and ppc_linux_supply_gregset.
- * ppc-linux-nat.c (supply_gregset): Call ppc_linux_supply_gregset.
- (supply_fpregset): Call ppc_linux_supply_fpregset.
- * config/powerpc/linux.mh (NATDEPFILES): Remove core-regset.o and
- corelow.o.
- * config/powerpc/linux.mt (TDEPFILES): Add corelow.o.
-
-2002-07-30 Daniel Jacobowitz <drow@mvista.com>
-
- * symtab.c (lookup_symbol): Demangle before lowercasing.
-
-2002-07-30 Andrew Cagney <ac131313@redhat.com>
-
- * symtab.h: Replace #include "gdb_obstack.h" with opaque
- declaration.
- * cli/cli-cmds.c, cli/cli-script.c: Include "gdb_string.h".
- * gnu-v3-abi.c, arc-tdep.c, cli/cli-decode.c: Ditto.
- * avr-tdep.c, mon960-rom.c, i960-tdep.c: Ditto.
- * arch-utils.c, cli/cli-setshow.c: Unconditionally include
- "gdb_string.h".
- * Makefile.in (cli-script.o, cli-cmds.o): Update dependencies.
- (gnu-v3-abi.o, cli-setshow.o, i960-tdep.o): Ditto.
- (cli-decode.o, mi-cmd-var.o, mi-cmd-disas.o): Ditto.
- (avr-tdep.o, mon960-rom.o): Ditto.
- (aout_stabs_gnu_h): Define.
- (symtab_h): Remove $(gdb_obstack_h).
-
-2002-07-30 Jim Blandy <jimb@redhat.com>
-
- Patch from David Carlton <carlton@math.stanford.edu>:
- * gdbinit.in: Move the `dir' commands that add GDB's own source
- directory to the search path to the end, so that the `gdb' source
- directory will be searched first.
-
-2002-07-29 Andrew Cagney <ac131313@redhat.com>
-
- * gdb_obstack.h: New file.
- * symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
- (obstack_chunk_alloc, obstack_chunk_free): Delete macros.
- * objfiles.h: Include "gdb_obstack.h".
- * Makefile.in (gdb_obstack_h): Define.
- (symtab_h): Add $(gdb_obstack_h).
- (objfiles_h): Add $(gdb_obstack_h).
-
- * objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
- * macrotab.c, cp-valprint.c, dbxread.c: Ditto.
- * ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
- * macroexp.c, p-typeprint.c, stabsread.c: Ditto.
- * symtab.c, f-typeprint.c, mdebugread.c: Ditto.
- * p-valprint.c, symmisc.c, typeprint.c: Ditto.
- * symfile.c, coffread.c, c-typeprint.c: Ditto.
- * buildsym.c, bcache.c, ada-typeprint.c: Ditto.
-
- * Makefile.in (bcache.o): Update dependencies.
- (buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
- (ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
- (dbxread.o, dstread.o, f-typeprint.o): Ditto.
- (objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
- (stabsread.o, symfile.o, symmisc.o): Ditto.
- (symtab.o, typeprint.o, macroexp.o): Ditto.
- (macrotab.o, mdebugread.o): Ditto.
- (f_lang_h, coff_sym_h, coff_symconst_h): Define.
- (coff_ecoff_h, aout_aout64_h): Define.
- (aout_stabs_gnu_h, libaout_h): Define.
-
-2002-07-29 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (struct regcache_descr): Rename nr_registers to
- nr_cooked_registers. Revise comments describing the structure
- member fields.
- (init_regcache_descr): Update.
- (init_legacy_regcache_descr): Update.
- (read_register_gen, write_register_gen): When a cooked register in
- the raw register range, directly access the value from the raw
- register cache.
-
-2002-07-29 Andrew Cagney <ac131313@redhat.com>
-
- * z8k-tdep.c: Do not include "obstack.h".
- * h8300-tdep.c, h8500-tdep.c: Ditto.
- * m68hc11-tdep.c, sh-tdep.c: Ditto.
- * valprint.c, v850-tdep.c: Ditto.
- * d10v-tdep.c, mn10300-tdep.c: Ditto.
- * mn10200-tdep.c: Ditto.
-
- * Makefile.in (z8k-tdep.o): Update dependencies.
- (m68hc11-tdep.o, valprint.o): Ditto.
- (v850-tdep.o, d10v-tdep.o): Ditto.
- (mn10300-tdep.o, sparc-tdep.o): Ditto.
- (sh-tdep.o, h8500-tdep.o, h8300-tdep.o): Ditto.
- (m32r-tdep.o, mn10200-tdep.o): Specify dependencies.
- (sh_opc_h, gdb_sim_sh_h): Define.
- (elf_sh_h, elf_bfd_h): Define.
- (opcode_m68hc11_h): Define.
- (OPCODES_SRC, OPCODES_DIR): define.
- (OPCODES): Use $(OPCODES_DIR).
- (gdb_sim_d10v_h): Rename sim_d10v_h.
- (gdb_sim_arm_h): Rename sim_arm_h.
-
-2002-07-26 Kevin Buettner <kevinb@redhat.com>
-
- * utils.c (host_pointer_to_address, address_to_host_pointer):
- Change internal_error() message to indicate function responsible
- for the error.
-
-2002-07-26 Kevin Buettner <kevinb@redhat.com>
-
- * ui-out.c (ui_out_field_core_addr): Remove unnecessary cast in
- calls to local_hex_string_custom().
-
-2002-07-26 Kevin Buettner <kevinb@redhat.com>
-
- * irix5-nat.c: Move IRIX shared library support from here...
- * solib-irix.c: ...to here. Revised substantially to work with
- generic solib framework.
-
- * osabi.h (gdb_osabi): Add new enum constant GDB_OSABI_IRIX.
- * osabi.c (gdb_osabi_names): Add corresponding string for Irix.
- * mips-irix-tdep.c: New file.
-
- * Makefile.in (ALLDEPFILES): Add mips-irix-tdep.c and solib-irix.c.
- (mips-irix-tdep.o, solib-irix.o): New rules.
- * config/mips/irix5.mt (TDEPFILES): Add mips-irix-tdep.o, solib.o,
- solib-irix.o.
- * config/mips/irix6.mt (TDEPFILES): Likewise.
- * config/mips/irix6.mh (NATDEPFILES): Remove solib.o.
-
-2002-07-26 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (coff/internal.h, bfd/libcoff.h, pthread.h): Remove
- disabled (via ``#if 0'') includes.
-
-2002-07-26 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
- (fetch_regs_user_thread, fetch_regs_kernel_thread, fill_sprs64)
- (fill_sprs32, store_regs_user_thread, store_regs_kernel_thread):
- Add support for the fpscr register.
- * rs6000-nat.c (regmap, fetch_inferior_registers)
- (store_inferior_registers, fetch_core_registers): Likewise.
-
-2002-07-26 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-nat.c (language.h): Include.
- (special_regs): Delete this array.
- (regmap): New function.
- (fetch_register, store_register): Use regmap() to map gdb
- register numbers to ptrace register numbers. Also, use
- outputs from regmap() to make decisions regarding type of
- ptrace() call to make. In particular, don't compare against
- FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
- (fetch_inferior_registers, store_inferior_registers): Where
- possible, obtain register numbers from tdep struct. Don't
- refer to FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
- * config/rs6000/tm-rs6000.h (FIRST_UISA_SP_REGNUM)
- (LAST_UISA_SP_REGNUM): Delete.
-
-2002-07-25 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-nat.c (ppc-tdep.h): Include.
- (fetch_registers, store_register, fetch_core_registers): Don't
- access registers[] directly. Instead, use supply_register() or
- regcache_collect() as appropriate.
- (find_toc_address): Format hex address with local_hex_string().
-
-2002-07-25 Andrew Cagney <ac131313@redhat.com>
-
- * config/djgpp/fnchange.lst: Rename bfd/elf32-fr30.c and
- bfd/elf32-frv.c.
-
-2002-07-24 Tom Tromey <tromey@redhat.com>
-
- * jv-exp.y: Marked all strings with _().
- (ClassInstanceCreationExpression, ArrayCreationExpression): Use
- internal_error.
- (MethodInvocation, CastExpression, parse_number, yyerror,
- java_type_from_name, push_expression_name, yylex): Typo fixes.
-
-2002-07-24 Daniel Jacobowitz <drow@mvista.com>
-
- * ui-file.c (struct tee_file, tee_file_new, tee_file_delete)
- (tee_file_flush, tee_file_write, tee_file_fputs)
- (tee_file_isatty): New.
- * ui-file.h (tee_file_new): Add prototype.
-
-2002-07-24 Aidan Skinner <aidan@velvet.net>
-
- * ada-lang.c: Change k&r style function definitions to prototyped
- form.
- * ada-typeprint.c: Change k&r style function definitions to prototyped
- form.
- * ada-valprint.c: Change k&r style function definitions to prototyped
- form.
-
-2002-07-24 Andrew Cagney <cagney@redhat.com>
-
- * README: Remove reference to remote-bug.
- * Makefile.in (ALLDEPFILES): Remove m88k-nat.c, m88k-tdep.c and
- remote-bug.c.
- (m88k-nat.o): Delete rule.
- (m88k-tdep.o): Delete rule.
- (remote-bug.o): Delete rule.
- * MAINTAINERS: Mark as obsolete.
- * elfread.c (elf_symtab_read): Mention that m88k is obsolete.
- * m88k-tdep.c: Make file obsolete.
- * config/m88k/m88k.mh: Ditto.
- * config/m88k/delta88v4.mh: Ditto.
- * config/m88k/delta88v4.mt: Ditto.
- * config/m88k/delta88.mt: Ditto.
- * config/m88k/delta88.mh: Ditto.
- * remote-bug.c: Ditto.
- * config/m88k/tm-delta88.h: Ditto.
- * config/m88k/nm-delta88v4.h: Ditto.
- * config/m88k/xm-delta88.h: Ditto.
- * config/m88k/xm-dgux.h: Ditto.
- * config/m88k/tm-m88k.h: Ditto.
- * config/m88k/nm-m88k.h: Ditto.
- * config/m88k/tm-delta88v4.h: Ditto.
- * m88k-nat.c: Ditto.
- * cxux-nat.c: Ditto.
- * configure.host: Make m88*-motorola-sysv4*, m88*-motorola-sysv*
- and m88*-*-* obsolete.
- * configure.tgt: Make m88*-motorola-sysv4*, m88*-motorola-* and
- m88*-*-* obsolete.
-
-2002-07-24 Andrew Cagney <cagney@redhat.com>
-
- * findvar.c (extract_unsigned_integer): Make `addr' parameter
- constant. Same for local pointer variables.
- (extract_signed_integer): Ditto.
- * defs.h (extract_unsigned_integer): Update.
- (extract_signed_integer): Update.
-
-2002-07-24 Andrew Cagney <cagney@redhat.com>
-
- * regcache.c (regcache_raw_write): Change buf parameter to a
- constant void pointer.
- (regcache_raw_read): Change buf parameter to a void pointer.
- (legacy_write_register_gen): Change myaddr parameter a constant
- void pointer.
- (supply_register): Change val parameter to a const void pointer.
- * regcache.h (regcache_raw_write): Update declaration.
- (regcache_raw_read): Update declaration.
- (supply_register): Update declaration.
-
-2002-07-24 Tom Tromey <tromey@redhat.com>
-
- * defs.h (gdb_readline_wrapper): Declare.
- * utils.c (prompt_for_continue): Use gdb_readline_wrapper.
- * tracepoint.c (read_actions): Use gdb_readline_wrapper.
- * top.c (gdb_readline_wrapper): New function.
- (command_line_input): Use it.
-
-2002-07-24 Andrew Cagney <cagney@redhat.com>
-
- * regcache.h (regcache_raw_read, regcache_raw_write): Replace
- regcache_read and regcache_write.
- (regcache_raw_read_as_address): Replace regcache_read_as_address.
- * regcache.c: Update.
- * sh-tdep.c (sh64_push_arguments): Update comment.
- (sh_pseudo_register_read): Update.
- (sh_pseudo_register_write): Update.
- (sh4_register_read): Update.
- (sh4_register_write): Update.
- (sh64_pseudo_register_read): Update.
- (sh64_pseudo_register_write): Update.
- (sh64_register_read): Update.
- (sh64_register_write): Update.
- * i386-tdep.c (i386_extract_return_value): Update.
- (i386_extract_struct_value_address): Update.
- (i386_extract_return_value): Update.
- * blockframe.c (generic_read_register_dummy): Update.
- (generic_call_dummy_register_unwind): Update
- * infrun.c (write_inferior_status_register): Update.
-
-2002-07-23 Jim Blandy <jimb@redhat.com>
-
- * parser-defs.h (expression_context_pc): Make this extern.
- (Thanks to Michael Snyder.)
-
-2002-07-23 Andrew Cagney <ac131313@redhat.com>
-
- GDB 5.2.1 released from 5.2 branch.
- * NEWS: Mention changes in 5.2.1 including addition of AVR target.
- * README: Update to mention 5.2.1.
-
-2002-07-23 Mark Salter <msalter@redhat.com>
-
- * remote.c (remote_read_bytes): Fix check for error.
-
-2002-07-22 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (language.h): Include.
- (ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
- (pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc):
- Print newlines at end of debug messages.
- (pdc_symbol_addrs, pdc_read_regs, pdc_write_regs, pdc_read_data)
- (pdc_write_data): Use local_hex_string() instead of %llx formats.
-
-2002-07-22 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (ppc-tdep.h): Include.
- (special_register_p): New function.
- (supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32)
- (store_regs_user_thread): Use register number information from
- gdbarch_tdep struct instead of hardcoded offsets relative to
- FIRST_UISA_SP_REGNUM.
- (fetch_regs_kernel_thread, store_regs_kernel_thread): Call
- special_register_p() instead of using FPLAST_REGNUM and
- LAST_UISA_SP_REGNUM as lower and upper bounds on the special
- register numbers. Also, don't assume that LAST_UISA_SP_REGNUM
- will be MQ's register number.
-
-2002-07-22 Michael Snyder <msnyder@redhat.com>
-
- * aix-thread.c (ops): Rename to aix_thread_ops.
- (base_ops): Rename to base_target.
- (ops_attach): Rename to aix_thread_attach.
- (ops_detach): Rename to aix_thread_detach.
- (ops_resume): Rename to aix_thread_detach.
- (ops_wait): Rename to aix_thread_wait.
- (ops_kill): Rename to aix_thread_kill.
- (init_ops): Rename to init_aix_thread_ops.
- (ops_fetch_register): Rename to aix_thread_fetch_register.
- (ops_store_register): Rename to aix_thread_store_register.
- (ops_mourn_inferior): Rename to aix_thread_mourn_inferior.
- (ops_thread_alive): Rename to aix_thread_thread_alive.
- (ops_extra_thread_info: Rename to aix_thread_extra_thread_info.
- (ops_pid_to_str): Rename to aix_thread_pid_to_str.
- (ops_xfer_memory): Rename to aix_thread_xfer_memory.
- (fetch_regs_lib): Rename to fetch_regs_user_thread.
- (fetch_regs_kern): Rename to fetch_regs_kernel_thread.
- (store_regs_lib): Rename to store_regs_user_thread.
- (store_regs_kern): Rename to store_regs_kernel_thread.
-
-2002-07-22 Michael Snyder <msnyder@redhat.com>
-
- * aix-thread.c (ops_prepare_to_store): Eliminate.
- (init_ops): Don't initialize ops.prepare_to_store.
- (store_regs_kern): Pre-fetch register buffers from child,
- because some registers may not be in the cache. Copy
- regs from register cache only if they are cached.
- (store_regs_lib): Copy regs from register cache only
- if they are cached.
- (fill_sprs32, (fill_sprs64, fill_fprs, fill_gprs32,
- fill_gprs64): Ditto.
-
-2002-07-22 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (gdb_assert.h): Include.
- (fill_sprs64, fill_sprs32): Add selected asserts to make sure that
- register sizes (from register cache) match size of buffer holding
- register data.
- (fill_sprs32): Change parameter types to match those in the ptrace()
- buffer.
- (store_regs_lib): Likewise, but for 32-bit temporary variables.
- (ops_prepare_to_store): Rename loop variable ``i'' to ``regno''.
-
-2002-07-22 Michael Snyder <msnyder@redhat.com>
-
- * aix-thread.c (supply_sprs64): Cosmetic change.
- (supply_sprs32): Cosmetic change.
- (fill_gprs64, fill_gprs32, fill_fprs, fill_sprs32): New funcs.
- (fill_sprs64): Use regcache_collect instead of read_register.
- (store_regs_lib): Use regcache_collect instead of
- read_register. Use fill_sprs32 instead of fill_sprs64,
- if debugging a 32-bit architecture.
- (store_regs_kern): Use fill_gprs64 etc. to pull the values
- out of the register cache, instead of passing a pointer into
- the register cache directly to ptrace. Use regcache_collect
- insteaad of read_register.
- (ops_prepare_to_store): Use target_read_registers instead
- of read_register_bytes.
-
-2002-07-20 Aidan Skinner <aidan@velvet.net>
-
- * MAINTAINERS: Add self under write after approval.
-
-2002-07-20 Aidan Skinner <aidan@velvet.net>
-
- * ada-tasks.c: Change k&r style function definitions to prototyped
- form.
-
-2002-07-19 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (x86-64-tdep.o): Add $(objfiles_h).
- * x86-64-tdep.c: Include "objfiles.h".
- (x86_64_gdbarch_init): Set in_solib_call_trampoline to
- in_plt_section. From 2002-07-18 Michal Ludvig <mludvig@suse.cz>.
-
-2002-07-17 Michal Ludvig <michal@suse.cz>
-
- * dwarf2cfi.c (execute_stack_op): Complain on unknown DW_OP_ value.
- (update_context): Initialise cfa variable.
-
-2002-07-17 Michael Snyder <msnyder@redhat.com>
-
- * aix-thread.c: Shorten some long lines.
- Bring comments into line with code spec.
-
-2002-07-18 Joel Brobecker <brobecker@gnat.com>
-
- * infrun.c: Re-indent using gdb_indent.sh.
-
-2002-07-18 Joel Brobecker <brobecker@gnat.com>
-
- * infrun.c (handle_inferior_event): Remove unneeded extra brace.
- Leave the indentation temporarily untouched, to minimize the diffs.
-
-2002-07-18 Elena Zannoni <ezannoni@redhat.com>
-
- * stabsread.c: Make os9k sections of the code obsolete,
- for real this time.
- * stabsread.h: Make os9k sections of the code obsolete.
-
-2002-07-18 Michal Ludvig <mludvig@suse.cz>
-
- * linux-low.c (regsets_store_inferior_registers): Add free()
- at the end of a loop to prevent memory leak.
- * linux-x86-64-low.c (x86_64_regmap): Add CS, SS registers.
- (X86_64_NUM_GREGS): Count it from the size of x86_64_regmap.
- * config/sparc/tm-sp64linux.h: Make the rest of #endif
- line a comment.
- * Makefile.in (x86-64-linux-nat.o): Remove dependency on i387-tdep.h
-
-2002-07-17 Jim Blandy <jimb@redhat.com>
-
- * macrocmd.c (info_macro_command): Remove newline from error
- message.
-
-2002-07-17 J"orn Rennecke <joern.rennecke@superh.com>
-
- * sh-tdep.c (sh_dsp_register_sim_regno): New function.
- (sh_gdbarch_init): Use it for sh-dsp.
-
-2002-07-16 Kevin Buettner <kevinb@redhat.com>
-
- * dwarf2read.c (read_initial_length): Handle older, non-standard,
- 64-bit DWARF2 format.
-
-2002-07-16 Joel Brobecker <brobecker@gnat.com>
-
- * proc-api.c: use HAVE_SYS_PROC_H macro to avoid including
- <sys/proc.h> when not available.
-
-2002-07-16 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Mention that the i[34]86-*-os9k has been made obsolete.
- * stabsread.c: Make os9k sections of the code obsolete.
- * configure.tgt: Make i[3456]86-*-os9k target obsolete.
- * config/i386/i386os9k.mt: Make file obsolete.
- * Makefile.in (ALLDEPFILES): Remove remote-os9k.c.
- (COMMON_OBS): Remove os9kread.o
- (SFILES): Remove os9kread.c.
- (os9kread.o, remote-os9k.o): Make target obsolete.
- * remote-os9k.c: Make file obsolete.
- * os9kread.c: Make file obsolete.
- * Makefile.in
-
-2002-07-16 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Mention that the FR30 has been made obsolete.
- * fr30-tdep.c: Make file obsolete.
- * config/fr30/tm-fr30.h: Ditto.
- * config/fr30/fr30.mt: Ditto.
- * configure.tgt: Make fr30-*-elf obsolete.
- * MAINTAINERS: Make fr30-elf obsolete.
-
-2002-07-16 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * blockframe.c (get_pc_function_start): return 0 if the minimal symbol
- found is not inside a section.
-
-2002-07-15 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (ptrace_check): Use safe_strerror() instead of
- strerror().
- (pdc_realloc): Use xrealloc() instead of realloc().
-
-2002-07-15 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (PD_ERROR, CALL_BASE): Delete.
- (ops_resume, ops_wait, fetch_regs_lib, store_regs_lib)
- (ops_xfer_memory, ops_kill): Don't use PD_ERROR or CALL_BASE
- macros.
-
-2002-07-15 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (ptrace_check): Eliminate goto.
- (sync_threadlists): Eliminate gotos. Also, fix array overrun
- problem.
-
-2002-07-15 Kevin Buettner <kevinb@redhat.com>
-
- * aix-thread.c (gdbcmd.h): Include.
- (DEBUG, DBG, DBG2, dbg): Eliminate.
- (debug_aix_thread): New static global.
- (ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
- (pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc)
- (fetch_regs_lib, store_regs_lib, store_regs_kern): Rewrite
- invocations to DBG and DBG2 macros to test against
- ``debug_aix_thread'' and call fprintf_unfiltered().
- (_initialize_aix_thread): Add new command "set debug aix-thread".
-
-2002-07-15 Andrew Cagney <ac131313@redhat.com>
-
- From Gerhard Tonn <TON@de.ibm.com>:
- * s390-nat.c (fill_fpregset, fill_gregset): Use regcache_collect
- instead of supply_register.
-
-2002-07-15 Andrew Cagney <ac131313@redhat.com>
-
- * dwarf2cfi.c: Include "gdb_assert.h".
- (frame_state_for): Use gdb_assert to check that fde->cie_ptr is
- non-NULL.
- (update_context): Do not use __func__. Add missing ``break''.
- (update_context): Do not use __func__.
-
-2002-07-15 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn
- and its setting. Set gdbarch instruction printing functions
- directly. For non-rs6000 case use new function
- gdb_print_insn_powerpc.
- (gdb_print_insn_powerpc): New function.
-
-2002-07-13 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Mention that the d30v has been marked obsolete.
- * MAINTAINERS: Note that d30v / d30v-elf has been made obsolete.
- * configure.tgt: Mark d30v-*-* as obsolete.
- * d30v-tdep.c: Mark file as obsolete.
- * config/d30v/d30v.mt: Ditto.
- * config/d30v/tm-d30v.h: Ditto.
-
-2002-07-13 Aidan Skinner <aidan@velvet.net>
-
- * ada-tasks.c (add_task_entry): replace calls to
- malloc() with xmalloc
- * ada-tasks.c (init_task_list): replace calls to free with xfree()
-
- * ada-lang.c (replace_operator_with_call, fill_in_ada_prototype,
- ada_finish_decode_line_1, all_sals_for_line
- ada_breakpoint_rewrite): replace calls to free() with xfree()
-
-2002-07-12 Kevin Buettner <kevinb@redhat.com>
-
- From Nicholas Duffek (with minor changes by Martin Hunt,
- Louis Hamilton, and Kevin Buettner):
- * aix-thread.c: New file.
-
-2002-07-12 Petr Sorfa <petrs@caldera.com>
-
- * dwarf2read.c (dwarf2_invalid_attrib_class): New
- complaint for invalid attribute class or form.
- (read_func_scope): DW_AT_frame_base
- better handling of DW_AT_block*.
- (dwarf2_add_member_fn): DW_AT_vtable_elem_location
- better handling of DW_AT_block*.
- (read_common_block): DW_AT_location
- better handling of DW_AT_block*.
- (read_partial_die): DW_AT_location better handling
- of DW_AT_block*.
- (new_symbol): DW_AT_external better handling of
- DW_AT_block*. Proper initialization of variable
- "addr".
- (attr_form_is_block): New function that returns true
- if the attribute's form is of DW_FORM_block*.
-
-2002-07-12 Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
-
- * valops.c (find_method_list): Remove comment about
- removed STATIC_MEMFUNCP argument.
- (value_find_oload_method_list): Likewise.
-
-2002-07-12 Kevin Buettner <kevinb@redhat.com>
-
- From Nicholas Duffek:
- * rs6000-nat.c (vmap_ldinfo, xcoff_relocate_core): Call
- target_new_objfile_hook.
-
-2002-07-12 Kevin Buettner <kevinb@redhat.com>
-
- From Nicholas Duffek:
- * xcoffread.c (scan_xcoff_symtab): Recognize XMC_TD as a data storage
- csect.
-
-2002-07-12 Andrew Cagney <cagney@redhat.com>
-
- * MAINTAINERS: Mention --enable-sim-build-warnings.
- (m68hc11-elf): Disable sim build warnings.
- (m32r-elf): Mark as broken obsolete candidate.
- (x86_64-linux-gnu): Mark as buildable with -Werror.
- (arm-elf): Change -w to ``,'' which enables warnings but not
- -Werror.
-
-2002-07-12 Andrew Cagney <ac131313@redhat.com>
-
- * bcache.h: Update copyright.
- (struct bstring, struct bcache): Move definition to "bcache.c".
- Replaced by opaque declaration.
- (bcache_xfree): Replace free_bcache.
- (bcache_xmalloc, bcache_memory_used): Declare.
-
- * bcache.c: Update copyright.
- (struct bstring, struct bcache): Moved to here from "bcache.h".
- Update comments.
- (bcache_xmalloc, bcache_memory_used): New functions.
- (bcache_xfree): Replace function free_bcache.
-
- * Makefile.in (objfiles.o): Add $(bcache_h).
- (objfiles_h): Remove $(bcache_h).
- (symfile.o): Add $(bcache_h).
-
- * symmisc.c: Update copyright.
- (print_symbol_bcache_statistics): Pass psymbol_cache by value.
- (print_objfile_statistics): Use bcache_memory_used.
-
- * symfile.c: Include "bcache.h".
- (reread_symbols): Use bcache_xfree.
- (reread_symbols): Use bcache_xmalloc and bcache_xfree.
- (add_psymbol_to_list): Pass psymbol_cache by value.
- (add_psymbol_with_dem_name_to_list): Ditto.
-
- * objfiles.h: Update copyright.
- (struct bcache): Declare opaque. Do not include "bcache.h".
- (struct objfile): Change psymbol_cache and macro_cache to ``struct
- bcache'' pointers.
- * dwarf2read.c (macro_start_file): Pass macro_cache by value.
-
- * objfiles.c: Include "bcache.h". Update copyright.
- (allocate_objfile): Use bcache_xmalloc to create psymbol_cache and
- macro_cache.
- (free_objfile): Use bcache_xfree.
-
-2002-07-11 Grace Sainsbury <graces@redhat.com>
-
- * monitor.c (monitor_fetch_register): Make name a constant.
- (monitor_store_register): Same.
-
-2002-07-11 Daniel Jacobowitz <drow@mvista.com>
-
- Based on patch from Daniel Berlin <dberlin@dberlin.org>.
- * buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
- (finish_block) For non-function blocks, hash the symbol table. For
- function blocks, mark the symbol table as unhashed.
- * minsyms.c (msymbol_hash): Return hash value without taking modulus.
- (msymbol_hash_iw): Likewise.
- (add_minsym_to_hash_table): Take modulus of msymbol_hash's return
- value.
- (add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
- (lookup_minimal_symbol): Likewise for both.
- * symtab.h (struct block): Add `hashtable' flag. Comment the
- hashtable.
- (BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
- (ALL_BLOCK_SYMBOLS): Update.
- (BLOCK_SHOULD_SORT): Do not sort hashed blocks.
- (struct symbol): Add `hash_next' pointer.
- * symtab.c (lookup_block_symbol): Search using the hash table when
- possible.
- (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
- (search_symbols, find_addr_symbol): Likewise.
-
- * dstread.c (process_dst_block): Clear hashtable bit for new block.
- (read_dst_symtab): Likewise.
- * jv-lang.c (get_java_class_symtab): Likewise.
- * mdebugread.c: Include "gdb_assert.h".
- (shrink_block): Assert that the block being modified is not hashed.
- * coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
- * symmisc.c (free_symtab_block): Walk the hash table when freeing
- symbols.
- (dump_symtab): Recognize hashed blocks.
- * printcmd.c (print_frame_args): Assert that function blocks do not
- have hashed symbol tables.
- * ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
- (fill_in_ada_prototype, debug_print_block): Likewise.
- (ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS. Handle hash tables.
-
-2002-07-11 Corinna Vinschen <vinschen@redhat.com>
-
- * stack.c (print_frame): Use result of frame_address_in_block()
- instead of fi->pc when evaluating symbols.
- (backtrace_command_1): Ditto.
-
-2002-07-11 Andrew Cagney <cagney@redhat.com>
-
- * cris-tdep.c (cris_saved_pc_after_call): Fix parameter type.
- Make static.
-
- * arm-tdep.c (arm_register_name): Make return type constant.
-
-2002-07-10 Andrew Cagney <ac131313@redhat.com>
-
- * win32-nat.c (has_detach_ability): Convert to strict ISO C
- prototype.
- * top.c (gdb_rl_operate_and_get_next_completion): Ditto.
- * s390-tdep.c (s390_fp_regnum): Ditto.
- (s390_read_fp): Ditto.
- (s390_pop_frame): Ditto.
- (_initialize_s390_tdep): Ditto.
- * remote.c (get_remote_state): Ditto.
- * procfs.c (mappingflags): Ditto.
- * memattr.c (_initialize_mem): Ditto.
- * mcore-tdep.c (mcore_pop_frame): Ditto.
- * m68klinux-nat.c (_initialize_m68k_linux_nat): Ditto.
- * m68k-tdep.c (m68k_register_bytes_ok): Ditto.
- * language.c (set_case_str): Ditto.
- * gnu-v3-abi.c (vtable_address_point_offset): Ditto.
- * frv-tdep.c (new_variant): Ditto.
- (frv_stopped_data_address): Ditto.
- * dwarf2cfi.c (fde_chunks_need_space): Ditto.
- (context_alloc): Ditto.
- (frame_state_alloc): Ditto.
- (unwind_tmp_obstack_init): Ditto.
- (unwind_tmp_obstack_free): Ditto.
- (cfi_read_fp): Ditto.
- * cris-tdep.c (cris_saved_pc_after_call): Ditto.
- (cris_pop_frame): Ditto.
- * c-lang.c (scanning_macro_expansion): Ditto.
- (finished_macro_expansion): Ditto.
- (c_preprocess_and_parse): Ditto.
- * gdbarch.sh: Ditto.
- * gdbarch.h, gdbarch.c: Regenerate.
- * config/mn10200/tm-mn10200.h: Adjust indentation.
- * target.c: Adjust indentation.
- * symtab.h: Adjust indentation.
- * stabsread.h: Adjust indentation.
- * remote-es.c: Adjust indentation.
- * os9kread.c: Adjust indentation.
-
-2002-07-10 Andrew Cagney <ac131313@redhat.com>
-
- * wince.c (_initialize_wince): Rename _initialize_inftarg.
- * win32-nat.c (_initialize_win32_nat): Rename _initialize_inftarg.
-
-2002-07-10 Grace Sainsbury <graces@redhat.com>
-
- * NEWS: Mention m68k, mcore multi-arching.
- * MAINTAINERS: Change status of m68k, mcore to reflect
- multi-arching.
-
-2002-07-10 Daniel Jacobowitz <drow@mvista.com>
-
- * valops.c (find_overload_match): Free oload_syms.
-
-2002-07-09 Joel Brobecker <brobecker@gnat.com>
-
- Define HAVE_SYS_PROC_H if sys/proc.h exists
- * configure.in: Add check for sys/proc.h
- * config.in: Regenerate.
- * configure: Regenerate.
-
-2002-07-09 Grace Sainsbury <graces@redhat.com>
-
- * config/m68k/tm-m68k.h: Remove macros wrapped in
- #if !GDB_MULTI_ARCH.
-
-2002-07-08 Andrew Cagney <ac131313@redhat.com>
-
- * config.in, configure: Regenerate.
-
-2002-07-08 Mark Kettenis <kettenis@gnu.org>
-
- * dwarf2cfi.c: Include "gcore.h".
- (execute_stack_op): Fix implementation of the
- DW_OP_deref and DW_OP_deref_size operators by letting do their
- lookup in the target.
-
-2002-07-07 Mark Kettenis <kettenis@gnu.org>
-
- From Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.de>:
- * i386-sol2-tdep.c (i386_sol2_init_abi): Correct value for
- tdep->sc_sp_offset.
-
-2002-07-05 Daniel Jacobowitz <drow@mvista.com>
-
- Fix PR gdb/595, gdb/602
- * gnu-v3-abi.c (gnuv3_baseclass_offset): Remove unused variables.
- Don't call value_cast, just read the vtable pointer; update comments
- to match.
-
-2002-07-05 Grace Sainsbury <graces@redhat.com>
-
- * config/mcore/tm-mcore.h: Remove file.
- * config/mcore/mcore.mt: Remove definition of TM_FILE
- * configure.tgt: Set gdb_multi_arch to yes for the mcore target.
-
-2002-07-05 Mark Kettenis <kettenis@gnu.org>
-
- * i386bsd-tdep.c: Include "gdb_string.h".
-
-2002-07-04 Grace Sainsbury <graces@redhat.com>
-
- * config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Set to 2.
- (PR_REGNUM, FIRST_ARGREG, LAST_ARGREG,RETVAL_REGNUM): Move to
- mcore-tdep.
- (REG_STRUCT_HAS_ADDR, USE_STRUCT_CONVENTION, GET_SAVED_REGISTER)
- (TARGET_VIRTUAL_FRAME_POINTER, BELIEVE_PCC_PROMOTION): Remove.
- * mcore-tdep.c (PR_REGNUM, FIRST_ARGREG, LAST_ARGREG)
- (RETVAL_REGNUM): Move macros from tm-mcore.h
- (mcore_reg_struct_has_addr): New function.
- (mcore_gdbarch_init): Added initializations for the macros removed
- from tm-mcore.h.
-
-2002-07-04 Mark Kettenis <kettenis@gnu.org>
-
- * osabi.c (generic_elf_osabi_sniffer): Add check for FreeBSD 3.x's
- traditonal string branding within the ELF header.
-
-2002-07-04 Daniel Jacobowitz <drow@mvista.com>
-
- * symtab.c (remove_params): New function.
- (make_symbol_overload_list): Use it instead of cplus_demangle.
- (overload_list_add_symbol): Likewise. Reorder. Fix memory leak.
-
-2002-07-04 Mark Kettenis <kettenis@gnu.org>
-
- * i386obsd-nat.c (_initialize_i386obsd_nat): Fix typo in prototype.
-
- * i386bsd-tdep.c (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end):
- New variables.
- (i386nbsd_init_abi): Use these to initialize tdep->sigtramp_start
- and tdep->sigtramp_end.
- * i386obsd-nat.c: New file.
- * config/i386/obsd.mh (NATDEPFILES): Add i386obsd-nat.o.
-
- * dwarf2cfi.c (cfi_pop_frame): Use alloca() for regbuf.
- Don't call get_current_frame().
-
-2002-07-04 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * i386-nat.c (child_post_startup_inferior): New function
- calling i386_cleanup_dregs if
- I386_USE_GENERIC_WATCHPOINTS is defined.
- * config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
- conditional to acknowledge that i386-nat.c has its
- own child_post_startup_inferior function.
-
-2002-07-04 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.h (I386_MAX_REGISTER_SIZE): New define.
- * i386-tdep.c (i386_do_pop_frame): Use I386_MAX_REGISTER_SIZE
- instead of MAX_REGISTER_RAW_SIZE.
- (i386_extract_return_value, i386_extract_struct_value_address):
- Convert to use regcache.
- (i386_gdbarch_init): Set max_register_raw_size and
- max_register_virtual_size to I386_MAX_REGISTER_SIZE.
- Set extract_return_value and extract_struct_value_address instead
- of their deprecated variants.
-
- Convert i386 target to generic dummy frames.
- * i386-tdep.c: Include "symfile.h".
- (i386_frameless_signal_p): Consider a function to be frameless if
- the pc points at the first instruction of the function.
- (i386_frame_chain): Handle (generic) call dummies.
- (i386_frame_saved_pc): Likewise.
- (i386_frame_init_saved_regs): Remove code dealing with call
- dummies on the stack.
- (i386_push_dummy_frame): Removed.
- (i386_call_dummy_words): Removed.
- (i386_fix_call_dummy): Removed.
- (i386_push_return_address): New function.
- (i386_do_pop_frame): Renamed from i386_pop_frame. Add FRAME
- parameter, and don't call get_current_frame.
- (i386_pop_frame): New function.
- (i386_gdbarch_init): Set use_generic_dummy_frames to 1, set
- call_dummy_location to AT_ENTRY_POINT, set call_dummy_address to
- entry_point_address, set call_dummy_breakpoint_offset to 0, set
- call_dummy_length to 0, set call_dummy_words to NULL, set
- sizeof_call_dummy_words to 0, set fix_call_dummy to
- generic_fix_call_dummy, set pc_in_call_dummy to
- pc_in_call_dummy_at_entry_point, set push_dummy_frame to
- generic_push_dummy_frame, set push_return_address to
- i386_push_return_address and set frame_chain_valid to
- generic_file_frame_chain_valid.
-
-2002-07-03 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (struct regcache): Add opaque declaration.
- (EXTRACT_RETURN_VALUE): New architecture method.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Ditto.
- * gdbarch.h, gdbarch.c: Regenerate.
- * arch-utils.c (legacy_extract_return_value): New function.
- * arch-utils.h (legacy_extract_return_value): Declare.
- * values.c (value_being_returned): Re-enable code handling
- EXTRACT_STRUCT_VALUE_ADDRESS. Move
- deprecated_grub_regcache_for_registers call to block handling
- DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
- (EXTRACT_RETURN_VALUE): Do not define.
-
-2002-07-03 Grace Sainsbury <graces@redhat.com>
-
- * config/mcore/tm-mcore.h (REGISTER_BYTES, NUM_REGS, PC_REGNUM)
- (SP_REGNUM, FP_REGNUM, FUNCTION_START_OFFSET, DECR_PC_AFTER_BREAK)
- (BREAKPOINT_FROM_PC, INNER_THAN, SAVED_PC_AFTER_CALL)
- (INIT_EXTRA_FRAME_INFO, FRAME_INIT_SAVED_REGS, INIT_FRAME_PC)
- (FRAME_CHAIN, FRAME_CHAIN_VALID, FRAME_SAVED_PC)
- (STORE_RETURN_VALUE, DEPRECATED_EXTRACT_RETURN_VALUE)
- (STORE_STRUCT_RETURN, DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
- (SKIP_PROLOGUE, FRAME_ARGS_SKIP, FRAME_ARGS_ADDRESS)
- (FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS, POP_FRAME)
- (PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME, PUSH_ARGUMENTS): Remove.
- * mcore-tdep.c (mcore_init_extra_frame_info): Add fromleaf
- argument so the function fits the prototype in the architecture
- vector.
- (mcore_pop_frame): Remove argument so the function fits the
- prototype. Use get_current_frame instead of the argument.
- (mcore_push_arguments): Change type of struct_return so the
- function can be used in the architecture vector.
- (mcore_store_struct_return): Add.
- (mcore_frame_init_saved_regs): Add.
- (mcore_gdbarch_init): Add function calls to replace the macros
- removed from tm-mcore.h
-
-2002-07-03 Andrew Cagney <ac131313@redhat.com>
-
- * infcmd.c (print_return_value): Remove compatibility code calling
- deprecated_grub_regcache_for_registers.
-
- * values.c: Include "regcache.h".
- (value_being_returned): Update. Use
- deprecated_grub_regcache_for_registers to extract the register
- buffer address.
- * value.h (value_being_returned): Change ``retbuf'' parameter to a
- ``struct regcache''.
- * Makefile.in (values.o): Add dependency on $(regcache_h).
-
- * inferior.h (run_stack_dummy): Change type of second parameter to
- a ``struct regcache''.
- * valops.c (hand_function_call): Change type of retbuf to ``struct
- regcache''. Allocate using regcache_xmalloc, clean using
- make_cleanup_regcache_xfree.
- * infcmd.c (run_stack_dummy): Update. Use
- regcache_cpu_no_passthrough instead of memcpy to copy the buffer.
-
- * regcache.c (do_regcache_xfree): New function.
- (make_cleanup_regcache_xfree): New function.
- * regcache.h (make_cleanup_regcache_xfree): Declare.
-
-2002-07-03 Martin M. Hunt <hunt@redhat.com>
-
- * event-top.c (command_line_handler): Don't read past
- beginning of buffer.
-
-2002-07-03 Martin M. Hunt <hunt@redhat.com>
-
- * varobj.c (struct varobj_root): Change frame from CORE_ADDR to
- struct frame_id.
- (varobj_create): Store frame_id for root.
- (varobj_gen_name): Use xasprintf.
- (varobj_update): Save and restore frame using get_frame_id() and
- frame_find_by_id().
- (create_child): Use xasprintf.
- (new_root_variable): Initialize frame_id.
- (c_name_of_child): Use xasprintf. Call find_frame_by_id().
- (c_value_of_variable): Use xasprintf. Move mem_fileopen call
- to prevent memory leak.
-
-2002-07-03 Andrew Cagney <ac131313@redhat.com>
-
- * valops.c (hand_function_call): Move declaration of retbuf to
- start of function, allocate using malloc, add a cleanup but before
- the inf_status cleanup, cleanup the buffer. Rename local variable
- old_chain to inf_status_cleanup.
-
-2002-07-03 Martin M. Hunt <hunt@redhat.com>
-
- * top.c (execute_command): Use cmd_func() and cmd_func_p().
-
- * cli/cli-decode.c (cmd_func_p): New function.
- (cmd_func): New function.
-
- * command.h: Add cmd_func() and cmd_func_p().
-
-2002-07-03 Grace Sainsbury <graces@redhat.com>
-
- * config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Add macro. Set to 0.
- (REGISTER_SIZE): Remove.
- (MAX_REGISTER_RAW_SIZE): Remove.
- (REGISTER_VIRTUAL_TYPE): Remove.
- (MAX_REGISTER_VIRTUAL_SIZE): Remove.
- (REGISTER_NAME): Remove.
- (USE_GENERIC_DUMMY_FRAMES): Remove.
- (CALL_DUMMY): Remove.
- (CALL_DUMMY_START_OFFSET): Remove.
- (CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
- (CALL_DUMMY_LOCATION): Remove.
- (FIX_CALL_DUMMY): Remove.
- (CALL_DUMMY_ADDRESS): Remove.
- (SIZEOF_CALL_DUMMY_WORDS): Remove.
- (SAVE_DUMMY_FRAME_TOS): Remove.
- * mcore-tdep.c (MCORE_REG_SIZE, MCORE_NUM_REGS): Add macros.
- (mcore_register_virtual_type): New function.
- (mcore_register_byte): New function.
- (mcore_register_size): New function.
- (mcore_register_name): New function.
- (mcore_gdbarch_init): New function. Add set_gdbarch calls for
- macros removed from tm-mcore.h.
- (mcore_dump_tdep): Add.
- (_initialize_mcore_tdep): Add gdbarch_register call.
-
-2002-07-03 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.c (i386_frameless_signal_p): Provide an argument in to
- frameless_look_for_prologue, such that we actually call this
- function.
-
-2002-07-02 Joel Brobecker <brobecker@gnat.com>
-
- * frame.h (frame_address_in_block): New function.
-
- * blockframe.c (frame_address_in_block): New function extracted
- from get_frame_block().
- (get_frame_block): Use frame_address_in_block().
- (block_innermost_frame): Use frame_address_in_block() to match
- the frame pc address against the block boundaries rather than
- the frame pc directly. This prevents a failure when a frame pc
- is actually a return-address pointing immediately after the end
- of the given block.
-
-2002-07-02 Grace Sainsbury <graces@redhat.com>
-
- * MAINTAINERS: Add self under write after approval.
-
-2002-07-02 Grace Sainsbury <graces@redhat.com>
-
- * m68k-tdep.c (m68k_remote_breakpoint_from_pc): Add. Currently not
- used in architecture vector. The default is
- m68k_local_breakpoint_from_pc.
- (m68k_local_breakpoint_from_pc): Add.
- (enum): Add register numbers from tm-m68k.h.
- (m68k_gdbarch_init): Add breakpoint_from_pc to architecture
- vector.
- * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Set to
- GDB_MULTI_ARCH_PARTIAL.
- (BPT_VECTOR, REGISTER_BYTES_FP, REGISTER_BYTES_NOFP)
- (NUM_FREGS, SIG_PC_FP_OFFSET, SP_ARG0, REMOTE_BPT_VECTOR): Move to
- m68k-tdep.c.
- (BREAKPOINT, REMOTE_BREAKPOINT): Remove.
- (A1_REGNUM, FP0_REGNUM, FPC_REGNUM, FPS_REGNUM, FPI_REGNUM): Move
- to enum in m68k-tdep.c
-
-2002-07-02 Joel Brobecker <brobecker@gnat.com>
-
- * solib-osf.c (open_map): Compute the list of shared libraries
- loaded by the inferior, rather than the list of libraries loaded
- by GDB itself. Otherwise, GDB ends up reading the symbols from
- the wrong shared libraries...
-
-2002-07-02 Mark Kettenis <kettenis@gnu.org>
-
- * i386-linux-tdep.c (i386_linux_sigcontext_addr): Make static.
- (LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONEXT_SP_OFFSET): Remove
- macros.
- (i386_linux_sigtramp_saved_pc, i386_linux_sigtramp_saved_sp):
- Remove functions.
- (FRAMELESS_SIGNAL): Remove function.
- (i386_linux_frame_chain, i386_linux_frame_saved_pc,
- i386_linux_saved_pc_after_call): Removed.
- (i386_linux_init_abi): Initialize tdep->sigcontext_addr,
- tdep->sc_pc_offset and tdep->sc_sp_offset. Don't override
- frame_chain, frame_saved_pc and saved_pc_after_call any longer.
-
- * i386-tdep.c (i386_frameless_signal_p): New function.
- (i386_frame_chain): Deal with frameless signals.
- (i386_sigtramp_saved_sp): New function.
- (i386_frame_saved_pc): Deal with frameless signals.
- (i386_saved_pc_after_call): Make sure the correct value is
- returned just after entry into a sigtramp.
- * i386bsd-tdep.c (i386bsd_sc_sp_offset, i386nbsd_sc_sp_offset,
- i386fbsd4_sc_sp_offset): New variables.
- (i386bsd_init_abi, i386nbsd_init_abi, i386fbsd4_init_abi): Use
- these variables to initialize tdep->sc_sp_offset. * i386bsd-nat.c
- (_initialize_i386bsd_nat): Add sanity check for sc_sp_offset
- similiar to what we already did for sc_pc_offset.
- * i386-sol2-tdep.c (i386_sol2_init_abi): Initialize
- tdep->sc_sp_offset.
-
- * i386nbsd-tdep.c (fetch_elfcore_registers): Wrap long line.
-
-2002-07-02 Michal Ludvig <mludvig@suse.cz>
-
- * config/i386/tm-x86-64linux.h: New.
- * config/i386/x86-64linux.mt: Add GDB_MULTI_ARCH and TM_FILE
- definitions.
- * config/i386/nm-x86-64.h: Rename to ...
- * config/i386/nm-x86-64linux.h: ... this one.
- * config/i386/x86-64linux.mh: Reflect the above change.
-
-2002-07-01 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.h (struct gdbarch_tdep): Replace sigtramp_saved_pc
- with sigcontext_addr. Add sc_sp_offset.
- (i386bsd_sigtramp_saved_pc): Remove prototype.
- (i386bsd_sicontext_addr): Add prototype.
- * i386-tdep.c (i386_sigtramp_saved_pc): New function.
- (i386_frame_saved_pc): Rewrite to call i386_sigtramp_saved_pc.
- (i386_svr4_sigtramp_saved_pc): Removed.
- (i386_svr4_sigcontext_addr): New function.
- (i386_svr4_init_abi): Don't initialize tdep->sigtramp_saved_pc.
- Initialize tdep->sigcontext_addr instead. Initialize
- tdep->sc_pc_offset and tdep->sc_sp_offset.
- (i386_gdbarch_init): Likewise.
- * i386bsd-tdep.c (i386bsd_sigcontext_addr): Don't make it static
- any more.
- (i386bsd_sigtramp_saved_pc): Remove function.
- (i386bsd_init_abi): Don't initialize tdep->sigtramp_saved_pc.
- Initialize tdep->sigcontext_addr instead. Initialize
- tdep->sc_pc_offset.
- * i386-linux-tdep.c (i386_linux_init_abi): Remove initialization
- of tdep->sigtramp_saved_pc.
- * i386-sol2-tdep.c (i386_sol2_init_abi): Don't initialize
- tdep->sigtramp_saved_pc. Initialize tdep->sigcontext_addr
- instead.
-
- * i386-tdep.c (i386_frameless_function_invocation,
- i386_frame_num_args, i386_frame_init_saved_regs,
- i386_skip_prologue, i386_push_dummy_frame, i386_fix_call_dummy,
- i386_pop_frame, i386_push_arguments, i386_store_struct_return,
- i386_extract_return_value, i386_store_return_value,
- i386_extract_struct_value_address, i386_register_virtual_type,
- i386_register_convertible, i386_register_convert_to_virtual,
- i386_register_convert_to_raw, i386_svr4_sigtramp_saved_pc,
- i386_go32_init_abi, i386_nw_init_abi, i386_gdbarch_init): Make
- static.
-
-2002-07-01 Mark Kettenis <kettenis@gnu.org>
-
- * i386bsd-tdep.c (i386bsd_frame_saved_pc): Removed.
-
- * config/i386/tm-i386sol2.h (COERCE_FLOAT_TO_DOUBLE): Removed.
- * i386-sol2-tdep.c (i386_sol2_init_abi): Adjust for the removal of
- this macro. Include "value.h".
-
-2002-06-30 Aidan Skinner <aidan@velvet.net>
-
- * ada-exp.tab.c: remove as it's a generated file
- * ada-lex.c: remove as it's a generated file
-
-2002-06-30 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-i386.h (struct frame_info, struct
- frame_saved_regs, struct value, struct type): Remove forward
- declarations.
-
- * config/i386/tm-linux.h [HAVE_PTRACE_GETFPXREGS]
- (FILL_FPXREGSET, HAVE_SSE_REGS): Remove define.
- * config/i386/nm-linux.h [HAVE_PTRACE_GETFPXREGS]
- (FILL_FPXREGSET): Define.
-
- * config/i386/tm-nbsd.h (HAVE_SSE_REGS): Remove define.
-
- * configure.tgt (i[3456]86-*-openbsd*): Fold into
- i[3456]86-*-netbsd* case.
- * config/i386/tm-obsd.h: Removed.
- * config/i386/obsd.mt: Removed.
- * config/i386/obsd.mh (NATDEPFILES): Remove corelow.o and
- core-aout.o.
- (MH_CFLAGS): Add -DYYDEBUG=0.
-
- * i386bsd-nat.c (_initialize_i386bsd_nat): Define SC_PC_OFFSET to
- i386nbsd_sc_pc_offset on OpenBSD too.
-
- * config/i386/tm-fbsd.h [!SVR4_SHARED_LIBS]
- (IN_SOLIB_CALL_TRAMPOLINE): Remove define.
- * config/i386/tm-nbsdaout.h (IN_SOLIB_CALL_TRAMPOLINE): Remove
- define.
- * i386bsd-tdep.c: Include "arch-utils.h".
- (i386bsd_aout_in_solib_call_trampoline): New function.
- (i386bsd_init_abi): Set in_solib_call_trampoline to
- i386bsd_aout_in_solib_call_trampoline.
- (i386nbsdelf_init_abi, i386fbsd_init_abi): Set
- in_solib_call_trampoline to generic_in_solib_call_trampoline.
-
-2002-06-28 Andrew Cagney <ac131313@redhat.com>
-
- * macrotab.h: Do not include "obstack.h" or "bcache.h".
- (struct obstack, struct bcache): Add opaque declarations.
- * Makefile.in (macrotab_h): Update
-
-2002-06-28 Andrew Cagney <ac131313@redhat.com>
-
- * blockframe.c (generic_find_dummy_frame): Change return type to
- ``struct regcache''.
- (struct dummy_frame): Replace field ``registers'' with regcache, a
- struct regcache object.
- (generic_find_dummy_frame): Update.
- (generic_push_dummy_frame): Update. Use regcache_xfree,
- regcache_xmalloc and regcache_cpy.
- (generic_pop_dummy_frame): Update. Use regcache_cpy and
- regcache_xfree.
- (deprecated_generic_find_dummy_frame): Update.
- (generic_read_register_dummy): Update. Use
- regcache_read_as_address.
- (generic_call_dummy_register_unwind): Update. Use regcache_read.
- (generic_get_saved_register): Update. Use regcache_read.
-
-2002-06-28 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (objfiles_h): Add $(bcache_h).
- * objfiles.h: Include "bcache.h".
-
- * Makefile.in (symtab_h): Remove $(bcache_h).
- * symtab.h: Do not include "bcache.h".
-
-2002-06-28 Andrew Cagney <ac131313@redhat.com>
-
- * ppcnbsd-tdep.c (ppcnbsd_init_abi): Set frame_chain_valid to
- generic_func_frame_chain_valid.
-
-2002-06-28 David O'Brien <obrien@FreeBSD.org>
-
- * config/i386/nm-fbsd.h: Include <sys/param.h>.
- * config/i386/tm-fbsd.h: Likewise.
-
-2002-06-28 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Use
- generic_unwind_get_saved_register.
-
-2002-06-27 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>:
- * regcache.c (supply_register): Add missing argument to
- register_buffer call.
-
-2002-06-27 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (init.c): Drop -e option to grep. Not necessary and
- Solaris /bin/grep does not not like it. From Peter Schauer.
-
-2002-06-26 Tom Tromey <tromey@redhat.com>
-
- * command.h (add_setshow_cmd): Declare.
- (add_setshow_cmd_full): Declare.
- * cli/cli-decode.c (add_setshow_cmd): No longer static. Now
- returns void. Use add_setshow_cmd_full.
- (add_setshow_cmd_full): New function.
- (add_setshow_auto_boolean_cmd): Use add_setshow_cmd_full.
- (add_setshow_boolean_cmd): Likewise.
-
-2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/vax/tm-vax.h: Protect from multiple inclusion.
- (TARGET_UPAGES, TARGET_NBPG, STACK_END_ADDR)
- (SIGTRAMP_START, SIGTRAMP_END, SIGCONTEXT_PC_OFFSET): Move to...
- * config/vax/tm-vaxbsd.h: ...here. New file.
- * config/vax/vax.mt (TM_FILE): Set to tm-vaxbsd.h.
-
-2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/vax/tm-vax.h (BREAKPOINT): Remove.
- (BELIEVE_PCC_PROMOTION): Remove.
- (AP_REGNUM): Move to...
- * config/vax/nm-vax.h: ...here.
- * vax-tdep.c: Use VAX_AP_REGNUM instead of AP_REGNUM.
- (vax_breakpoint_from_pc): New function.
- (vax_gdbarch_init): Initialize gdbarch_breakpoint_from_pc
- and gdbarch_believe_pcc_promotion.
-
-2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (vax_tdep_h): Define.
- (vax-tdep.o): Use $(vax_tdep_h).
- * vax-tdep.c (vax_gdbarch_init): Use generic OS ABI framework.
- (vax_dump_tdep): New function.
- (_initialize_vax_tdep): Register vax_dump_tdep.
- * vax-tdep.h: Include osabi.h.
- (struct gdbarch_tdep): New.
-
-2002-06-26 Andrew Cagney <cagney@redhat.com>
-
- * frame.h (deprecated_generic_find_dummy_frame): Rename
- generic_find_dummy_frame.
- * blockframe.c (generic_find_dummy_frame): Make static.
- (deprecated_generic_find_dummy_frame): New function.
- * sh-tdep.c (sh_nofp_frame_init_saved_regs): Replace
- generic_find_dummy_frame with deprecated_find_dummy_frame.
- (sh64_nofp_frame_init_saved_regs): Ditto.
- (sh_fp_frame_init_saved_regs): Ditto.
- * s390-tdep.c (s390_frame_saved_pc_nofix): Ditto.
- (s390_frame_chain): Ditto.
- * cris-tdep.c (cris_frame_init_saved_regs): Ditto.
-
-2002-06-26 Grace Sainsbury <graces@redhat.com>
-
- * config/m68k/tm-m68k.h: Rearrange code so macros not in the
- gdbarch vector are at the top.
- (NUM_REGS): Remove.
- (FP_REGNUM, SP_REGNUM, PS_REGNUM, PC_REGNUM, FP0_REGNUM): Remove.
- (FRAME_ARGS_ADDRESS): Remove.
- (FRAME_LOCALS_ADDRESS): Remove.
- (FRAME_NUM_ARGS): Remove.
- (FRAME_ARGS_SKIP): Remove.
- * m68k-tdep.c (enum): Add eumeration of special register numbers.
- (m68k_gdbarch_init): Add gdbarch initializations for macros
- undefined in tm-m68k.h
-
-2002-06-26 Grace Sainsbury <graces@redhat.com>
-
- * monitor.h: Add the function regname to monitor_ops
- structure. This way NUM_REGS does not have to be a constant.
- * monitor.c (monitor_fetch_register): Added support for regname
- function. The function is called if the array regnames is NULL.
- (monitor_store_register): Same.
- * cpu32bug-rom.c (cpu32bug_regname): Add function. Replaces
- regnames array.
- (init_cpu32bug_cmds): set cpu32bug_cmds.regnames to NULL,
- cpu32bug_cmds.regname to point to new function.
- * abug-rom.c (abug_regname): Same as above.
- (init_abug_cmds): Same.
- * dbug-rom.c (dbug_regname): Same as above.
- (init_dbug_cmds): Same.
- * remote-est.c (est_regname): Same.
- (init_est_cmds): Same.
- * rom68k-rom.c (rom68k_regname): Same.
- (init_rom68k_cmds): Same.
-
-2002-06-25 Tom Tromey <tromey@redhat.com>
-
- * breakpoint.c (delete_command): Don't repeat `delete' commands.
-
-2002-06-25 Andrew Cagney <cagney@redhat.com>
-
- * infrun.c (stop_registers): Change variable's type to ``struct
- regcache'''.
- (xmalloc_inferior_status): Delete function.
- (free_inferior_status): Delete function.
- (normal_stop): Use regcache_cpy.
- (struct inferior_status): Change type of fields ``stop_registers''
- and ``registers'' to ``struct regcache''.
- (write_inferior_status_register): Use regcache_write.
- (save_inferior_status): Instead of calling
- xmalloc_inferior_status, allocate the inf_status buffer directly.
- Use regcache_dup_no_passthrough and regcache_dup to save the
- buffers.
- (restore_inferior_status): Use regcache_xfree and regcache_cpy.
- Replace the stop_registers regcache instead of overriding it. Use
- regcache_xfree. Instead of calling free_inferior_status, xfree
- the buffer directly.
- (discard_inferior_status): Use regcache_xfree. Instead of calling
- free_inferior_status, xfree the buffer directly.
- (build_infrun): Use regcache_xmalloc.
- (_initialize_infrun): Delete redundant call to build_infrun.
-
- * Makefile.in (infcmd.o): Add $(regcache_h).
-
- * infcmd.c: Include "regcache.h".
- (run_stack_dummy): Use deprecated_grub_regcache_for_registers to
- obtain the address of `stop_registers' register buffer.
- (print_return_value): Ditto.
-
- * inferior.h (struct regcache): Add opaque declaration.
- (stop_registers): Change variable's declared type to ``struct
- regcache''.
-
-2002-06-24 Tom Tromey <tromey@redhat.com>
-
- * cli/cli-decode.c (add_show_from_set): Fixed typo in comment.
- * target.c (initialize_targets): Fixed typo in
- trust-readonly-sections `show' documentation.
-
- * main.c: Marked all strings with _().
-
-2002-06-24 Don Howard <dhoward@redhat.com>
-
- * memattr.c (create_mem_region): Treat hi == 0 as a special case
- that means max CORE_ADDR+1.
- (lookup_mem_region): Ditto.
- (mem_info_command): Ditto.
-
-2002-06-24 Grace Sainsbury <graces@redhat.com>
-
- * config/m68k/tm-m68k.h (DECR_PC_AFTER_BREAK): Remove.
- (REGISTER_BYTES_OK): Remove.
- (REGISTER_BYTES): Remove.
- (STORE_STRUCT_RETURN): Remove.
- (DEPRECATED_EXTRACT_RETURN_VALUE): Remove.
- (STORE_RETURN_VALUE): Remove.
- (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Remove.
- (FRAME_CHAIN): Remove.
- (FRAMELESS_FUNCTION_INVOCATION): Remove.
- (FRAME_SAVED_PC): Remove.
- * m68k-tdep.c (m68k_register_bytes_ok):Add.
- (m68k_store_struct_return): Add.
- (m68k_deprecated_extract_return_value): Add.
- (m68k_deprecated_extract_struct_value_address): Add.
- (m68k_store_return_value): Add.
- (m68k_frame_chain): Add.
- (m68k_frameless_function_invocation): Add.
- (m68k_frame_saved_pc): Add.
- (m68k_gdbarch_init): added set_gdbarch calls for new
- functions and deleted macros.
-
-2002-06-23 Tom Tromey <tromey@redhat.com>
-
- * Makefile.in (HFILES_NO_SRCDIR): Remove old files.
- (ALLDEPFILES): Likewise.
- (udiheaders): Removed.
- (udip2soc.o): Likewise.
- (udi2go32.o): Likewise.
- (udr.o): Likewise.
- (HFILES_WITH_SRCDIR): Don't mention udiheaders.
-
-2002-06-22 Andrew Cagney <ac131313@redhat.com>
-
- * infrun.c (_initialize_infrun): Delete unnecessary call to
- build_infrun.
-
- * regcache.h: Update comments describing the regcache_cpy family
- of functions.
- (regcache_save, regcache_restore): Delete declaration.
- (regcache_save_no_passthrough): Delete declaration.
- (regcache_restore_no_passthrough): Delete declaration.
- * regcache.c (regcache_save): Delete function.
- (regcache_save_no_passthrough): Delete function.
- (regcache_restore): Delete function.
- (regcache_restore_no_passthrough): Delete function.
-
-2002-06-21 Andrew Cagney <ac131313@redhat.com>
-
- * config/m68k/tm-m68k.h: Fix typo.
- (FRAME_INIT_SAVED_REGS): Define when non-multi-arch.
- (m68k_frame_init_saved_regs): Declare.
-
-2002-06-21 Jim Blandy <jimb@redhat.com>
-
- Remove some vestiges of Harris 88k support.
- * dwarf2read.c (decode_locdesc): Remove `#if' block for Harris 88k
- register numbering quirk.
- * elfread.c (elf_symtab_read): Remove `#if' block for skipping
- odd symbols occurring in Harris 88k ELF targets.
-
-2002-06-21 Tom Tromey <tromey@redhat.com>
-
- * gdb_locale.h: New file.
- * Makefile.in (GDB_CFLAGS): Define LOCALEDIR.
- (defs_h): Added gdb_locale.h.
- * configure, config.in: Rebuilt.
- * configure.in (PACKAGE): Define.
- * defs.h: Include gdb_locale.h.
- * main.c (captured_main): Call setlocale, bindtextdomain,
- textdomain.
-
-2002-06-21 Dave Brolley <brolley@redhat.com>
-
- From Stan Shebs, Jim Blandy, Mark Salter, Kevin Buettner:
- * config/frv/frv.mt: New file.
- * config/frv/tm-frv.h: New file.
- * configure.tgt: Support frv-*-*.
- * Makefile.in (frv-tdep.o): New target.
- * frv-tdep.c: New file.
- * NEWS: Mention frv.
-
-2002-06-21 Dave Brolley <brolley@redhat.com>
-
- * MAINTAINERS: Add self to "Write After Approval" list.
-
-2002-06-21 Grace Sainsbury <graces@redhat.com>
-
- * config/m68k/tm-m68k.h (REGISTER_BYTE, REGISTER_RAW_SIZE)
- (REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE)
- (REGISTER_VIRTUAL_TYPE, REGISTER_NAMES, TARGET_LONG_DOUBLE_FORMAT)
- (FUNCTION_START_OFFSET, SKIP_PROLOGUE, SAVED_PC_AFTER_CALL)
- (INNER_THAN, STACK_ALIGN, REGISTER_SIZE): Remove macros.
-
- * m68k-tdep.c: Include arch-utils.h
- (m68k_register_raw_size): Add.
- (m68k_register_virtual_size): Add.
- (m68k_register_virtual_type): Add.
- (m68k_register_name): Add.
- (m68k_stack_align): Add.
- (m68k_register_byte): Add.
- (m68k_gdbarch_init): Add set_gdbarch calls for macros removed in
- tm-m68k.h.
-
-2002-06-21 Grace Sainsbury <graces@redhat.com>
-
- * m68k-tdep.c (m68k_frame_init_saved_regs): Replace
- m68k_find_saved_regs.
- (m68k_pop_frame): Removed saved_regs structure, and replaced
- references to it with frame->saved_regs.
- (m68k_gdbarch_init): Added function calls to initialize the
- gdbarch structure.
- (m68k_fix_call_dummy): Add.
- * config/m68k/tm-m68k.h: (FRAME_FIND_SAVED_REGS): Remove.
- (CALL_DUMMY): Remove.
- (CALL_DUMMY_LENGTH): Remove.
- (CALL_DUMMY_START_OFFSET): Remove.
- (CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
- (FIX_CALL_DUMMY): Remove.
- (PUSH_DUMMY_FRAME): Remove.
- (POP_FRAME): Remove.
-
-2002-06-19 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * parse.c (parse_fprintf): New function used to avoid calls to
- fprintf in bison parser generated debug code.
- * parser-defs.h: Declaration of new parse_fprintf function.
- * ada-exp.y, c-exp.y, f-exp.y, jv-exp.y, m2-exp.y, p-exp.y:
- Set YYDEBUG to 1 by default.
- Set YYFPRINTF as parse_fprintf.
-
-2002-06-21 Michal Ludvig <mludvig@suse.cz>
-
- * dwarf2cfi.c (read_encoded_pointer): Don't handle pointer
- encoding anymore.
- (pointer_encoding, enum ptr_encoding): New.
- (execute_cfa_program): Take care about pointer encoding.
- (dwarf2_build_frame_info): Only call parse_frame_info for
- .debug_frame and .eh_frame.
- (parse_frame_info): New, derived from former dwarf2_build_frame_info.
- fixed augmentation handling, added relative addressing,
- ignore duplicate FDEs. Added comments.
- * dwarf2cfi.c: Reindented.
-
-2002-06-20 Elena Zannoni <ezannoni@redhat.com>
-
- * event-top.c (command_handler): Don't use space_at_cmd_start
- unless there is sbrk() on the host. Assign time and space data
- to union fields of the appropriate length.
-
-2002-06-20 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.c (x86_64_register_nr2name): Rename to
- x86_64_register_name. Return type changed to 'const char *'.
- (x86_64_register_name2nr): Rename to x86_64_register_number.
- (x86_64_gdbarch_init): Update to reflect the change.
- * x86-64-tdep.h: Ditto.
- * x86-64-linux-nat.c (x86_64_fxsave_offset)
- (supply_fpregset): Ditto.
-
-2002-06-19 Andrew Cagney <cagney@redhat.com>
-
- * regcache.h: Update copyright.
- (struct regcache, struct gdbarch): Add opaque declarations.
- (current_regcache): Declare global variable.
- (regcache_read, regcache_write): Add gdbarch parameter.
- (regcache_save, regcache_save_no_passthrough)
- (regcache_restore, regcache_restore_no_passthrough)
- (regcache_dup, regcache_dup_no_passthrough)
- (regcache_cpy, regcache_cpy_no_passthrough)
- (deprecated_grub_regcache_for_registers)
- (deprecated_grub_regcache_for_register_valid)
- (regcache_valid_p): Add function declarations.
-
- * regcache.c: Update copyright.
- (regcache_descr_handle): New global variable.
- (struct regcache_descr): Define.
- (init_legacy_regcache_descr, init_regcache_descr): New functions.
- (regcache_descr, xfree_regcache_descr): New functions.
- (struct regcache): Define.
- (regcache_xmalloc, regcache_xfree): New functions.
- (regcache_cpy, regcache_cpy_no_passthrough): New functions.
- (regcache_dup, regcache_dup_no_passthrough): New functions.
- (regcache_valid_p, regcache_read_as_address): New functions.
- (deprecated_grub_regcache_for_registers): New function.
- (deprecated_grub_regcache_for_register_valid): New function.
- (current_regcache): New global variable.
- (register_buffer): Add regcache parameter. Update calls.
- (regcache_read, regcache_write): Add regcache parameter. Rewrite.
- (read_register_gen, write_register_gen): Update register_buffer
- call. Test for legacy_p instead of gdbarch_register_read_p or
- gdbarch_register_write_p.
- (regcache_collect): Update register_buffer call.
- (build_regcache): Rewrite. Use deprecated grub functions.
- (regcache_save, regcache_save_no_passthrough): New functions.
- (regcache_restore, regcache_restore_no_passthrough): New
- functions.
- (_initialize_regcache): Create the regcache_data_handle. Swap
- current_regcache global variable.
-
- * sh-tdep.c (sh_pseudo_register_read): Add current_regcache
- parameter to regcache_read and regcache_write calls.
- (sh4_register_read): Ditto.
- (sh64_pseudo_register_read): Ditto.
- (sh64_register_read): Ditto.
- (sh_pseudo_register_write): Ditto.
- (sh4_register_write): Ditto.
- (sh64_pseudo_register_write): Ditto.
- (sh64_register_write): Ditto.
-
- * defs.h (XCALLOC): Define.
-
-2002-06-19 Grace Sainsbury <graces@redhat.com>
-
- * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Added (set to 0).
- * m68k-tdep.c (m68k_gdbarch_init): Added.
- (m68k_dump_tdep): Added.
-
-2002-06-19 Daniel Jacobowitz <drow@mvista.com>
-
- * ada-lang.c (fill_in_ada_prototype): Update comment.
-
-2002-06-19 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-tdep.c (enum mips_abi): Explicitly start at 0. Add
- MIPS_ABI_LAST.
- (mips_abi_string, mips_abi_strings): New.
- (struct gdbarch_tdep): Remove mips_abi_string, add found_abi.
- (mips_gdbarch_init): Set tdep->found_abi. Don't set
- tdep->mips_abi_string. Honor mips_abi_string. Default to
- O32 if no ABI is found.
- (mips_dump_tdep): Use mips_abi_strings.
- (mips_abi_update): New function.
- (_initialize_mips_tdep): Initialize mips_abi_string. Add
- ``set mips abi'' and ``show mips abi''. Check the size of
- mips_abi_strings.
-
-2002-06-19 Andrew Cagney <cagney@redhat.com>
-
- * i386-linux-tdep.c (i386_linux_register_name): Make return type
- constant.
-
-2002-06-18 Joel Brobecker <brobecker@gnat.com>
-
- * alpha-tdep.c (heuristic_proc_desc): Compute the size of the
- current frame using only the first stack size adjustment. All
- subsequent size adjustments are not considered to be part of
- the "static" part of the current frame.
- Compute the address of the saved registers relative to the
- Frame Pointer ($fp) instead of the Stack Pointer if $fp is
- in use in this frame.
-
-2002-06-18 Don Howard <dhoward@redhat.com>
-
- * valops.c (value_ind): Use value_at_lazy() when dereferencing
- type int expressions. Thanks to Jim Blandy <jimb@redhat.com> for
- suggesting this solution.
-
-2002-06-18 Andrew Cagney <ac131313@redhat.com>
-
- * config/romp/xm-rtbsd.h: Delete file.
- * config/romp/rtbsd.mh: Delete file.
-
-2002-06-18 Keith Seitz <keiths@redhat.com>
-
- * breakpoint.c (condition_command): Post breakpoint_modify
- when a condition is added to an existing breakpoint.
- (commands_command): Likewise for commands.
- (set_ignore_count): Likewise for ignore counts.
- If no tty, do not simply return, still need to send event
- notification.
- (ignore_command): Only print a newline if the command came
- from a tty.
- Don't call breakpoints_changed, since this is now properly
- handled by set_ignore_count.
-
-2002-06-18 Andrew Cagney <cagney@redhat.com>
-
- * MAINTAINERS: Note that cris-elf target can be compiled with
- -Werror.
- * cris-tdep.c (cris_register_name): Make return type constant.
- (cris_breakpoint_from_pc): Ditto.
-
-2002-06-18 Michal Ludvig <mludvig@suse.cz>
-
- * frame.h (struct frame_info): Change type of context to
- 'struct context'.
-
-2002-06-17 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (REGISTER_NAME): Change return type a constant string
- pointer.
- * gdbarch.h, gdbarch.c: Regenerate.
- * config/mips/tm-mips.h (mips_register_name): Update.
- * i386-tdep.h (i386_register_name): Update.
- * mips-tdep.c (mips_register_name): Update
- * alpha-tdep.c (alpha_register_name): Update.
- * arch-utils.c (legacy_register_name): Update.
- * arch-utils.h (legacy_register_name): Update.
- * avr-tdep.c (avr_register_name): Update.
- * ia64-tdep.c (ia64_register_name): Update.
- * i386-tdep.c (i386_register_name): Update.
- * sparc-tdep.c (sparc32_register_name): Update.
- (sparc64_register_name): Update.
- (sparclite_register_name): Update.
- (sparclet_register_name): Update.
- * sh-tdep.c (sh_generic_register_name): Update.
- (sh_sh_register_name): Update.
- (sh_sh3_register_name): Update.
- (sh_sh3e_register_name): Update.
- (sh_sh_dsp_register_name): Update.
- (sh_sh3_dsp_register_name): Update.
- (sh_sh4_register_name): Update.
- (sh_sh64_register_name): Update.
- * s390-tdep.c (s390_register_name): Update.
- * rs6000-tdep.c (rs6000_register_name): Update.
- * ns32k-tdep.c (ns32k_register_name_32082): Update.
- (ns32k_register_name_32382): Update.
- * d10v-tdep.c (d10v_ts2_register_name): Update.
- (d10v_ts3_register_name): Update.
- * xstormy16-tdep.c (xstormy16_register_name): Update.
- * vax-tdep.c (vax_register_name): Update.
- * v850-tdep.c (v850_register_name): Update.
- * m68hc11-tdep.c (m68hc11_register_name): Update.
- * mn10300-tdep.c (mn10300_generic_register_name): Update.
- (am33_register_name): Update.
-
-2002-06-17 Grace Sainsbury <graces@redhat.com>
-
- * m68k-tdep.c: Reindented.
-
-2002-06-17 Andrew Cagney <ac131313@redhat.com>
-
- * gdb_indent.sh: Add prgregset_t, fpregset_t, and gregset_t to the
- list of predefined types.
-
-2002-06-16 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE,
- REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW): Remove defines.
- (i386_register_virtual_type, i386_register_convertible,
- i386_register_convert_to_virtual, i386_register_convert_to_raw):
- Remove prototypes.
- * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
- macros mentioned above.
-
- * config/i386/tm-i386lynx.h (SAVED_PC_AFTER_CALL): Remove define.
- (i386lynx_saved_pc_after_call): Remove prototype.
- * i386ly-tdep.c: Include "i386-tdep.h".
- (i386lynx_saved_pc_after_call): Make static. Use
- read_memory_nobpt instead of read_memory. Use
- read_memory_unsigned_integer instead of read_memory_integer.
- (i386lynx_init_abi): New function.
- (i386lynx_coff_osabi_sniffer): New function.
- (_initialize_i386bsd_tdep): New function.
-
- * config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
- CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
- CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
- (i386_fix_call_dummy): Remove prototype.
- * i386-tdep.c (i386_call_dummy_words): New variable.
- (i386_gdbarch_init): Adjust for removal of the
- macros mentioned above.
-
-2002-06-15 Andrew Cagney <ac131313@redhat.com>
-
- * command.h (add_setshow_auto_boolean_cmd): Replace
- add_set_auto_boolean_cmd.
- * cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace
- add_set_auto_boolean_cmd.
- * cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration.
- * mips-tdep.c (_initialize_mips_tdep): Update ``set mips
- mask-address'' command.
- (show_mask_address): Add cmd parameter.
- * remote.c (add_packet_config_cmd): Update. Change type of
- set_func and show_func to cmd_sfunc_ftype.
- (_initialize_remote): Update `set remote Z-packet'
- (show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter.
- (show_remote_protocol_e_packet_cmd): Ditto.
- (show_remote_protocol_E_packet_cmd): Ditto.
- (show_remote_protocol_P_packet_cmd): Ditto.
- (show_remote_protocol_Z_software_bp_packet_cmd): Ditto.
- (show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto.
- (show_remote_protocol_Z_write_wp_packet_cmd): Ditto.
- (show_remote_protocol_Z_read_wp_packet_cmd): Ditto.
- (show_remote_protocol_Z_access_wp_packet_cmd): Ditto.
- (show_remote_protocol_Z_packet_cmd): Ditto.
- (show_remote_protocol_binary_download_cmd): Ditto.
- (show_remote_cmd): Pass NULL to all of above.
-
-2002-06-15 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
- DEPRECATED_EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
- DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, PUSH_DUMMY_FRAME,
- POP_FRAME): Remove defines.
- (i386_push_arguments, i386_store_struct_return,
- i386_extract_return_value, i386_store_return_value,
- i386_extract_struct_value_address, i386_push_dummy_frame,
- i386_pop_frame): Renove prototypes.
- * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
- macros mentioned above.
-
-2002-06-15 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c (add_setshow_boolean_cmd): Replace
- add_set_boolean_cmd.
- (add_setshow_cmd): New function.
- * command.h (add_setshow_boolean_cmd): Replace
- add_set_boolean_cmd.
- * remote-rdi.c (_initialize_remote_rdi): Update ``set rdiheartbeat''
- and ``set rdiromatzero''.
- * maint.c (_initialize_maint_cmds): Update commented out code.
- * cli/cli-decode.h (add_set_boolean_cmd): Delete declaration.
- * target.c (initialize_targets): Update `set
- trust-readonly-sections'.
- * remote.c (_initialize_remote): Update `set remotebreak'.
-
-2002-06-15 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-i386.h (FUNCTION_START_OFFSET, INNER_THAN,
- BREAKPOINT, DECR_PC_AFTER_BREAK): Removed.
- * i386-tdep.c (i386_skip_prologue): Adjust function signature to
- fit into multi-arch framework.
- (i386_breakpoint_from_pc): New function.
- (i386_gdbarch_init): Adjust for removal of the macros mentioned
- above.
-
- * config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION,
- FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS,
- FRAME_ARGS_SKIP, FRAME_INIT_SAVED_REGS): Remove defines.
- (i386_frameless_function_invocation, i386_frame_num_args,
- i386_frame_init_saved_regs): Remove prototypes.
- * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
- macros mentioned above.
-
-2002-06-15 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c (set_cmd_cfunc): Update.
- (set_cmd_sfunc): Update.
- * command.h (cmd_cfunc_ftype, cmd_sfunc_ftype): Declare.
- (set_cmd_sfunc, set_cmd_cfunc): Update.
- * cli/cli-decode.h: Update.
-
-2002-06-15 Mark Kettenis <kettenis@gnu.org>
-
- * i386-sol2-tdep.c (i386_sol2_osabi_sniffer): New function.
- (_initialize_i386_sol2_tdep): Register i386_sol2_osabi_sniffer.
-
-2002-06-15 Andrew Cagney <ac131313@redhat.com>
-
- * defs.h (auto_boolean): Declare enum.
- * command.h (cmd_auto_boolean): Delete enum.
- * mips-tdep.c (mask_address_var): Update.
- (mips_mask_address_p): Update.
- (show_mask_address): Update.
- * remote.c (struct packet_config): Update.
- (update_packet_config): Update.
- (show_packet_config_cmd): Update.
- (packet_ok): Update.
- (add_packet_config_cmd): Update.
- (_initialize_remote):
- * command.h: Update.
- * cli/cli-setshow.c (parse_auto_binary_operation): Update.
- (do_setshow_command): Update.
- * cli/cli-decode.c (add_set_auto_boolean_cmd): Update.
- * cli/cli-decode.h: Update.
-
-2002-06-15 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-cygwin.h, config/i386/tm-fbsd.h,
- config/i386/tm-go32.h, config/i386/tm-i386gnu.h,
- config/i386/tm-i386sol2.h, config/i386/tm-i386v4.h,
- config/i386/tm-linux.h, config/i386/tm-nbsd.h,
- config/i386/tm-obsd.h (HAVE_I387_REGS): Remove define.
- * config/i386/tm-i386.h: Unconditionally define FLOAT_INFO.
-
- * i386-tdep.c (i386_coff_osabi_sniffer): Add "coff-go32" to the
- list of DJGPP COFF targets.
-
- * config/i386/tm-i386.h (REGISTER_SIZE): Remove define.
- (NUM_GREGS, NUM_FREGS, NUM_SSE_REGS): Remove defines.
- (FP_REGNUM, SP_REGNUM, PC_REGNUM, PS_REGNUM): Remove defines.
- (FP0_REGNUM): Remove define.
- (MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
- MAX_REGISTER_VIRTUAL_SIZE): Remove define.
- (i386_register_virtual_size): Remove protoype.
- * i386-tdep.c (i386_register_virtual_size): Removed.
- (i386_extract_return_value, i386_store_return_value): Use
- FP0_REGNUM instead of NUM_FREGS to determine whether the
- floating-point registers are available.
- (i386_gdbarch_init): Tweak FIXME about FPU registers.
- Adjust for removal of macros mentioned above.
-
-2002-06-15 Mark Kettenis <kettenis@gnu.org>
-
- * i386v4-nat.c: Include "i386-tdep.h". Reformat and tweak various
- comments.
- (fill_gregset, supply_gregset, supply_fpregset, fill_fpregset):
- Remove prototypes.
- (supply_gregset, fill_gregset): Remove use of register keyword and
- remove declaration for regmap. Use I386_NUM_GREGS instead of
- NUM_REGS and NUM_FREGS.
- (FPREGSET_FSAVE_OFFSET): Remove.
- (supply_fpregset, fill_fpregset): Use FPO_REGNUM instead of
- NUM_FREGS to determine whether the floating-point registers are
- available.
-
- * i386gnu-nat.c (supply_gregset, gnu_fetch_registers,
- gnu_store_registers): Replace usage of NUM_GREGS with
- I386_NUM_GREGS.
-
- * i386-linux-nat.c (OLD_CANNOT_FETCH_REGISTER,
- OLD_CANNOT_STORE_REGISTER, supply_gregset, fill_gregset): Replace
- usage of NUM_GREGS with I386_NUM_GREGS.
-
- * i386-linux-nat.c (fill_gregset): Remove redundant parentheses.
-
- * i386bsd-nat.c: Include "i386-tdep.h".
- (supply_gregset, fill_gregset): Replace usage of NUM_GREGS with
- I386_NUM_GREGS.
-
- * i386v-nat.c: Remove copnditional inclusion of <asm/debugreg.h>,
- and associated comment. They no longer make any sense, since we
- don't use this file anymore on Linux.
-
- * config/i386/tm-i386.h (MAX_NUM_REGS): Removed.
- * i386-tdep.c (i386_register_offset, i386_register_size): Use
- I386_SSE_NUM_REGS instead of MAX_NUM_REGS for the number of
- elements in these arrays.
- (_initialize_i386_tdep): Use I386_SSE_NUM_REGS instead of
- MAX_NUM_REGS.
-
-2002-06-15 Mark Kettenis <kettenis@gnu.org>
-
- * osabi.h (gdb_osabi): Add GDB_OSABI_LYNXOS.
- * osabi.c (gdb_osabi_names): Add entry for "LynxOS".
-
-2002-06-14 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename
- EXTRACT_RETURN_VALUE.
- (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename
- EXTRACT_STRUCT_VALUE_ADDRESS.
- * gdbarch.h, gdbarch.c: Regenerate.
-
- * values.c (value_being_returned): Handle
- DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
- (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE.
-
- * arm-linux-tdep.c (arm_linux_init_abi): Update.
- * arm-tdep.c (arm_gdbarch_init): Update.
- * avr-tdep.c (avr_gdbarch_init): Update.
- * cris-tdep.c (cris_gdbarch_init): Update.
- * d10v-tdep.c (d10v_gdbarch_init): Update.
- * ia64-tdep.c (ia64_gdbarch_init): Update.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
- * rs6000-tdep.c (rs6000_gdbarch_init): Update.
- * s390-tdep.c (s390_gdbarch_init): Update.
- * sh-tdep.c (sh_gdbarch_init): Update.
- * s390-tdep.c (s390_gdbarch_init): Update.
- * sparc-tdep.c (sparc_gdbarch_init): Update.
- * ns32k-tdep.c (ns32k_gdbarch_init): Update.
- * v850-tdep.c (v850_gdbarch_init): Update.
- * vax-tdep.c (vax_gdbarch_init): Update.
- * x86-64-tdep.c (x86_64_gdbarch_init): Update.
- * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
-
- * config/arc/tm-arc.h: Update.
- * config/d30v/tm-d30v.h: Update.
- * config/fr30/tm-fr30.h: Update.
- * config/h8300/tm-h8300.h: Update.
- * config/h8500/tm-h8500.h: Update.
- * config/i386/tm-i386.h: Update.
- * config/i386/tm-ptx.h: Update.
- * config/i386/tm-symmetry.h: Update.
- * config/i960/tm-i960.h: Update.
- * config/m32r/tm-m32r.h: Update.
- * config/m68k/tm-delta68.h: Update.
- * config/m68k/tm-linux.h: Update.
- * config/m68k/tm-m68k.h: Update.
- * config/m88k/tm-m88k.h: Update.
- * config/mcore/tm-mcore.h: Update.
- * config/mips/tm-mips.h: Update.
- * config/mn10200/tm-mn10200.h: Update.
- * config/pa/tm-hppa.h: Update.
- * config/pa/tm-hppa64.h: Update.
- * config/sparc/tm-sp64.h: Update.
- * config/sparc/tm-sparc.h: Update.
- * config/sparc/tm-sparclet.h: Update.
- * config/z8k/tm-z8k.h: Update.
-
-2002-06-14 Andrew Cagney <cagney@redhat.com>
-
- * Makefile.in (i386_linux_tdep_h): Define.
- (i386_tdep_h, i387_tdep_h): Define.
- (i386-linux-nat.o): Add $(i386_linux_tdep_h),
- $(i386_tdep_h) and $(i387_tdep_h).
- * i386-linux-nat.c: Include "i386-linux-tdep.h".
-
-2002-06-14 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/tm-i386.h (START_INFERIOR_TRAPS_EXPECTED): Removed.
- Already covered by the default.
-
- * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT,
- TARGET_LONG_DOUBLE_BIT): Remove. * i386-tdep.c
- (i386_gdbarch_init): Initialize long_double_format and long_double
- bit.
-
- * config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and
- i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o.
- Move these to ...
- * config/i386/i386sol2.mh: ... here.
- * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define.
- (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef.
- (SIGCONTEXT_PC_OFFSET): Remove define.
- (IN_SIGTRAMP): Remove define.
- * i386-sol2-tdep.c: New file.
-
- * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h.
- * config/i386/tm-i386nw.h: Removed.
-
- * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM,
- USE_STRUCT_CONVENTION): Remove defines.
- (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
- (get_longjmp_target): Remove prototype.
- (IN_SIGTRAMP): Remove define.
- (i386bsd_in_sigtramp): Remove prototype.
- (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
- function. Update comment accordingly
- (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
- (FRAME_SAVED_PC): Remove define.
- (i386bsd_frame_saved_pc): Remove prototype.
- * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC,
- GET_LONGJMP_TARGET): Remove defines.
- (get_longjmp_target): Remove prototype.
- (IN_SIGTRAMP): Remove define.
- (i386bsd_in_sigtramp): Remove prototype.
- (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
- function. Update comment accordingly
- (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
- (FRAME_SAVED_PC): Remove define.
- (i386bsd_frame_saved_pc): Remove prototype.
- * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention):
- Remove prototype.
- (USE_STRUCT_CONVENTION): Remove prototype.
- * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove
- declaration.
- (_initialize_i386bsd_nat): Revise logic to determine some
- constants at compile time when compiling a native GDB. Warn if
- things don't match up with what we expect.
- * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end):
- Remove variables.
- (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite
- to use date stored in `struct gdbarch_tdep'.
- (i386bsd_sigcontext_offset): Remove varaible.
- (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data
- stored in `struct gdbarch_tdep'.
- (i386bsd_frame_saved_pc): Make static.
- (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions.
- (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset,
- i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
- i386fbsd4_sc_pc_offset): New variables.
- (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi,
- i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New
- functions.
- (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New
- functions.
- * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment.
- Modify the value of i386fbsd_sigtramp_start and
- i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and
- i386fbsd_sigtramp_end.
- * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove
- function.
-
- * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move
- define to i386-linux-tdep.h.
- (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME,
- REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove
- defines.
- (i386_linux_register_name, i386_linux_register_byte,
- i386_linux_register_raw_size): Remove prototypes.
- (i386_linux_svr4_fetch_link_map_offsets): Remove prototype.
- (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define.
- (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL,
- TARGET_WRITE_PC): Remove defines.
- (i386_linux_in_sigtramp, i386_linux_frame_chain,
- i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call,
- i386_linux_write_pc): Remove prototypes.
- (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
- (get_longjmp_target): Remove prototype.
- * i386-linux-tdep.h: New file.
- * i386-linux-nat.c: Include "i386-linux-tdep.h".
- * i386-linux-tdep.c: Include "i386-tdep.h" and
- "i386-linux-tdep.h".
- (i386_linux_register_name, i386_linux_register_byte,
- i386_linux_register_raw_size, i386_linux_in_sigtramp,
- i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets):
- Make static.
- (i386_linux_init_abi): New function.
- (_initialize_i386_linux_tdep): New function.
-
- * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define.
- (i386_saved_pc_after_call): Remove prototype.
- (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register".
- (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
- DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines.
- (i386_register_name, i386_stab_reg_to_regnum,
- i386_dwarf_reg_to_regnum): Remove prototypes.
- (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS,
- SIZEOF_SSE_REGS): Remove defines.
- (REGISTER_BYTES): Remove define.
- (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines.
- (i386_register_byte, i386_register_raw_size): Remove prototypes.
- (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines.
- (i386_frame_chain, i386_frame_saved_pc): Remove prototypes.
- * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define.
- (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP,
- JB_EDX, GET_LONGJMP_TARGET): Remove defines.
- (get_longjmp_target): Remove prototype.
- (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines.
- (sigtramp_saved_pc): Remove define.
- (i386v4_sigtramp_saved_pc): Remove prototype.
- * config/i386/tm-go32.h (FRAME_CHAIN,
- FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines.
- (i386go32_frame_saved_pc): Remove prototype.
- (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
- (get_longjmp_target): Remove prototype.
- * i386-tdep.h: Include "osabi.h".
- (enum i386_abi): Removed.
- (enum struct_return): New enum.
- (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset,
- struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and
- sc_pc_offset members.
- (i386_gdbarch_register_os_abi): Remove prototype.
- (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS,
- I386_SSE_NUM_REGS): New defines.
- (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS,
- I386_SSE_SIZEOF_REGS): New defines.
- (i386_register_name, i386_register_byte, i386_register_raw_size):
- New prototypes.
- (i386_elf_init_abi, i386_svr4_init_abi): New prototypes.
- (i386bsd_sigtramp_saved_pc): New prototype.
- * i386-tdep.c: Don't include "elf-bfd.h".
- (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum,
- i386_frame_chain, i386_saved_pc_after_call): Make static.
- (i386_frame_saved_pc): Rewrite to call architecture dependent
- function to deal with signal handlers. Make static.
- (i386go32_frame_saved_pc): Removed.
- [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target):
- Removed.
- (i386_get_longjmp_target): New function.
- (default_struct_convention, pcc_struct_convention,
- reg_struct_convention, valid_conventions, struct_convention): New
- variables.
- (i386_use_struct_convention): New function.
- (i386v4_sigtramp_saved_pc): Renamed to
- i386_svr4_sigtramp_saved_pc. Made static. Moved.
- (i386_pc_in_sigtramp): New function.
- (i386_abi_names): Removed.
- (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD,
- ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD):
- Removed.
- (process_note_sections, i386_elf_abi_from_note, i386_elf_abi,
- i386_gdbarch_register_os_abi): Removed.
- (struct i386_abi_handler): Removed.
- (i386_abi_handler_list): Removed.
- (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New
- functions.
- (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi,
- i386_nw_init_abi): New functions.
- (i386_gdbarch_init): Rewritten to use generic OS ABI framework.
- Use set_gdbarch_xxx() calls instead of relying on macros for a
- number of calls.
- (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions.
- (_initialize_i386_tdep): Add new 'struct-convcention' command.
- Register the various architecture variants defined in this file.
-
-2002-06-14 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
- (struct main_type): Remove arg_types member. Update comments for
- struct field.
- (TYPE_ARG_TYPES): Remove.
- (TYPE_FN_FIELD_ARGS): Update.
- (smash_to_method_type): Update prototype.
-
- * c-typeprint.c (cp_type_print_method_args): Take method type
- instead of argument list. Use new argument layout. Simplify.
- (c_type_print_args): Use new argument layout. Simplify.
- (c_type_print_base): Update call to cp_type_print_method_args.
- * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
- argument; use die->type instead. Update call to
- smash_to_method_type.
- (read_structure_scope): Update call to dwarf2_add_member_fn.
- * gdbtypes.c (allocate_stub_method): Update comment.
- (smash_to_method_type): Take new NARGS and VARARGS arguments.
- Use new argument layout.
- (check_stub_method): Use new argument layout. Don't count
- void as an argument.
- (print_arg_types): Update comments. Use new argument layout.
- (recursive_dump_type): Don't print arg_types member.
- * hpread.c (hpread_read_struct_type): Use new argument layout.
- (fixup_class_method_type): Likewise.
- (hpread_type_lookup): Likewise.
- * stabsread.c (read_type): Update calls to read_args and
- smash_to_method_type.
- (read_args): Use new argument layout. Simplify.
- * valops.c (typecmp): Use new argument layout. Update parameters
- and comments. Simplify.
- (hand_function_call): Use new argument layout.
- (search_struct_method): Update call to typecmp.
- (find_overload_match): Use new argument layout.
-
-2002-06-13 Daniel Jacobowitz <drow@mvista.com>
-
- * NEWS: Mention multithreaded debug support for gdbserver.
-
-2002-06-13 Daniel Jacobowitz <drow@mvista.com>
-
- * MAINTAINERS: Mention NEWS.
-
-2002-06-13 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-tdep.c (PROC_SYMBOL): Add warning comment.
- (struct mips_objfile_private, compare_pdr_entries): New.
- (non_heuristic_proc_desc): Read the ".pdr" section if it
- is present.
-
-2002-06-12 Andrew Cagney <ac131313@redhat.com>
-
- * arm-tdep.c (arm_push_arguments): Rewrite using a two-pass loop.
- (arm_debug): New static variable.
- (_initialize_arm_tdep): Add ``set debug arm'' command.
-
-2002-06-12 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (sim_arm_h): Define.
- (arm-tdep.o): Add $(sim_arm_h) and $(gdb_assert_h).
- * arm-tdep.c: Include "gdb/sim-arm.h" and "gdb_assert.h".
- (arm_register_sim_regno): New function, map an internal REGNUM
- onto a simulator register number.
- (arm_gdbarch_init): Set register_sim_regno.
-
-2002-06-09 Aldy Hernandez <aldyh@redhat.com>
-
- * MAINTAINERS: Add self.
-
-2002-06-11 Jim Blandy <jimb@redhat.com>
-
- * source.c (source_info): Mention whether the symtab has
- information about preprocessor macros.
-
- Call the command `info macro', not `show macro'.
- * macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
- Fix error message.
- (_initialize_macrocmd): Register `info_macro_command' in
- `infolist', not `showlist'.
-
-2002-06-11 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-tdep.c (MIPS_FPU_TYPE, FP_REGISTER_DOUBLE, MIPS_EABI)
- (MIPS_LAST_FP_ARG_REGNUM, MIPS_LAST_ARG_REGNUM)
- (MIPS_DEFAULT_SAVED_REGSIZE, MIPS_REGS_HAVE_HOME_P)
- (MIPS_DEFAULT_STACK_ARGSIZE, GDB_TARGET_IS_MIPS64)
- (MIPS_DEFAULT_MASK_ADDRESS_P): Remove obsolete definitions. Define
- unconditionally.
- (set_mipsfpu_single_command, set_mipsfpu_double_command)
- (set_mipsfpu_none_command): Remove if (GDB_MULTI_ARCH).
- (_initialize_mips_tdep): Remove dead code.
- * config/mips/tm-irix5.h (MIPS_LAST_ARG_REGNUM)
- (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
- * config/mips/tm-irix6.h (MIPS_LAST_ARG_REGNUM)
- (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
- * config/mips/tm-mips.h (MIPS_EABI, MIPS_LAST_ARG_REGNUM,
- MIPS_LAST_FP_ARG_REGNUM): Remove.
-
-2002-06-11 Michal Ludvig <mludvig@suse.cz>
-
- * dwarf2cfi.c (unwind_tmp_obstack_init): New.
- (unwind_tmp_obstack_free, parse_frame_info)
- (update_context, cfi_read_fp, cfi_write_fp)
- (cfi_frame_chain, cfi_init_extra_frame_info)
- (cfi_virtual_frame_pointer): Use the above function.
- * dwarf2cfi.c: Reindented (using 'indent dwarf2cfi.c').
-
-2002-06-11 Corinna Vinschen <vinschen@redhat.com>
-
- * v850-tdep.c (v850_type_is_scalar): New function.
- (v850_use_struct_convention): Match current gcc implementation
- as close as possible.
- (v850_push_arguments): Fix stack_offset handling. Don't write
- struct_addr into register. This is done by v850_store_struct_return.
- (v850_extract_return_value): Care for structs.
- (v850_store_return_value): Ditto.
- (v850_store_struct_return): Actually write address.
-
-2002-06-11 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions
- without debug information too.
-
-2002-06-10 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (PRINT_FLOAT_INFO): Add frame and ui_file parameters.
- Make multi-arch pure.
- * gdbarch.h, gdbarch.c: Re-generate.
- * arm-tdep.c (arm_print_float_info): Update.
- * arch-utils.h (default_print_float_info): Update.
- * arch-utils.c (default_print_float_info): Update.
- * infcmd.c (float_info): Update call.
-
-2002-06-10 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (init.c): Move the call to _initialize_gdbtypes to
- the front of the initialize list.
-
-2002-06-10 Andrew Cagney <ac131313@redhat.com>
-
- * infrun.c (struct inferior_status): Replace fields
- selected_frame_address and selected_level with field
- selected_frame_id.
- (save_inferior_status): Update. Use get_frame_id.
- (struct restore_selected_frame_args): Delete.
- (restore_selected_frame): Update. Use frame_find_by_id.
- (restore_inferior_status): Update.
-
- * breakpoint.h (struct breakpoint): Change type of
- watchpoint_frame to frame_id.
- * breakpoint.c (insert_breakpoints): Use frame_find_by_id. Remove
- call to get_current_frame.
- (do_enable_breakpoint): Use frame_find_by_id. Remove call to
- get_current_frame.
- (watchpoint_check): Use frame_find_by_id.
-
- * frame.h (record_selected_frame): Delete declaration.
- * stack.c (record_selected_frame): Delete function.
-
- * frame.h (struct frame_id): Define.
- (get_frame_id): Declare.
- (frame_find_by_id): Declare.
- * frame.c (frame_find_by_id): New function.
- (get_frame_id): New function.
-
-2002-06-10 Andrey Volkov <avolkov@transas.com>
-
- * ser-e7kpc.c: Fix duplicated define and call of
- _initialize_ser_e7000pc
-
-2002-06-09 Daniel Jacobowitz <drow@mvista.com>
-
- * signals/signals.c (target_signal_from_host): Fix #ifdef
- SIGRTMIN case.
- (do_target_signal_to_host): Likewise.
-
-2002-06-09 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-tdep.c (mips_find_abi_section): New function.
- (mips_gdbarch_init): Call it.
-
-2002-06-09 Mark Kettenis <kettenis@gnu.org>
-
- * solib-svr4.c (init_fetch_link_map_offsets): Simply return
- legacy_fetch_link_map_offsets. Adjust comment to reflect reality
- after Andrew's 2002-06-08 gdbarch change.
-
-2002-06-09 Mark Kettenis <kettenis@gnu.org>
-
- * i386-linux-nat.c (suppy_gregset): Don't supply
- I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
- register cache.
- (fill_gregset): Don't fetch it under the same circumstances.
-
-2002-06-09 Andrew Cagney <cagney@redhat.com>
-
- * Makefile.in (callback_h): Define.
- (remote_sim_h): Update path to remote-sim.h.
- (remote-rdp.o): Add $(callback_h).
- (remote-sim.o): Use $(callback_h).
- * remote-sim.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
- * remote-rdp.c: Include "gdb/callback.h".
-
-2002-06-09 Mark Kettenis <kettenis@gnu.org>
-
- * osabi.h (gdb_osabi): Add GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
- * osabi.c (gdb_osabi_names): Add "DJGPP" and "NetWare".
-
-2002-06-08 Andrew Cagney <ac131313@redhat.com>
-
- * sparcl-tdep.c: Use __CYGWIN__ instead of __CYGWIN32__.
- * rdi-share/serpardr.c: Ditto.
- * rdi-share/unixcomm.c: Ditto.
- * rdi-share/serdrv.c: Ditto.
- * rdi-share/hostchan.h: Ditto.
- * rdi-share/hostchan.c: Ditto.
- * rdi-share/host.h: Ditto.
- * rdi-share/devsw.c: Ditto.
-
- * objfiles.h: Change type of obj_private to void pointer.
- * pa64solib.c: Update copyright. Don't include "assert.h", use
- strcmp instead of STREQ, use LONGEST, do not use PTR
- * somsolib.c: Ditto.
-
- * config/djgpp/fnchange.lst: Fix problems with bfd/elf32-i386.c,
- bfd/elf32-i386qnx.c, bfd/elf32-sh.c, bfd/elf32-sh64-nbsd.c,
- bfd/elf64-sh64-nbsd.c bfd/elf64-sh64.c.
-
-2002-06-08 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (GET_SAVED_REGISTER): Delete macro definition.
- (default_get_saved_register): Delete function.
- * gdbarch.sh (GET_SAVED_REGISTER): Set default to
- generic_unwind_get_saved_register.
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-06-08 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (FRAME_CHAIN_VALID): Set default to
- generic_func_frame_chain_valid.
- * gdbarch.h, gdbarch.c: Re-generate.
- * blockframe.c (generic_func_frame_chain_valid): Only check
- PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about
- passing FP to PC_IN_CALL_DUMMY.
- Fix PR gdb/360.
-
-2002-06-08 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (struct gdbarch_data): Add field init_p.
- (register_gdbarch_data): Initialize init_p.
- (gdbarch_data): Initialize data pointer using the init function.
- (init_gdbarch_data): Delete function.
- (gdbarch_update_p): Update.
- (initialize_non_multiarch): Update.
- (struct gdbarch): Add field initialized_p.
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-06-07 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-linux-nat.c (x86_64_fxsave_offset): New.
- (supply_fpregset, fill_fpregset): Don't call i387_*_fxsave,
- better do the things actually here.
- * x86-64-tdep.c (x86_64_register_name2nr): New.
- (x86_64_register_name): Renamed to x86_64_register_nr2name.
- (x86_64_gdbarch_init): Respect the above change.
- * x86-64-tdep.h (x86_64_register_name2nr)
- (x86_64_register_nr2name): Add prototypes.
- * config/i386/x86-64linux.mt (TDEPFILES): Remove i387-tdep.o.
-
-2002-06-06 Michael Snyder <msnyder@redhat.com>
-
- * d10v-tdep.c (d10v_push_arguments): Handle struct_return.
- Delete extra braces and re-indent.
- (d10v_store_return_value): Char return values
- must be shifted over by one byte in R0.
- (d10v_extract_return_value): Delete extra braces, re-indent.
-
-2002-06-06 Elena Zannoni <ezannoni@redhat.com>
-
- * d10v-tdep.c (d10v_read_sp, d10v_read_fp): Add prototype.
- (d10v_register_virtual_type): Make $fp and $sp be pointer to data.
- (d10v_integer_to_address): Rewrite.
- (d10v_frame_init_saved_regs): When reading fp and sp registers use
- the d10v specific functions which take care of converting to the
- correct space.
-
-2002-06-06 Elena Zannoni <ezannoni@redhat.com>
-
- * config/djgpp/fnchange.lst: Add testsuite files altivec-abi.c,
- altivec-abi.exp, altivec-regs.c, altivec-regs.exp.
-
-2002-06-02 Andrew Cagney <ac131313@redhat.com>
-
- * config/alpha/nm-linux.h: Add "config/" prefix to tm, nm and xm
- includes.
- * config/tm-linux.h: Ditto.
- * config/alpha/tm-alphalinux.h: Ditto.
- * config/arm/nm-linux.h, config/arm/tm-linux.h: Ditto.
- * config/arm/xm-nbsd.h, config/i386/nm-gnu.h: Ditto.
- * config/i386/nm-i386lynx.h, config/i386/nm-i386sol2.h: Ditto.
- * config/i386/nm-i386v4.h, config/i386/nm-i386v42mp.h: Ditto.
- * config/i386/nm-linux.h, config/i386/nm-m3.h: Ditto.
- * config/i386/nm-ptx4.h, config/i386/nm-x86-64.h: Ditto.
- * config/i386/tm-i386gnu.h, config/i386/tm-i386lynx.h: Ditto.
- * config/i386/tm-i386m3.h, config/i386/tm-i386sco5.h: Ditto.
- * config/i386/tm-i386v4.h, config/i386/tm-linux.h: Ditto.
- * config/i386/tm-ptx4.h, config/i386/tm-vxworks.h: Ditto.
- * config/i386/xm-i386v4.h, config/i386/xm-nbsd.h: Ditto.
- * config/i386/xm-ptx.h, config/i386/xm-ptx4.h: Ditto.
- * config/i960/tm-vx960.h, config/ia64/nm-aix.h: Ditto.
- * config/ia64/nm-linux.h, config/ia64/tm-aix.h: Ditto.
- * config/ia64/tm-linux.h, config/ia64/xm-aix.h: Ditto.
- * config/m68k/nm-linux.h, config/m68k/nm-m68klynx.h: Ditto.
- * config/m68k/nm-sysv4.h, config/m68k/tm-linux.h: Ditto.
- * config/m68k/tm-m68klynx.h, config/m68k/tm-m68kv4.h: Ditto.
- * config/m68k/tm-sun2os4.h, config/m68k/tm-sun3os4.h: Ditto.
- * config/m68k/tm-vx68.h, config/m68k/xm-m68kv4.h: Ditto.
- * config/m68k/xm-nbsd.h, config/m88k/nm-delta88v4.h: Ditto.
- * config/m88k/tm-delta88v4.h, config/m88k/xm-delta88v4.h: Ditto.
- * config/mips/nm-irix5.h, config/mips/nm-linux.h: Ditto.
- * config/mips/tm-linux.h, config/mips/tm-mips64.h: Ditto.
- * config/mips/tm-mipsm3.h, config/mips/tm-mipsv4.h: Ditto.
- * config/mips/tm-vxmips.h, config/mips/xm-irix5.h: Ditto.
- * config/mips/xm-mipsv4.h, config/ns32k/xm-nbsd.h: Ditto.
- * config/pa/nm-hppao.h, config/powerpc/nm-linux.h: Ditto.
- * config/powerpc/tm-linux.h, config/powerpc/tm-vxworks.h: Ditto.
- * config/powerpc/xm-aix.h, config/rs6000/nm-rs6000ly.h: Ditto.
- * config/rs6000/tm-rs6000ly.h, config/rs6000/xm-aix4.h: Ditto.
- * config/sh/tm-linux.h, config/sparc/nm-linux.h: Ditto.
- * config/sparc/nm-sparclynx.h, config/sparc/nm-sun4sol2.h: Ditto.
- * config/sparc/tm-linux.h, config/sparc/tm-sp64linux.h: Ditto.
- * config/sparc/tm-sp64sim.h, config/sparc/tm-sparclynx.h: Ditto.
- * config/sparc/tm-sun4os4.h, config/sparc/tm-sun4sol2.h: Ditto.
- * config/sparc/tm-vxsparc.h, config/sparc/xm-sun4sol2.h: Ditto.
-
-2002-05-04 Aidan Skinner <aidan@velvet.net>
-
- * ada-exp.tab.c: New file
- * ada-exp.y: New file
- * ada-lang.c: New file
- * ada-lang.h: New file
- * ada-lex.c: New file
- * ada-lex.l: New file
- * ada-tasks.c: New file
- * ada-typeprint.c: New file
- * ada-valprint.c: New file
-
-2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ppcnbsd-tdep.c (ppcnbsd_init_abi): Don't set
- use_struct_convention to ppc_sysv_abi_broken_use_struct_convention.
-
-2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/rs6000/aix4.mt (TDEPFILES): Use ppc-sysv-tdep.o
- insetead of ppc-linux-tdep.o.
- * config/rs6000/rs6000.mt (TDEPFILES): Likewise.
- * config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
-
-2002-06-02 Andrew Cagney <ac131313@redhat.com>
-
- 2002-05-07 Christian Groessler <chris@groessler.org>
- * z8k-tdep.c (z8k_print_register_hook): Fix display of 32 and 64
- bit register contents for little endian hosts.
-
-2002-06-01 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Mention that any `HP/UX reader' can be changed by
- any maintainer.
-
-2002-06-01 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.h: Regenerate.
-
-2002-06-01 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Add everyone to write-after-approval list.
-
-2002-06-01 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (frame_info): Use frame_register_unwind instead of
- saved_regs. Mention when the SP is on the stack or in a register.
-
- * frame.h (frame_register_unwind_ftype): Define. Document.
- (struct frame_info): Add field register_unwind and
- register_unwind_cache.
- (frame_register_unwind): Declare.
- (generic_unwind_get_saved_register): Declare.
-
- * frame.c (frame_register_unwind): New function.
- (generic_unwind_get_saved_register): New function.
-
- * blockframe.c (generic_call_dummy_register_unwind): New function.
- (frame_saved_regs_register_unwind): New function.
- (set_unwind_by_pc): New function.
- (create_new_frame): New function.
- (get_prev_frame): New function.
-
-2002-05-30 Andrew Cagney <ac131313@redhat.com>
-
- * a29k-share/: Delete directory.
- * remote-vx29k.c: Delete file.
-
-2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/djgpp/fnchange.lst: Add ns32knbsd-nat.c, ns32knbsd-tdep.c,
- ppcnbsd-nat.c, ppcnbsd-tdep.c, sparcnbsd-nat.c, and sparcnbsd-tdep.c.
-
-2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add sparc64nbsd-nat.c,
- sparcnbsd-nat.c, and sparcnbsd-tdep.c.
- (sparc64nbsd-nat.o)
- (sparcnbsd-nat.o)
- (sparcnbsd-tdep.o): New dependency lists.
- * NEWS: Note new UltraSPARC NetBSD native configuration.
- * configure.host (sparc64-*-netbsd*): New host.
- * configure.tgt (sparc-*-netbsdelf*)
- (sparc-*-netbsd*): Set gdb_target to nbsd.
- (sparc64-*-netbsd*): New target.
- * sparc64nbsd-nat.c: New file.
- * sparcnbsd-nat.c: New file.
- * sparcnbsd-tdep.c: New file.
- * sparcnbsd-tdep.h: New file.
- * config/sparc/nbsd.mt: New file.
- * config/sparc/nbsd64.mh: New file.
- * config/sparc/nbsd64.mt: New file.
- * config/sparc/nbsdaout.mh (NATDEPFILES): Remove corelow.o,
- sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
- (HOST_IPC): Remove.
- * config/sparc/nbsdaout.mt: Remove.
- * config/sparc/nbsdelf.mh (NATDEPFILES): Remove corelow.o,
- sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
- (HOST_IPC): Remove.
- * config/sparc/nbsdelf.mt: Remove.
- * config/sparc/nm-nbsd.h: Update copyright years. Remove all
- sparc-nat.c compatiblity defines.
- * config/sparc/tm-nbsd.h: Update copyright years. Include solib.h.
- (GDB_MULTI_ARCH): Set to GDB_MULTI_ARCH_PARTIAL.
- * config/sparc/tm-nbsd64.h: New file.
- * config/sparc/tm-nbsdaout.h: Remove.
- * config/sparc/xm-nbsd.h: Remove.
-
-2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (sparc-tdep.o): Add osabi.h to dependency list.
- * sparc-tdep.c: Include osabi.h.
- (gdbarch_tdep): Add osabi member.
- (_initialize_sparc_tdep): Use gdbarch_register.
- (sparc_gdbarch_init): Use generic OS ABI framework.
- (sparc_dump_tdep): New function.
-
-2002-05-30 Kevin Buettner <kevinb@redhat.com>
-
- * corefile.c (do_captured_read_memory_integer): Return non-zero
- result.
- (safe_read_memory_integer): Copy result of memory read when
- status is non-zero. Also, add comments.
-
-2002-05-20 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ppc_tdep_h): Define.
- (ppc-linux-nat.o)
- (ppc-linux-tdep.o)
- (rs6000-tdep.o): Use $(ppc_tdep_h).
- (ppc-sysv-tdep.o)
- (ppcnbsd-nat.o)
- (ppcnbsd-tdep.o): New dependency lists.
- * ppc-tdep.h: Use generic OS ABI framework.
- * ppc-linux-tdep.c (_initialize_ppc_linux_tdep)
- (ppc_linux_init_abi): New functions.
- (ppc_sysv_abi_broken_use_struct_convention)
- (ppc_sysv_abi_use_struct_convention)
- (ppc_sysv_abi_push_arguments): Move to...
- * ppc-sysv-tdep.c: ...here.
- * ppcnbsd-nat.c: Don't include gdbcore.h and regcache.h.
- * rs6000-tdep.c (process_note_abi_tag_sections)
- (get_elfosabi): Remove.
- (rs6000_gdbarch_init): Use generic OS ABI framework.
- (rs6000_dump_tdep): New function.
- (_initialize_rs6000_tdep): Use gdbarch_register.
- * config/powerpc/linux.mt (TDEPFILES): Add ppc-sysv-tdep.o.
- * config/powerpc/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
- * config/powerpc/aix.mt (TDEPFILES): Use ppc-sysv-tdep.o instead
- of ppc-linux-tdep.o.
- * config/powerpc/nbsd.mt (TDEPFILES): Likewise.
- * config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
- * config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
- * config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
- * config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
- * config/powerpc/vxworks.mt (TDEPFILES): Likewise.
-
-2002-05-29 Jim Blandy <jimb@redhat.com>
-
- * macroscope.c (default_macro_scope): Put `void' in empty argument
- list.
-
-2002-05-29 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (arch-utils.o): Add $(sim_regno_h).
- * arch-utils.c: Include "sim-regno.h".
- * gdbarch.sh: Don't include "sim-regno.h".
- * gdbarch.h, gdbarch.c: Regenerate.
- * sim-regno.h (legacy_register_sim_regno): Move declaration from
- here.
- * arch-utils.h (legacy_register_sim_regno): To here.
- * remote-sim.c (legacy_register_sim_regno): Move function from
- here.
- * arch-utils.c (legacy_register_sim_regno): To here.
-
-2002-05-28 Andrew Cagney <ac131313@redhat.com>
-
- * sim-regno.h: New file.
- * Makefile.in (sim_regno_h): Define.
- (d10v-tdep.o, remote-sim.o): Add dependency on $(sim_regno_h).
- * remote-sim.c: Include "sim-regno.h" and "gdb_assert.h".
- (legacy_register_sim_regno): New function.
- (one2one_register_sim_regno): New function.
- (gdbsim_fetch_register): Rewrite.
- (gdbsim_store_register): Only store a register when
- REGISTER_SIM_REGNO is valid.
- * d10v-tdep.c: Include "sim-regno.h".
- (d10v_ts2_register_sim_regno): Add legacy_regiter_sim_regno check.
- (d10v_ts3_register_sim_regno): Ditto.
- * gdbarch.sh: Include "sim-regno.h".
- (REGISTER_SIM_REGNO): Set default to legacy_register_sim_regno.
- * gdbarch.h, gdbarch.c: Regenerate.
- * arch-utils.h (default_register_sim_regno): Delete declaration.
- * arch-utils.c (default_register_sim_regno): Delete function.
-
-2002-05-28 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ppcnbsd-nat.c: Rewrite.
- * ppcnbsd-tdep.c: New file.
- * ppcnbsd-tdep.h: New file.
- * config/powerpc/nbsd.mh (NATDEPFILES): Remove corelow.o,
- solib.o, and solib-svr4.o.
- * config/powerpc/nbsd.mt (TDEPFILES): Add ppcnbsd-tdep.o,
- nbsd-tdep.o, and corelow.o.
-
-2002-05-28 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (--enable-gdb-build-warnings): Rewrite script to use
- `tr' and `sed'. Mention that `broken' targets are not expected to
- build.
-
-2002-05-27 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.c (x86_64_skip_prologue): Remove obsolete note.
- Let PC point right after the prologue before looking up symbols.
-
-2002-05-27 Martin M. Hunt <hunt@redhat.com>
-
- * i386-tdep.c (i386_register_virtual_type): Return
- builtin_type_vec128i for SSE registers.
-
- * gdbtypes.h (builtin_type_vec128i): Declare.
-
- * gdbtypes.c (build_builtin_type_vec128i): New function.
- (builtin_type_v2_double, builtin_type_v4_int64): New types.
- (builtin_type_vec128i): New type for SSE2 128-bit registers.
- (build_gdbtypes): Initialize new builtin vector types.
- (_initialize_gdbtypes): Register new vector types with gdbarch.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * MAINTAINERS: ns32k is not longer an obsolete candidate,
- since it has been multi-arch'd.
- * NEWS: Note that ns32k-*-* is now partial multi-arch.
- Move Alpha and VAX multi-arch news entries to same section
- as other multi-arch news.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ns32k-tdep.c: include gdbtypes.h, inferior.h, regcache.h,
- target.s, arch-utils.h, ns32k-tdep.h. Make many functions
- static. Rename some register numbers to put them in ns32k-tdep
- private namespace.
- (ns32k_get_saved_register, ns32k_gdbarch_init_32082,
- ns32k_gdbarch_init_32382, ns32k_gdbarch_init, ns32k_dump_tdep): New
- functions.
- (_initialize_ns32k_tdep): Use gdbarch_register.
- * ns32k-tdep.h: New file.
- * ns32knbsd-tdep.c: New file.
- * config/ns32k/nbsdaout.mt (TDEPFILES): Add ns32knbsd-tdep.o.
- * config/ns32k/tm-nbsd.h: Include "ns32k/tm-ns32k.h".
- (IN_SOLIB_CALL_TRAMPOLINE, REGISTER_NAME, NUM_REGS,
- REGISTER_BYTES, REGISTER_BYTE): Remove.
- * config/ns32k/tm-ns32k.h: New file.
- * config/ns32k/tm-umax.h: Remove.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ns32k-tdep.c (ns32k_saved_pc_after_call,
- ns32k_store_struct_return, ns32k_extract_return_value,
- ns32k_store_return_value, ns32k_extract_struct_value_address): New
- functions.
- * config/ns32k/tm-umax.h (SAVED_PC_AFTER_CALL): Define as
- ns32k_saved_pc_after_call.
- (STORE_STRUCT_RETURN): Define as ns32k_store_struct_return.
- (EXTRACT_RETURN_VALUE): Define as ns32k_extract_return_value.
- (STORE_RETURN_VALUE): Define as ns32k_store_return_value.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Define as
- ns32k_extract_struct_value_address.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ns32k-tdep.c (ns32k_call_dummy_words, sizeof_ns32k_call_dummy_words,
- ns32k_fix_call_dummy): New.
- * config/ns32k/tm-umax.h (CALL_DUMMY_WORDS): Define as
- ns32k_call_dummy_words.
- (SIZEOF_CALL_DUMMY_WORDS): Define as sizeof_ns32k_call_dummy_words.
- (CALL_DUMMY, CALL_DUMMY_LENGTH, CALL_DUMMY_ADDR,
- CALL_DUMMY_NARGS): Remove.
- (FIX_CALL_DUMMY): Define as ns32k_fix_call_dummy.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ns32k-tdep.c (ns32k_breakpoint_from_pc, ns32k_frame_chain,
- ns32k_frame_saved_pc, ns32k_frame_args_address,
- ns32k_frame_locals_address, ns32k_frame_init_saved_regs,
- ns32k_push_dummy_frame, ns32k_pop_frame): New functions.
- * config/ns32k/tm-nbsd.h (FRAME_SAVED_PC): Remove.
- * config/ns32k/tm-umax.h (INNER_THAN): Define as core_addr_lessthan.
- (BREAKPOINT_FROM_PC): Define as ns32k_breakpoint_from_pc.
- (BREAKPOINT): Remove..
- (FRAME_CHAIN): Define as ns32k_frame_chain.
- (FRAME_SAVED_PC): Define as ns32k_frame_saved_pc.
- (FRAME_ARGS_ADDRESS): Define as ns32k_frame_args_address.
- (FRAME_LOCALS_ADDRESS): Define as ns32k_frame_locals_address.
- (FRAME_FIND_SAVED_REGS): Remove.
- (FRAME_INIT_SAVED_REGS): Define as ns32k_frame_init_saved_regs.
- (PUSH_DUMMY_FRAME): Define as ns32k_push_dummy_frame.
- (POP_FRAME): Define as ns32k_pop_frame.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ns32k-tdep.c (ns32k_register_byte_32082,
- ns32k_register_byte_32382, ns32k_register_raw_size,
- ns32k_register_virtual_size, ns32k_register_virtual_type): New
- functions.
- * config/ns32k/tm-nbsd.h (REGISTER_BYTE): Define as
- ns32k_register_byte_32382.
- * config/ns32k/tm-umax.h: Update copyright years.
- (REGISTER_BYTE): Define as ns32k_register_byte_32082.
- (REGISTER_RAW_SIZE): Define as ns32k_register_raw_size.
- (REGISTER_VIRTUAL_SIZE): Define as ns32k_register_virtual_size.
- (REGISTER_VIRTUAL_TYPE): Define as ns32k_register_virtual_type.
- (ns32k_get_enter_addr): Fix prototype.
-
-2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * ns32k-tdep.c: Update copyright years.
- (ns32k_register_name_32082): New function.
- (ns32k_register_name_32382): Ditto.
- * config/ns32k/tm-nbsd.h (REGISTER_NAMES): Remove.
- (REGISTER_NAME): Define as ns32k_register_name_32382.
- * config/ns32k/tm-umax.h (REGISTER_NAMES): Remove.
- (REGISTER_NAME): Define as ns32k_register_name_32082.
-
-2002-05-24 Jim Blandy <jimb@redhat.com>
-
- * dwarf2read.c (free_line_header): Use xfree, not free.
-
-2002-05-24 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/djgpp/fnchange.lst: Add alphabsd-nat.c,
- alphabsd-tdep.c, mipsnbsd-nat.c, and mipsnbsd-tdep.c
-
-2002-05-23 Andrew Cagney <ac131313@redhat.com>
-
- * PROBLEMS: Mention s390 and FreeBSD 4.4 build problems.
-
-2002-05-23 Andrew Cagney <ac131313@redhat.com>
-
- From Ross Alexander at NEC Europe:
- * config/pa/hpux11w.mh (NATDEPFILES): Add solib.o.
-
-2002-05-23 Michael Snyder <msnyder@redhat.com>
-
- * cli/cli-dump.c (restore_command): Use parse_and_eval_long
- for input, rather than parse_and_eval_address.
-
-2002-05-23 Andrew Cagney <ac131313@redhat.com>
-
- * d10v-tdep.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".
- * Makefile.in (sim_d10v_h): Update definition.
-
-2002-05-24 Andrew Cagney <cagney@redhat.com>
-
- * d10v-tdep.c (d10v_gdbarch_init): Revert old code included in
- change `2002-05-22 Michael Snyder' below.
- (d10v_push_arguments): Ditto.
- (d10v_extract_return_value): Ditto.
-
-2002-05-23 Jim Blandy <jimb@redhat.com>
-
- * macrotab.c (check_for_redefinition): Don't complain if the new
- definition is the same as the previous one. Take more arguments
- to allow the comparison.
- (macro_define_object, macro_define_function): Pass more arguments
- to check_for_redefinition.
-
-2002-05-22 Michael Snyder <msnyder@redhat.com>
-
- * d10v-tdep.c: Change a few macros to enums for ease of debugging.
- (d10v_frame_chain_valid): Add PC_IN_CALL_DUMMY clause.
- (d10v_frame_saved_pc): Add PC_IN_CALL_DUMMY clause.
- (d10v_frame_chain): Bail immediately if PC_IN_CALL_DUMMY.
- Don't bail if return_pc is PC_IN_CALL_DUMMY.
- Add a temp variable to save a call (and a memory read).
- (d10v_init_extra_frame_info): Get fi->pc from callee's return_pc
- if possible (so that PC_IN_CALL_DUMMY will work).
-
-2002-05-22 Corinna Vinschen <vinschen@redhat.com>
-
- * MAINTAINERS: Remove status `OBSOLETE' from v850.
-
-2002-05-22 Michal Ludvig <mludvig@suse.cz>
-
- * dwarf2cfi.c (frame_state_for): Added safety check for a valid
- fde->cie_ptr.
- (dwarf2_build_frame_info): Corrected handling of eh_frame.
- (dwarf2_build_frame_info): Add offset to fde->initial_location
- so that frames of shared libraries are mapped correctly.
- (execute_stack_op): Change type of 'result' from ULONGEST to
- CORE_ADDR.
-
-2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/alpha/tm-nbsd.h: Include solib.h.
-
-2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Don't make
- assumptions about the host's byte order.
-
-2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (alphanbsd-tdep.o, shnbsd-tdep.o): Add solib-svr4.h
- to dependency list.
- * alphanbsd-tdep.c: Include solib-svr4.h.
- * shnbsd-tdep.c: Ditto.
-
-2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (armnbsd-tdep.o): Add solib-svr4.h and
- nbsd-tdep.h to dependency list.
- * configure.host (arm*-*-netbsdelf*, arm*-*-netbsd*,
- i[3456]86-*-netbsdaout*, i[3456]86-*-netbsd*, m68*-*-netbsd*,
- ns32k-*-netbsd*, sparc-*-netbsdaout*, sparc-*-netbsd*): Use
- nbsdaout.mh and nbsdelf.mh consistently.
- * configure.tgt (i[3456]86-*-netbsd*, m68*-*-netbsd*,
- ns32k-*-netbsd*, sparc-*-netbsdelf*, sparc-*-netbsd*) Use
- nbsdaout.mt and nbsdelf.mh consistently.
- * armnbsd-tdep.c: Include nbsd-tdep.h and solib-svr4.h.
- (arm_netbsd_elf_init_abi): Use set_solib_svr4_fetch_link_map_offsets
- to set nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
- * config/nm-nbsd.h: Garbage-collect SVR4_SHARED_LIBS. Move
- a.out shared library stuff from here...
- * config/nm-nbsdaout.h: ...to here.
- * config/tm-nbsd.h: Remove.
- * config/alpha/nm-nbsd.h (SVR4_SHARED_LIBS): Remove.
- * config/arm/nbsd.mh: Remove.
- * config/arm/nbsd.mt (TDEPFILES): Remove solib-sunos.o, add
- nbsd-tdep.o.
- * config/arm/nbsdaout.mh: New file.
- * config/arm/nbsdelf.mh: New file.
- * config/arm/nm-nbsdaout.h: New file.
- * config/i386/nbsd.mh: Remove.
- * config/i386/nbsd.mt: Remove.
- * config/i386/nbsdaout.mh: New file.
- * config/i386/nbsdaout.mt: New file.
- * config/i386/nbsdelf.mh (NAT_FILE): Use nm-nbsd.h.
- * config/i386/nbsdelf.mt (TM_FILE): Use tm-nbsd.h.
- * config/i386/nm-nbsd.h (REGISTER_U_ADDR,
- i386_register_u_addr): Remove.
- * config/i386/nm-nbsdaout.h: New file.
- * config/i386/nm-nbsdelf.h: Remove.
- * config/i386/tm-nbsd.h: Don't include config/tm-nbsd.h.
- (USE_STRUCT_CONVENTION): Remove.
- * config/i386/tm-nbsdaout.h: New file.
- * config/i386/tm-nbsdelf.h: Remove.
- * config/m68k/nbsd.mh: Remove.
- * config/m68k/nbsd.mt: Remove.
- * config/m68k/nbsdaout.mh: New file.
- * config/m68k/nbsdaout.mt: New file.
- * config/m68k/nm-nbsd.h: Use config/nm-nbsd.h.
- * config/m68k/nm-nbsdaout.h: New file.
- * config/m68k/tm-nbsd.h: Don't include config/tm-nbsd.h.
- (IN_SOLIB_CALL_TRAMPOLINE): Define.
- * config/ns32k/nbsd.mh: Remove.
- * config/ns32k/nbsd.mt: Remove.
- * config/ns32k/nbsdaout.mh: New file.
- * config/ns32k/nbsdaout.mt: New file.
- * config/ns32k/nm-nbsd.h: Include config/nm-nbsd.h.
- * config/ns32k/nm-nbsdaout.h: New file.
- * config/ns32k/tm-nbsd.h: Don't include config/tm-nbsd.h.
- (IN_SOLIB_CALL_TRAMPOLINE): Define.
- * config/powerpc/nm-nbsd.h: Include config/nm-nbsd.h.
- (SVR4_SHARED_LIBS): Remove.
- * config/powerpc/tm-nbsd.h: Dont' include config/tm-nbsd.h.
- * config/sparc/nbsd.mh: Remove.
- * config/sparc/nbsd.mt: Remove.
- * config/sparc/nbsdaout.mh: New file.
- * config/sparc/nbsdaout.mt: New file.
- * config/sparc/nbsdelf.mh (NAT_FILE): Use nm-nbsd.h.
- * config/sparc/nbsdelf.mt: New file.
- * config/sparc/nm-nbsdaout.h: New file.
- * config/sparc/nm-nbsdelf.h: Remove.
- * config/sparc/tm-nbsd.h: Don't include config/tm-nbsd.h.
- * config/sparc/tm-nbsdaout.h: New file.
-
-2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add mipsnbsd-nat.c and
- mipsnbsd-tdep.c
- (mipsnbsd-nat.o, mipsnbsd-tdep.o): New dependency lists.
-
-2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add shnbsd-tdep.c and
- shnbsd-nat.c.
- (shnbsd-tdep.o, shnbsd-nat.o): New dependency lists.
-
-2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * NEWS: Note new MIPS NetBSD native configuration.
- * configure.host (mips*-*-netbsd*): New host.
- * configure.tgt (mips*-*-netbsd*): New target.
- * mipsnbsd-nat.c: New file.
- * mipsnbsd-tdep.c: New file.
- * mipsnbsd-tdep.h: New file.
- * config/mips/nbsd.mh: New file.
- * config/mips/nbsd.mt: New file.
- * config/mips/nm-nbsd.h: New file.
- * config/mips/tm-nbsd.h: New file.
-
-2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (SFILES): Add osabi.c.
- (COMMON_OBS): Add osabi.o.
- (osabi.o): New dependency list.
- * osabi.c: New file.
- * osabi.h: New file.
- * doc/gdbint.texinfo: Document new generic OS ABI framework.
-
- * Makefile.in (alpha_tdep_h): Define and use instead of
- alpha-tdep.h.
- * alpha-tdep.c (alpha_abi_names, process_note_abi_tag_sections,
- get_elfosabi, alpha_abi_handler_list, alpha_gdbarch_register_os_abi):
- Remove.
- (alpha_gdbarch_init, alpha_dump_tdep): Use generic OS ABI framework.
- * alpha-tdep.h: Include osabi.h.
- (alpha_abi): Remove.
- (gdbarch_tdep): Use generic OS ABI framework.
- * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Use
- gdbarch_register_osabi.
- * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise.
- * alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise.
- * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise.
-
- * Makefile.in (sh_tdep_h): Add osabi.h.
- * sh-tdep.h (sh_osabi): Remove.
- (gdbarch_tdep): Use generic OS ABI framework.
- * sh-tdep.c (sh_osabi_names, process_note_abi_tag_sections,
- sh_osabi_handler_list, sh_gdbarch_register_os_abi): Remove.
- (sh_gdbarch_init, sh_dump_tdep): Use generic OS ABI framework.
- * shnbsd-tdep.c (_initialize_shnbsd_tdep): Use gdbarch_register_osabi.
-
- * Makefile.in (arm_tdep_h): Define and use instead of arm-tdep.h.
- * arm-linux-tdep.c (_initialize_arm_linux_tdep): Use
- gdbarch_register_osabi.
- * arm-tdep.c (arm_abi_names, process_note_abi_tag_sections,
- arm_abi_handler_list, arm_gdbarch_register_os_abi): Remove.
- (get_elfosabi): Rename to...
- (arm_elf_osabi_sniffer): ...this. Adjust to use generic OS
- ABI framework support routines.
- (arm_gdbarch_init): Use generic OS ABI framework.
- (arm_dump_tdep): Likewise.
- (_initialize_arm_tdep): Likewise.
- * arm-tdep.h: Include osabi.h.
- (arm_abi): Remove.
- (gdbarch_tdep): Remove arm_abi and abi_name members. Add
- osabi member.
- (arm_gdbarch_register_os_abi): Remove prototype.
- * armnbsd-tdep.c (arm_netbsd_aout_osabi_sniffer): New function.
- (_initialize_arm_netbsd_tdep): Use gdbarch_register_osabi.
-
- * Makefile.in (mips-tdep.o): Add osabi.h to dependency list.
- * mips-tdep.c: Include osabi.h.
- (gdbarch_tdep, mips_gdbarch_init, mips_dump_tdep): Use generic
- OS ABI framework.
-
-2002-05-20 Kazu Hirata <kazu@cs.umass.edu>
-
- * h8300-tdep.c: Fix formatting.
-
-2002-05-20 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
- printing vector registers.
-
-2002-05-19 Andrew Cagney <ac131313@redhat.com>
-
- From Fernando Nasser:
- * remote.c (remote_async_open_1): Re-throw the exception when the
- connection fails.
- (remote_cisco_open): Ditto.
- (remote_open_1): Ditto.
-
-2002-05-19 Andrew Cagney <ac131313@redhat.com>
-
- * remote.c (remote_start_remote_dummy): Add uiout parameter.
- (remote_start_remote): Add uiout parameter. Pass through to
- remote_start_remote_dummy.
- (remote_open_1): Use catch_exception instead of catch_errors.
- (remote_async_open_1): Ditto.
- (remote_cisco_open): Ditto.
-
-2002-05-19 Andrew Cagney <ac131313@redhat.com>
-
- * remote.c (remote_start_remote): Replace PTR with void pointer.
- (sigint_remote_twice_token, sigint_remote_token): Ditto. Make
- static.
-
-2002-05-18 Andrew Cagney <ac131313@redhat.com>
-
- * gdb_indent.sh: Allow the script to be run in the sim directory.
-
-2002-05-18 Mark Kettenis <kettenis@gnu.org>
-
- * config/i386/nm-cygwin.h (NO_PTRACE_H): Remove define.
- * config/i386/nm-go32.h (NO_PTRACE_H): Remove define.
-
- * corelow.c (core_open): Only call set_gdbarch_from_file if
- exec_bfd is NULL.
-
-2002-05-17 Andrey Volkov <avolkov@transas.com>
-
- * h8300-tdep.c: Add support of EXR register
- * config/h8300/tm-h8300.h: Ditto.
-
-2002-05-17 Andrey Volkov <avolkov@transas.com>
-
- * h8300-tdep.c: Add additional CCR flags (I,UI,H,U)
-
-2002-05-17 Andrey Volkov <avolkov@transas.com>
-
- * h8300-tdep.c: Change literal regnums to REGNO.
-
-2002-05-17 Jim Blandy <jimb@redhat.com>
-
- * NEWS: Note addition of macro support.
-
- Expand preprocessor macros in C expressions.
- * c-lang.h: #include "macroexp.h", for macro_lookup_ftype.
- (scan_macro_expansion, scanning_macro_expansion,
- finished_macro_expansion): New function declarations.
- (expression_macro_lookup_func, expression_macro_lookup_baton): New
- variable declarations.
- * parser-defs.h (expression_context_pc): New declaration.
- * parse.c (expression_context_pc): New variable.
- (parse_exp_1): Set expression_context_pc, as well as
- expression_context_block.
- * c-exp.y (yylex): If we're not already reading the result of a
- macro expansion, try to macro-expand the next token. When we're
- done scanning a macro expansion, switch back to the mainline text.
- Commas and `if's in a macro's expansion don't terminate the input.
- * c-lang.c: #include "macroscope.h" and "gdb_assert.h".
- (macro_original_text, macro_expanded_text,
- expression_macro_lookup_func, expression_macro_lookup_baton): New
- variables.
- (scan_macro_expansion, scanning_macro_expansion,
- finished_macro_expansion, scan_macro_cleanup, null_macro_lookup,
- c_preprocess_and_parse): New functions.
- (c_language_defn, cplus_language_defn, asm_language_defn): Call
- c_preprocess_and_parse, instead of c_parse.
- * Makefile.in (c_lang_h): Note that this #includes macroexp.h.
- (c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
-
-Fri May 17 14:26:19 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * sh-tdep.c (gdb_print_insn_sh64): Delete.
- (gdb_print_insn_sh): Just set info->endian and use print_insn_sh.
- (sh_gdbarch_init): Always use gdb_print_insn_sh.
-
-2002-05-17 Corinna Vinschen <vinschen@redhat.com>
-
- * NEWS: Add section for multi-arched targets. Add v850 to that section.
-
-2002-05-17 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (sh_tdep_h): Define and use.
- * config/sh/tm-sh.h (sh_osabi, sh_abi, gdbarch_tdep,
- register enum): Move to...
- * * sh-tdep.h: ...here.
- * sh-tdep.c: Include sh-tdep.h.
- * sh3-rom.c: Likewise.
- * shnbsd-tdep.c: Likewise.
-
-2002-05-16 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.c: Spelling fix in comment.
-
-2002-05-16 Jim Blandy <jimb@redhat.com>
-
- Add commands for manually expanding macros and showing their
- definitions.
- * macrocmd.c, macroscope.c, macroscope.h: New files.
- * Makefile.in (SFILES): Add macrocmd.c, macroscope.c.
- (macroscope_h): New variable.
- (HFILES_NO_SRCDIR): Add macroscope.h.
- (COMMON_OBS): Add macrocmd.o, macroscope.o.
- (macroscope.o, macrocmd.o): New rules.
-
- Teach the Dwarf 2 reader to read macro information.
- * dwarf2read.c: #include "macrotab.h".
- (dwarf_macinfo_buffer): New variable.
- (struct dwarf2_pinfo): New members: dwarf_macinfo_buffer, and
- dwarf_macinfo_size.
- (DWARF_MACINFO_BUFFER, DWARF_MACINFO_SIZE): New macros.
- (dwarf2_missing_macinfo_section, dwarf2_macros_too_long,
- dwarf2_macros_not_terminated, dwarf2_macro_outside_file,
- dwarf2_macro_unmatched_end_file, dwarf2_macro_malformed_definition,
- dwarf2_macro_spaces_in_definition): New complaints.
- (dwarf2_has_info): Initialize dwarf_macinfo_offset.
- (dwarf2_build_psymtabs): Read the .dwarf_macinfo section.
- (dwarf2_build_psymtabs_hard): Record the buffer and its size in
- the partial symbol table.
- (psymtab_to_symtab_1): Set the macinfo buffer and size globals
- from what's recorded in the partial symbol table.
- (read_file_scope): If the compilation unit has a
- `DW_AT_macro_info' attribute, read its macro information.
- * Makefile.in (dwarf2read.o): Depend on macrotab.h.
-
-2002-05-16 Daniel Jacobowitz <drow@mvista.com>
-
- Fix PR gdb/546
- * ser-tcp.c: Don't include <netinet/udp.h>.
-
-2002-05-16 Stephane Carrez <stcarrez@nerim.fr>
-
- * MAINTAINERS: Update my email address.
-
-2002-05-16 Richard Earnshaw <rearnsha@arm.com>
-
- * config/arm/nm-nbsd.h: Use "config/nm-nbsd.h" to include generic
- include file of the same name.
-
-2002-05-16 Corinna Vinschen <vinschen@redhat.com>
-
- * configure.tgt: Mark v850 as multi-arched.
- * config/v850/tm-v850.h: Remove file.
- * config/v850/v850.mt: Eliminate TM_FILE.
-
-2002-05-16 Corinna Vinschen <vinschen@redhat.com>
-
- * v850-tdep.c: Full multi-arch.
- * config/v850/tm-v850.h: Eliminate or move to v850-tdep.c everything.
- Define GDB_MULTI_ARCH to 2.
-
-2002-05-16 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-exp.y (current_type): New static variable.
- Carries the type of the expression at the position that is parsed.
- (push_current_type, pop_current_type): Two new functions. Used
- to store/restore current_type in expression on specific tokens.
- (search_field): New static variable. Set to one after parsing a point
- as at that point only a FIELDNAME token should be searched.
- (FIELDNAME): New token. After a point only a token belonging to
- current_type type definition is allowed.
- (all over token rules): reset and change current_type according
- to rules.
- (exp '[' rule): insert implicit array index field if
- exp is a pascal string type.
-
-2002-05-16 Corinna Vinschen <vinschen@redhat.com>
-
- * v850-tdep.c: Fix comment for v850_scan_prologue. Remove extra
- frame info. Use frame_info's saved_regs instead of matching member
- in extra_frame_info throughout.
- (v850_frame_init_saved_regs): New function.
- (v850_init_extra_frame_info): Move most functionality into
- v850_frame_init_saved_regs().
- * config/v850/tm-v850.h (EXTRA_FRAME_INFO): Remove definition.
- (v850_frame_find_saved_regs): Remove declaration.
- (FRAME_FIND_SAVED_REGS): Remove definition.
- (v850_frame_init_saved_regs): Add declaration.
- (FRAME_INIT_SAVED_REGS): Add definition.
-
-2002-05-16 Corinna Vinschen <vinschen@redhat.com>
-
- * v850-tdep.c: Begin multi-arch'ing v850.
- (v850_target_architecture_hook): Remove function.
- (v850_gdbarch_init): New function. Add code previously in
- v850_target_architecture_hook().
- (_initialize_v850_tdep): Don't set target_architecture_hook.
- Call register_gdbarch_init() instead.
-
-2002-05-16 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.h (struct cplus_struct_type): Remove args field.
- * hpread.c (hpread_read_struct_type): Remove assignments to args.
- (fixup_class_method_type): Likewise.
-
-2002-05-15 Jim Blandy <jimb@redhat.com>
-
- Add macro structures to GDB's symbol tables. Nobody puts anything
- in them yet.
- * symtab.h (struct symtab): New member: `macro_table'.
- * buildsym.h (pending_macros): New global variable.
- * buildsym.c: #include "macrotab.h".
- (buildsym_init): Initialize `pending_macros'.
- (end_symtab): If we found macro information while reading a CU's
- debugging info, do build a symtab structure for it. Make the
- symtab point to the macro information, and clear the
- `pending_macros' pointer which held it while we were reading the
- debug info.
- (really_free_pendings): Free any pending macro table.
- * objfiles.h (struct objfile): New member: `macro_cache'.
- * objfiles.c (allocate_objfile): Set allocate and free functions
- for the macro cache's objstack.
- (free_objfile): Empty the macro cache's obstack.
- * symfile.c (reread_symbols): Empty the macro cache's obstack, and
- set new allocate and free functions for it.
- * solib-sunos.c (allocate_rt_common_objfile): Set allocate and
- free functions for the macro cache's objstack. (Why is this
- function building its own objfile?)
- * symmisc.c (print_objfile_statistics): Print statistics on the
- macro bcache.
- * Makefile.in: Note that buildsym.o depends on macrotab.h.
-
-2002-05-15 Richard Earnshaw <rearnsha@arm.com>
-
- * config/arm/nm-nbsd.h: Use <> for include of config/nm-nbsd.h.
- (REGISTER_U_ADDR): Delete definition.
- (arm_register_u_addr): Delete declaration.
-
-2002-05-15 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-linux-tdep.c (ARM_LINUX_JB_PC): Renamed from JB_PC.
- (ARM_LINUX_JB_ELEMENT_SIZE): Likewise.
-
-2002-05-14 Andrew Cagney <ac131313@redhat.com>
-
- * regcache.c (register_valid): Revise comments refering to "Not
- available" and "unavailable".
- * frame.c (frame_register_read): Ditto.
- * findvar.c (value_of_register): Ditto.
-
-2002-05-15 Andrew Cagney <cagney@redhat.com>
-
- * Makefile.in (remote_sim_h): Replace remote-sim_h.
- (remote-sim.o): Update dependencies.
- (d10v-tdep.o): Specify dependencies.
- (sim_d10v_h): Define.
-
-2002-05-14 Jim Blandy <jimb@redhat.com>
-
- * macroexp.c (init_buffer, gather_arguments, expand): Use NULL, not 0.
- * macrotab.c (macro_lookup_inclusion, find_definition,
- new_macro_table): Same.
-
- * macroexp.c (currently_rescanning, expand): Use `strcmp () == 0',
- not `! strcmp ()'. This is a dubious improvement.
- * macrotab.c (macro_lookup_inclusion, find_definition): Same.
-
- * macrotab.c (macro_lookup_inclusion): Initialize `best_depth',
- although it's not necessary, to avoid a warning.
-
-2002-05-14 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.h: Update accessor macros to use TYPE_MAIN_TYPE.
- (TYPE_CONST, TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE): Use
- TYPE_INSTANCE_FLAGS.
- (struct main_type): New.
- (struct type): Move most members to struct main_type. Change
- cv_type and as_type to new type_chain member. Add instance_flags.
- (TYPE_MAIN_TYPE, TYPE_CHAIN, TYPE_INSTANCE_FLAGS): New macros.
- (TYPE_CV_TYPE, TYPE_AS_TYPE): Remove.
- (finish_cv_type): Remove prototype.
- * gdbtypes.c (alloc_type): Update comment. Allocate TYPE_MAIN_TYPE.
- Set TYPE_CHAIN.
- (alloc_type_instance): New function.
- (smash_type): New function.
- (make_pointer_type, make_reference_type, make_function_type)
- (smash_to_member_type, smash_to_method_type): Call smash_type.
- (make_qualified_type): New function.
- (make_type_with_address_space): Call make_qualified_type.
- (make_cv_type): Likewise.
- (finish_cv_type): Remove unnecessary function.
- (replace_type): Update comment. Copy TYPE_MAIN_TYPE.
- (recursive_dump_type): Dump TYPE_CHAIN and TYPE_INSTANCE_FLAGS;
- remove TYPE_CV_TYPE and TYPE_AS_TYPE.
- * c-typeprint.c (c_type_print_modifier): Use TYPE_INSTANCE_FLAGS.
- * dwarf2read.c (read_structure_scope): Don't call finish_cv_type.
- * hpread.c (hpread_read_struct_type): Likewise.
- * stabsread.c (read_struct_type): Likewise.
-
-2002-05-14 Elena Zannoni <ezannoni@redhat.com>
-
- * configure.tgt: Add a catch all sh* target, for cases like
- sh[2,3,4]-elf and sh-hms.
-
-2002-05-14 Keith Seitz <keiths@redhat.com>
-
- * event-loop.c (create_file_handler): Don't do anything but
- update data when we are given a fd which we are already
- monitoring.
-
-2002-05-14 Michal Ludvig <mludvig@suse.cz>
-
- * dwarf2cfi.c (context_cpy): Copy registers correctly.
- (update_context): Use __func__ in warnings.
-
-2002-05-14 Daniel Jacobowitz <drow@mvista.com>
-
- * ser-tcp.c: Include <netinet/udp.h>. Rename tcp_open
- and tcp_close to net_open and net_close.
- (net_open): Accept "udp:" and "tcp:" specifications. Connect
- using UDP if requested. Don't try to disable Nagle on UDP
- sockets.
- * remote.c (remote_serial_open): New function. Warn about UDP.
- (remote_open_1, remote_async_open_1, remote_cisco_open): Call it.
-
-2002-05-13 Elena Zannoni <ezannoni@redhat.com>
-
- * MAINTAINERS: List sh-elf as buildable with ,-Werror.
-
-2002-05-13 Elena Zannoni <ezannoni@redhat.com>
-
- * configure.tgt: Remove sh-hms target.
- * MAINTAINERS: Don't list sh-hms as a separate target.
-
-2002-05-13 Jim Blandy <jimb@redhat.com>
-
- Add first preprocessor macro-expansion files.
- * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files.
- * Makefile.in (SFILES): Add macrotab.c, macroexp.c.
- (splay_tree_h, macroexp_h, macrotab_h): New variable.
- (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h.
- (COMMON_OBS): Add macrotab.o, macroexp.o.
- (macroexp.o, macrotab.o): New rules.
-
-2002-05-13 Andrew Cagney <ac131313@redhat.com>
-
- * config/m88k/tm-m88k.h: Update copyright.
- (m88k_target_write_pc): Declare
- (TARGET_WRITE_PC): Redefine using m88k_target_write_pc.
- (M88K_NNPC_REGNUM): Rename NNPC_REGNUM.
- (SHIFT_INST_REGS): Update definition.
- * m88k-tdep.c (m88k_target_write_pc): New function. Implement
- using old definition of TARGET_WRITE_PC.
- * regcache.c (generic_target_write_pc): Delete code handling
- NNPC_REGNUM.
- * gdbarch.sh (NNPC_REGNUM): Delete.
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-05-13 Richard Earnshaw <rearnsha@arm.com>
-
- * builtin-regs.c (value_of_builtin_reg): Correctly calculate the
- builtin reg number.
-
-2002-05-13 Daniel Jacobowitz <drow@mvista.com>
-
- * ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary)
- (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref)
- (gen_address_of, gen_struct_ref, gen_repeat): Use type
- access macros.
- * c-typeprint.c (cp_type_print_method_args): Likewise.
- (c_type_print_args): Likewise.
- * d10v-tdep.c (d10v_push_arguments): Likewise.
- (d10v_extract_return_value): Likewise.
- * expprint.c (print_subexp): Likewise.
- * gdbtypes.c (lookup_primitive_typename): Likewise.
- (lookup_template_type, add_mangled_type, print_arg_types): Likewise.
- * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB)
- (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE)
- (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS)
- (TYPE_VECTOR): Likewise.
- * hpread.c (hpread_read_struct_type)
- (fix_static_member_physnames, fixup_class_method_type)
- (hpread_type_lookup): Likewise.
- * mdebugread.c (parse_symbol, parse_type): Likewise.
- * p-lang.c (is_pascal_string_type): Likewise.
- * valops.c (hand_function_call): Likewise.
- * x86-64-tdep.c (classify_argument): Likewise.
-
- * hpread.c (hpread_read_function_type)
- (hpread_read_doc_function_type): Call replace_type.
- * dstread.c (create_new_type): Delete.
- (decode_dst_structure, process_dst_function): Call alloc_type.
- Use type access macros.
-
-2002-05-12 Mark Kettenis <kettenis@gnu.org>
-
- * i387-tdep.c (i387_supply_fxsave): Skip the SSE registers if
- the're not supported by the current architecture.
- (i387_fill_fxsave): Likewise.
-
-2002-05-12 Fred Fish <fnf@redhat.com>
-
- * symfile.c (default_symfile_offsets): Arrange for uninitialized
- sect_index_xxx members to index the first slot in section_offsets
- if all of the section_offsets are zero.
-
-2002-05-12 Mark Kettenis <kettenis@gnu.org>
-
- * configure.tgt (sparc-*openbsd): Remove entry accidentially
- checked in with last change.
-
-2002-05-12 Mark Kettenis <kettenis@gnu.org>
-
- * configure.tgt (i[3456]86-*-unixware*, i[3456]86-*-unixware2*):
- Remove targets. These are canonicalized to i386-*-sysv4.2uw by
- config.sub.
-
-2002-05-12 Daniel Jacobowitz <drow@mvista.com>
-
- * Makefile.in: Update dependencies.
-
-2002-05-11 Andrew Cagney <ac131313@redhat.com>
-
- * language.c (local_hex_string_custom): Simplify. Do not depend
- on PRINTF_HAS_LONG_LONG or CC_HAS_LONG_LONG.
-
- * memattr.c (mem_info_command): Replace calls to
- longest_local_hex_string and longest_local_hex_string_custom.
- * buildsym.c (make_blockvector): Ditto.
- * solib.c (info_sharedlibrary_command): Ditto.
- * tracepoint.c (tracepoints_info): Ditto.
- * symtab.c (print_msymbol_info): Ditto.
-
- * language.c (local_hex_string): Delete.
- (local_hex_string_custom): Delete.
- (longest_local_hex_string): Rename to local_hex_string.
- (longest_local_hex_string_custom): Rename to
- local_hex_string_custom.
- * language.h (local_hex_string): Change parameter type to LONGEST.
- (local_hex_string_custom): Ditto.
- (longest_local_hex_string): Delete declaration.
- (longest_local_hex_string_custom): Ditto.
-
- * solib.c: Update copyright.
- * memattr.c: Update copyright.
-
-2002-05-11 Andrew Cagney <ac131313@redhat.com>
-
- * arch-utils.h (legacy_register_to_value): Declare.
- (legacy_value_to_register): Declare.
- (legacy_convert_register_p): Declare.
- * arch-utils.c (legacy_register_to_value): New function.
- (legacy_value_to_register): New function.
- (legacy_convert_register_p): New function.
-
- * gdbarch.sh (REGISTER_TO_VALUE): Define.
- (VALUE_TO_REGISTER): Define.
- (CONVERT_REGISTER_P): Define.
- * gdbarch.h, gdbarch.c: Regenerate.
-
- * valops.c (value_assign): Use CONVERT_REGISTER_P and
- VALUE_TO_REGISTER.
- * findvar.c (value_from_register): Use REGISTER_TO_VALUE and
- CONVERT_REGISTER_P.
-
-2005-05-11 Daniel Jacobowitz <drow@mvista.com>
- Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * Makefile.in: Update dependencies for valops.c.
- * valops.c: Include "gdb_assert.h".
- (typecmp): Skip THIS parameter to methods.
- (find_method_list): Remove static_memfuncp argument,
- update callers. Check for stub methods.
- (find_value_oload_method_list): Don't set *static_memfuncp.
- (find_overload_match): Don't check for stub methods. Assert
- that methods are not stubbed. Handle static methods.
- (value_find_oload_method_list): Remove static_memfuncp argument.
- * gdbtypes.c (check_stub_method): Do not add THIS pointer
- to the argument list for static stub methods.
- * value.h (value_find_oload_method_list): Update prototype.
-
-2002-05-11 Andrew Cagney <ac131313@redhat.com>
-
- * arch-utils.h (generic_register_size): Declare.
- (generic_register_raw_size, generic_register_virtual_size): Delete
- declarations.
- * arch-utils.c (generic_register_raw_size): Delete.
- (generic_register_size): New function.
- (generic_register_virtual_size): Delete.
-
- * gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Make
- default generic_register_size.
- * gdbarch.h, gdbarch.c: Re-generate.
-
- * d10v-tdep.c (d10v_gdbarch_init): Use generic_register_size for
- register_virtual_size.
- * x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
- * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
-
-2002-05-11 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (gdbarch_data): Add gdbarch parameter.
- * gdbarch.h, gdbarch.c: Regenerate.
- * gnu-v3-abi.c: Update copyright.
- (vtable_address_point_offset): Update.
- (gnuv3_rtti_type): Update.
- (gnuv3_baseclass_offset): Update.
- * solib-svr4.c (svr4_fetch_link_map_offsets): Update.
- (init_fetch_link_map_offsets): Update.
- * remote.c (get_remote_state): Update.
-
-2002-05-11 Daniel Jacobowitz <drow@mvista.com>
-
- * TODO: Remove value_headof/value_from_vtable_info comment.
- * printcmd.c (print_command_1): Don't call value_from_vtable_info.
- * values.c (value_headof, value_from_vtable_info): Delete.
- * value.h (value_from_vtable_info): Delete prototype.
-
-2002-05-11 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in: Replace gdb_assert.h with $(gdb_assert_h),
- gdb_string.h with $(gdb_string_h) and gdb_regex.h with
- $(gdb_regex_h).
- (gdb_assert_h): Define.
- (gdb_wait_h): Define.
- (gdb_regex_h): Define.
-
-2002-05-11 Daniel Jacobowitz <drow@mvista.com>
-
- From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>:
- * linespec.c (find_methods): Handle GCC 3.x template constructors.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * nbsd-tdep.c: Fix comment.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add nbsd-tdep.c.
- (alphanbsd-tdep.o): Add nbsd-tdep.h to dependency list.
- (nbsd-tdep.o): New dependency list.
- * alphanbsd-tdep.c: Don't include solib-svr4.h. Include
- nbsd-tdep.h.
- (alphanbsd_solib_svr4_fetch_link_map_offsets): Remove.
- (alphanbsd_init_abi): Use nbsd_lp64_solib_svr4_fetch_link_map_offsets.
- * nbsd-tdep.c: New file.
- * nbsd-tdep.h: New file.
- * shnbsd-tdep.c: Don't include solib-svr4.h. Include
- nbsd-tdep.h.
- (shnbsd_solib_svr4_fetch_link_map_offsets): Remove.
- (shnbsd_init_abi): Use nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
- * config/alpha/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
- * config/sh/nbsd.mt (TDEPFILES): Ditto.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/alpha/nbsd.mh (NATDEPFILES): Remove corelow.o.
- * config/alpha/nbsd.mt (TDEPFILES): Add corelow.o.
- * config/i386/nbsd.mh (NATDEPFILES): Remove corelow.o.
- * config/i386/nbsd.mt (TDEPFILES): Add corelow.o.
- * config/i386/nbsdelf.mh (NATDEPFILES): Remove corelow.o.
- * config/i386/nbsdelf.mt (TDEPFILES): Add corelow.o.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/i386/nbsd.mh (NATDEPFILES): Use line continuations.
- * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
- * config/m68k/nbsd.mh (NATDEPFILES): Likewise.
- * config/ns32k/nbsd.mh (NATDEPFILES): Likewise.
- * config/powerpc/nbsd.mh (NATDEPFILES): Likewise.
- * config/sparc/nbsd.mh (NATDEPFILES): Likewise.
- * config/sparc/nbsdelf.mh (NATDEPFILES): Likewise.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * i386nbsd-nat.c: Delete file. Move fetch_core_registers and
- fetch_elfcore_registers to...
- * i386nbsd-tdep.c: ...here.
- (i386nbsd_use_struct_convention): Rename to...
- (i386nbsd_aout_use_struct_convention): ...this.
- (i386nbsd_supply_reg): New function.
- (i386nbsd_fill_reg): New function.
- (fetch_core_registers): Use i386nbsd_supply_reg.
- (fetch_elfcore_registers): Likewise.
- (_initialize_i386nbsd_tdep): New function.
- * config/i386/nbsd.mh (NATDEPFILES): Remove i386nbsd-nat.o.
- * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
- * config/i386/nbsdelf.mt (TDEPFILES): Add i386nbsd-tdep.o.
- * config/i386/tm-nbsd.h (i386nbsd_use_struct_convention): Rename to...
- (i386nbsd_aout_use_struct_convention): ...this.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * shnbsd-nat.c (fetch_inferior_registers): Use shnbsd_supply_reg.
- (store_inferior_registers): Use shnbsd_fill_reg.
- * shnbsd-tdep.c (sh_nbsd_supply_registers,
- sh_nbsd_supply_register): Collapse into...
- (shnbsd_supply_reg): ...this.
- (sh_nbsd_fill_registers, sh_nbsd_fill_register): Collapse into...
- (shnbsd_fill_reg): ...this.
- (sh_nbsd_solib_svr4_fetch_link_map_offsets): Rename to...
- (shnbsd_solib_svr4_fetch_link_map_offsets): ...this.
- (fetch_core_registers): Use shnbsd_supply_reg.
- (fetch_elfcore_registers): Use shnbsd_supply_reg.
- (sh_nbsd_core_fns): Rename to...
- (shnbsd_core_fns): ...this.
- (sh_nbsd_elfcore_fns): Rename to...
- (shnbsd_elfcore_fns): ...this.
- (sh_nbsd_init_abi): Rename to...
- (shnbsd_init_abi): ...this.
- (_initialize_sh_nbsd_tdep): Rename to...
- (_initialize_shnbsd_tdep): ...this.
- * shnbsd-tdep.h (sh_nbsd_supply_registers,
- sh_nbsd_supply_register, sh_nbsd_fill_registers,
- sh_nbsd_fill_register): Remove prototypes.
- (shnbsd_supply_reg, shnbsd_fill_reg): Add prototypes.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Remove i387-nat.c.
- (i387-nat.o): Delete dependency list.
- (go32-nat.o): Change i387-nat.h to i387-tdep.h.
- (x86-64-linux-nat.o): Likewise.
- * i387-nat.c: Delete file, moving contents to...
- * i387-tdep.c: ...here.
- * i387-nat.h: Rename...
- * i387-tdep.h: ...to this.
- * go32-nat.c: Include i387-tdep.h instead of i387-nat.h.
- * i386-linux-nat.c: Likewise.
- * i386bsd-nat.c: Likewise.
- * i386gnu-nat.c: Likewise.
- * i386nbsd-nat.c: Likewise.
- * i386v4-nat.c: Likewise.
- * x86-64-linux-nat.c: Likewise.
- * config/i386/fbsd.mh (NATDEPFILES): Remove i387-nat.o.
- * config/i386/go32.mh (NATDEPFILES): Likewise.
- * config/i386/i386gnu.mh (NATDEPFILES): Likewise.
- * config/i386/i386sol2.mh (NATDEPFILES): Likewise.
- * config/i386/i386v42mp.mh (NATDEPFILES): Likewise.
- * config/i386/linux.mh (NATDEPFILES): Likewise.
- * config/i386/nbsd.mh (NATDEPFILES): Likewise.
- * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
- * config/i386/obsd.mh (NATDEPFILES): Likewise.
- * config/i386/x86-64linux.mh (NATDEPFILES): Likewise.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Remove alphanbsd-nat.c.
- (alphanbsd-nat.o): Remove dependency list.
- (alphanbsd-tdep.o): Add $(regcache_h) to dependency list.
- * alphanbsd-nat.c: Delete. Contents moved to...
- * alphanbsd-tdep.c: ...here.
- (_initialize_alphanbsd_tdep): Register core functions.
- * config/alpha/nbsd.mh (NATDEPFILES): Remove alphanbsd-nat.o.
-
-2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add alphabsd-tdep.c.
- (alphabsd-nat.o): Depend on alphabsd-tdep.h.
- (alphanbsd-nat.o): Likewise.
- (alphabsd-tdep.o): New dependency list.
- * alphabsd-nat.c (supply_gregset): Use alphabsd_supply_reg.
- (fill_gregset): Use alphabsd_fill_reg.
- (supply_fpregset): Use alphabsd_supply_fpreg.
- (fill_fpregset): Use alphabsd_fill_fpreg.
- (fetch_inferior_registers): Use struct reg and struct fpreg
- rather than gregset_t and fpregset_t. Use alphabsd_supply_reg
- and alphabsd_supply_fpreg.
- (store_inferior_registers): Use struct reg and struct fpreg
- rather than gregset_t and fpregset_t. Use alphabsd_fill_reg
- and alphabsd_fill_fpreg.
- * alphabsd-tdep.c: New file.
- * alphabsd-tdep.h: New file.
- * alphanbsd-nat.c (fetch_core_registers): Use alphabsd_supply_fpreg.
- (fetch_elfcore_registers): Use alphabsd_supply_reg and
- alphabsd_supply_fpreg.
- * config/alpha/fbsd.mt (TDEPFILES): Add alphabsd-tdep.o.
- * config/alpha/nbsd.mt (TDEPFILES): Likewise.
-
-2002-05-11 Eric Christopher <echristo@redhat.com>
-
- * mips-tdep.c (mips_double_register_type): Fix thinko.
- (mips_single_register_type): Ditto.
- * MAINTAINERS: Add self.
-
-2002-05-11 Mark Kettenis <kettenis@gnu.org>
-
- * i387-nat.c (i387_supply_register, i387_fill_fsave,
- i387_supply_fxsave, i387_fill_fxsave): Rewrite in order to do the
- right thing on architectures with different endianness and/or
- integer sizes.
-
-2002-05-10 Jason Thorpe <thorpej@wasabisystems.com>
-
- From Christian Limpach <chris@Pin.LU>
- * configure.in: Change sed expression which comments out
- NATDEPFILES to also comment out continuation lines.
- * configure: Regenerate.
-
-2002-05-10 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c: Clean up code erroneously reintroduced by previous
- big patch.
-
-2002-05-10 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c: Include correct file.
-
-2002-05-10 Elena Zannoni <ezannoni@redhat.com>
-
- New support for sh64-elf (sh5) target.
-
- * configure.tgt: For sh64-elf target, default to sh-elf.
-
- * config/sh/tm-sh.h (enum sh-abi): Possible ABI's.
- (struct gdbarch_tdep): Add new fields for new registers and ABI
- info.
-
- * sh-tdep.c: Include elf-bfd.h, elf/sh.h, gdb/sim-sh.h.
- (NUM_PSEUDO_REGS_SH_MEDIA, NUM_PSEUDO_REGS_SH_COMPACT,
- MSYMBOL_IS_SPECIAL, IS_ISA32_ADDR, MAKE_ISA32_ADDR,
- UNMAKE_ISA32_ADDR, IS_PTABSL_R18, IS_STS_R0, IS_STS_PR,
- IS_MOV_TO_R15, IS_MOV_R14, IS_STQ_R18_R14, IS_STQ_R18_R15,
- IS_STL_R18_R15, IS_STQ_R14_R15, IS_STL_R14_R15, IS_ADDIL_SP_MEDIA,
- IS_ADDI_SP_MEDIA, IS_ADDL_SP_FP_MEDIA, IS_ADD_SP_FP_MEDIA,
- IS_MOV_SP_FP_MEDIA, IS_MOV_R0, IS_MOVL_R0, IS_ADD_SP_R0,
- IS_MOV_R14_R0, IS_MEDIA_IND_ARG_MOV, IS_MEDIA_ARG_MOV,
- IS_MEDIA_MOV_TO_R14, IS_COMPACT_IND_ARG_MOV, IS_COMPACT_ARG_MOV,
- IS_COMPACT_MOV_TO_R14, IS_JSR_R0, IS_NOP): New macros.
- (sh_sh64_register_name, sh64_elf_make_msymbol_special,
- pc_is_isa32, sh_sh64_breakpoint_from_pc, look_for_args_moves,
- sh64_skip_prologue_hard_way, sh64_use_struct_convention,
- gdb_print_insn_sh64, translate_insn_rn, sh64_frame_chain,
- sh64_get_saved_pr, fpp_reg_base_num, is_media_pseudo,
- sh64_get_gdb_regnum, sh64_media_reg_base_num,
- sh64_compact_reg_base_num, translate_rn_to_arch_reg_num,
- sign_extend, sh64_nofp_frame_init_saved_regs,
- sh64_init_extra_frame_info, sh64_get_saved_register,
- sh64_extract_struct_value_address, sh64_pop_frame,
- sh64_push_arguments, sh64_extract_return_value,
- sh64_store_return_value, sh64_show_media_regs,
- sh64_show_compact_regs, sh64_show_regs, sh_sh64_register_byte,
- sh_sh64_register_raw_size, sh_sh64_register_virtual_size,
- sh_sh64_register_virtual_type,
- sh_sh64_register_convert_to_virtual,
- sh_sh64_register_convert_to_raw, sh64_pseudo_register_read,
- sh64_register_read, sh64_pseudo_register_write,
- sh64_register_write, do_fv_c_register_info, do_dr_c_register_info,
- do_r_c_register_info, do_fpp_register_info, do_cr_c_register_info,
- sh64_do_pseudo_register, sh_compact_do_registers_info,
- sh64_do_registers_info, sh_gdbarch_init): New functions.
-
-2002-05-10 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c (sh_breakpoint_from_pc): Add 'const' to return type.
-
-2002-05-10 Daniel Jacobowitz <drow@mvista.com>
-
- * linespec.c (decode_line_1): Check for a double quote after
- a filename correctly.
-
-2002-05-10 Jim Blandy <jimb@redhat.com>
-
- Properly track the size of the current objfile's .debug_line section.
- * dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size.
- (DWARF_LINE_SIZE): New macro.
- (dwarf2_build_psymtabs_hard): Record the line section's size in
- the partial symbol table.
- (psymtab_to_symtab_1): Restore dwarf_line_size from the partial
- symbol table.
-
-2002-05-10 Petr Sorfa <petrs@caldera.com>
-
- * ia64-tdep.c: Handle breakpoints on L instruction type
- in MLX instruction bundle by moving the breakpoint to
- the third slot (X instruction type) as L holds only data.
-
-2002-05-10 Kevin Buettner <kevinb@redhat.com>
-
- * dbxread.c (discarding_local_symbols_complaint): New complaint.
- (process_one_symbol): Complain about discarding local symbols
- due to a misplaced N_LBRAC entry.
-
-2002-05-09 Elena Zannoni <ezannoni@redhat.com>
-
- From Daniel Berlin <dan@cgsoftware.com>
- * linespec.c (find_toplevel_char): '<' and '>' also increase and
- decrease the depth we are at, in the case of templates.
-
-2002-05-09 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-tdep.c (mips_float_register_type): New function.
- (mips_double_register_type): New function.
- (mips_print_register): Use them.
- (do_fp_register_row): Likewise.
-
-2002-05-09 Daniel Jacobowitz <drow@mvista.com>
-
- * signals/signals.c (signals): Remove conditional compilation around
- Mach-specific signals. Move them to after TARGET_SIGNAL_DEFAULT.
- (target_signal_from_name): Loop until TARGET_SIGNAL_LAST.
-
-2002-05-09 Michael Snyder <msnyder@redhat.com>
-
- * remote-rdp.c (remote_rdp_can_run): Remove.
-
-2002-05-09 Tom Tromey <tromey@redhat.com>
-
- * jv-valprint.c (java_val_print): Handle `char' as a special case
- of TYPE_CODE_INT.
-
-2002-05-09 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.c (arm_scan_prologue): Accept strb r(0123),[r11,#-nn],
- strh r(0123),[r11,#-nn], str r(0123),[r11,#-nn], as well as
- strb r(0123),[sp,#nn], strh r(0123),[sp,#nn] and
- str r(0123),[sp,#nn].
- (arm_skip_prologue): Ditto. Also make disassembly
- order-independent by placing it in a loop.
-
-2002-05-06 Michael Snyder <msnyder@redhat.com>
-
- * stabsread.c (read_type): Add recognition for new attribute:
- "@V;" means that an array type is actually a vector.
- This is analogous to the vector flag that's been added to dwarf2.
-
-2002-05-09 Mark Kettenis <kettenis@gnu.org>
-
- * i386-tdep.h (i386_abi): New enum.
- (struct gdbarch_tdep): Replace os_ident member with abi.
- (i386_gdbarch_register_os_abi): New prototype.
- * i386-tdep.c (i386_abi_names): New array.
- (process_note_abi_tag_sections): Removed.
- (process_note_sections): New function.
- (i386_elf_abi_from_note, i386_elf_abi): New functions.
- (struct i386_abi_handler): New struct.
- (i386_abi_handler_list): New variable.
- (i386_gdbarch_register_os_abi): New function.
- (i386_gdbarch_init): Adapt for the changes given above.
-
-2002-05-08 Daniel Jacobowitz <drow@mvista.com>
-
- * gregset.h: Say "GNU/Linux".
-
-2002-05-08 Elena Zannoni <ezannoni@redhat.com>
-
- * gdbtypes.c : Add new builtin type for 64 bit vectors.
- (build_gdbtypes): Build builtin_type_v2_float.
- (_initialize_gdbtypes): Register new builtin type.
-
-2002-05-08 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (init_gdbarch_swap): Do not clear the swap section.
- (clear_gdbarch_swap): New function.
- (initialize_non_multiarch): Call.
- (gdbarch_update_p): Before calling init(), swap out and clear the
- existing architecture.
- * gdbarch.c: Regenerate.
-
-2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/djgpp/fnchange.lst: Add alphanbsd-nat.c and
- alphanbsd-tdep.c.
-
-2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
-
- * sh-nbsd-nat.c: Rename to...
- * shnbsd-nat.c: ...this.
- * sh-nbsd-tdep.c: Rename to...
- * shnbsd-tdep.c: ...this.
- * sh-nbsd-tdep.h: Rename to...
- * shnbsd-tdep.h: ...this.
- * config/sh/nbsd.mh: Use shnbsd-nat.o.
- * config/sh/nbsd.mt: Use shnbsd-tdep.o.
-
-2002-05-08 Richard Earnshaw <rearnsha@arm.com>
-
- * remote-rdi.c (_initializie_remote_rdi): Use ANSI-style string
- concatenation for command help messages.
-
-2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
-
- * NEWS: Note new sh*-*-netbsdelf* configuration.
- * configure.host: Set gdb_host_cpu to sh for all sh*.
- (sh*-*-netbsdelf*): New host.
- * configure.tgt: Set gdb_target_cpu to sh for all sh*.
- (sh*-*-netbsdelf*): New target.
- * sh-nbsd-nat.c: New file.
- * sh-nbsd-tdep.c: New file.
- * sh-nbsd-tdep.h: New file.
- * config/sh/nbsd.mh: New file.
- * config/sh/nbsd.mt: New file.
- * config/sh/nm-nbsd.h: New file.
- * config/sh/tm-nbsd.h: New file.
-
-2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
-
- * sh-tdep.c (sh_osabi_names): Declare.
- (process_note_abi_tag_sections): New function.
- (get_elfosabi): Ditto.
- (sh_gdbarch_register_os_abi): Ditto.
- (sh_dump_tdep): Ditto.
- _initialize_sh_tdep): Use gdbarch_register to register
- sh_gdbarch_init and sh_dump_tdep.
- * config/sh/tm-sh.h (sh_osabi): Declare.
- (gdbarch_tdep): Add sh_osabi and osabi_name members.
-
-2002-05-07 Andrew Cagney <ac131313@redhat.com>
-
- * arm-tdep.c (arm_skip_prologue): Handle generic dummy frames.
- (thumb_scan_prologue): Ditto.
- (arm_find_callers_reg): Ditto.
- (arm_frame_chain): Ditto.
- (arm_init_extra_frame_info): Ditto.
- (arm_frame_saved_pc): Ditto.
- (arm_pop_frame): Ditto.
- (arm_push_return_address): New function.
- (arm_gdbarch_init): Initialize use_generic_dummy_frames,
- call_dummy_location, call_dummy_breakpoint_offset_p,
- call_dummy_breakpoint_offset, call_dummy_p,
- call_dummy_stack_adjust_p, call_dummy_words,
- sizeof_call_dummy_words, call_dummy_start_offset,
- call_dummy_length, fix_call_dummy, pc_in_call_dummy,
- call_dummy_address, push_return_address and push_dummy_frame for
- generic dummy frames.
-
-2002-05-07 Jason Thorpe <thorpej@wasabisystems.com>
-
- * sh-tdep.c (sh_nofp_frame_init_saved_regs): Fix error in
- size computation for alloca.
- (sh_fp_frame_init_saved_regs): Likewise.
-
-2002-05-07 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE): Define.
- (ARM_MAX_REGISTER_VIRTUAL_SIZE): Define.
- * arm-tdep.c (arm_store_return_value): Use them.
- Use FP_REGISTER_RAW_SIZE when setting the FPA return value.
- * remote-rdp.c (remote_rdp_fetch_register): Use
- ARM_MAX_REGISTER_RAW_SIZE.
- (remote_rdp_store_register): Likewise.
-
-2002-05-07 Michal Ludvig <mludvig@suse.cz>
-
- * dwarf2cfi.c: Code cleanup, removed unused variables,
- added default labels to switch {} statements.
- * x86-64-tdep.c: Ditto.
- * x86-64-linux-nat.c: Ditto.
-
-2002-05-07 Jason Thorpe <thorpej@wasabisystems.com>
-
- * solib.h: Protect against multiple inclusion.
-
-2002-05-06 Jim Blandy <jimb@redhat.com>
-
- Add first preprocessor macro-expansion files.
- * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files.
- * Makefile.in (SFILES): Add macrotab.c, macroexp.c.
- (splay_tree_h, macroexp_h, macrotab_h): New variable.
- (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h.
- (COMMON_OBS): Add macrotab.o, macroexp.o.
- (macroexp.o, macrotab.o): New rules.
-
- Separate the job of reading the line number info statement program
- header (...expialidocious) out into its own function.
- * dwarf2read.c (struct line_head, struct filenames, struct
- directories): Replace with...
- (struct line_header): New structure, containing the full
- contents of the statement program header, including the
- include directory and file name tables.
- (read_file_scope): If we have line number info, instead of just
- calling dwarf_decode_lines to do all the work, call
- dwarf_decode_line_header first to get a `struct line_header'
- containing the data in the statement program header, and then
- pass that to dwarf_decode_lines, which will pick up where that
- left off. Be sure to clean up the `struct line_header' object.
- (dwarf_decode_line_header, free_line_header, add_include_dir,
- add_file_name): New functions.
- (dwarf_decode_lines): Move all the code to read the statement
- program header into dwarf_decode_line_header. Take the line
- header it built as the first argument, instead of the offset to
- the compilation unit's line number info. Use the new `struct
- line_header' type instead of the old structures. No need to do
- cleanups here now, since we don't allocate anything.
- (dwarf2_statement_list_fits_in_line_number_section,
- dwarf2_line_header_too_long): New complaints.
-
-2002-05-06 Elena Zannoni <ezannoni@redhat.com>
-
- * gdbtypes.c (init_vector_type): New function.
- (build_builtin_type_vec128): Simplify the representation of SIMD
- registers.
- (build_gdbtypes): Initialize new builtin vector types.
- (_initialize_gdbtypes): Register new vector types with gdbarch.
- (builtin_type_v4_float, builtin_type_v4_int32,
- builtin_type_v8_int16, builtin_type_v16_int8,
- builtin_type_v2_int32, builtin_type_v4_int16,
- builtin_type_v8_int8): New (renamed) SIMD types.
-
-2002-05-06 Mark Kettenis <kettenis@gnu.org>
-
- * i387-nat.c (i387_fill_fsave): Use regcache_collect.
- (i387_fill_fxsave): Likewise.
-
-2002-05-05 Alexandre Oliva <aoliva@redhat.com>
-
- * alpha-tdep.c (alpha_extract_return_value): Don't use
- non-constant array size in prototype.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- From Brian Taylor <briant at model dot com>:
- * ui-out.c (ui_out_field_core_addr): Use the function
- longest_local_hex_string_custom'to format addresses > 32 bits
- wide.
-
- * ui-out.c (ui_out_field_core_addr): Update comment.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (select_and_print_frame): Make static. Delete the
- parameter `level'.
- (func_command): Update call.
- (select_frame_command): Delete code computing the frame level.
- * frame.h (select_and_print_frame): Delete declaration.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-tdep.c (sparc_get_saved_register): Comment why
- get_prev_frame call is safe.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (select_frame): Delete level parameter.
- * stack.c (select_frame): Update. Use frame_relative_level to
- obtain the frame's level.
- (select_and_print_frame): Update call.
- (select_frame_command): Ditto.
- (up_silently_base): Ditto.
- (down_silently_base): Ditto.
- * ocd.c (ocd_start_remote): Ditto.
- * remote-rdp.c (remote_rdp_open): Ditto.
- * remote-mips.c (mips_initialize): Ditto.
- (common_open): Ditto.
- * remote-e7000.c (e7000_start_remote): Ditto.
- * m3-nat.c (select_thread): Ditto.
- * hppa-tdep.c (child_get_current_exception_event): Ditto.
- (child_get_current_exception_event): Ditto.
- * varobj.c (varobj_create): Ditto.
- (varobj_update): Ditto.
- (c_value_of_root): Ditto.
- * tracepoint.c (finish_tfind_command): Ditto.
- * corelow.c (core_open): Ditto.
- * arch-utils.c (generic_prepare_to_proceed): Ditto.
- * thread.c (info_threads_command): Ditto.
- (switch_to_thread): Ditto.
- * infrun.c (normal_stop): Ditto.
- (restore_selected_frame): Ditto.
- (restore_inferior_status): Ditto.
- * breakpoint.c (insert_breakpoints): Ditto.
- (watchpoint_check): Ditto.
- (bpstat_stop_status): Ditto.
- (do_enable_breakpoint): Ditto.
- * blockframe.c (flush_cached_frames): Ditto.
- (reinit_frame_cache): Ditto.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Host/Native): Add Jason Thorpe as NetBSD
- maintainer.
-
-2002-05-04 Jim Blandy <jimb@redhat.com>
-
- * gdbtypes.c (replace_type): Doc fix.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * valprint.c (strcat_longest): Delete commented out function.
- Update copyright.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Mark a29k as deleted.
- * NEWS: Mention that a29k was removed. Add OBSOLETE section.
- Move new configurations to the top.
- * configure.tgt: Remove a29k.
- * config/a29k/tm-vx29k.h: Delete.
- * config/a29k/vx29k.mt: Delete.
- * config/a29k/tm-a29k.h: Delete.
- * config/a29k/a29k-udi.mt: Delete.
- * config/a29k/a29k.mt: Delete.
- * a29k-tdep.c: Delete.
- * remote-udi.c: Delete.
- * remote-mm.c: Delete.
- * remote-eb.c: Delete.
- * remote-adapt.c: Delete.
- * Makefile.in: Remove obsolete code.
- * config/s390/s390x.mt: Ditto.
- * config/s390/s390.mt: Ditto.
- * config/sparc/sparclynx.mh: Ditto.
- * config/sparc/linux.mh: Ditto.
- * config/pa/hppaosf.mh: Ditto.
- * config/pa/hppabsd.mh: Ditto.
- * config/ns32k/nbsd.mt: Ditto.
- * config/mips/vr5000.mt: Ditto.
- * config/m68k/sun3os4.mh: Ditto.
- * config/m68k/nbsd.mt: Ditto.
- * config/m68k/m68klynx.mh: Ditto.
- * config/m32r/m32r.mt: Ditto.
- * config/i386/x86-64linux.mt: Ditto.
- * config/i386/nbsdelf.mt: Ditto.
- * config/i386/nbsd.mt: Ditto.
- * config/i386/i386lynx.mh: Ditto.
-
-2002-05-04 Andrew Cagney <ac131313@redhat.com>
-
- * target.c (debug_print_register): New function. Handle oversize
- registers.
- (debug_to_fetch_registers): Call.
- (debug_to_store_registers): Call.
-
-2002-05-03 Jim Blandy <jimb@redhat.com>
-
- * stabsread.c (cleanup_undefined_types): Use replace_type, not memcpy.
- (read_type): Doc fix.
- * gdbtypes.c (replace_type): Doc fix.
-
- * stabsread.c (multiply_defined_struct): New complaint.
- (read_struct_type): If the type we were passed isn't empty, or
- incomplete, don't read the new struct type into it; complain,
- and return the original type unchanged. Take a new `type_code'
- argument, which is the type code for the new type.
- (read_type): Rather than storing the type's type code here, pass
- it as an argument to read_struct_type, and let that take care of
- storing it. That way, we don't overwrite the original type code,
- so read_struct_type can use it to decide whether we're overwriting
- something we shouldn't.
- (complain_about_struct_wipeout): New function.
-
-2002-05-03 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh: Assert that gdbarch is non-NULL.
- * gdbarch.c: Regenerate.
-
-2002-05-03 Jason Merrill <jason@redhat.com>
-
- * gnu-v3-abi.c (gnuv3_rtti_type): If we get confused, just warn
- and return NULL.
+2003-01-02 Mark Kettenis <kettenis@gnu.org>
-2002-05-03 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.c (x86_64_dwarf2gdb_regno_map),
- (x86_64_dwarf2gdb_regno_map_length),
- (x86_64_dwarf2_reg_to_regnum): Added.
- (x86_64_gdbarch_init): Added registration of x86_64_dwarf2_reg_to_regnum.
- (x86_64_gdbarch_init): Renamed from i386_gdbarch_init.
- (_initialize_x86_64_tdep): Synced with the change above.
- (x86_64_skip_prologue): Reformulated message.
-
-2002-05-03 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * f-exp.y: Also use new prev_lexptr variable
- to improve error reporting. Based on Michael Snyder
- 2002-04-24 dated patch to c-exp.y.
- * jv-exp.y: Likewise.
- * m2-exp.y: Likewise.
-
-2002-05-02 Elena Zannoni <ezannoni@redhat.com>
-
- * valops.c (value_arg_coerce): Don't coerce arrays to pointers if
- we are dealing with vectors.
-
-2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * config/m68k/tm-nbsd.h: Obvious fix,
- correct machine name.
-
-2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-typeprint.c (pascal_type_print_base): Add support
- for TYPE_CODE_STRING and TYPE_CODE_BITSTRING.
-
-2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-lang.c (pascal_create_fundamental_type): Use TYPE_CODE_CHAR
- for fondamental pascal 'char' type.
-
-2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-lang.h (is_pascal_string_type): Declaration changed,
- new sixth argument of type char ** added.
- * p-lang.c (is_pascal_string_type): Implementation
- changed. Args length_pos, length_size, string_pos, char_size
- can now be NULL. New argument arrayname set to the field
- name of the char array. Return value set to char array
- field index plus one.
- * p-valprint.c (pascal_val_print): Adapt to new declaration of
- is_pascal_string_type function.
-
-2002-05-02 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (gdbarch_update_p): Revert 2002-05-02 Andrew Cagney
- <cagney@redhat.com> change.
- * gdbarch.c: Regenerate.
-
-2002-05-02 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (gdbarch_update_p): Swap out the old architecture
- before probing for a new one. Detect errorenous gdbarch_init
- functions.
- * gdbarch.c: Regenerate.
-
-2002-05-01 Andrew Cagney <cagney@redhat.com>
-
- * config/mn10200/tm-mn10200.h: Include "symfile.h" and "symtab.h".
- * config/mcore/tm-mcore.h: Ditto. Update copyright.
- * config/v850/tm-v850.h: Ditto. Update copyright.
-
-2002-04-30 Andrew Cagney <ac131313@redhat.com>
-
- * cris-tdep.c (cris_gdbarch_init): Use arches instead of
- current_gdbarch.
-
-2002-04-30 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.c: Whitespace clean-ups.
- (arm_skip_prologue): Fix thinko; two lines
- should have been removed as part of 4/24 change.
-
-2002-04-30 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-tdep.c: Added comment describing how fpscr register
- numbers were chosen.
-
-2002-04-30 Michael Snyder <msnyder@redhat.com>
-
- * gnu-nat.c (gnu_find_memory_regions): Fix merge botch.
-
-2002-04-29 Elena Zannoni <ezannoni@redhat.com>
-
- * hpread.c (DNTT_TYPE_VECTOR): Rename from TYPE_VECTOR.
- (DNTT_TYPE_VECTOR_LENGTH): Rename from TYPE_VECTOR_LENGTH.
- (hpread_symfile_init, hpread_lookup_type): Substitute throughout.
-
-2002-04-29 Kevin Buettner <kevinb@redhat.com>
-
- From Louis Hamilton <hamilton@redhat.com>:
- * rs6000-tdep.c (coff/xcoff.h, libxcoff.h): Include.
- * xcoffread.c (coff/xcoff.h, libxcoff.h): Likewise.
- * rs6000-tdep.c (rs6000_gdbarch_init): Use bfd_xcoff_is_xcoff64(),
- not bfd-private xcoff data, to determine wordsize.
- * xcoffread.c (read_xcoff_xymtab, read_symbol_lineno): Likewise.
-
-2002-04-29 Andrew Cagney <ac131313@redhat.com>
-
- GDB 5.2 released from 5.2 branch.
-
-2002-04-29 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-linux-nat.c (fill_gregset): Explicit cast to avoid warning.
- * x86-64-tdep.c (i386_gdbarch_init): Ditto.
- (x86_64_register_info_table): Added comments with register numbers.
-
-2002-04-29 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (rs6000_extract_return_value,
- rs6000_store_return_value): Handle returning vectors.
- (rs6000_gdbarch_init): Use
- ppc_sysv_abi_broken_use_struct_convention for native sysv cases.
- * ppc-linux-tdep.c (ppc_sysv_abi_broken_use_struct_convention):
- New function.
- (ppc_sysv_abi_use_struct_convention): Deal with functions returning
- vectors.
- (ppc_sysv_abi_push_arguments): Handle vector parameters.
- * ppc-tdep.h (ppc_sysv_abi_broken_use_struct_convention): Export.
-
-2002-04-24 Pierre Muller <ics.u-strasbg.fr>
-
- * hpread.c (hpread_psymtab_to_symtab_1,
- hpread_psymtab_to_symtab): Replace fprintf tab_to_s...)
- with fprintf_unfiltered (gdb_stderr,...).
-
-2002-04-24 Pierre Muller <ics.u-strasbg.fr>
-
- * remote-array.c (printf_monitor, write_monitor,
- array_insert_breakpoint, array_remove_breakpoint ):
- Replace fprintf (stderr,...
- with fprintf_unfiltered (gdb_stderr,....
- * remote-es.c: Likewise.
- * remote-os9k.c: Likewise.
- * remote-st.c: Likewise.
-
-2002-04-28 Andreas Schwab <schwab@suse.de>
-
- * config/s390/s390.mh (NATDEPFILES): Remove solib.o, add
- linux-proc.o and gcore.o.
-
-2002-04-26 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.c (x86_64_skip_prologue): Print note when debugging
- code without frame pointers.
-
-2002-04-26 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-tdep.c (sparc_gdbarch_init): Add comment explaining why
- ON_STACK is needed.
-
-2002-04-26 Ben Elliston <bje@redhat.com>
-
- * target.c (do_xfer_memory): Correct reference to the new option
- "trust-readonly-sections".
-
-2002-04-26 Elena Zannoni <ezannoni@redhat.com>
-
- * gdbtypes.h (TYPE_FLAG_VECTOR, TYPE_VECTOR): Define.
- * gdbtypes.c (recursive_dump_type): Output the vector flag.
- * dwarf2read.c (dwarf_attr_name): Handle new attribute for
- vectors.
- (read_array_type): Record the fact that this array type is really a
- vector (i.e. are passed in by value).
-
-2002-04-26 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.h (gdbarch_tdep): Add sigcontext_addr member.
- * alpha-tdep.c (alpha_sigcontext_addr): New function.
- (alpha_find_saved_regs): Use alpha_sigcontext_addr.
- (alpha_gdbarch_init): Initialize tdep->sigcontext_addr.
- * alpha-linux-tdep.c: Include frame.h.
- (alpha_linux_sigcontext_addr): New function.
- (alpha_linux_init_abi): Set tdep->sigcontext_addr to
- alpha_linux_sigcontext_addr.
- * alpha-osf1-tdep.c: Include gdbcore.h.
- (alpha_osf1_sigcontext_addr): New function.
- (alpha_osf1_init_abi): Set tdep->sigcontext_addr to
- alpha_osf1_sigcontext_addr.
- * config/alpha/tm-alpha.h (SIGCONTEXT_ADDR): Remove.
- * config/alpha/tm-alphalinux.h (SIGCONTEXT_ADDR): Remove.
-
-2002-04-26 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (selected_frame_level):
- (select_frame): Do not set selected_frame_level.
- * frame.h (selected_frame_level): Delete declaration.
-
-2002-04-26 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Only set
- convert_from_func_ptr-addr when AIX / PowerOpen.
-
-2002-04-25 Andrew Cagney <ac131313@redhat.com>
-
- * valops.c (hand_function_call): Call
- generic_save_call_dummy_addr.
- * frame.h (generic_save_call_dummy_addr): Declare.
- * blockframe.c (struct dummy_frame): Add fields call_lo and
- call_hi.
- (generic_find_dummy_frame): Check for PC in range call_lo to
- call_hi instead of entry_point_address.
- (generic_pc_in_call_dummy): Search the dummy frames for a PC in
- the call_lo to call_hi range. Allow for DECR_PC_AFTER_BREAK.
- (generic_save_call_dummy_addr): New function.
-
-2002-04-24 David S. Miller <davem@redhat.com>
-
- * sparc-tdep.c (sparc_gdbarch_skip_prologue): Kill, duplicates
- sparc_skip_prologue.
- (sparc_skip_prologue): Kill frameless_p arg, and use line number
- information to find prologue when possible.
- (sparc_prologue_frameless_p): Call examine_prologue directly.
- (sparc_gdbarch_init): Update set_gdbarch_skip_prologue call.
- * config/sparc/tm-sparc.h (sparc_skip_prologue): Update for killed
- second argument.
- (SKIP_PROLOGUE): Likewise.
-
-2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_skip_prologue_internal): Remove
- GDB_TARGET_HAS_SHARED_LIBS #ifdef and update comment to
- indicate that the condition it was testing is always true.
- * config/alpha/nm-linux.h (GDB_TARGET_HAS_SHARED_LIBS): Remove.
- * config/alpha/nm-nbsd.h (GDB_TARGET_HAS_SHARED_LIBS): Ditto.
- * config/alpha/nm-osf.h (GDB_TARGET_HAS_SHARED_LIBS): Ditto.
-
-2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.h (gdbarch_tdep): Add jb_pc and jb_elt_size members.
- * alpha-linux-tdep.c (alpha_linux_init_abi): Initialize
- tdep->jb_pc and tdep->jb_elt_size.
- * alpha-osf1-tdep.c (alpha_osf1_init_abi): Likewise.
- * alphafbsd-tdep.c (alphafbsd_init_abi): Likewise.
- * alphanbsd-tdep.c (alphanbsd_init_abi): Likewise.
- * alpha-nat.c (get_longjmp_target): Remove.
- (JB_ELEMENT_SIZE): Ditto.
- (JB_PC): Ditto.
- * alpha-tdep.c (alpha_get_longjmp_target): New function.
- (alpha_gdbarch_init): Default tdep->jb_pc to -1. If the
- OS ABI sets jb_pc to a valid value, set gdbarch_get_longjmp_target
- to alpha_get_longjmp_target.
- (alpha_dump_tdep): Report tdep->jb_pc and tdep->jb_elt_size.
- * config/alpha/nm-linux.h (GET_LONGJMP_TARGET): Remove.
- * config/alpha/nm-osf.h (GET_LONGJMP_TARGET): Remove.
-
-2002-04-25 Andrew Cagney <ac131313@redhat.com>
-
- * README: Update to GDB 5.2.
-
-2002-04-25 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (LC_ALL): Set to `c'.
-
-2002-04-25 Theodore A. Roth <troth@verinet.com>
-
- * avr-tdep.c: Ran through gdb_indent.sh.
-
-2002-04-25 Theodore A. Roth <troth@verinet.com>
-
- * MAINTAINERS: Add myself as AVR maintainer.
- * NEWS: Note new target avr.
-
-2002-04-25 Theodore A. Roth <troth@verinet.com>
-
- * Makefile.in: Add support for AVR target.
- * configure.tgt: Add support for AVR target.
- * avr-tdep.c: New file
- * config/avr/avr.mt: New file.
-
-2002-04-25 Theodore A. Roth <troth@verinet.com>
-
- * MAINTAINERS: Add myself to write-after-approval.
-
-2002-04-24 Pierre Muller <ics.u-strasbg.fr>
-
- * f-lang.c (get_bf_for_fcn): Replace fprintf (stderr,...
- with fprintf_unfiltered (gdb_stderr,....
-
-2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>
-
- Fix PR gdb/508.
- * symfile.c (add_filename_language): Fix wrong xrealloc size argument.
-
-2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-exp.y: Also use new prev_lexptr variable
- to improve error reporting. Based on Michael Snyder
- 2002-04-24 dated patch to c-exp.y.
-
-2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_breakpoint_from_pc): New function.
- (alpha_gdbarch_init): Set gdbarch_breakpoint_from_pc to
- alpha_breakpoint_from_pc. Set gdbarch_function_start_offset
- to 0.
- * config/alpha/tm-alpha.h: Remove forward decls of struct type
- and struct value.
- (FUNCTION_START_OFFSET): Remove.
- (BREAKPOINT): Ditto.
-
-2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
-
- * MAINTAINERS: Reflect that multi-arch is enabled for VAX.
- * NEWS: Ditto.
-
-2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-linux-tdep.c (alpha_linux_pc_in_sigtramp): New function.
- (alpha_linux_init_abi): Set gdbarch_pc_in_sigtramp to
- alpha_linux_pc_in_sigtramp.
- * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): New function.
- (alpha_osf1_init_abi): Set gdbarch_pc_in_sigtramp to
- alpha_osf1_pc_in_sigtramp.
- * alpha-tdep.c (alpha_osf_in_sigtramp): Remove.
- * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): New function.
- (alphafbsd_init_abi): Set gdbarch_pc_in_sigtramp to
- alphafbsd_pc_in_sigtramp.
- * alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): New function.
- (alphanbsd_init_abi): Set gdbarch_pc_in_sigtramp to
- alphanbsd_pc_in_sigtramp.
- * config/alpha/tm-alpha.h (IN_SIGTRAMP): Remove.
- * config/alpha/tm-alphalinux.h (IN_SIGTRAMP): Remove.
-
-2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/alpha/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
-
-2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add alphanbsd-nat.c and
- alphanbsd-tdep.c.
- (alphanbsd-nat.o): New dependency list.
- (alphanbsd-tdep.o): Ditto.
- * NEWS: Note new native NetBSD/alpha configuration.
- * alphanbsd-nat.c: New file.
- * alphanbsd-tdep.c: Ditto.
- * configure.host (alpha*-*-netbsd*): New host.
- * configure.tgt (alpha*-*-netbsd*): New target.
- * config/alpha/nbsd.mh: New file.
- * config/alpha/nbsd.mt: Ditto.
- * config/alpha/nm-nbsd.h: Ditto.
- * config/alpha/tm-nbsd.h: Ditto.
-
-2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add alpha-osf1-tdep.c.
- (alpha-osf1-tdep.o): New dependency list.
- * alpha-tdep.h (gdbarch_tdep): Add dynamic_sigtramp_offset
- and skip_sigtramp_frame members.
- * alpha-linux-tdep.c: Include gdbcore.h.
- (alpha_linux_sigtramp_offset): Change return type to LONGEST.
- (alpha_linux_init_abi): Initialize tdep->dynamic_sigtramp_offset.
- * alpha-osf1-tdep.c: New file.
- * alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Moved to
- alpha-osf1-dep.c.
- (alpha_frame_past_sigtramp_frame): New function.
- (alpha_dynamic_sigtramp_offset): Ditto.
- (alpha_proc_desc_is_dyn_sigtramp): Ditto.
- (alpha_set_proc_desc_is_dyn_sigtramp): Ditto.
- (ALPHA_PROC_SIGTRAMP_MAGIC): Define.
- (push_sigtramp_desc): Use alpha_set_proc_desc_is_dyn_sigtramp.
- (after_prologue): Use alpha_proc_desc_is_dyn_sigtramp.
- (find_proc_desc): Use alpha_dynamic_sigtramp_offset.
- (alpha_frame_chain): Use alpha_frame_past_sigtramp_frame.
- (alpha_init_extra_frame_info): Use alpha_proc_desc_is_dyn_sigtramp.
- (alpha_pop_frame): Use alpha_proc_desc_is_dyn_sigtramp.
- (alpha_gdbarch_init): Initialize tdep->dynamic_sigtramp_offset
- and tdep->skip_sigtramp_frame. Set gdbarch_skip_trampoline_code
- to find_solib_trampoline_target.
- * config/alpha/alpha-osf1.mt (TDEPFILES): Add alpha-osf1-tdep.o.
- * config/alpha/tm-alpha.h: Remove inclusion of regcache.h.
- (SKIP_TRAMPOLINE_CODE): Remove.
- (PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
- (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
- (DYNAMIC_SIGTRAMP_OFFSET): Ditto.
- (FRAME_PAST_SIGTRAMP_FRAME): Ditto.
- * config/alpha/tm-alphalinux.h (PROC_DESC_IS_DYN_SIGTRAMP): Remove.
- (PROC_SIGTRAMP_MAGIC): Ditto.
- (PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
- (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
- (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
- (DYNAMIC_SIGTRAMP_OFFSET): Ditto.
- (FRAME_PAST_SIGTRAMP_FRAME): Ditto.
-
-2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
-
- * NEWS: Note that Alpha targets are now multi-arch.
-
-2002-04-24 Michael Snyder <msnyder@redhat.com>
-
- * parser-defs.h (prev_lexptr): New external variable.
- * parse.c (parse_exp_1): Set prev_lexptr to null before
- calling the language-specific parser.
- * c-exp.y (yylex): Set prev_lexptr to start of current token.
- (yyerror): Use prev_lexptr in error reporting.
-
-2002-04-24 Daniel Jacobowitz <drow@mvista.com>
-
- * config/i386/tm-linux.h: Define FILL_FPXREGSET.
- * gregset.h: If FILL_FPXREGSET is defined, provide
- gdb_fpxregset_t, supply_fpxregset, and fill_fpxregset.
- * linux-proc.c (linux_do_thread_registers): If FILL_FPXREGSET
- is defined, call fill_fpxregset.
-
-2002-04-24 Roland McGrath <roland@frob.com>
-
- * config/i386/i386gnu.mh (NATDEPFILES): Add core-regset.o here.
- * i386gnu-nat.c [HAVE_SYS_PROCFS_H]
- (supply_gregset, supply_fpregset): New functions.
-
- * gnu-nat.c (gnu_find_memory_regions): New function.
- (init_gnu_ops): Set `to_find_memory_regions' hook to that.
- (gnu_xfer_memory): Add a cast.
-
-2002-04-24 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.c (arm_scan_prologue): Move "mov ip, sp" into the
- loop. Add handling for "str lr, [sp, #-4]!" and for saves
- of argument regs ("str r(0123), [r11, #-nn"]).
- (arm_skip_prologue): Better handling for frameless functions.
- Treat "mov ip, sp" as optional. Recognize "str lr, [sp, #-4]".
- (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].
-
-Wed Apr 24 14:22:21 2002 Andrew Cagney <cagney@redhat.com>
-
- * arm-tdep.c (arm_gdbarch_init): Add comment that NUM_REGS nor
- NUM_PSEUDO_REGS can be used.
-
-2002-04-24 Andrew Cagney <ac131313@redhat.com>
-
- * arch-utils.h: Update copyright.
-
- * gdbarch.sh (PC_IN_SIGTRAMP): Add.
- * gdbarch.h, gdbarch.c: Re-generate.
-
- * inferior.h (IN_SIGTRAMP): Delete definition.
- * arch-utils.c (legacy_pc_in_sigtramp): New function.
- * arch-utils.h (legacy_pc_in_sigtramp): Declare.
-
- * mips-tdep.c (mips_init_extra_frame_info): Use PC_IN_SIGTRAMP.
- (mips_dump_tdep): Do not print value of IN_SIGTRAMP.
- * hppa-tdep.c (pc_in_interrupt_handler): Use PC_IN_SIGTRAMP.
- (find_proc_framesize): Ditto.
- * alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Ditto.
- (alpha_init_extra_frame_info): Ditto.
- * infrun.c (handle_inferior_event): Ditto.
- (handle_inferior_event): Ditto.
- (check_sigtramp2): Ditto.
- * blockframe.c (create_new_frame): Ditto.
- (get_prev_frame): Ditto.
- * ppc-linux-tdep.c: Update comments.
- * i386-linux-tdep.c: Update comments.
- * breakpoint.c (bpstat_what): Update comment.
-
-2002-04-24 David S. Miller <davem@redhat.com>
-
- * i960-tdep.c (register_in_window_p): New function.
- (i960_find_saved_register): Use it instead of
- REGISTER_IN_WINDOW_P.
- * config/i960/tm-i960.h (REGISTER_IN_WINDOW): Delete.
-
- * symtab.h (find_stab_function_addr): Kill extern.
- * minsyms.c (find_stab_function_addr): Remove from here...
- * dbxread.c: ... to here, and mark it static.
-
-2002-04-20 David S. Miller <davem@redhat.com>
-
- * sparc-tdep.c (sparc_pop_frame): Only need to allocate
- SPARC_INTREG_SIZE * 16 bytes for reg_temp.
-
-2002-04-21 David S. Miller <davem@redhat.com>
-
- * remote-vxsparc.c (vx_read_register): Fix typo, we want
- REGISTER_RAW_SIZE of SP_REGNUM not CORE_ADDR.
- (vx_write_register): Likewise.
-
-2002-04-23 J. Brobecker <brobecker@gnat.com>
-
- * source.c (is_regular_file): New function.
- (openp): Check wether file to open is a regular file
- to avoid opening directories.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * findvar.c (extract_signed_integer): Cast printf argument
- to suppress format warning.
- (extract_unsigned_integer): Likewise.
- * infcmd.c (registers_info): Likewise.
- * top.c (get_prompt_1): Likewise.
- * valops.c (value_assign): Likewise.
- * valprint.c (print_decimal): Likewise.
-
-2002-04-22 H.J. Lu (hjl@gnu.org)
-
- * c-exp.y (typebase): Support
-
- [long|long long|short] [signed|unsigned] [int|]
-
- and
-
- signed [long|long long|short] int
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (vax-tdep.o): Add $(arch_utils_h), $(inferior_h),
- and vax-tdep.h.
- * vax-tdep.h: New file.
- * vax-tdep.c: Include inferior.h, arch-utils.h, and vax-tdep.h.
- Make several routines static.
- (vax_get_saved_register): New function.
- (vax_gdbarch_init): New function.
- (_initialize_vax_tdep): Register vax_gdbarch_init.
- * config/vax/tm-vax.h: Set GDB_MULTI_ARCH to GDB_MULTI_ARCH_PARTIAL.
- Remove macros now under the control of gdbarch.
-
-2002-04-22 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.c (arm_skip_prologue): Recognize "sub sp, sp, #nn".
- Some whitespace and coding standards tweaks.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * vax-tdep.c: Include regcache.h.
- (vax_call_dummy_words): New.
- (sizeof_vax_call_dummy_words): New.
- (vax_fix_call_dummy): New function.
- (vax_saved_pc_after_call): Ditto.
- * config/vax/tm-vax.h: Don't include regcache.h.
- (SAVED_PC_AFTER_CALL): Use vax_saved_pc_after_call.
- (CALL_DUMMY): Remove.
- (CALL_DUMMY_WORDS): Define.
- (SIZEOF_CALL_DUMMY_WORDS): Define.
- (FIX_CALL_DUMMY): Use vax_fix_call_dummy.
-
-2002-04-18 Michael Snyder <msnyder@redhat.com>
-
- * arm-tdep.h: Change regnum defines to enums for ease of debugging.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * vax-tdep.c (vax_frame_chain): New function.
- (vax_push_dummy_frame): Ditto.
- (vax_pop_frame): Ditto.
- * config/vax/tm-vax.h (FRAME_CHAIN): vax_frame_chain.
- (FRAMELESS_FUNCTION_INVOCATION): Use
- generic_frameless_function_invocation_not.
- (PUSH_DUMMY_FRAME): Use vax_push_dummy_frame.
- (POP_FRAME): Use vax_pop_frame.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * vax-tdep.c (vax_store_struct_return): New function.
- (vax_extract_return_value): Ditto.
- (vax_store_return_value): Ditto.
- (vax_extract_struct_value_address): Ditto.
- * config/vax/tm-vax.h (STORE_STRUCT_RETURN): Use
- vax_store_struct_return.
- (EXTRACT_RETURN_VALUE): Use vax_extract_return_value.
- (STORE_RETURN_VALUE): Use vax_store_return_value.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Use vax_extract_struct_value_address.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * vax-tdep.c (vax_frame_saved_pc): New function.
- (vax_frame_args_address_correct): Ditto.
- (vax_frame_args_address): Ditto.
- (vax_frame_locals_address): Ditto.
- (vax_frame_num_args): Move code to be in proximity to
- other frame-related functions.
- * config/vax/tm-vax.h (INNER_THAN): Use core_addr_lessthan.
- (FRAME_SAVED_PC): Use vax_frame_saved_pc.
- (FRAME_ARGS_ADDRESS_CORRECT): Use vax_frame_args_address_correct.
- (FRAME_ARGS_ADDRESS): Use vax_frame_args_address.
- (FRAME_LOCALS_ADDRESS): Use vax_frame_locals_address.
-
-2002-04-22 H.J. Lu (hjl@gnu.org)
-
- * Makefile.in (FLAGS_TO_PASS): Add libdir, mandir, datadir and
- includedir.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * vax-tdep.c (vax_frame_init_saved_regs): New function.
- * config/vax/tm-vax.h (FRAME_FIND_SAVED_REGS): Remove.
- (FRAME_INIT_SAVED_REGS): New macro.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * MAINTAINERS: Reflect that the Alpha target has been multi-arch'd.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-nat.c (get_longjmp_target): Use ALPHA_* constants
- where needed.
- (fetch_osf_core_registers): Likewise.
- (supply_gregset): Likewise.
-
-2002-04-22 J. Brobecker <brobecker@gnat.com>
-
- * symfile.h (get_section_index): Define.
- * symfile.c (get_section_index): New function.
- * mdebugread.c (SC_IS_SBSS): New macro.
- (SC_IS_BSS): Return true for the scBss storage class only, as
- the scSBss storage class refers to the .sbss section.
- (parse_partial_symbols): Discard the symbols which associated
- section does not exist.
- Make sure to use the .sbss section index for symbols which
- storage class is scBss, rather than using the .bss section index.
-
-2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
-
- * vax-tdep.c: Update copyright years.
- (vax_register_name): New function.
- (vax_register_byte): Ditto.
- (vax_register_raw_size): Ditto.
- (vax_register_virtual_size): Ditto.
- (vax_register_virtual_type): Ditto.
- * config/vax/tm-vax.h: Update copyright years.
- (REGISTER_NAMES): Remove.
- (REGISTER_NAME): Define.
- (REGISTER_BYTE): Use vax_register_byte.
- (REGISTER_RAW_SIZE): Use vax_register_raw_size.
- (REGISTER_VIRTUAL_SIZE): Use vax_register_virtual_size.
- (REGISTER_VIRTUAL_TYPE): Use vax_register_virtual_type.
-
-2002-04-21 Andrew Cagney <ac131313@redhat.com>
-
- * config/sparc/tm-sparc.h (sparc_skip_prologue): Restore
- declaration
- * arc-tdep.c (arc_prologue_frameless_p): Fix syntax error.
-
-2002-04-21 David S. Miller <davem@redhat.com>
-
- * arch-utils.c (generic_prologue_frameless_p): Kill
- SKIP_PROLOGUE_FRAMELESS_P code.
- * config/arc/tm-arc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete
- references.
- (PROLOGUE_FRAMELESS_P, arc_prologue_frameless_p): New.
- * arc-tdep.c (arc_prologue_frameless_p): Implement.
- * config/arc/tm-sparc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete
- references.
- (PROLOGUE_FRAMELESS_P, sparc_prologue_frameless_p): New.
- * sparc-tdep.c (sparc_prologue_frameless_p): Implement.
- (sparc_gdbarch_init): Pass it to
- set_gdbarch_prologue_frameless_p.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add alphabsd-nat.c.
- (alphabsd-nat.o): New dependency list.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * Makefile.in (ALLDEPFILES): Add alpha-linux-tdep.c and
- alphafbsd-tdep.c.
- (alpha-linux-tdep.o): New dependency list.
- (alphafbsd-tdep.o): Likewise.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-linux-tdep.c: New file. Move alpha_linux_sigtramp_offset
- to here...
- * alpha-tdep.c: ...from here.
- * config/alpha/alpha-linux.mt (TDEPFILES): Add alpha-linux-tdep.o.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/alpha/tm-alpha.h: Move alpha_software_single_step
- prototype from here...
- * alpha-tdep.h: ...to here.
-
-2002-04-21 Andrew Cagney <ac131313@redhat.com>
-
- * frame.h (selected_frame_level): Document as deprecated.
- (frame_relative_level): Declare.
- * stack.c (frame_relative_level): New function.
- (selected_frame_level): Document as deprecated.
- (select_frame): Do not set the selected_frame_level.
-
- * stack.c (frame_info, record_selected_frame): Update.
- (frame_command, current_frame_command): Update.
- (up_silently_base, up_command, down_silently_base): Update.
- (down_command): Update.
- * inflow.c (kill_command): Update.
- * tracepoint.c (finish_tfind_command): Update.
- * corelow.c (core_open): Update.
- * thread.c (info_threads_command): Update.
- (do_captured_thread_select): Update.
- * infcmd.c (finish_command): Update.
- * breakpoint.c (insert_breakpoints, do_enable_breakpoint): Update.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/alpha/tm-fbsd.h (FRAME_CHAIN_VALID): Remove.
-
-2002-04-21 Andrew Cagney <ac131313@redhat.com>
-
- * arm-tdep.c (arm_breakpoint_from_pc): Make static. Make return
- type const.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alphafbsd-tdep.c: Update copyright years. Include
- alpha-tdep.h.
- (alphafbsd_use_struct_convention): Make static.
- (alphafbsd_init_abi): New function.
- (_initialize_alphafbsd_tdep): New function.
- * config/alpha/tm-fbsd.h: Update copyright years.
- (USE_STRUCT_CONVENTION): Remove.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_abi_handler): New structure to describe
- an Alpha ABI variant.
- (alpha_abi_handler_list): Declare.
- (alpha_gdbarch_register_os_abi): New function.
- (alpha_gdbarch_init): Give registered ABI variant handlers a
- chance to tweak the gdbarch once we have set up defaults.
- * alpha-tdep.h: Prototype alpha_gdbarch_register_os_abi.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_gdbarch_init): Set coerce_float_to_double
- to standard_coerce_float_to_double.
- * config/alpha/tm-alpha.h (COERCE_FLOAT_TO_DOUBLE): Remove.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.h (gdbarch_tdep): Add vm_min_address member.
- * alpha-tdep.c (heuristic_proc_start): Use vm_min_address
- from gdbarch_tdep rather than a constant.
- (alpha_gdbarch_init): Initialize tdep->vm_min_address to
- the default text address for all Alpha Unix ABIs.
- (alpha_dump_tdep): Report the value of tdep->vm_min_address.
- * config/alpha/tm-alpha.h (VM_MIN_ADDRESS): Delete.
-
-2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.h: New file. Includes several Alpha target constants
- taken from...
- * config/alpha/tm-alpha.h: ...here. Remove macros that we now
- let gdbarch deal with.
- (GDB_MULTI_ARCH): Define as GDB_MULTI_ARCH_PARTIAL.
- * Makefile.in (alpha-nat.o): Add alpha-tdep.h and $(BFD_SRC)/elf-bfd
- to dependency list.
- * alpha-nat.c: Include alpha-tdep.h. Update for adjusted
- Alpha target register names.
- * alphabsd-nat.c: Likewise.
- * alpha-tdep.c: Include alpha-tdep.h. Update for adjusted
- Alpha target register names. Make serveral routines static.
- (alpha_get_saved_register): New function.
- (alpha_abi_names): New.
- (process_note_abi_tag_sections): New function.
- (get_elfosabi): New function.
- (alpha_gdbarch_init): New function.
- (alpha_dump_tdep): New function.
- (_initialize_alpha_tdep): Register alpha_gdbarch_init.
-
-2002-04-21 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (find_saved_register): Delete #ifdef
- HAVE_REGISTER_WINDOWS code.
- * config/sparc/tm-sparc.h: Update comments.
- * config/i960/tm-i960.h (HAVE_REGISTER_WINDOWS): Delete macro.
-
-2002-04-21 Andrew Cagney <ac131313@redhat.com>
-
- * i960-tdep.c (i960_find_saved_register): New function.
- (i960_get_saved_register): New function.
- * config/i960/tm-i960.h (GET_SAVED_REGISTER): Define.
- (i960_get_saved_register): Declare.
- * config/i960/tm-i960.h, i960-tdep.c: Update copyright.
-
-2002-04-20 David S. Miller <davem@redhat.com>
-
- * sparc-nat.c (store-inferior_registers): Fix ambiguous else.
-
-2002-04-20 Andrew Cagney <ac131313@redhat.com>
-
- * arm-tdep.c (arm_gdbarch_init): Use gdbarch_num_pseudo_regs
- instead of NUM_PSEUDO_REGS.
-
-2002-04-20 David S. Miller <davem@redhat.com>
-
- * config/sparc/tm-linux.h (GDB_MULTI_ARCH): Define to
- GDB_MULTI_ARCH_PARTIAL
- * config/sparc/tm-sp64linux.h (GDB_MULTI_ARCH): Do not
- define, let tm-sp64.h do it.
-
-2002-04-20 Jason Thorpe <thorpej@wasabisystems.com>
-
- * frame.c (find_saved_register): Avoid a NULL pointer
- dereference and actually walk the frame list.
-
-2002-04-20 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (gdbarch_update_p): Keep the list of architectures
- sorted in most most-recent-used order. Document.
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-04-19 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-tdep.c (sparc_get_saved_register): Use get_prev_frame
- instead of ->prev.
- * z8k-tdep.c (z8k_frame_chain): Do not use ->prev.
- * s390-tdep.c (s390_frame_chain): Do not use ->prev.
- * rs6000-tdep.c (frame_get_saved_regs): Use rs6000_frame_chain()
- instead of ->prev.
-
-2002-04-19 Elena Zannoni <ezannoni@redhat.com>
-
- Fix PR gdb/471.
- * gdbtypes.c (init_simd_type): Rewrite using new functions.
- (build_builtin_type_vec128): Ditto.
- (append_composite_type_field): Fix calculation of type length in
- union case.
-
-2002-04-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * config/djgpp/README: Update.
-
- * go32-nat.c (store_register): Cast &a_tss to `char *' to avoid a
- compiler warnings.
-
-2002-04-19 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (setup_arbitrary_frame): Rename...
- (alpha_setup_arbitrary_frame): ...to this.
- * config/alpha/tm-alpha.h (SETUP_ARBITRARY_FRAME): Update
- for alpha_setup_arbitrary_frame.
-
-2002-04-18 Andrew Cagney <cagney@redhat.com>
-
- * gdbarch.sh (BREAKPOINT_FROM_PC): Return a const buffer.
- * gdbarch.h, gdbarch.c: Regenerate.
-
- * defs.h (breakpoint_from_pc_fn): Delete type definition.
- * target.h (memory_breakpoint_from_pc): Update declaration.
- * config/mcore/tm-mcore.h (mcore_breakpoint_from_p): Ditto.
-
- * arch-utils.c (legacy_breakpoint_from_pc): Update return type.
- * mcore-tdep.c (mcore_breakpoint_from_pc): Ditto.
- * mem-break.c (memory_breakpoint_from_pc): Ditto.
- * rs6000-tdep.c (rs6000_breakpoint_from_pc): Ditto.
- * s390-tdep.c (s390_breakpoint_from_pc): Ditto
- * xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Ditto.
- * mn10300-tdep.c (mn10300_breakpoint_from_pc): Ditto.
- * mips-tdep.c (mips_breakpoint_from_pc): Ditto.
- * m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Ditto.
- * ia64-tdep.c (ia64_breakpoint_from_pc): Ditto.
- * d10v-tdep.c (d10v_breakpoint_from_pc): Ditto.
- * arch-utils.c (legacy_breakpoint_from_pc): Ditto..
-
- * mem-break.c (default_memory_insert_breakpoint): Make `bp' a
- const pointer.
- * monitor.c (monitor_insert_breakpoint): Ditto.
- * rs6000-tdep.c (rs6000_software_single_step): Ditto for `breakp'.
-
- * config/mcore/tm-mcore.h: Update copyright.
- * mem-break.c: Ditto.
- * xstormy16-tdep.c: Ditto.
-
-2002-04-18 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-exp.y: Add precedence rule for '^' token.
- This removes the shift/reduce conflicts.
- Remove the comment concerning these shift/reduce conflicts.
-
-2002-04-18 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (COMMON_UISA_NOFP_REGS): New macro.
- (registers_powerpc_nofp): New register set for processors
- without floating point unit.
-
-2002-04-18 David S. Miller <davem@redhat.com>
-
- * MAINTAINERS: Add myself to write-after-approval.
-
-2002-04-17 Michael Snyder <msnyder@redhat.com>
-
- * MAINTAINERS: Add myself as co-maintainer of testsuite/gdb.asm.
-
-2002-04-17 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (frame_initial_stack_address): Use
- frame_register_read to read the alloca_reg.
-
-2002-04-17 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (find_saved_register): Find saved registers in the next
- not prev frame.
- Fix PR gdb/365.
-
-2002-04-17 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (LANG): Set to ``c''.
-
-2002-04-15 Andrew Cagney <ac131313@redhat.com>
-
- * PROBLEMS: Mention hppa2.0-hp-hpux10.20 compile problems.
-
-2002-04-15 Andrew Cagney <ac131313@redhat.com>
-
- * bcache.c: Include <stddef.h> and <stdlib.h> after "defs.h".
- Update copyright.
-
- * hpread.c (hpread_get_lntt): Add declaration.
- Also fix PR gdb/391.
-
-2002-04-14 Andrew Cagney <ac131313@redhat.com>
-
- * acinclude.m4 (AM_PROG_CC_STDC): Import from automake 1.6.
- * aclocal.m4, configure: Re-generate.
- Fix PR gdb/391.
-
-2002-04-14 Elena Zannoni <ezannoni@redhat.com>
-
- * mi/mi-cmd-disas.c (dump_insns): Use TARGET_PRINT_INSN
- instead of tm_print_insn.
-
-2002-04-14 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-bdm.c (bdm_ppc_fetch_registers): Fix typo.
-
-2002-04-14 Andrew Cagney <ac131313@redhat.com>
-
- * config/pa/tm-hppa.h (FRAME_CHAIN_COMBINE): Delete macro.
- * blockframe.c (FRAME_CHAIN_COMBINE): Delete macro.
- (get_prev_frame): Do not call FRAME_CHAIN_COMBINE.
-
-2002-04-12 Don Howard <dhoward@redhat.com>
-
- * cli/cli-cmds.c (init_cli_cmds): Add new user settable value:
- max_user_call_depth.
- (init_cmd_lists): Initialize the new value;
- * cli/cli-script.c (execute_user_command): Limit the call depth of
- user defined commands. This avoids a core-dump when user commands
- are infinitly recursive.
-
-2002-04-12 Kevin Buettner <kevinb@redhat.com>
-
- * ppc-tdep.h (struct gdbarch_tdep): Add new member ``lr_frame_offset''.
- * rs6000-tdep.c (rs6000_frame_saved_pc): Use ``lr_frame_offset''
- from tdep struct instead of DEFAULT_LR_SAVE.
- (rs6000_gdbarch_init): Initialize ``lr_frame_offset''.
- * config/powerpc/tm-ppc-eabi.h (DEFAULT_LR_SAVE): Delete.
- * config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Delete.
-
-2002-04-12 Michael Snyder <msnyder@redhat.com>
-
- * Remote.c: Spelling fix.
- * gcore.c (default_derive_heap_segment): Use bfd_section_name.
- If no symbol found for "sbrk", try "_sbrk".
- (make_output_phdrs): Use bfd_section_name.
- (gcore_copy_callback): Use bfd_section_name.
- * eval.c: Indentation fix-ups.
- * d10v-tdep.c (d10v_make_iaddr): Make it idempotent,
- in case it gets applied to an address that is already
- in the instruction space.
- * cli/cli-decode.c (help_list): Allow long lines to wrap.
- * symfile.c: Fix indentation, long lines.
- * source.c: White space fix-up.
-
-2002-04-12 Andrew Cagney <cagney@redhat.com>
-
- * defs.h (read_relative_register_raw_bytes): Delete declaration.
- * frame.c (frame_register_read): New function. Return non-zero on
- success.
- (read_relative_register_raw_bytes_for_frame): Delete.
- (read_relative_register_raw_bytes): Delete.
- * frame.h (frame_register_read): Declare.
- * d30v-tdep.c: Update Copyright. Use frame_register_read.
- * sh-tdep.c: Ditto.
- * infcmd.c (do_registers_info): Ditto.
- * hppa-tdep.c: Ditto.
- * rs6000-tdep.c: Ditto.
- * h8500-tdep.c: Ditto.
- * mips-tdep.c: Ditto.
- * h8300-tdep.c: Ditto.
- * z8k-tdep.c: Ditto.
-
-2002-04-12 Kevin Buettner <kevinb@redhat.com>
-
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (rs6000_gdbarch_init): Use rs6000_* methods for
- 64-bit SysV ABI.
-
-2002-04-12 Kevin Buettner <kevinb@redhat.com>
-
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from
- bfd info.
-
-2002-04-12 Kevin Buettner <kevinb@redhat.com>
-
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (powerpc64, 630, rs64ii, rs64iii): Define
- register sets for these processor variants.
-
-2002-04-11 Daniel Jacobowitz <drow@mvista.com>
-
- * regformats/reg-ppc.dat: Support FPSCR.
-
-2002-04-11 Kevin Buettner <kevinb@redhat.com>
-
- * ppc-tdep.h (struct gdbarch_tdep): Add new field ``ppc_fpscr_regnum''.
- * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
- Add fpscr as an invalid/unfetchable register.
- * ppc-linux-nat.c (ppc_register_u_addr, store_register)
- (fetch_ppc_registers, store_ppc_registers, supply_fpregset)
- (fill_fpregset): Add support for register fpscr.
- (fetch_ppc_registers, store_ppc_registers, supply_gregset)
- (fill_gregset): Account for the fact that register ``mq'' might
- not exist.
- * rs6000-tdep.c (PPC_UISA_SPRS): Use (unused) slot 70 for fpscr.
- (registers_power): Add fpscr to register set at slot 71.
- (rs6000_gdbarch_init): Account for the fact that ``mq'' doesn't
- exist on most PPC architectures. Initialize ppc_fpscr_regnum.
-
-2002-04-11 Michael Snyder <msnyder@redhat.com>
-
- * configure.in: Autoconfiscate _SYSCALL32 define for solaris.
- * configure: Regenerate.
- * config.in: Regenerate.
- * acconfig.h: Add define for _SYSCALL32.
- * core-sol2.c: Remove #define _SYSCALL32.
- * solib-legacy.c: Remove #define _SYSCALL32.
-
-2002-04-10 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (select_frame): Cleanup internal error message, do not
- use %p.
-
-2002-04-10 Andrew Cagney <ac131313@redhat.com>
-
- * stack.c (select_frame): Check that selected_frame and the
- specified level are as expected.
- * blockframe.c (get_prev_frame): Set the `level' from next_frame.
- Update copyright.
- * frame.h (struct frame_info): Add field `level'. Update
- copyright.
- Work-in-progress PR gdb/464.
-
-2002-04-10 Andrew Cagney <ac131313@redhat.com>
-
- * maint.c (maint_print_section_info): Rename print_section_info.
- (print_bfd_section_info, print_objfile_section_info): Update.
- * inferior.h (struct gdbarch): Add opaque declaration.
- * gdbarch.sh: Add include of "inferior.h" to gdbarch.sh.
- * gdbarch.h: Regenerate.
-
-2002-04-10 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-linux-nat.c (child_resume, child_xfer_memory): Delete.
- (PTRACE_XFER_TYPE): Moved to config/i386/nm-x86-64.h.
- (kernel_u_size): Added.
- * config/i386/nm-x86-64.h (CHILD_XFER_MEMORY, CHILD_RESUME): Delete.
- (PTRACE_XFER_TYPE): Moved here from config/i386/nm-x86-64.h.
-
-2002-04-04 Jim Ingham <jingham@apple.com>
-
- * valarith.c (find_size_for_pointer_math): New function, either returns
- the size for a pointer's target, returns 1 for void *, or errors for
- incomplete types.
- (value_add, value_sub): use find_size_for_pointer_math.
-
-2002-04-09 Daniel Jacobowitz <drow@mvista.com>
-
- * linux-low.c (linux_look_up_symbols): New hook.
- (linux_target_ops): Add linux_look_up_symbols.
- * remote-utils.c (decode_address): New function.
- (look_up_one_symbol): New function.
- * server.c (handle_query): Call target look_up_symbols hook.
- * server.h (look_up_one_symbol): Add prototype.
- * target.h (struct target_ops): Add look_up_symbols hook.
-
-2002-04-09 Andrew Cagney <ac131313@redhat.com>
-
- * frame.c (read_relative_register_raw_bytes_for_frame): Do not
- override FP_REGNUM with frame->fp. Update copyright.
- * parse.c (num_std_regs, std_regs): Delete.
- (target_map_name_to_register): Do not search std_regs. Update
- function description.
- * parser-defs.h (num_std_regs, std_regs, struct std_regs): Delete
- declarations. Update copyright.
- Fix PR gdb/251.
-
-2002-04-09 Daniel Jacobowitz <drow@mvista.com>
-
- * symtab.h (ALL_BLOCK_SYMBOLS): Don't dereference the pointer
- after the last symbol in a block.
-
-2002-04-09 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * p-exp.y (yylex): Handle also the fact that is_a_field_of_this
- is non zero as a found symbol.
-
-2002-04-08 Andrew Cagney <ac131313@redhat.com>
-
- * findvar.c: Include "builtin-regs.h".
- (value_of_register): Call value_of_builtin_reg when applicable.
- * parse.c: Include "builtin-regs.h" and "gdb_assert.h".
- (target_map_name_to_register): Call
- builtin_reg_map_name_to_regnum.
- * Makefile.in (SFILES): Add builtin-regs.c and std-regs.c.
- (COMMON_OBS): Add builtin-regs.o and std-regs.o.
- (builtin_regs_h): Define.
- (builtin-regs.o): New target.
- (findvar.o): Add $(builtin_regs_h).
- * builtin-regs.c, builtin-regs.h: New files.
- * std-regs.c: New file.
- Partial fix for PR gdb/251.
-
-2002-04-08 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Don't set tm_print_insn;
- it's no longer required.
-
-2002-04-08 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (gdbtk-wrapper.o): Add missing dependencies.
-
-2002-04-08 Kevin Buettner <kevinb@redhat.com>
-
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (rs6000_software_single_step): Use
- rs6000_breakpoint_from_pc() to fetch breakpoint instruction
- and size. Use target_insert_breakpoint() and
- target_remove_breakpoint() to insert and remove breakpoints
- instead of explicit memory reads and writes.
-
-2002-04-08 Kevin Buettner <kevinb@redhat.com>
-
- * config/powerpc/tm-ppc-eabi.h (ELF_OBJECT_FORMAT): Delete.
- * rs6000-tdep.c (rs6000_push_arguments): Eliminate
- ELF_OBJECT_FORMAT ifdef.
-
-2002-04-08 Kevin Buettner <kevinb@redhat.com>
-
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_print_insn().
-
-2002-04-08 Kevin Buettner <kevinb@redhat.com>
-
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (rs6000_fix_call_dummy): Delete unused macro
- definitions for TOC_ADDR_OFFSET and TARGET_ADDR_OFFSET.
-
-2002-04-07 Mark Kettenis <kettenis@gnu.org>
-
- * fbsd-proc.c (child_pid_to_exec_file, fbsd_find_memory_regions):
- s/asprintf/xasprintf/.
- (fbsd_make_corefile_notes): s/strdup/xstrdup/.
-
-2002-04-07 Andrew Cagney <ac131313@redhat.com>
-
- I believe Jeff Law denies responsability for this one:
- * config/pa/hpux11w.mh (MH_CFLAGS): Add -Dvfork=fork.
- * config/pa/hpux11.mh (MH_CFLAGS): Add -Dvfork=fork.
- * config/pa/hpux1020.mh (MH_CFLAGS): Add -Dvfork=fork.
- Work-around for PR gdb/366.
-
-2002-04-07 Elena Zannoni <ezannoni@redhat.com>
-
- * remote-e7000.c (write_small, e7000_read_inferior_memory,
- e7000_read_inferior_memory_large, e7000_insert_breakpoint,
- e7000_remove_breakpoint): Use paddr_nz() to print addresses.
-
-2002-04-07 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c (sh_fp_frame_init_saved_regs,
- sh_nofp_frame_init_saved_regs): Use alloca() for 'where'
- information.
-
-2002-04-07 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Misc): List Daniel Jacobowitz as the GDBSERVER
- maintainer.
-
-2002-04-07 Andrew Cagney <ac131313@redhat.com>
-
- * README (Reporting Bugs in GDB): Document the bug web page as the
- prefered way of submitting bugs.
- Fix PR gdb/402.
-
-2002-04-06 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (FP_REGNUM, PC_REGNUM, SP_REGNUM): Allow default of
- -1. Update comment.
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-04-07 Andreas Schwab <schwab@suse.de>
-
- * m68klinux-nat.c (fill_fpregset): Properly pass address of
- buffer to regcache_collect.
-
-2002-04-06 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (PS_REGNUM): Add. Document. Default to -1.
- * gdbarch.c, gdbarch.h: Re-generate.
-
-2002-04-06 Andrew Cagney <ac131313@redhat.com>
-
- * symtab.c (lookup_symtab): Remove ``const'' from ``rp''
- declaration. Fix -Werror.
-
-2002-04-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbarch.sh (initialize_non_multiarch): Call init_gdbarch_swap.
- * gdbarch.c: Regenerate.
-
-2002-04-05 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (clear_command): Rewrite middle section to
- combine two loops with identical control conditions.
- Add a cleanup to eliminate a memory leak.
- * cli/cli-dump.c (restore_section_callback): Use paddr_nz.
-
-2002-04-05 H.J. Lu (hjl@gnu.org)
-
- * solib-svr4.c (bkpt_names): Add "__start".
-
-2002-04-04 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-tdep.c (sparc_push_dummy_frame): Use GDB_TARGET_IS_SPARC64
- as test for 64 bit target.
-
-2002-04-05 Andrew Cagney <ac131313@redhat.com>
-
- * h8500-tdep.c (h8500_write_fp): Delete function.
- * dwarf2cfi.c (cfi_write_fp): Document as not used.
- * mips-tdep.c (mips_gdbarch_init): Do not set write_fp.
- * ia64-tdep.c (ia64_gdbarch_init): Do not set write_fp.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Do not set write_fp.
- * rs6000-tdep.c (rs6000_gdbarch_init): Do not set write_fp.
- * s390-tdep.c (s390_gdbarch_init): Do not set write_fp.
- (s390_write_fp):
- * sh-tdep.c (sh_gdbarch_init): Do not set write_fp.
- * x86-64-tdep.c (i386_gdbarch_init): Do not set write_fp.
- * d10v-tdep.c (d10v_gdbarch_init): Do not set write_fp.
- (d10v_write_fp): Delete function.
- * inferior.h (write_fp, generic_target_write_fp): Delete
- declarations.
- * regcache.c (generic_target_write_fp): Delete function.
- (write_fp): Delete function.
- * gdbarch.sh (TARGET_WRITE_FP): Delete.
- * gdbarch.h, gdbarch.c: Regenerate.
- * config/v850/tm-v850.h (TARGET_WRITE_FP): Delete macro.
- * config/sparc/tm-sp64.h (TARGET_WRITE_FP): Delete macro.
- (sparc64_write_fp): Delete declaration.
- * config/h8500/tm-h8500.h (TARGET_WRITE_FP): Delete macro.
- (h8500_write_fp): Delete declaration.
-
-2002-04-04 Andrew Cagney <ac131313@redhat.com>
-
- * sparc-tdep.c (sparc64_write_fp): Delete.
- (sparc_push_dummy_frame): Replace write_fp call with code to store
- the FP directly.
- (sparc_gdbarch_init): Do not initialize write_fp.
-
-2002-04-05 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-tdep.c (skip_prologue): Eliminate unused/unreachable
- clause.
-
-2002-03-29 Jim Blandy <jimb@redhat.com>
-
- * stack.c (get_selected_block): Add new argument `addr_in_block',
- used to return the exact code address we used to select the block,
- not just the block.
- * blockframe.c (get_frame_block, get_current_block): Same.
- * frame.h (get_frame_block, get_current_block,
- get_selected_block): Update declarations.
- * linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c,
- linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed.
-
-2002-04-05 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (insert_breakpoints): Change 'hw' to 'hardware in
- warning message.
-
-2002-04-05 J. Brobecker <brobecker@gnat.com>
-
- * utils.c (xfullpath): New function.
- * defs.h (xfullpath): Add declaration.
- * source.c (openp): Use xfullpath in place of gdb_realpath to
- avoid resolving the basename part of filenames when the
- associated file is a symbolic link. This fixes a potential
- inconsistency between the filenames known to GDB and the
- filenames it prints in the annotations.
- * symtab.c (lookup_symtab): Use the new xfullpath function, in order
- to be able to match a filename with either the real filename, or
- the name of any symbolic link to this file.
- (lookup_partial_symtab): Ditto.
-
-2002-04-04 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c: Add support for hardware breakpoints in overlays.
- (overlay_events_enabled): New state variable.
- (insert_breakpoints): Use overlay_events_enabled to decide
- whether to attempt to set a breakpoint at the overlay load addr.
- Handle bp_hardware_breakpoint as well as bp_breakpoint.
- (remove_breakpoint): Use overlay_events_enabled to decide
- whether breakpoints need to be removed from overlay load addr.
- Handle bp_hardware_breakpoint as well as bp_breakpoint.
- (bpstat_stop_status): Handle bp_hardware_breakpoint in overlays.
- (create_overlay_event_breakpoint, enable_overlay_breakpoints,
- disable_overlay_breakpoints): Update overlay_events_enabled.
-
-2002-04-04 Daniel Jacobowitz <drow@mvista.com>
-
- * dwarf2read.c (struct function_range): New.
- (cu_first_fn, cu_last_fn, cu_cached_fn): New.
- (check_cu_functions): New.
- (read_file_scope): Initialize global function lists.
- Call dwarf_decode_line after processing children.
- (read_func_scope): Add to global function list.
- (dwarf_decode_lines): Call check_cu_functions everywhere
- record_line is called. Call record_line with a linenumber
- of 0 to mark sequence ends.
-
-2002-04-04 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-linux-nat.c (child_xfer_memory): x86-64 ptrace() ABI
- change sync with glibc.
-
-2002-04-03 Jim Blandy <jimb@redhat.com>
-
- * configure.in: Call AC_C_INLINE.
+ * configure.in: Reorganize "Checks for library functions section"
+ a bit. Remove check for `btowc' and `isascii' functions.
* configure: Regenerated.
-2002-04-01 Daniel Jacobowitz <drow@mvista.com>
-
- * rs6000-tdep.c: Change #include of "bfd/libcoff.h"
- and "bfd/libbfd.h" to "libcoff.h" and "libbfd.h".
-
-2002-03-31 Mark Kettenis <kettenis@gnu.org>
-
- * NEWS: Mention gcore support on FreeBSD/i386.
-
- * fbsd-proc.c: New file.
- * config/i386/nm-fbsd.h (CHILD_PID_TO_EXEC_FILE): Define.
- * config/i386/fbsd.mh (NATDEPFILES): Add gcore.o and fbsd-proc.o.
-
- * lin-lwp.c (child_wait): Check SAVE_ERRNO instead of ERRNO in
- while statement.
-
-2002-03-29 Jim Blandy <jimb@redhat.com>
-
- * cli/cli-dump.c (_initialize_cli_dump): Older GCC's tolerate
- unescaped newlines in string literals, but newer ones don't. So
- escape them.
-
-2002-03-26 Michael Snyder <msnyder@redhat.com>
- Andrew Cagney <cagney@redhat.com>
-
- * cli/cli-dump.c: New file. Dump memory to file,
- restore file to memory.
- * cli/cli-dump.h: New file.
- * Makefile.in: Add rules, dependencies for cli-dump.o.
- * NEWS: Mention new commands.
-
-2002-03-28 Michael Snyder <msnyder@redhat.com>
-
- * symfile.c (symbol_file_add): Move test for null symbols to later.
-
-2002-03-27 Andrew Cagney <ac131313@redhat.com>
-
- From veksler at il.ibm.com:
- * utils.c (gdb_realpath): If canonicalize_file_name fails, return
- the xstrduped original path.
- Fix PR gdb/417.
-
-2002-03-27 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (_initialize_breakpoint): Clean up help string.
- * infcmd.c (_initialize_infcmd): Ditto.
- * language.c (_initialize_language): Ditto.
- * symfile.c (_initialize_symfile): Ditto.
- * top.c (_init_main): Ditto.
- * cli/cli-cmds.c (init_cli_cmds): Ditto.
-
-2002-03-27 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (struct rs6000_framedata): Add fields for AltiVec
- vector registers handling.
- (skip_prologue): Handle new AltiVec instructions. Fill in new
- fields of frame data.
- (frame_get_saved_regs): Fill in information for AltiVec registers.
-
-2002-03-27 Jim Blandy <jimb@redhat.com>
-
- * symtab.h (SYMBOL_INIT_MANGLED_NAME): Turn this macro's body into
- a function; leave this macro here to invoke that function.
- (symbol_init_mangled_name): Declaration for that function.
- * symtab.c (symbol_init_mangled_name): New function.
-
-2002-03-27 Andrew Cagney <ac131313@redhat.com>
-
- * valarith.c: Replace strerror with safe_strerror.
- * tracepoint.c: Ditto.
- * lin-lwp.c: Ditto.
- * go32-nat.c: Ditto.
- * inflow.c: Ditto.
- * gnu-nat.c: Ditto.
-
-2002-03-27 Andreas Schwab <schwab@suse.de>
-
- * event-top.c (command_line_handler): Remove useless if.
-
-2002-03-27 Andreas Jaeger <aj@suse.de>
-
- * dwarf2cfi.c: Give credit to Daniel Berlin, reformat copyright
- comment.
-
-2002-03-27 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.h (X86_64_NUM_REGS, X86_64_NUM_GREGS): Delete #defines.
- (x86_64_num_regs, x86_64_num_gregs): Added extern variables.
- * x86-64-linux-nat.c (x86_64_regmap): Swapped RBX <> RDX, added DS, ES, FS, GS.
- (x86_64_linux_dr_get_status, supply_gregset),
- (fill_gregset): Changed X86_64_NUM_GREGS to x86_64_num_gregs.
- * x86-64-tdep.c (x86_64_register_raw_size_table): Delete.
- (x86_64_register_info_table): Add.
- (X86_64_NUM_REGS, X86_64_NUM_GREGS): Add.
- (x86_64_register_raw_size, x86_64_register_virtual_type),
- (x86_64_register_name, _initialize_x86_64_tdep): Changed to reflect new
- general x86_64_register_info_table.
- (i386_gdbarch_init): gdbarch_register_bytes is now set
- dynamicaly during initialization.
- * regformats/reg-x86-64.dat: Synced with changes to registers above.
- * gdbserver/linux-x86-64-low.c: Ditto.
-
-2002-03-27 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/server.c (main): Call target_signal_to_host_p
- and target_signal_to_host on signals received from the remote.
- * gdbserver/remote-utils.c (prepare_resume_reply): Call
- target_signal_from_host on signals sent to the remote.
- * gdbserver/server.h: Add prototypes. Include "gdb/signals.h".
- * gdbserver/Makefile.in: Add signals.o. Add -I${INCLUDE_DIR}.
-
-2002-03-27 Daniel Jacobowitz <drow@mvista.com>
-
- * signals/signals.c: Include "server.h" in gdbserver build.
- (target_signal_from_name): Don't use STREQ.
- (_initialize_signals): Likewise. Don't include function in
- gdbserver build.
-
-2002-03-27 Daniel Jacobowitz <drow@mvista.com>
-
- * signals.c: Moved to...
- * signals/signals.c: Here.
- * Makefile (signals.o): Update.
-
-2002-03-26 Jeff Law (law@redhat.com)
-
- * somread.c (som_symtab_read): Remove some commented out code and
- updated related comments. Do not set the minimal symbol table to
- mst_solib_trampoline for ST_ENTRY symbols with SS_LOCAL scope
- in a dynamic executable.
- * hppa-tdep.c (find_proc_framesize): Sanely handle the case
- where we are unable to find the minimal symbol for the given
- PC value.
-
-2002-03-25 Jeff Law (law@redhat.com)
-
- * linux-proc.c (read_mapping): Scan up to end of line for filename.
-
-2002-03-25 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.c (x86_64_skip_prologue): Rewritten from scratch.
-
-2002-03-23 Andrew Cagney <ac131313@redhat.com>
-
- * command.h: Update copyright.
- (struct cmd_list_element): Replace definition with opaque
- declaration.
- (enum cmd_types): Document that it will eventually be moved to
- cli/cli-decode.h
- (CMD_DEPRECATED, DEPRECATED_WARN_USER): Delete macros.
- (MALLOCED_REPLACEMENT): Delete macro.
- * Makefile.in (cli_decode_h): Add $(command_h).
- (top.o, completer.o, maint.o): Add dependency on $(cli_decode_h).
- * top.c: Include "cli/cli-decode.h".
- * completer.c: Include "cli/cli-decode.h".
- * maint.c: Include "cli/cli-decode.h".
- * cli/cli-decode.h: Include "command.h".
- (enum command_class): Delete.
- (enum cmd_types): Comment out.
- (enum cmd_auto_boolean): Delete.
- (enum var_types): Delete.
-
-2002-03-23 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c: Include "gdb_assert.h".
- (add_set_or_show_cmd): New static function.
- (add_set_cmd): Rewrite. Use add_set_or_show_cmd.
- (add_show_from_set): Rewrite. Use add_set_or_show_cmd. Don't copy
- all fields, such as func, from the set command.
-
-2002-03-23 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (sh-elf): Change warning flag to -w.
-
-2002-03-23 Andrew Cagney <cagney@redhat.com>
-
- * defs.h (error): Add printf format attribute.
- * thread-db.c (thread_from_lwp): Fix error format string.
- * stack.c (parse_frame_specification): Ditto.
- * cli/cli-decode.c (undef_cmd_error): Ditto.
- * scm-lang.c (scm_lookup_name): Ditto.
- * tracepoint.c (trace_error): Ditto.
- * remote-utils.c (usage): Ditto.
- * remote.c (compare_sections_command): Ditto.
- Fix PR gdb/328.
-
-2002-03-22 Andrew Cagney <ac131313@redhat.com>
-
- * gdbtypes.c (append_composite_type_field): New function.
- (init_composite_type): New function.
- * gdbtypes.h (append_composite_type_field): Declare.
- (init_composite_type): Ditto.
-
-2002-03-22 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-linux-tdep.c (ppc_sysv_abi_use_struct_convention): New
- function.
- * ppc-tdep.h (ppc_sysv_abi_use_struct_convention): Export.
- * rs6000-tdep.c (rs6000_gdbarch_init): Use different
- structure returning convention for SYSV ABI case, but not
- for GNU/Linux, FreeBSD, or NetBSD.
-
-2002-03-22 Daniel Jacobowitz <drow@mvista.com>
-
- * symtab.h (lookup_block_symbol): Add mangled_name argument
- to prototype.
-
- * symmisc.c (maintenance_check_symtabs): Call lookup_block_symbol
- with new mangled_name argument.
- * linespec.c (decode_line_1): Likewise.
- * valops (value_of_this): Likewise.
- * symtab.c (lookup_transparent_type): Likewise.
- (lookup_symbol_aux): Likewise. Accept new mangled_name argument.
- (lookup_symbol): If we are given a mangled name, pass it down
- to lookup_symbol_aux.
- (lookup_block_symbol): If we are given a mangled name to check
- against, only return symbols which match it.
-
-2002-03-22 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (child_create_inferior): Check for proper shell to use
- here, in case the user changes it on the fly.
- (_initialize_inftarg): Remove shell path considerations.
-
-2002-03-21 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Use correct max size value
- for gdbarch_max_register_raw_size and max_register_virtual_size.
- Adjust copyright year.
-
-2002-03-21 Daniel Jacobowitz <drow@mvista.com>
-
- * dbxread.c (process_one_symbol): Extend the first N_SLINE
- in a function to cover the entire beginning of the function
- as well if it does not already.
-
-2002-03-21 Tom Rix <trix@redhat.com>
-
- * rs6000-nat.c (rs6000_ptrace32): Renamed from ptrace32.
- (rs6000_ptrace64): Renamed from ptrace64.
-
-2002-03-20 Martin M. Hunt <hunt@redhat.com>
-
- * gdbserver/remote-utils.c (remote_open): Don't call
- getprotobyname, we're all using TCP here so just use
- IPPROTO_TCP.
- * gdbserver/gdbreplay.c (remote_open): Ditto.
-
-2002-03-20 Martin M. Hunt <hunt@redhat.com>
-
- * regcache.c (_initialize_regcache): No need to call
- build_regcache() at this time; it gets called whenever
- the gdbarch changes.
-
-2002-03-20 David O'Brien <obrien@FreeBSD.org>
-
- * sparc-nat.c: Include sys/param.h where possible.
-
-2002-03-20 Daniel Jacobowitz <drow@mvista.com>
-
- Fix PR gdb/422.
- * c-lang.c (c_create_fundamental_type): Handle FT_COMPLEX,
- FT_DBL_PREC_COMPLEX, and FT_EXT_PREC_COMPLEX.
- * dwarf2read.c (read_base_type): Set TYPE_TARGET_TYPE for
- complex types.
- * stabsread.c (rs6000_builtin_type): Likewise.
- (read_sun_floating_type): Likewise.
-
-2002-03-19 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * stabsread.c (read_member_functions): Remove skip code for duplicate
- constructor/destructor methods. Use standard parsing for these
- methods and just do not chain them to the list of methods after
- parsing.
-
-2002-03-19 Alexandre Oliva <aoliva@redhat.com>
-
- * coffread.c: Remove redundant static declarations. Replace
- occurrences of `PTR' with `void *'.
- * elfread.c, mdebugread.c, minsyms.c, mipsread.c: Likewise.
- * top.h (quit_cover): Likewise.
- * defs.h (catch_errors): Likewise.
-
-2002-03-18 Andrew Cagney <ac131313@redhat.com>
-
- * defs.h (XMALLOC): Define.
- * gdb-events.sh (XMALLOC): Delete macro.
- * gdb-events.c, gdb-events.h: Regenerate.
- * gdbarch.sh (XMALLOC): Delete macro.
- * gdbarch.c: Regenerate.
- * serial.c (XMALLOC): Delete macro.
- * ui-file.c (XMALLOC): Ditto.
- * ser-unix.h (XMALLOC): Ditto.
- * sh-tdep.c (XMALLOC): Ditto.
- * ui-out.c (XMALLOC): Ditto.
- * utils.c (XMALLOC): Ditto.
- * i386-tdep.c (XMALLOC): Ditto.
- * gdb-events.c (XMALLOC): Ditto.
- * d10v-tdep.c (XMALLOC): Ditto.
- * cli-out.c (XMALLOC): Ditto.
-
- * cli-out.c, d10v-tdep.c, gdb-events.c: Update copyright.
- * gdb-events.sh, i386-tdep.c, ser-unix.h, serial.c: Ditto.
- * ui-file.c, ui-out.c: Ditto.
-
-2002-03-18 Andrew Cagney <ac131313@redhat.com>
-
- * command.h (struct cmd_list_element): Add field context.
- (set_cmd_context, get_cmd_context): Declare.
- * cli/cli-decode.h: Ditto.
- * cli/cli-decode.c (get_cmd_context): New function.
- (set_cmd_context): New function.
- (add_cmd): Initialize context.
- Part of fixing PR gdb/145 and PR gdb/146.
-
-2002-03-17 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c (cmd_type): New function.
- * command.h (cmd_type): Declare.
- * infrun.c (set_schedlock_func): Call function cmd_type.
- * kod.c (kod_set_os): Call cmd_type.
- * cris-tdep.c (cris_version_update): Use function cmd_type.
- (cris_mode_update, cris_abi_update): Ditto.
-
- * command.h: (execute_cmd_post_hook): Declare.
- (execute_cmd_pre_hook): Declare.
- * cli/cli-script.c (clear_hook_in_cleanup): New function.
- (execute_cmd_post_hook, execute_cmd_pre_hook): New
- functions. Execute pre/post hook while ensuring that afterwords
- hook_in is cleared.
- * top.c (execute_command): Use execute_cmd_post_hook, and
- execute_cmd_pre_hook to execute pre/post commands.
- * infrun.c (normal_stop): Pass stop_command and not pre_hook to
- hook_stop_stub.
- (hook_stop_stub): Call execute_cmd_pre_hook.
-
-2002-03-17 Andrew Cagney <ac131313@redhat.com>
-
- * kod.c (kod_set_os): Revert previous change. Is called by ``info
- set'' and this leads to a core dump. Move xstrdup of
- operating_system to after check that it is not NULL.
-
-2002-03-17 Andrew Cagney <ac131313@redhat.com>
-
- * kod.c (kod_set_os): Remove unnecessary check that
- ``command->type'' is set_cmd.
-
- * valprint.c (set_input_radix): Use input_radix.
- (set_output_radix): Use output_radix.
- (set_input_radix_1, set_output_radix_1): Add FIXME - bad radix
- isn't reverted.
-
-2002-03-16 Andrew Cagney <ac131313@redhat.com>
-
- * value.h (struct value): Delete field ``substring_addr''. Change
- aligner fields to force_doublest_align, force_longest_align,
- force_core_addr_align and force_pointer_aligh.
-
- * value.h (struct value): Fix typo in above change.
-
-2002-03-16 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * ia64-tdep.c (ia64_gdbarch_init): Call set_gdbarch_frame_args_skip,
- to fix internal_error from ``maintenance print architecture''.
-
-2002-03-16 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * cp-valprint.c (cp_is_vtbl_ptr_type): Handle vtbl field type
- for gcc versions after gcc-2.8.1.
-
-2002-03-16 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * eval.c (evaluate_subexp_standard): Fix setup of ``this'' pointer
- for method resolution. Restore adjustment of ``this'' pointer after
- calling value_struct_elt, which was accidentally removed during the
- HP merge.
-
-2002-03-15 Andrew Cagney <ac131313@redhat.com>
-
- * eval.c (evaluate_subexp_standard): Pass ``selected_frame'' to
- value_of_register.
- * findvar.c (value_of_register): Add ``frame'' parameter. Pass to
- get_saved_register.
- * value.h (value_of_register): Update.
-
-2002-03-14 Richard Henderson <rth@redhat.com>
-
- * configure.in: Detect declaration for canonicalize_file_name.
- * utils.c (canonicalize_file_name): Declare, if needed.
- (gdb_realpath): Prefer realpath if available and usable.
- * config.in, configure: Rebuild.
-
-2002-03-14 Richard Henderson <rth@redhat.com>
-
- * dwarf2read.c (read_array_type): Accept DW_FORM_data8 as
- a constant array bound.
-
- * MAINTAINERS: Add myself to write-after-approval.
-
-2002-03-14 Michael Snyder <msnyder@redhat.com>
-
- * symfile.c (syms_from_objfile): Return immediately if no syms.
- (symbol_file_add): Return immediately if no syms.
- (find_sym_fns): Return immediately if no syms.
-
-2002-03-13 Michal Ludvig <mludvig@suse.cz>
-
- * gdbserver/remote-util.c (remote_open): Print remote-side's
- IP address when remote debugging over the network.
-
-2002-03-12 David O'Brien <obrien@FreeBSD.org>
-
- * config/sparc/fbsd.mh: Fix copyright.
- * config/sparc/fbsd.mt: Likewise.
-
-2002-03-11 Richard Earnshaw <rearnsha@arm.com>
-
- * MAINTAINERS: Fix typo in name of gdb warnings option.
- (x86-64): Fix formating so that this can be parsed by awk.
-
-2002-03-10 Daniel Jacobowitz <drow@mvista.com>
-
- * Makefile.in (defs_h): Add $(INCLUDE_DIR)/gdb/signals.h.
- * defs.h: Include "gdb/signals.h".
- (enum target_signal): Move to $(INCLUDE_DIR)/gdb/signals.h.
-
-2002-03-10 Michal Ludvig <mludvig@suse.cz>
-
- * x86-64-tdep.h (sys/reg.h, x86_64_regmap): Moved to x86-64-linux-nat.c
- * x86-64-linux-nat.c (sys/reg.h, x86_64_regmap): Moved here
- from x86-64-tdep.h
-
-2002-03-10 Daniel Jacobowitz <drow@mvista.com>
- Don Howard <dhoward@redhat.com>
-
- * mips-tdep.c (ST0_FR): Define.
- (mips2_fp_compat): New function, temporarily disabled.
- (mips_read_fp_register_single): New function.
- (mips_read_fp_register_double): New function.
- (mips_print_register): Use them.
- (do_fp_register_row): Likewise.
-
-2002-03-09 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Add Jim Ingham and Klee Dienes to ``write after
- approval''.
-
-2002-03-08 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * stabsread.c (read_member_functions): Fix is_stub test for
- static member functions, improve comment.
-
-2002-03-07 Richard Earnshaw <rearnsha@arm.com>
-
- * remote-rdi.c (myprint): Replace 'PTR' with 'void *'.
- (mywrite, mywritec, mypause, myreadc, mygets): Likewise.
- (_initialize_remote_rdi): Use add_set_boolean_cmd to register
- commands that set boolean values.
- (arm_rdi_remove_breakpoint): Rewrite to avoid uninitialized warning.
- (arm_rdi_resume): Always initialize PC.
- (arm_rdi_open): Don't use rslt as a boolean.
- (arm_rdi_create_inferior, arm_rdi_close, arm_rdi_resume)
- (arm_rdi_fetch_registers, arm_rdi_store_registers)
- (arm_rdi_xfer_memory, arm_rdi_files_info, arm_rdi_kill)
- (arm_rdi_insert_breakpoint, arm_rdi_remove_breakpoint): Likewise.
-
-2002-03-06 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.in (gdb_cv_bigtoc): Check for -bbigtoc on AIX.
- * configure: Rebuilt.
-
-2002-03-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * m68hc11-tdep.c (_initialize_m68hc11_tdep): Don't set tm_print_insn.
- (m68hc11_gdbarch_init): But use set_gdbarch_print_insn instead.
-
-2002-03-06 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c (set_cmd_completer): New function.
- * command.h (set_cmd_completer): Declare.
- * cli/cli-decode.h (set_cmd_completer): Ditto.
-
- * breakpoint.c (_initialize_breakpoint): Use set_cmd_completer.
- * cli/cli-cmds.c (init_cli_cmds): Ditto.
- * win32-nat.c (_initialize_inftarg): Ditto.
- * remote-rdi.c (_initialize_remote_rdi): Ditto.
- * proc-api.c (_initialize_proc_api): Ditto.
- * hppa-tdep.c (_initialize_hppa_tdep): Ditto.
- * source.c (_initialize_source): Ditto.
- * exec.c (_initialize_exec): Ditto.
- * solib.c (_initialize_solib): Ditto.
- * top.c (init_main): Ditto.
- * tracepoint.c (_initialize_tracepoint): Ditto.
- * symfile.c (_initialize_symfile): Ditto.
- * printcmd.c (_initialize_printcmd): Ditto.
- * infcmd.c (_initialize_infcmd): Ditto.
- * corefile.c (_initialize_core): Ditto.
-
-2002-03-05 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Past Maintainers): Add Frank Ch. Eigler.
-
-2002-03-05 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Fix Mac OS X and Objective-C/C++.
-
-2002-03-05 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Update headings, 5.2 has branched.
-
-2002-03-04 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c (PTRACE_XFER_TYPE): Change to long.
- (num_regs, regmap): Move inside HAVE_LINUX_USRREGS.
- (register_addr, REGISTER_RAW_SIZE): Likewise.
- (usr_store_inferior_registers): Use PTRACE_XFER_TYPE.
- * gdbserver/linux-x86-64-low.c: Remove extra #endif.
-
-2002-03-03 Michal Ludvig <mludvig@suse.cz>
-
- * MAINTAINERS (x86-64): Add myself.
- * x86-64-tdep.c (x86_64_push_arguments): Fixed typo naregs->nregs,
- changed value_ptr -> struct value *
-
-2002-03-01 David O'Brien <obrien@FreeBSD.org>
-
- * configure.host (sparc64-*-freebsd): Add.
- * configure.tgt: Likewise.
- * config/sparc/fbsd.mh: New file.
- * config/sparc/fbsd.mt: Likewise.
- * config/sparc/nm-fbsd.h: Likewise.
- * config/sparc/tm-fbsd.h: Likewise.
-
-2002-03-01 Daniel Jacobowitz <drow@mvista.com>
-
- * config/djgpp/fnchange.lst: Add regformats/reg-i386-linux.dat and
- regformats/reg-s390x.dat.
-
-2002-03-01 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c: Add FIXME explaining true/false problem.
-
-2002-02-28 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Past Maintainers): Add J.T. Conklin.
-
-2002-02-28 Michael Chastain <mec@shout.net>
-
- * MAINTAINERS: Fix typo: gdb.satbs -> gdb.stabs .
-
-2002-02-28 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-s390-low.c: New file.
- * regformats/reg-s390.dat: New file.
- * regformats/reg-s390x.dat: New file.
- * gdbserver/configure.srv: Add S/390.
- * gdbserver/Makefile.in: Add S/390.
- * configure.tgt: Enable gdbserver for S/390.
-
-2002-02-28 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (_initialize_go32_nat): Don't use periods in the
- first line of the doc string for "info dos", except at the end of
- the sentence, since the short help stops at the first period.
-
-2002-02-28 Jason Merrill <jason@redhat.com>
-
- * dwarf2read.c (dwarf_cfi_name): Add new codes.
-
-2002-02-27 Fred Fish <fnf@redhat.com>
-
- * blockframe.c (generic_fix_call_dummy): Fix obvious typo in
- comment (dumy -> dummy).
-
-2002-02-27 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * symtab.c (gdb_mangle_name): Handle fully mangled v3 abi physnames.
-
-2002-02-27 Rodney Brown <rbrown64@csc.com.au>
-
- * utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.
-
-2002-02-27 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/acconfig.h: New file.
- * gdbserver/i387-fp.c: New file.
- * gdbserver/i387-fp.h: New file.
- * gdbserver/linux-x86-64.c: New file.
- * regformats/reg-x86-64.dat: New file.
- * configure.tgt: Add x86_64-*-linux* gdbserver support.
- * gdbserver/configure.srv: Add x86_64-*-linux* and regset support.
- * gdbserver/configure.in: Add support for regsets.
- * gdbserver/config.in: Regenerate.
- * gdbserver/configure: Regenerate.
- * gdbserver/Makefile.in: Likewise. Add $(linux_low_h).
- * gdbserver/linux-low.h: New file.
- * gdbserver/linux-low.c: Include "linux-low.h". Add support
- for regsets.
- * gdbserver/linux-arm-low.c: Include "linux-low.h".
- * gdbserver/linux-ia64-low.c: Include "linux-low.h".
- * gdbserver/linux-m68k-low.c: Include "linux-low.h".
- * gdbserver/linux-mips-low.c: Include "linux-low.h".
- * gdbserver/linux-ppc-low.c: Include "linux-low.h".
- * gdbserver/linux-sh-low.c: Include "linux-low.h".
- * gdbserver/linux-i386-low.c: Include "linux-low.h". Include
- "i387-fp.h". Add PTRACE_GETREGS and friends.
- * gdbserver/regcache.c (supply_register): New function.
- (supply_register_by_name): New function.
- (collect_register): New function.
- (collect_register_by_name): New function.
-
-2002-02-27 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/Makefile.in (INTERNAL_CFLAGS): Remove -DGDBSERVER.
- (config.status): Add configure.srv dependency.
- (server_h): Add config.h dependency.
-
-2002-02-27 Daniel Jacobowitz <drow@mvista.com>
-
- * regformats/reg-i386-linux.dat: New file, with $orig_eax.
- * gdbserver/Makefile.in: Add rules for reg-i386-linux.o.
- * gdbserver/configure.srv: Change i386-*-linux* to use
- reg-i386-linux.o.
-
-2002-02-26 Andrew Cagney <ac131313@redhat.com>
-
- * x86-64-tdep.c: Re-indent. Update copyright date.
-
-2002-02-26 Andrew Cagney <ac131313@redhat.com>
-
- From Michal Ludvig <mludvig@suse.cz>:
- * x86-64-tdep.c (value.h): Delete.
- (gdb_assert.h): Include.
- (x86_64_register_convert_to_virtual,
- x86_64_register_convert_to_raw ): Add check which lets only
- floating-point values to be converted.
- (value_push): Delete.
- (x86_64_push_arguments): Order of arguments pushed on stack fixed.
- (i386_gdbarch_init): Number of register_bytes fixed.
-
-2002-02-26 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Add x86-64 target.
-
-2002-02-26 Andrew Cagney <ac131313@redhat.com>
-
- * memattr.c (mem_command): Eliminate ``true'' and ``false''.
- * osfsolib.c (solib_map_sections): Ditto.
- * irix5-nat.c (solib_map_sections): Ditto.
- * corelow.c (gdb_check_format): Ditto.
- * symfile.c (symfile_bfd_open): Ditto.
- * solib.c (solib_map_sections): Ditto.
- Fix PR gdb/354.
-
-2002-02-26 Andrew Cagney <ac131313@redhat.com>
-
- * remote.c (_initialize_remote): By default, disable ``e'' and
- ``E'' step out-of-range packets.
-
-2002-02-26 Andreas Schwab <schwab@suse.de>
-
- * config/m68k/tm-linux.h (FRAME_SAVED_PC): Define as
- m68k_linux_frame_saved_pc.
- (IN_SIGTRAMP): Define as m68k_linux_in_sigtramp instead of
- in_sigtramp.
- (SIGCONTEXT_PC_OFFSET): Remove.
- * m68klinux-nat.c (m68k_linux_frame_saved_pc,
- m68k_linux_sigtramp_saved_pc): New functions.
- (IS_SIGTRAMP, IS_RT_SIGTRAMP): Define.
- (SIGCONTEXT_PC_OFFSET): Moved here from config/m68k/tm-linux.h.
- (UCONTEXT_PC_OFFSET): Define.
- (m68k_linux_in_sigtramp): Renamed from in_sigtramp, handle both
- non-RT and RT signal trampolines.
-
-2002-02-26 Richard Earnshaw <rearnsha@arm.com>
-
- * config/arm/tm-embed.h (TARGET_UPAGES): Delete.
- (TARGET_NBPG, STACK_END_ADDR): Delete
- (VARIABLES_INSIDE_BLOCK): Delete.
-
-2002-02-25 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c (perror_with_name): Make string parameter constant.
- (print_sys_errmsg): Ditto.
- (query): Ditto.
- * defs.h (perror_with_name): Update.
- (print_sys_errmsg): Update.
- (query): Update.
-
-2002-02-25 Daniel Jacobowitz <drow@mvista.com>
-
- From Eliot Dresselhaus <eliot@ayrnetworks.com>:
- * gdbserver/linux-mips-low.c (cannot_fetch_register): Fix typo.
-
-2002-02-25 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * rs6000-nat.c (set_host_arch): Do not switch to a new architecture
- if it already matches the current architecture from the exec file.
- Include arch-utils.h for gdbarch_info_init prototype.
- * Makefile.in (rs6000-nat.o): Update dependencies.
-
-2002-02-25 Eli Zaretskii <eliz@is.elta.co.il>
-
- * config/djgpp/djconfig.sh: Set NM=nm and CFLAGS="-g -O2" in the
- list of exported variables.
-
-2002-02-24 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/configure.srv: New file.
- * gdbserver/configure.in: Use configure.srv instead
- of the host/target makefile fragments. Set GDBSERVER_DEPFILES
- from it.
- * gdbserver/configure: Regenerated.
- * gdbserver/terminal.h: New file.
- * gdbserver/Makefile.in: Update for configure changes. Remove
- more unneeded include paths.
-
-2002-02-24 Andrew Cagney <ac131313@redhat.com>
-
- From wiz at danbala:
- * config/sparc/tm-sp64.h: Fix grammar and typos.
- Fix PR gdb/287.
-
-2002-02-24 Andrew Cagney <ac131313@redhat.com>
-
- * lin-lwp.c, thread-db.c, defs.h, cris-tdep.c: Replace ``Linux''
- with either ``GNU/Linux'' or ``Linux kernel''. Update copyright.
- * m68klinux-nat.c, sparc-linux-nat.c, x86-64-linux-nat.c: Ditto.
- * x86-64-linux-tdep.c, gregset.h, gdb_wait.h: Ditto.
- * ia64-linux-nat.c, infrun.c, linux-proc.c: Ditto.
- * proc-service.c, i386-linux-tdep.c, ppc-linux-tdep.c: Ditto.
- * s390-tdep.c: Ditto.
- * config/nm-linux.h, config/alpha/nm-linux.h: Ditto.
- * config/alpha/tm-alpha.h, config/alpha/tm-alphalinux.h:
- * config/alpha/xm-alphalinux.h, config/i386/nm-linux.h: Ditto.
- * config/i386/nm-x86-64.h, config/i386/tm-linux.h: Ditto.
- * config/m68k/tm-linux.h, config/mips/nm-linux.h: Ditto.
- * config/mips/tm-linux.h, config/mips/xm-linux.h: Ditto.
- * config/powerpc/tm-linux.h, config/s390/nm-linux.h: Ditto.
- * config/s390/tm-linux.h, config/sh/tm-linux.h: Ditto.
- * config/sparc/nm-linux.h, config/sparc/tm-linux.h: Ditto.
- * config/sparc/tm-sp64linux.h, config/sparc/xm-linux.h: Ditto.
- Fix PR gdb/378.
-
-2002-02-23 Andrew Cagney <ac131313@redhat.com>
-
- * lin-thread.c: Delete file.
- * configure.in (gdb_cv_struct_reg_r_gs): Update comment to refer
- to gdb_proc_service.h.
- * configure: Re-generate.
-
- * ocd.c (ocd_open): Do not try to open the "ocd" device.
- * serial.c (serial_open): Delete check for "ocd".
- Fix PR gdb/349.
-
- * Makefile.in (linux-thread.o): Delete target.
- * linux-thread.c: Delete file.
-
- * config/djgpp/fnchange.lst: Rename bfd/elf32-sh64.c. Tweak other
- renamed SH files to be consistent.
-
- * symtab.c (sort_search_symbols): Use xfree.
-
-2002-02-23 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-linux-tdep.c (arm_linux_init_abi): Register
- IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE
- * config/arm/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE): Replace old
- definition with undef, since we don't want the sysvr4 definition.
- (SKIP_TRAMPOLINE_CODE): Likewise.
-
-2002-02-23 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-02-22 Alfred M. Szmidt <ams@kemisten.nu>:
-
- * configure.in: (AC_CHECK_FUNCS) Added test for
- canonicalize_file_name Regenerated.
- * config.in, configure: Regenerated.
- * utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is
- defined use canonicalize_file_name.
-
-2002-02-23 Michael Chastain <mec@shout.net>
-
- * MAINTAINERS: Remove Michael Chastain from "paper trail" list.
-
-2002-02-23 Andrew Cagney <ac131313@redhat.com>
-
- * README: Remove references to cygnus.com.
- * MAINTAINERS: Change Past Maintainer addresses to ``foo at bar
- dot com'' form. Remove references to cygnus.com and sourceware.
-
-2002-02-23 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-02-19 Paul Eggert <eggert@twinsun.com>:
- * Makefile.in (VER): Change "head -1" to "sed q", since POSIX
- 1003.1-2001 no longer allows "head -1".
- * gdb/Makefile.in (version.c): Likewise.
- * gdb/doc/Makefile.in (GDBvn.texi): Likewise.
- * gdb/CONTRIBUTE: Change "diff -c3" to "diff -c", which is
- equivalent. POSIX 1003.1-2001 no longer allows "diff -c3".
-
-2002-02-23 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c (cmd_cfunc_eq): New function.
- * command.h (cmd_cfunc_eq): Declare.
- * cli/cli-decode.h (cmd_cfunc_eq): Ditto.
-
- * cli/cli-cmds.h (is_complete_command): Change parameter to a
- ``struct cmd_list_element *''.
- * cli/cli-cmds.c (is_complete_command): Update. Use
- cmd_cfunc_eq.
- * top.c (execute_command): Pass the command to
- is_complete_command.
- * tracepoint.c: Replace function.cfunc with cmd_cfunc_eq.
-
-2002-02-23 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-02-20 Martin Schwidefsky <schwidefsky@de.ibm.com>:
- * config/s390/tm-s390.h (GDB_TARGET_IS_ESAME): Use renamed
- architecture defines.
- * s390-tdep.c (s390_gdbarch_init): Likewise.
-
-2002-02-23 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-linux-tdep.c (arm_linux_extract_return_value): Make static.
- (arm_linux_push_arguments): Likewise.
- (arm_linux_init_abi): Register them. Also register linux-specific
- call_dummy_words.
- (find_minsym_and_objfile): Use strcmp, not STREQ.
- * config/arm/tm-linux.h (CALL_DUMMY_WORDS): Delete.
- (arm_linux_call_dummy_words): Delete declaration.
- (EXTRACT_RETURN_VALUE, PUSH_ARGUMENTS): Delete.
- (arm_linux_extract_return_value, arm_linux_push_arguments): Delete
- declarations.
- (LOWEST_PC): Delete.
-
-2002-02-23 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * maint.c (print_section_info): Do not prepend `0x' to filepos
- output, it will be handled by local_hex_string_custom.
-
-2002-02-23 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-linux-nat.c (store_newfpe_single): Use regcache_collect.
- (store_newfpe_double, store_newfpe_extended, store_fpregister)
- (store_register, store_regs, fill_gregset, fill_fpregset): Likewise.
-
-2002-02-22 Jim Blandy <jimb@redhat.com>
-
- Indicate that the bcache functions don't change the strings
- they're passed.
- * bcache.h (bcache, hash): Add `const' keywords to declarations.
- * bcache.c (bcache, hash): Add `const' keywords to definitions.
-
-2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * win32-nat.c (child_create_inferior): Fix create flags setting bug.
-
-2002-02-21 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (register_loaded_dll): Just use raw name when we can't
- find the complete path to a loaded DLL.
-
-2002-02-21 Fred Fish <fnf@redhat.com>
-
- * dbxread.c (process_one_symbol): When finding an N_FUN symbol
- that marks the end of the range of a function, enter a line number
- entry that has a line number of zero and a PC offset that matches
- the end of the function. This starts a range of PC's for which no
- line number information is known.
- * symtab.c (find_pc_sect_line): If our best fit is in a range of
- PC's for which no line number info is found (line number is zero)
- then we didn't find any valid line information.
- * symtab.h: Document use of zero line number entry.
-
-2002-02-21 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-linux-nat.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Define.
- (have_ptrace_getvrregs): Define for run time checks.
- (gdb_vrregset_t): New type for Altivec register handling.
- (fetch_register, store_register): Fetch/store altivec register
- when needed.
- (fetch_altivec_register, store_altivec_register): New functions.
- (supply_vrregset, fill_vrregset): New functions.
- (fetch_altivec_registers, store_altivec_registers): New functions.
- (fetch_ppc_registers, store_ppc_registers): Fetch/store altivec
- registers as well.
-
-2002-02-21 Jiri Smid <smid@suse.cz>
-
- * config/i386/x86-64linux.mh (NATDEPFILES): Remove x86-64-nat.o.
-
-2002-02-21 Richard Earnshaw <rearnsha@arm.com>
-
- * Makefile.in (armnbsd-nat.o): Update dependencies.
- * armnbsd-nat.c (supply_gregset): New function. Common code to
- supply the integer register set.
- (supply_fparegset): New function. Similar for FPA registers.
- (fetch_regs, fetch_fp_regs): Use them.
- (fetch_core_registers): Likewise.
- (fetch_elfcore_registers): New function.
- (arm_netbsd_elfcore_fns): New core-file type specification.
- (_initialize_arm_netbsd_nat): Register it.
-
-2002-02-21 Richard Earnshaw <rearnsha@arm.com>
-
- * armnbsd-nat.c: Include gdbcore.h.
- (FETCH_INFERIOR_REGISTERS): Just error if this isn't defined.
- (fetch_regs, fetch_fp_regs, store_regs, store_fp_regs): Add explicit
- 'void' to declaration, to shut up ARI.
- (fetch_core_registers): Make static. Rewrite using supply_register.
- (arm_netbsd_core_fns): New core-file type specification.
- (_initialize_arm_netbsd_nat): New function.
-
-2002-02-21 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (register_loaded_dll): Correctly check for invalid handle
- value.
-
-2002-02-20 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (register_loaded_dll): Handle case where FindFirstFile
- fails.
-
-2002-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * jv-exp.y (parse_number): Change type of implicit longs
- to builtin_type_uint64.
-
-2002-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c (mywait): Change argument to waitpid
- to be an integer instead of a `union wait'.
-
-2002-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * mips-linux-nat.c: Call the operating system GNU/Linux.
- * mips-linux-tdep.c: Likewise.
- * mips-tdep.c: Likewise.
-
-2002-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- Fix PR gdb/265.
- * jv-exp.y (parse_number): Handle 64-bit integers.
-
-2002-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/configure.in: Remove AM_PROC_CC_STDC. Change
- AC_STDC_HEADERS to AC_HEADER_STDC.
- * gdbserver/configure: Regenerated.
-
-2002-02-20 Richard Earnshaw <rearnsha@arm.com>
-
- * arc-tdep.c (get_longjmp_target): Only compile this function if JB_PC
- is defined.
- * sparc-tdep.c (get_longjmp_target): Likewise.
-
-2002-02-20 Richard Earnshaw <rearnsha@arm.com>
-
- * News: Add news about ARM and Multi-arch. Mention the new target
- arm*-*-netbsd*.
-
-2002-02-19 Jim Blandy <jimb@redhat.com>
-
- * stabsread.c (error_type_complaint): Improve error message.
-
-2002-02-19 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/README: Update documentation.
- * gdbserver/configure.in: Update configury to match documentation.
- * gdbserver/Makefile.in: Likewise.
- * gdbserver/configure: Regenerated.
- * gdbserver/aclocal.m4: New file, generated by aclocal.
- * gdbserver/config.in: New file, generated by autoheader.
-
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
-
- * config/djgpp/fnchange.lst: Add change rules for armnbsd-tdep.c and
- armnbsd-nat.c.
-
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.h (enum arm_float_model): New enum.
- (struct gdbarch_tdep): Add fp_model.
- * arm-tdep.c (arm_gdbarch_init): Set fp_model in tdep. Defer setting
- up floating-point conversions until we know the floating-point model
- in use by the inferior. Don't complain about being unable to
- determine the ABI of the inferior when we don't have one.
- (arm_extract_return_value): Support different floating-point models.
- (arm_store_return_value): Likewise.
- * armnbsd-tdep.c (arm_netbsd_aout_init_abi): Set fp_model in tdep to
- ARM_FLOAT_SOFT.
- (arm_netbsd_elf_init_abi): Set fp_model to ARM_FLOAT_SOFT_VFP.
-
-2002-02-19 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use
- of ``current_gdbarch''.
-
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
-
- * armnbsd-nat.c : ANSIfy all function declarations.
- (fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs): New.
- (fetch_inferior_registers): Re-implement in terms of above.
- (store_register, store_regs, store_fp_register, store_fp_regs): New.
- (store_inferior_registers): Re-implement in terms of above.
-
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-linux-nat.c: Linux -> GNU/Linux when not talking about the
- kernel.
- * arm-linux-tdep.c: Likewise.
- * config/arm/tm-linux.h: Likewise.
+ * acconfig.h (_MSE_INT_H): Remove.
+ * configure.in: Create "Checks for header files" section, and move
+ appropriate tests there. Don't check for objlist.h, wchar.h,
+ wctype.h and asm/debugreg.h. Rewrite Solaris 2.[78] <curses.h>
+ misdetection fix. Also add "Checks for types", "Checks for
+ compiler characteristics" and "Checks for library functions"
+ sections.
+ * config.in, configure: Regenerated.
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+ * configure.in: Create "Checks for programs" section, and move
+ appropriate tests there.
- * configure.tgt (arm*-*-netbsd*): This variant is now fully multi-arch.
- * config/arm/nbsd.mt (TM_FILE): Delete.
- * config/arm/tm-nbsd.h: Delete.
+2003-01-01 Mark Kettenis <kettenis@gnu.org>
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_gdbarch_init): Initialize TARGET_CHAR_SIGNED.
- Initialize CALL_DUMMY_LENGTH.
-
-2002-02-19 Richard Earnshaw <rearnsha@arm.com>
-
- * armnbsd-tdep.c (arm_netbsd_aout_in_solib_call_trampoline): New
- function.
- (arm_netbsd_aout_init_abi): Initialize IN_SOLIB_CALL_TRAMPOLINE.
- * config/arm/tm-nbsd.h: Don't include config/tm-nbsd.h, it only
- defines one thing and that is incorrect for this port.
- (IN_SOLIB_CALL_TRAMPOLINE): Delete.
-
-2002-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * go32-nat.c: add i386-tdep.h include to import FP_REGNUM_P macro.
-
-2002-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * win32-nat.c (display_selector): New function. Displays information
- about the information returned by GetThreadSelectorEntry API function.
- (display_selectors): New function. Displays the infomation of
- the selector given as argument, or of CS, DS ans FS selectors
- if no argument is given.
- ( _initialize_inftarg): Add "w32" as info prefix command.
- Add "info w32 selector" as command calling display_selectors.
-
-2002-02-19 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * i386-tdep.c (get_longjmp_target): Fix compilation failure
- by setting dummy values to JB_PC and JB_ELEMENT_SIZE
- if not defined.
-
-2002-02-18 Richard Earnshaw <rearnsha@arm.com>
-
- * config/arm/nbsd.mt (TDEPFILES): Add solib-sunos.o.
-
-2002-02-18 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_set_call_dummy_breakpoint_offset): New function.
- (arm_fix_call_dummy): Call it.
- (arm_call_dummy_breakpoint_offset): Delete.
- (arm_gdbarch_init): Initialize call_dummy_breakpoint_offset.
- * config/arm/tm-arm.h (CALL_DUMMY_BREAKPOINT_OFFSET): Delete.
-
-2002-02-18 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (FRAME_CHAIN_VALID): Only require at level 2.
- Default to func_frame_chain_valid.
- * gdbarch.h, gdbarch.c: Re-generate.
- * frame.h (FRAME_CHAIN_VALID): Delete definition.
-
-2002-02-18 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-linux-nat.c: Update copyright.
- (fetch_register, store_register): Add tid parameter, don't compute
- tid here.
- (fetch_ppc_registers, store_ppc_registers): Add tid
- parameter. Pass it along to callees.
- (fetch_inferior_registers, store_inferior_registers): Compute tid
- here, and pass it to calleed functions.
- (fill_gregset, supply_fpregset): Clean up formatting.
-
-2002-02-18 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_gdbarch_init): Initialize coerce_float_to_double.
- * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Delete.
-
-2002-02-18 Richard Earnshaw <rearnsha@arm.com>
-
- * gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
- * gdbarch.c gdbarch.h: Regenerate.
- * breakpoint.c (create_longjmp_breakpoint): Always compile this
- function.
- (breakpoint_reset): Test GET_LONGJMP_TARGET_P().
- * infrun.c (GET_LONGJMP_TARGET): Delete default definition.
- (handle_inferior_event): Test GET_LONGJMP_TARGET_P().
-
- * arm-tdep.h (struct gdbarch_tdep): Add jb_pc and jb_elt_size fields.
- * arm-tdep.c (arm_get_longjmp_target): New function.
- (arm_gdbarch_init): Initialize jb_pc to -1. If ABI handler changes
- this to a positive value register arm_get_longjmp_target as the
- longjmp handler.
- * arm-linux-tdep.c (arm_get_longjmp_target): Delete.
- (arm_linux_init_abi): Set up longjmp description in tdep.
- * armnbsd-nat.c (get_longjmp_target): Delete.
- * armnbsd-tdep.c (arm_netbsd_init_abi_common): Set up longjmp
- description in tdep.
- * config/arm/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC): Delete.
- (get_longjmp_target): Delete declaration.
- (GET_LONGJMP_TARGET): Delete.
- * config/arm/tm-linux.h (arm_get_longjmp_target): Delete declaration.
- (GET_LONGJMP_TARGET): Delete.
-
-2002-02-17 Kevin Buettner <kevinb@redhat.com>
-
- From Peter Schauer <pes@regent.e-technik.tu-muenchen.de>:
- * ia64-tdep.c (ia64_gdbarch_init): Eliminate incorrect use
- of ``current_gdbarch''.
-
-2002-02-17 Tom Tromey <tromey@redhat.com>
-
- * cli/cli-cmds.c (compare_strings): New function.
- (complete_command): Only print each unique item once.
- * completer.h (complete_line): Declare.
- * completer.c (complete_line): New function.
- (line_completion_function): Use it.
-
-2002-02-16 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (TARGET_LONG_DOUBLE_BIT): Default to 64.
- * gdbarch.h, gdbarch.c: Re-generate.
-
-2002-02-16 Daniel Jacobowitz <drow@mvista.com>
-
- * valarith.c (value_x_unop): Fix decrement; support post-decrement.
-
-2002-02-16 Daniel Jacobowitz <drow@mvista.com>
-
- From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>:
- * valops.c (value_arg_coerce): Don't take the address of a reference
- to convert an argument to a reference.
-
-2002-02-15 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (get_image_name): New function.
- (handle_load_dll): Use get_image_name function.
- (get_child_debug_event): Avoid registering debug events until possibly
- execed process is started.
- (child_create_inferior): Allow invocation via shell so that command
- line redirection, etc. works ok.
- (_initialize_inftarg): Add new command: "set shell" to control whether
- a shell is used to start a process.
-
-2002-02-15 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-mips-low.c (cannot_fetch_register): Use find_regno
- instead of find_register_by_number.
- (cannot_store_register): Likewise.
-
-2002-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * dwarf2read.c: Replace fprintf (stderr, ...) by
- fprintf_unfiltered (gdb_stderr, ...).
-
-2002-02-15 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/gdbserver.1: Document --attach.
-
-2002-02-15 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.h (struct gdbarch_tdep): Add fields for breakpoint
- descriptions.
- * arm-tdep.c (arm_default_arm_le_breakpoint)
- (arm_default_arm_be_breakpoint, arm_default_thumb_le_breakpoint)
- (arm_default_thumb_be_breakpoint): New. Initialize them from
- traditional breakpoint defines.
- (arm_breakpoint_from_pc): Use new gdbarch_tdep entries.
- (arm_gdbarch_init): Initialize new breakpoint variables.
- * arm-linux-tdep.c (arm_linux_arm_le_breakpoint): New.
- (arm_linux_init_abi): Initialize linux-specific breakpoint.
- * armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint): New.
- (arm_netbsd_aout_init_abi, arm_netbsd_elf_init_abi): Split common
- code out to ...
- (arm_netbsd_init_abi_common): ... here; new function.
- * config/arm/tm-arm.h (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT)
- (THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Delete.
- * config/arm/tm-linux.h (ARM_LE_BREAKPOINT): Delete.
- * config/arm/tm-nbsd.h (ARM_LE_BREAKPOINT): Delete.
-
-2002-02-15 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.h (enum arm_abi): New enum.
- (struct gdbarch_tdep): New structure.
- (LOWEST_PC): Provide a default.
- (arm_gdbarch_register_os_abi): Declare new function.
- * arm-tdep.c (arm_abi_names): New array.
- (process_note_abi_tag_sections): New function.
- (get_elfosabi): New function.
- (arm_gdbarch_register_os_abi): New function.
- (arm_gdbarch_init): Try to determine the ABI of the inferior. If
- support for that ABI has been built in, then call the appropriate
- configuration routine. Use gdbarch_num_regs() to get the number
- of registers.
- (arm_dump_tdep): New function.
- (arm_init_abi_eabi_v1, arm_init_abi_eabi_v2, arm_init_abi_apcs): New
- place-holder functions.
- (_initialize_arm_tdep): Register them.
- * config/arm/tm-arm.h (LOWEST_PC): Delete.
-
- * armnbsd-tdep.c: New file.
- * Makefile.in (armnbsd-tdep.o): Add dependencies.
- * config/arm/nbsd.mt (TDEPFILES): Add it.
- * config/arm/tm-nbsd.h (LOWEST_PC): Delete.
-
- * armnbsd-nat.c: Include regcache.h.
- * Makefile.in (armnbsd-nat.o): Update dependency list.
-
- * arm-tdep.c (arm_get_next_pc): Use printf_filtered for error message.
-
-2002-02-14 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/Makefile.in: Fix typos in target rules.
-
-2002-02-14 Daniel Jacobowitz <drow@mvista.com>
-
- Fix part of PR gdb/267.
- * linespec.c (find_methods): Handle constructors specially for now.
-
-2002-02-14 Corinna Vinschen <vinschen@redhat.com>
-
- * arm-tdep.c (arm_push_arguments): Eliminate special float type
- handling.
- * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Define to call
- standard_coerce_float_to_double().
-
-2002-02-14 Christopher Faylor <cgf@redhat.com>
-
- * config/i386/xm-cygwin.h: Revert inadvertent reinclusion of
- GDBINIT_FILENAME.
-
-2002-02-14 Elena Zannoni <ezannoni@redhat.com>
-
- * rs6000-tdep.c (rs6000_gdbarch_init): Don't call
- find_variant_by_name, because it confuses the multiarch
- framework. Return NULL if there isn't an architecture with the
- user supplied name, instead of forcing a different one without
- recording the change with the multiarch machinery.
- (find_variant_by_name): Delete.
-
-2002-02-14 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * config/i386/i386sol2.mh (NATDEPFILES): Add i387-nat.o, needed by
- i386v4-nat.o now. Add gcore.o, Solaris x86 supports gcore.
-
-2002-02-13 Martin M. Hunt <hunt@redhat.com>
-
- * stack.c (print_frame_info_base): When calling
- print_frame_info_listing_hook, set current_source_symtab.
-
-2002-02-14 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/Makefile.in: Add regformats directory to INCLUDE_CFLAGS,
- and remove unused $(INCLUDE_DIR).
- Add regcache.c to OBS.
- Add generated register protocol files to clean target.
- Update dependencies for new objects, obsolete old target code.
-
- * gdbserver/linux-low.c: Remove all platform-specific code to
- new files. Remove various dead code. Update to use regcache
- functionality.
- * gdbserver/remote-utils.c (fromhex): Add return statement
- to quiet warning.
- (putpkt): Dynamically allocate buf2 because PBUFSIZ is no longer
- constant.
- (input_interrupt): Add integer parameter to match prototype
- of a signal handler.
- (outreg): Use register_data ().
- (prepare_resume_reply): Use gdbserver_expedite_regs.
- * gdbserver/server.c (main): Dynamically allocate own_buf because
- PBUFSIZ is no longer constant. Use registers_to_string () and
- registers_from_string ().
- * gdbserver/server.h: No longer include "defs.h". Add prototypes
- for error (), fatal (), and warning (). Update definition of
- PBUFSIZ to use regcache functionality. Add include guard.
- * gdbserver/utils.c (fatal): Add missing ``const''.
- (warning): New function.
-
- * regformats/regdat.sh: Include "regcache.h" in generated files.
- Provide init_registers () function.
- * regformats/regdef.h: Add prototype for set_register_cache ().
- Add include guard.
-
- * gdbserver/linux-arm-low.c: New file.
- * gdbserver/linux-i386-low.c: New file.
- * gdbserver/linux-ia64-low.c: New file.
- * gdbserver/linux-m68k-low.c: New file.
- * gdbserver/linux-mips-low.c: New file.
- * gdbserver/linux-ppc-low.c: New file.
- * gdbserver/linux-sh-low.c: New file.
-
- * gdbserver/regcache.c: New file.
- * gdbserver/regcache.h: New file.
-
- * gdbserver/low-linux.c: Removed obsolete file.
-
-2002-02-14 Daniel Jacobowitz <drow@mvista.com>
-
- * config/arm/linux.mt: Update GDBSERVER_DEPFILES.
- * config/i386/linux.mt: Likewise.
- * config/ia64/linux.mt: Likewise.
- * config/m68k/linux.mh: Likewise.
- * config/powerpc/linux.mh: Likewise.
- * config/mips/linux.mt: Likewise.
-
- * config/sh/linux.mt: Add GDBSERVER_DEPFILES.
-
- * config/i386/i386lynx.mh: Mark gdbserver variables
- as (currently) obsolete for this target.
- * config/i386/nbsd.mt: Likewise.
- * config/i386/nbsdelf.mt: Likewise.
- * config/m32r/m32r.mt: Likewise.
- * config/m68k/m68klynx.mh: Likewise.
- * config/m68k/nbsd.mt: Likewise.
- * config/m68k/sun3os4.mh: Likewise.
- * config/mips/vr5000.mt: Likewise.
- * config/ns32k/nbsd.mt: Likewise.
- * config/pa/hppabsd.mh: Likewise.
- * config/pa/hppaosf.mh: Likewise.
- * config/powerpc/nbsd.mt: Likewise.
- * config/rs6000/rs6000lynx.mh: Likewise.
- * config/s390/s390.mt: Likewise.
- * config/s390/s390x.mt: Likewise.
- * config/sparc/sparclynx.mh: Likewise.
- * config/sparc/sun4os4.mh: Likewise.
- * config/i386/x86-64linux.mt: Likewise.
- * config/sparc/linux.mh: Likewise.
-
-2002-02-14 Daniel Jacobowitz <drow@mvista.com>
-
- * configure.tgt: Configure gdbserver only for known working
- targets. Set ${build_gdbserver} instead of modifying ${configdirs}.
- * configure.in: Check ${build_gdbserver}. Put gdbserver/ into
- SUBDIRS if it is configured. Update comment for ${nativefile}.
+ * configure.in: Create "Checks for libraries" section, and move
+ appropriate tests there. Cleanup check for wctype in libw. Use
+ AC_SEARCH_LIBS to see whether we need libsocket.
* configure: Regenerated.
-2002-02-13 Michael Snyder <msnyder@redhat.com>
-
- * config/i386/i386v42mp.mh: Add gcore.o to NATDEPFILES.
-
- * gcore.c (gcore_command): Use gcore_default_target instead of NULL.
- (default_gcore_mach): Just return 0, work around a problem in bfd.
- (default_gcore_target): OK to return NULL if exec_bfd is null.
- (make_mem_sec): Use a cast, avoid a warning.
-
- * procfs.c (find_memory_regions_callback): Use a cast instead of
- calling host_pointer_to_address (which complains if
- sizeof (host pointer) != sizeof (target pointer)).
- (procfs_make_note_section): Avoid overflow in psargs string.
-
- * procfs.c (procfs_make_note_section): Make the default
- implementation return an error.
-
-2002-02-13 Rodney Brown <rbrown64@csc.com.au>
-
- * procfs.c (procfs_make_note_section): Provide a default definition
- (for alpha-dec-osf4.0f). Fix typos.
-
-2002-02-13 Elena Zannoni <ezannoni@redhat.com>
-
- * linux-proc.c: Add include of regcache.h.
- * Makefile.in (linux-proc.o): Add dependency on regcache.h.
-
-2002-02-13 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-01-18 Greg McGary <greg@mcgary.org>:
- * memattr.c (create_mem_region): Disallow useless empty region.
- Regions are half-open intervals, so allow [A..B) [B..C) as
- non-overlapping.
-
-2002-02-13 Michael Chastain <mec@shout.net>
-
- * defs.h: Kill CONST_PTR.
- * c-lang.h (c_builtin_types): Change CONST_PTR to simple "const".
- * c-lang.c (c_builtin_types): Likewise.
- * ch-lang.c (ch_builtin_types): Likewise.
- * f-lang.c (f_builtin_types): Likewise.
- * language.c (unknown_builtin_types): Likewise.
- * m2-lang.c (m2_builtin_types): Likewise.
- * p-lang.c (pascal_builtin_types): Likewise.
- * scm-lang.c (c_builtin_types): Likewise.
-
-2002-02-13 Keith Seitz <keiths@redhat.com>
-
- * arm-tdep.h (arm_get_next_pc): Add declaration.
-
-2002-02-13 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_use_struct_convention): Make static. Move to be
- with other related struct-returning functions.
- (arm_extract_struct_value_address): New function.
- (arm_gdbarch_init): Initialize the above in multi-arch vector. Also
- initialize float_format, double_format and long_double_format as
- appropriate to the endianness of the target.
- * config/arm/tm-arm.h (TARGET_DOUBLE_FORMAT): Delete.
- (arm_use_struct_convention): Delete declaration.
- (USE_STRUCT_CONVENTION, EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
-
-2002-02-13 Keith Seitz <keiths@redhat.com>
-
- * defs.h (core_addr_to_string_nz): New function.
-
-2002-02-13 Mark Kettenis <kettenis@gnu.org>
-
- Apply missing bits of 2002-01-15 patch.
- * i386v4-nat.c (supply_fpregset): Use i387_supply_fsave.
- (fill_fpregset): Use i387_fill_fsave.
-
-2002-02-12 Keith Seitz <keiths@redhat.com>
-
- * utils.c (core_addr_to_string): Use phex instead of phex_nz.
- (core_addr_to_string_nz): New function.
-
-2002-02-11 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-linux-nat.c: Really include arm-tdep.h.
- * config/arm/tm-linux.h (struct type, struct value): Declare.
-
-2002-02-11 Michael Snyder <msnyder@redhat.com>
-
- * procfs.c: Include elf-bfd.h (for elfcore_write functions).
- (gcore section): Ifdef for Solaris and Unixware only.
- (procfs_do_thread_registers): Unixware needs one lwpstatus
- per thread (not one prstatus or pstatus).
- (procfs_make_note_section): Iterate only over kernel threads (lwps),
- not over all gdb threads. For unixware, call elfcore_write_pstatus
- once before iterating over threads.
-
-2002-02-11 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.h: New file.
- * arm-tdep.c: Include arm-tdep.h.
- (arm_addr_bits_remove, arm_smash_text_address, arm_saved_pc_after_call)
- (arm_skip_prologue, arm_call_dummy_words, arm_fix_call_dummy)
- (arm_print_float_info, arm_register_type, convert_to_extended)
- (arm_elf_make_msymbols_special, arm_coff_make_msymbol_special)
- (arm_extract_return_value, arm_register_name): Make static.
- (arm_software_single_step): Similarly. Fix types in declaration.
- (arm_register_byte, arm_register_raw_size, arm_register_virtual_size)
- (arm_store_return_value, arm_store_struct_return): New functions.
- (arm_gdbarch_init): Register the above functions. Also register
- call_dummy_start_offset, sizeof_call_dummy_words,
- function_start_offset, inner_than, decr_pc_after_break, fp_regnum,
- sp_regnum, pc_regnum, register_bytes, num_regs, max_register_raw_size,
- max_register_virtual_size, register_size. Set up
- prologue_cache.saved_regs here, rather than ...
- (_initialize_arm_tdep): ... here.
- * config/arm/tm-arm.h (struct type, struct value): Delete forward
- declarations.
- (arm_addr_bits_remove, arm_smash_text_address, arm_saved_pc_after_call)
- (arm_skip_prologue, arm_call_dummy_words, arm_fix_call_dummy)
- (arm_print_float_info, arm_register_type, convert_to_extended)
- (arm_elf_make_msymbols_special, arm_coff_make_msymbol_special)
- (arm_extract_return_value, arm_register_name): Delete declarations.
- (SMASH_TEXT_ADDRESS, ADDR_BITS_REMOVE, FUNCTION_START_OFFSET)
- (SKIP_PROLOGUE, SAVED_PC_AFTER_CALL, INNER_THAN, BREAKPOINT_FROM_PC)
- (DECR_PC_AFTER_BREAK, PRINT_FLOAT_INFO, REGISTER_SIZE, NUM_REGS)
- (REGISTER_NAME, REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE)
- (REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE)
- (MAX_REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, STORE_STRUCT_RETURN)
- (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE, CALL_DUMMY_WORDS)
- (SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_START_OFFSET, FIX_CALL_DUMMY)
- (SOFTWARE_SINGLE_STEP_P, SOFTWARE_SINGLE_STEP)
- (ELF_MAKE_MSYMBOL_SPECIAL, COFF_MAKE_MSYMBOL_SPECIAL) Delete.
- (arm_pc_is_thumb, arm_pc_is_thumb_dummy, thumb_get_next_pc)
- (arm_get_next_pc): No-longer static -- these are needed by the RDI
- interface.
- * arm-linux-nat.c arm-linux-tdep.c armnbsd-nat.c: Include arm-tdep.h.
- * remote-rdi.c remote-rdp.c: Likewise.
- * Makefile.in (arm-linux-nat.o, arm-linux-tdep.o arm-tdep.o)
- (armnbsd-nat.o, remote-rdi.o, remote_rdp.o): Update dependencies.
- * config/arm/tm-nbsd.h (SOFTWARE_SINGLE_STEP_P): Delete bogus
- definition.
-
- * arm-tdep.h (ARM_A1_REGNUM, ARM_A4_REGNUM, ARM_AP_REGNUM)
- (ARM_SP_REGNUM, ARM_LR_REGNUM, ARM_PC_REGNUM, ARM_F0_REGNUM)
- (ARM_F3_REGNUM, ARM_F7_REGNUM, ARM_FPS_REGNUM, ARM_PS_REGNUM): Renamed
- from non-ARM_ prefixed definitions.
- * arm-tdep.c armnbsd-nat.c arm-linux-nat.c arm-linux-tdep.c: Update
- all uses of above.
- * remote-rdi.c remote-rdp.c: Likewise.
- * arm-linux-nat.c (ARM_CPSR_REGNUM): Renamed from CPSR_REGNUM.
-
-2002-02-11 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_frameless_function_invocation)
- (arm_frame_args_address, arm_frame_locals_address, arm_frame_num_args)
- (arm_frame_chain, arm_init_extra_frame_info, arm_frame_saved_pc)
- (arm_read_fp, arm_frame_init_saved_regs, arm_push_dummy_frame)
- (arm_pop_frame, arm_get_next_pc): Make static.
- (arm_gdbarch_init): Register above in gdbarch structure.
- (arm_read_fp): Renamed from arm_target_read_fp.
- (arm_pc_is_thumb, arm_pc_is_thumb_dummy): Make static.
- * config/arm/tm-arm.h (arm_frameless_function_invocation)
- (arm_frame_args_address, arm_frame_locals_address, arm_frame_num_args)
- (arm_frame_chain, arm_init_extra_frame_info, arm_frame_saved_pc)
- (arm_target_read_fp, arm_frame_init_saved_regs, arm_push_dummy_frame)
- (arm_pop_frame, arm_get_next_pc, arm_pc_is_thumb)
- (arm_pc_is_thumb_dummy): Delete declarations.
- (INIT_EXTRA_FRAME_INFO, TARGET_READ_FP, FRAME_CHAIN)
- (FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, FRAME_ARGS_ADDRESS)
- (FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS, FRAME_ARGS_SKIP)
- (FRAME_INIT_SAVED_REGS, PUSH_DUMMY_FRAME, POP_FRAME): Delete.
-
-2002-02-10 Daniel Jacobowitz <drow@mvista.com>
-
- * symtab.c (compare_search_syms): New function.
- (sort_search_symbols): New function.
- (search_symbols): Sort symbols after searching rather than
- before.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Linux -> GNU/Linux.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh: For for level one methods, disallow a definition
- when partially multi-arched. Add comments explaining rationale.
- * gdbarch.h: Re-generate.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (EXTRA_STACK_ALIGNMENT_NEEDED): Don't require when
- multi-arch partial.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh: Map LEVEL onto a symbolic GT_LEVEL. Exit on bad
- field. Use diff -u.
- * gdbarch.c: Re-generate.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * config/mips/tm-mips.h (CALL_DUMMY_LOCATION): Delete.
- * gdbarch.sh (PUSH_RETURN_ADDRESS): Don't require when multi-arch
- partial.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (REGISTER_CONVERTIBLE): Don't require when
- multi-arch partial.
- (PUSH_ARGUMENTS): Switch to using predefault.
- * gdbarch.c: Regenerate.
-
-2002-02-10 Andrew Cagney <ac131313@redhat.com>
-
- * valops.c (PUSH_ARGUMENTS): Delete definition.
- * gdbarch.sh (PUSH_ARGUMENTS): Don't require when multi-arch
- partial. Default to default_push_arguments.
- * gdbarch.h, gdbarch.c: Regenerate.
-
-2002-02-09 Andrew Cagney <ac131313@redhat.com>
-
- * defs.h (throw_exception): Rename return_to_top_level. Update
- comments.
- * utils.c (error_stream, internal_verror, quit): Ditto.
- * top.c (throw_exception, catcher): Ditto.
- * sparclet-rom.c (sparclet_load): Ditto.
- * remote.c (interrupt_query, minitelnet): Ditto.
- * remote-sds.c (interrupt_query): Ditto.
- * remote-mips.c (mips_error, mips_kill): Ditto.
- * ocd.c (interrupt_query): Ditto.
- * monitor.c (monitor_interrupt_query): Ditto.
- * m3-nat.c (suspend_all_threads, thread_resume_command): Ditto.
- * target.h: Update comment.
-
- * m3-nat.c, ocd.c, sparclet-rom.c: Update copyright.
-
-2002-02-09 Andrew Cagney <ac131313@redhat.com>
-
- * gdbarch.sh (TARGET_LONG_DOUBLE_FORMAT): Default to
- default_double_format.
- * gdbarch.h, gdbarch.c: Re-generate.
- * findvar.c (floatformat_unknown): Delete variable definition.
- * doublest.h (floatformat_unknown): Delete variable declaration.
-
-2002-02-09 Jim Blandy <jimb@redhat.com>
-
- * stabsread.c (read_type): Add code to parse Sun's syntax for
- prototyped function types.
-
-2002-02-09 Andrew Cagney <ac131313@redhat.com>
-
- * Makefile.in (SUBDIR_CLI_INITS): Set to SUBDIR_CLI_SRCS.
- (SUBDIR_MI_INITS): Set to SUBDIR_MI_SRCS.
-
-2002-02-09 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * xcoffsolib.c (_initialize_xcoffsolib): Renamed from
- _initialize_solib. Fixes name clash with solib.c:_initialize_solib,
- now _initialize_xcoffsolib gets called again and overrides the
- commands from solib.c in a native configuration.
-
-2002-02-09 Mark Kettenis <kettenis@gnu.org>
-
- * doublest.c (store_typed_floating): Don't try to return a value.
- Fixes PR gdb/290.
-
-2002-02-08 Jim Blandy <jimb@redhat.com>
-
- * c-typeprint.c (c_type_print_varspec_suffix): If a function type
- is prototyped and has no arguments, print its argument list as
- `(void)'.
-
-2002-02-08 Chris Demetriou <cgd@broadcom.com>
-
- * MAINTAINERS (write-after-approval): Add myself.
- (paper-trail): I've escaped!
-
-2002-02-08 Christopher Faylor <cgf@redhat.com>
-
- * win32-nat.c (cygwin_pid_to_str): Revert 2002-02-08 change xasprintf
- changes.
- (_initialize_check_for_gdb_ini): Ditto.
-
-2002-02-08 Martin M. Hunt <hunt@redhat.com>
-
- * win32-nat.c (cygwin_pid_to_str): Fix typo.
- xaprintf -> xasprintf.
-
-2002-02-08 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * win32-nat.c: Remove use of printf and sprintf functions.
-
-2002-02-08 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_frame_chain_valid): Make static.
- (arm_push_arguments): Likewise.
- (arm_gdbarch_init): New function.
- (_initialize_arm_tdep): Call it.
- * config/arm/tm-arm.h (GDB_MULTI_ARCH): Set to 1.
- (TARGET_DOUBLE_FORMAT): Test TARGET_BYTE_ORDER, not target_byte_order.
- (FRAME_CHAIN_VALID): Delete.
- (arm_frame_chain_valid): Delete declaration.
- (PUSH_ARGUMENTS): Delete.
- (arm_push_arguments): Delete declaration.
- (CALL_DUMMY_P): Delete.
-
-2002-02-08 Andrew Cagney <ac131313@redhat.com>
- Corinna Vinschen <vinschen@redhat.com>
-
- * gdbtypes.c (build_gdbtypes): Disable setting a specific float format
- on builtin float types.
-
-2002-02-08 Daniel Jacobowitz <drow@mvista.com>
-
- * utils.c: Include <curses.h> before "bfd.h".
- * tui/tui-hooks.c: Likewise.
- * tui/tui.c: Likewise.
- * tui/tuiCommand.c: Likewise.
- * tui/tuiData.c: Likewise.
- * tui/tuiDataWin.c: Likewise.
- * tui/tuiDisassem.c: Likewise.
- * tui/tuiGeneralWin.c: Likewise.
- * tui/tuiIO.c: Likewise.
- * tui/tuiLayout.c: Likewise.
- * tui/tuiRegs.c: Likewise.
- * tui/tuiSource.c: Likewise.
- * tui/tuiSourceWin.c: Likewise.
- * tui/tuiStack.c: Likewise.
- * tui/tuiWin.c: Likewise.
-
-2002-02-07 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c (sh_nofp_frame_init_saved_regs): Extend where[] array
- to include space for pseudoregs as well. Update loops accordingly.
- (sh_fp_frame_init_saved_regs): Ditto.
- (sh_init_extra_frame_info, sh_pop_frame): Split long lines.
-
-2002-02-07 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Andreas Schwab is GNU/Linux m68k maintainer.
- Add Richard Earnshaw to Arm maintainers.
-
-2002-02-07 Andrew Cagney <ac131313@redhat.com>
-
- * defs.h (warning_begin): Delete declaration.
-
- * config/powerpc/tm-ppcle-eabi.h (TARGET_BYTE_ORDER_DEFAULT):
- Delete macro.
-
-2002-02-07 Michael Snyder <msnyder@redhat.com>
-
- * solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
- Logic bug, remove misplaced else.
-
-2002-02-07 Klee Dienes <klee@apple.com>
-
- * fork-inferior.c (fork_inferior): Add '!' to the list of
- characters that need to be quoted when building a string for the
- shell. Quote '!' specifically with a backslash, since CSH chokes
- when trying to evaluate "str!str".
-
-2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
-
- * rdi-share/host.h: Only provide a typedef for bool if it is not
- defined.
-
-2002-02-04 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.h (enum bptype): Add new overlay event bp type.
- (enable_overlay_breakpoints, disable_overlay_breakpoints): Export.
-
- * breakpoint.c (create_internal_breakpoint): New function.
- (internal_breakpoint_number): Moved into create_internal_breakpoint.
- (create_longjmp_breakpoint): Use create_internal_breakpoint.
- (create_thread_event_breakpoint): Ditto.
- (create_solib_event_breakpoint): Ditto.
- (create_overlay_event_breakpoint): New function.
- (enable_overlay_breakpoints, disable_overlay_breakpoints): New funcs.
- (update_breakpoints_after_exec): Delete and re-initialize
- overlay event breakpoints after an exec. Add FIXME comment
- about longjmp breakpoint.
- (print_it_typical): Ignore overlay event breakpoints.
- (print_one_breakpoint): Ditto.
- (mention): Ditto.
- (bpstat_what): Do not stop for overlay event breakpoints.
- (delete_breakpoint): Don't delete overlay event breakpoints.
- (breakpoint_re_set_one): Delete the overlay event breakpoint.
- (breakpoint_re_set): Re-create overlay event breakpoint.
-
- * symfile.c (overlay_auto_command): Enable overlay breakpoints.
- (overlay_manual_command): Disable overlay breakpoints.
- (overlay_off_command): Disable overlay breakpoints.
-
-2002-02-06 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c: Include elf-bfd.h and coff/internal.h.
- (MSYMBOL_SET_SPECIAL, MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Move defines
- to here from config/tm-arm.h.
- (coff_sym_is_thumb): Make static.
- (arm_elf_make_msymbol_special): New function.
- (arm_coff_make_msymbol_special): New function.
- * config/arm/tm-arm.h (MSYMBOL_SET_SPECIAL): Delete definition.
- (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Likewise.
- (coff_sym_is_thumb): Delete declaration.
- (arm_elf_make_msymbol_special): Declare.
- (arm_coff_make_msymbol_special): Declare.
- (ELF_MAKE_MSYMBOL_SPECIAL): Call arm_elf_make_msymbol_special.
- (COFF_MAKE_MSYMBOL_SPECIAL): Call arm_coff_make_msymbol_special.
-
-2002-02-06 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_software_single_step): ANSIfy function declaration.
-
-2002-02-06 Richard Earnshaw <rearnsha@arm.com>
-
- * gdbarch.sh (PRINT_FLOAT_INFO): Add rule.
- * gdbarch.c gdbarch.h: Regenerate.
- * arch-utils.c (default_print_float_info): New function.
- * arch-utils.h (default_print_float_info): Prototype it.
- * infcmd.c (float_info): Call PRINT_FLOAT_INFO.
- * doc/gdbint.texinfo (FLOAT_INFO): Mark as deprecated.
- (PRINT_FLOAT_INFO): Document it.
-
- * arm-tdep.c (arm_print_float_info): Renamed from arm_float_info.
- * config/arm/tm-arm.h (FLOAT_INFO): Delete.
- (PRINT_FLOAT_INFO): Define.
-
-2002-02-06 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * win32-nat.c (_initialize_check_for_gdb_ini):
- Add typecast to sprintf argument to suppress a warning.
-
-2002-02-05 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * win32-nat.c (last_sig): Changed type of variable to target_signal,
- to allow easier handling of pass state.
- (DEBUG_EXCEPTION_SIMPLE): New macro, used in handle_exception,
- that gives exception name and address.
- (handle_exception): Use DEBUG_EXCEPTION_SIMPLE macro
- and set last_sig value to ourstatus->value.sig. Some missing
- exceptions added.
- (child_continue): Correctly report continue_status.
- (get_child_debug_event,do_initial_child_stuff): Set last_sig to
- TARGET_SIGNAL_0 (new default value).
- (child_resume): consider sig argument passed to decide if
- the exception should be passed to debuggee or not.
-
-2002-02-05 Michael Snyder <msnyder@redhat.com>
-
- * regcache.c (fetch_register): Call target_fetch_register
- only if we don't call FETCH_PSEUDO_REGISTER.
- (store_register): Call target_store_register only if we
- don't call STORE_PSEUDO_REGISTER.
-
-2002-02-05 Elena Zannoni <ezannoni@redhat.com>
-
- * gdbarch.sh: Add definitions for COFF_MAKEMSYMBOL_SPECIAL and
- ELF_MAKE_MSYMBOL_SPECIAL.
- * gdbarch.c, gdbarch.h: Regenerate.
- * arch-utils.c (default_make_msymbol_special): New function.
- * arch-utils.h (default_make_msymbol_special): Export.
- * elfread.c (elf_symtab_read): Compile use of
- ELF_MAKE_MSYMBOL_SPECIAL unconditionally because it is now
- multiarched.
- * coffread.c (coff_symtab_read): Ditto, for
- COFF_MAKE_MSYMBOL_SPECIAL.
-
-2002-02-05 Jim Blandy <jimb@redhat.com>
-
- * solib-svr4.c (svr4_truncate_ptr): New function.
- (svr4_relocate_section_addresses): Do the address arithmetic with
- the appropriate truncation for target addresses, even when
- CORE_ADDR is larger than a target address.
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c (mywait): Cast second argument of waitpid
- to (int *).
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c (kill_inferior): Remove commented out
- code.
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c: Remove unused include files.
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c: Define PTRACE_ARG3_TYPE.
- (read_inferior_memory): Use it.
- (write_inferior_memory): Likewise.
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c (create_inferior): Call strerror instead of
- grubbing through sys_errlist.
-
-2002-02-05 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/linux-low.c: New file, copied exactly from low-linux.c.
-
-2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
- * win32-nat.c (handle_exception): Handle Ctrl-Break exception.
-
-2002-02-04 Andrew Cagney <ac131313@redhat.com>
-
- * cli/cli-decode.c (do_cfunc, set_cmd_cfunc): New functions.
- (do_sfunc, set_cmd_sfunc): New functions.
-
- * command.h (struct cmd_list_element): Add field func.
- * cli/cli-decode.h (struct cmd_list_element): Ditto.
- * command.h (set_cmd_sfunc, set_cmd_cfunc): Declare.
- * cli/cli-decode.h: Ditto.
-
- * cli/cli-decode.c (help_cmd): Test for func not cfunc/sfunc.
- (help_all, help_cmd_list): Ditto.
- (find_cmd, complete_on_cmdlist): Ditto.
- * top.c (execute_command): Ditto.
-
- * cli/cli-setshow.c (do_setshow_command): Call func instead of
- function.sfunc.
-
- * infcmd.c (notice_args_read): Fix function signature.
-
- * cli/cli-cmds.c (init_cli_cmds): Use set_cmd_sfunc.
- * cli/cli-decode.c (add_set_cmd): Ditto.
- * utils.c (initialize_utils): Ditto.
- * maint.c (_initialize_maint_cmds): Ditto.
- * infrun.c (_initialize_infrun): Ditto.
- * demangle.c (_initialize_demangler): Ditto.
- * remote.c (add_packet_config_cmd): Ditto.
- * mips-tdep.c (_initialize_mips_tdep): Ditto.
- * cris-tdep.c (_initialize_cris_tdep): Ditto.
- * proc-api.c (_initialize_proc_api): Ditto.
- * kod.c (_initialize_kod): Ditto.
- * valprint.c (_initialize_valprint): Ditto.
- * top.c (init_main): Ditto.
- * infcmd.c (_initialize_infcmd): Ditto.
- * corefile.c (_initialize_core): Ditto.
- * arm-tdep.c (_initialize_arm_tdep): Ditto.
- * arch-utils.c (initialize_current_architecture): Ditto.
- (_initialize_gdbarch_utils): Ditto.
- * alpha-tdep.c (_initialize_alpha_tdep): Ditto.
-
- * cli/cli-decode.c (add_cmd): Use set_cmd_cfunc.
- * wince.c (_initialize_inftarg): Ditto.
- * symfile.c (_initialize_symfile): Ditto.
- * mips-tdep.c (_initialize_mips_tdep): Ditto.
- * language.c (_initialize_language): Ditto.
- * arc-tdep.c (_initialize_arc_tdep): Ditto.
-
-2002-02-04 Michael Snyder <msnyder@redhat.com>
-
- * memattr.c (_initialize_mem): Elaborate the help for 'mem' command.
-
-2002-02-04 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/Makefile.in: Add regformats directory to INCLUDE_CFLAGS.
- Add rules for building the register data files.
-
-2002-02-04 Daniel Jacobowitz <drow@mvista.com>
-
- * regformats/regdat.sh: Add braces to the definition of
- expedite_regs_${arch}.
-
-2002-02-04 Daniel Jacobowitz <drow@mvista.com>
-
- * regformats/regdef.h (struct reg): Add comment describing the
- requirements for offset and size fields.
-
-2002-02-04 Andreas Schwab <schwab@suse.de>
-
- * config/ia64/linux.mh: Don't set NAT_CLIBS and REGEX.
- * config/ia64/linux.mt: Don't set GDBSERVER_LIBS.
-
-2002-02-04 Richard Earnshaw <rearnsha@arm.com>
-
- * gdbarch.sh (copyright): Update years in generated header.
- (SMASH_TEXT_ADDRESS): Add rule.
- * gdbarch.h, gdbarch.c: Re-generate.
- * coffread.c: Multi-arch uses of SMASH_TEXT_ADDRESS.
- * dbxread.c: Likewise.
- * dwarfread.c: Likewise.
- * elfread.c: Likewise.
- * somread.c: Likewise.
-
- * arm-tdep.c (arm_smash_text_address): New function.
- * config/arm/tm-arm.h (SMASH_TEXT_ADDRESS): Define in terms of above.
-
-2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
-
- Add support for hardware watchpoints on win32 native.
- * win32-nat.c (CONTEXT_DEBUG_DR macro): Add use of
- CONTEXT_DEBUG_REGISTERS.
- (dr variable): New variable. Static array containing a local copy
- of debug registers.
- (debug_registers_changed): New variable. Reflects when debug registers
- are changed and need to be written to inferior.
- (debug_registers_used): New variable. Reflects when any debug register
- was set, used when new threads are created.
- (cygwin_set_dr, cygwin_set_dr7, cygwin_get_dr6): New functions used by
- i386-nat code.
- (thread_rec): Set dr array if id is the thread of current_event .
- (child_continue, child_resume): Change the debug registers for all
- threads if debug_registers_changed.
- (child_add_thread): Change the debug registers if debug_registers_used.
- * config/i386/cygwin.mh: Add use of i386-nat.o file.
- Link nm.h to new nm-cygwin.h file.
- + config/i386/nm-cygwin.h: New file. Contains the macros used for use
- of hardware registers.
-
-2002-02-03 Andrew Cagney <ac131313@redhat.com>
-
- * valprint.c (print_floating): Allow non TYPE_CODE_FLT types.
- Restore behavour broken by 2002-01-20 Andrew Cagney
- <ac131313@redhat.com> IEEE_FLOAT removal.
-
-2002-02-03 Daniel Jacobowitz <drow@mvista.com>
-
- * c-valprint.c (c_val_print): Pass a proper valaddr to
- cp_print_class_method.
- * valops.c (search_struct_method): If there is only one method
- and args is NULL, return that method.
-
-2002-02-03 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.c (init_simd_type): Use TYPE_TAG_NAME instead of
- accessing tag_name directly.
-
-2002-02-03 Daniel Jacobowitz <drow@mvista.com>
-
- * ax-gdb.c (find_field): Use TYPE_TAG_NAME instead
- of accessing tag_name directly.
-
-2002-02-03 Daniel Jacobowitz <drow@mvista.com>
-
- PR gdb/280
- * gdbtypes.c (replace_type): New function.
- * gdbtypes.h (replace_type): Add prototype.
- * stabsread.c (read_type): Use replace_type.
-
-2002-02-03 Richard Earnshaw <rearnsha@arm.com>
-
- * Makefile.in (memattr.o): Add missing dependencies rule.
-
-2002-02-03 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * breakpoint.c (break_at_finish_command): Really export.
- (break_at_finish_at_depth_command): Ditto.
- (tbreak_at_finish_command): Ditto.
- * hppa-tdep.c: Include completer.h.
- * Makefile.in (hppa-tdep.o): Add dependency on $(completer_h).
- (COMMON_OBS): Remove duplicate ui-file.o, frame.o, doublest.o.
-
-2002-02-01 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c (do_write): New function.
- (error_stream): Rewrite combining the code from error_begin and
- verror.
- (verror): Rewrite using error_stream.
- (error_begin): Delete function.
-
-2002-02-01 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c (error_begin): Make static.
- * defs.h (error_begin): Delete declaration.
-
- * linespec.c (cplusplus_error): Replace cplusplus_hint.
- (decode_line_1): Use cplusplus_error instead of error_begin,
- cplusplus_hint and return_to_top_level.
- * coffread.c (coff_symfile_read): Use error instead of error_begin
- and return_to_top_level.
- * infrun.c (default_skip_permanent_breakpoint): Ditto.
-
-2002-02-01 Andrew Cagney <ac131313@redhat.com>
-
- * language.h (type_error, range_error): Make string parameter
- constant.
- * language.c (warning_pre_print): Delete extern declaration.
- * dwarfread.c (warning_pre_print): Ditto.
- * language.c (type_error, range_error): Rewrite to use verror and
- vwarning instead of warning_begin.
-
-2002-02-01 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (breakpoint_re_set): Delete ancient #if 0 code.
- (set_ignore_count): Move misplaced comment back where it belongs.
-
-2002-02-01 Andrew Cagney <ac131313@redhat.com>
-
- * command.h (NO_FUNCTION): Delete macro.
- * cli/cli-decode.h (NO_FUNCTION): Ditto.
- * top.c (execute_command): Replace NO_FUNCTION with NULL.
- * tracepoint.c (_initialize_tracepoint): Ditto.
- * cli/cli-decode.c (add_set_cmd): Ditto.
- * cli/cli-cmds.c (init_cli_cmds): Ditto.
-
-2002-02-01 Daniel Jacobowitz <drow@mvista.com>
-
- * gnu-v3-abi.c (gnuv3_virtual_fn_field): Update comments.
- Update ``this'' pointer when calling virtual functions.
-
-2002-02-01 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (create_temp_exception_breakpoint): Delete.
- * hppa-tdep.c: Deprecate xbreak, txbreak and bx commands.
-
-2002-02-01 Daniel Jacobowitz <drow@mvista.com>
-
- * regformats/reg-arm.dat: New file.
- * regformats/reg-i386.dat: New file.
- * regformats/reg-ia64.dat: New file.
- * regformats/reg-m68k.dat: New file.
- * regformats/reg-mips.dat: New file.
- * regformats/reg-ppc.dat: New file.
- * regformats/reg-sh.dat: New file.
- * regformats/regdef.h: New file.
- * regformats/regdat.sh: New file.
-
-2002-02-01 Richard Earnshaw <reanrsha@arm.com>
-
- * arm-tdep.c (arm_frameless_function_invocation): Add some comments.
- (arm_frame_args_address, arm_frame_locals_address): New functions.
- (arm_frame_num_args): New function.
- * config/tm-arm.h (FRAME_ARGS_ADDRESS): Call arm_frame_args_address.
- (FRAME_LOCALS_ADDRESS): Call arm_frame_locals_address.
- (FRMA_NUM_ARGS): Call arm_frame_num_args.
-
-2002-01-31 Michael Snyder <msnyder@redhat.com>
-
- * breakpoint.c (break_at_finish_command): Export.
- (break_at_finish_at_depth_command): Export.
- (tbreak_at_finish_command): Export.
- (_initialize_breakpoint): Delete "xbreak" and "txbreak" commands.
- * hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and
- "txbreak" commands, which are HPPA specific.
-
- * printcmd.c (disassemble_command): Remove an ancient
- artifact of an old merge.
-
- * symfile.h (enum overlay_debugging_state):
- Define enum constant values for overlay mode.
- * symfile.c (overlay_debugging): Use enums instead of literals.
- (overlay_is_mapped, overlay_auto_command,
- overlay_manual_command): Ditto.
-
- * breakpoint.c (insert_breakpoints, remove_breakpoint,
- breakpoint_here_p, breakpoint_inserted_here_p,
- breakpoint_thread_match, bpstat_stop_status,
- describe_other_breakpoints, check_duplicates, clear_command):
- Coding standard fixes.
-
- * target.c (target_xfer_memory): Add spaces, coding standard.
- (do_xfer_memory): Add missing line to trust-readonly
- code: check bfd SEC_READONLY flag for section.
-
-2002-01-31 Andrew Cagney <ac131313@redhat.com>
-
- * PROBLEMS: Fix typo, 5.1->5.1.1.
-
-2002-01-30 Daniel Jacobowitz <drow@mvista.com>
-
- * symtab.c (find_pc_sect_psymtab): Do not search psymtabs for
- data symbols, since we search based on textlow and texthigh.
- (find_pc_sect_symtab): Likewise.
-
-2002-01-30 Andrew Cagney <ac131313@redhat.com>
-
- * defs.h (vwarning): Declare.
- * utils.c (vwarning): New function.
- (warning): Call vwarning.
- (warning_begin): Delete function.
-
- * rs6000-nat.c (vmap_ldinfo): Use the function warning to print
- the warning message.
- * d10v-tdep.c (d10v_address_to_pointer) [0]: Delete call to
- warning_begin.
-
-2002-01-30 Michael Snyder <msnyder@redhat.com>
-
- * NEWS: Mention "set trust-readonly-sections" command.
- Mention generate-core-file command.
-
-2002-01-15 Michael Snyder <msnyder@redhat.com>
-
- * target.c: New command, "set trust-readonly-sections on".
- (do_xfer_memory): Honor the suggestion to trust readonly sections
- by reading them from the object file instead of from the target.
- (initialize_targets): Register command "set trust-readonly-sections".
-
-2002-01-29 Andrew Cagney <ac131313@redhat.com>
-
- * parse.c (target_map_name_to_register): Simplify, search regs and
- pseudo-regs using a single loop.
-
-2002-01-30 Andrew Cagney <ac131313@redhat.com>
-
- * PROBLEMS: Note that the i386 fix was missing from 5.1.1.
-
-2002-01-15 Rodney Brown <rbrown64@csc.com.au>
-
- * config/i386/tm-i386v4.h: Define HAVE_I387_REGS.
- * config/i386/i386v42mp.mh: Add i387-nat.o .
- * i386v4-nat.c: Include i387-nat.h.
- (supply_fpregset): Use i387_supply_fsave.
- (fill_fpregset): Use i387_fill_fsave.
-
-2002-01-30 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_call_dummy_words): Define.
- * arm-linux-tdep.c (arm_linux_call_dummy_words): Define.
- * config/arm/tm-arm.h (CALL_DUMMY_P): Define.
- (CALL_DUMMY_WORDS): Define.
- (arm_call_dummy_words): Declare.
- * config/arm/tm-linux.h (CALL_DUMMY_WORDS): Define.
- (arm_linux_call_dummy_words): Declare.
-
-2002-01-30 Andreas Schwab <schwab@suse.de>
-
- * m68klinux-nat.c: Fix last change to use regcache_collect
- instead of referencing registers[] directly.
-
-2002-01-29 Andrew Cagney <ac131313@redhat.com>
-
- * parse.c (target_map_name_to_register): Delete code wrapped in
- #ifdef REGISTER_NAME_ALIAS_HOOK.
-
-2002-01-28 Michael Snyder <msnyder@redhat.com>
-
- * regcache.c (legacy_read_register_gen): Need to be able to
- read pseudo-register as well as real register.
- (legacy_write_register_gen): Ditto.
-
-2002-01-28 Andrew Cagney <ac131313@redhat.com>
-
- * config/mips/tm-wince.h (TARGET_BYTE_ORDER): Delete.
- * config/sparc/tm-sparc.h (TARGET_BYTE_ORDER): Delete.
- * config/ns32k/tm-umax.h (TARGET_BYTE_ORDER): Delete.
- * config/ia64/tm-ia64.h (TARGET_BYTE_ORDER): Delete.
- * config/m32r/tm-m32r.h (TARGET_BYTE_ORDER): Delete.
- * config/m68k/tm-m68k.h (TARGET_BYTE_ORDER): Delete.
- * config/m88k/tm-m88k.h (TARGET_BYTE_ORDER): Delete.
- * config/mn10200/tm-mn10200.h (TARGET_BYTE_ORDER): Delete.
- * config/pa/tm-hppa.h (TARGET_BYTE_ORDER): Delete.
- * config/sh/tm-wince.h (TARGET_BYTE_ORDER): Delete.
- * config/v850/tm-v850.h (TARGET_BYTE_ORDER): Delete.
- * config/vax/tm-vax.h (TARGET_BYTE_ORDER): Delete.
- * config/z8k/tm-z8k.h (TARGET_BYTE_ORDER): Delete.
- * config/i960/tm-i960.h (TARGET_BYTE_ORDER): Delete.
- * config/i386/tm-i386.h (TARGET_BYTE_ORDER): Delete.
- * config/h8500/tm-h8500.h (TARGET_BYTE_ORDER): Delete.
- * config/h8300/tm-h8300.h (TARGET_BYTE_ORDER): Delete.
- * config/fr30/tm-fr30.h (TARGET_BYTE_ORDER): Delete.
- * config/d30v/tm-d30v.h (TARGET_BYTE_ORDER): Delete.
- * config/alpha/tm-alpha.h (TARGET_BYTE_ORDER): Delete.
-
-2002-01-28 Andrew Cagney <ac131313@redhat.com>
-
- * arch-utils.c (TARGET_BYTE_ORDER_DEFAULT): Delete macro.
- (target_byte_order): Initialize to BFD_ENDIAN_BIG.
- (initialize_current_architecture): Update target_byte_order using
- information from BFD.
- * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_DEFAULT):
- * config/arm/tm-arm.h (TARGET_BYTE_ORDER_DEFAULT): Delete.
-
-2002-01-28 Andrew Cagney <ac131313@redhat.com>
-
- * config/vax/tm-vax.h (INVALID_FLOAT): Move macro from here...
- * vax-tdep.c (INVALID_FLOAT): To here. Document why it is broken.
-
- * rs6000-tdep.c (rs6000_do_registers_info): Delete code wrapped in
- #ifdef INVALID_FLOAT.
- * infcmd.c (do_registers_info): Ditto.
- * values.c (unpack_double): Ditto. Add comment.
-
- * config/ns32k/tm-umax.h (INVALID_FLOAT): Delete macro that was
- already commented out.
-
-2002-01-26 Andreas Schwab <schwab@suse.de>
-
- * config/m68k/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
- * m68klinux-nat.c: Update ptrace interface for fetching/storing
- registers and add support for PTRACE_GETREGS.
-
-2002-01-24 Andrew Cagney <ac131313@redhat.com>
-
- GDB 5.1.1 released from 5.1 branch.
- * NEWS: Add 5.1.1 news.
- * README: Sync with 5.1 branch.
-
-2002-01-23 Fred Fish <fnf@redhat.com>
-
- * mdebugread.c (parse_partial_symbols): Only copy stabstring1 to
- stabstring on initial malloc. Reallocing will copy it for us,
- if necessary.
-
-2002-01-23 Elena Zannoni <ezannoni@redhat.com>
-
- * Makefile.in (hpread_h): Delete.
- (HFILES_NO_SRCDIR): Remove hpread.h.
- (ALLDEPFILES): Remove hp-psymtab-read.c and hp-symtab-read.c.
- (hpread.o): Update dependencies.
- (hp-psymtab-read.o, hp-symtab-read.o): Remove.
-
- * hp-psymtab-read.c: Remove file.
- * hp-symtab-read.c: Remove file.
- * hpread.h: Remove file.
-
- * hpread.c: Merge all contents of hp-psymtab-read.c,
- hp-symtab-read.c and hpread.h into this file, as it was prior to
- January 1999.
-
- * config/pa/hpux11w.mh, config/pa/hpux11.mh,
- config/pa/hpux1020.mh, config/pa/hppaosf.mh,
- config/pa/hppahpux.mh, config/pa/hppabsd.mh (NATDEPFILES):
- Remove hp-psymtab-read.o and hp-symtab-read.o, add hpread.o.
-
-2002-01-23 Elena Zannoni <ezannoni@redhat.com>
-
- * ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
- fill_gregset): Call gdbarch_tdep() just once, assign result to
- variable and use that, instead of calling the function several
- times.
-
-2002-01-24 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.host: Accept sparcv9 as alias for sparc64.
- * configure.tgt: Likewise.
-
-2002-01-22 Kevin Buettner <kevinb@redhat.com>
-
- * solib-aix5.c (build_so_list_from_mapfile)
- (aix5_relocate_main_executable): Fix xcalloc() calls so order of
- arguments is not reversed.
- * solib-sunos.c (sunos_relocate_main_executable): Likewise.
- * solib-svr4.c (svr4_relocate_main_executable): Likewise.
-
-2002-01-22 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c (sh_pseudo_register_read): New function. Renamed and
- modified version of obsolete sh_fetch_pseudo_register.
- (sh_fetch_pseudo_register): Rename to sh_pseudo_register_read.
- (sh4_register_read): New function.
- (sh_pseudo_register_write): New function. Renamed and modified
- version of obsolete sh_store_pseudo_register.
- (sh_store_pseudo_register): Rename to sh_pseudo_register_write.
- (sh4_register_write): New function.
- (sh_gdbarch_init): Remove setting of gdbarch function
- fetch_pseudo_register and store_pseudo_register. Remove setting of
- register_convert_to_raw, register_convert_to_virtual,
- register_convertible.
- (sh_sh4_register_convertible): Delete. No longer needed. All is
- taken care by architecture specific functions
- register_read/register_write.
- (sh_sh4_register_convert_to_virtual): Make static.
- (sh_sh4_register_convert_to_raw): Ditto.
-
-2002-01-22 Andrew Cagney <ac131313@redhat.com>
-
- * doublest.c (floatformat_is_negative): Assert FMT is non NULL.
- (floatformat_is_nan, floatformat_mantissa): Ditto.
-
- * gdbtypes.c (_initialize_gdbtypes): Initialize TYPE_FLOATFORMAT
- for builtin_type_ieee_single_little, builtin_type_ieee_double_big,
- builtin_type_ieee_double_little,
- builtin_type_ieee_double_littlebyte_bigword,
- builtin_type_m68881_ext, builtin_type_i960_ext,
- builtin_type_m88110_ext, builtin_type_m88110_harris_ext,
- builtin_type_arm_ext_big, builtin_type_arm_ext_littlebyte_bigword,
- builtin_type_ia64_spill_big, builtin_type_ia64_spill_little and
- builtin_type_ia64_quad_big, builtin_type_ia64_quad_little.
-
-2002-01-22 Corinna Vinschen <vinschen@redhat.com>
-
- * xstormy16-tdep.c (xstormy16_scan_prologue): Add frameless
- parameter. Set frameless flag if it exists and depended of
- whether the scanned function is frameless or not.
- (xstormy16_skip_prologue): If function is frameless, return
- result of xstormy16_scan_prologue().
- (xstormy16_frame_init_saved_regs): Adjust xstormy16_scan_prologue()
- call.
-
-2002-01-21 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c (sh_fp_frame_init_saved_regs, sh_push_arguments,
- sh_generic_show_regs, sh3_show_regs, sh3e_show_regs,
- sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs,
- sh_sh4_register_byte, sh_sh4_register_raw_size,
- sh_sh3e_register_virtual_type, sh_sh4_register_virtual_type,
- sh_sh4_register_convertible, sh_sh4_register_convert_to_virtual,
- sh_sh4_register_convert_to_raw, sh_fetch_pseudo_register,
- sh_store_pseudo_register, sh_do_pseudo_register): Call
- gdbarch_tdep() just once, assign result to variable and use that,
- instead of calling the function several times.
-
-2002-01-20 Mark Kettenis <kettenis@gnu.org>
-
- * go32-nat.c (fetch_register): Use FP_REGNUM_P and FPC_REGNUM_P
- macros instead of LAST_FPU_CTRL_REGNUM.
- (store_register): Likewise.
-
-2002-01-21 Jim Blandy <jimb@redhat.com>
-
- * infcmd.c (run_command): Check that the `exec' target layer's BFD
- is up-to-date before running the program, not just when a program
- exits.
-
-2002-01-21 Fred Fish <fnf@redhat.com>
-
- * arm-tdep.c (thumb_skip_prologue): Quit scanning prologue
- when we have found all instructions we are looking for.
-
-2002-01-21 Richard Earnshaw <rearnsha@arm.com>
-
- * arm-tdep.c (arm_register_name): New function.
- (arm_registers_names): Make static.
- * config/arm/tm-arm.h (arm_register_names): Delete declaration.
- (arm_register_name): Declare.
- (REGISTER_NAME): Use it.
-
-2002-01-21 Richard Earnshaw <rearnsha@arm.com>
- Kevin Buettner <kevinb@redhat.com>
-
- Convert arm targets to new FRAME interface.
- * arm-tdep.c (struct frame_extra_info): Remove fsr.
- (arm_frame_find_save_regs): Delete.
- (arm_frame_init_saved_regs): New.
- (arm_init_extra_frame_info): Alloacte saved_regs as required.
- Allocate extra_info as required. Convert all uses of fsr.regs
- to use saved_regs, similarly all uses of EXTRA_FRAME_INFO fields
- to use extra_info.
- (thumb_scan_prologue, arm_scan_prologue, arm_find_callers_reg)
- (arm_frame_chain, arm_frame_saved_pc, arm_pop_frame): Likewise.
- (check_prologue_cache, save_prologue_cache): Likewise.
- (_initialize_arm_tdep): Ensure prologue_cache is correctly set up.
- * config/arm/tm-arm.h (EXTRA_FRAME_INFO): Delete.
- (FRAME_FIND_SAVED_REGS): Delete.
- (arm_frame_find_saved_regs): Delete prototype.
- (arm_frame_init_saved_regs): New prototype.
- (FRAME_INIT_SAVED_REGS): Define.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- * config/arc/tm-arc.h (IEEE_FLOAT): Delete.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- From Jeff Law <law@redhat.com>:
- * infttrace.c: Include <sys/pstat.h>.
- (child_pid_to_exec_file): Revamp. Use pstat call to get the
- exec file if the ttrace equivalent fails.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- * rdi-share/devsw.c (openLogFile): Delete unused ``struct tm lt''.
- (closeLogFile): Ditto.
-
-2002-01-20 Michael Chastain <mec@shout.net>
-
- * top.c (print_gdb_version): Bump copyright year to 2002.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (Blanket Write Privs): Add Kevin Buettner, Elena
- Zannoni and Eli Zaretskii.
-
-2002-01-20 Daniel Jacobowitz <drow@mvista.com>
-
- * buildsym.c: Update copyright years.
- * c-typeprint.c: Likewise.
- * dwarf2read.c: Likewise.
- * f-typeprint.c: Likewise.
- * gdbtypes.c: Likewise.
- * gdbtypes.h: Likewise.
- * hp-symtab-read.c: Likewise.
- * hpread.c: Likewise.
- * mdebugread.c: Likewise.
- * p-typeprint.c: Likewise.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- * remote-sim.c (gdbsim_open): Simplify code testing the macro
- TARGET_BYTE_ORDER_SELECTABLE_P. Assume the target is always
- byte-order selectable.
- * sparc-tdep.c (sparc_target_architecture_hook): Ditto.
- * arch-utils.c: Ditto.
- (set_endian): Ditto.
- (set_endian_from_file): Ditto.
- * gdbserver/low-sim.c (create_inferior): Ditto.
- * gdbarch.sh: Ditto.
- * gdbarch.h: Re-generate.
- * config/powerpc/tm-ppc-eabi.h (TARGET_BYTE_ORDER_SELECTABLE_P):
- * config/sparc/tm-sparclite.h (TARGET_BYTE_ORDER_SELECTABLE):
- * config/sparc/tm-sparclet.h (TARGET_BYTE_ORDER_SELECTABLE):
- * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_SELECTABLE_P):
- * config/arm/tm-wince.h (TARGET_BYTE_ORDER_SELECTABLE_P):
- * config/arm/tm-linux.h (TARGET_BYTE_ORDER_SELECTABLE_P):
- * config/arc/tm-arc.h (TARGET_BYTE_ORDER_SELECTABLE):
- * config/arm/tm-arm.h (TARGET_BYTE_ORDER_SELECTABLE_P): Delete
- macro definition.
- * config/mips/tm-wince.h: Remove #undef of macro
- TARGET_BYTE_ORDER_SELECTABLE.
- * config/sh/tm-wince.h: Ditto.
-
-2002-01-20 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.h (struct cplus_struct_type): Add is_artificial to
- member function fields. Add accessor macro
- TYPE_FN_FIELD_ARTIFICIAL.
- * dwarf2read.c (dwarf2_add_member_fn): Check for artificial methods.
- * c-typeprint.c (c_type_print_base): Skip artificial member
- functions.
-
-2002-01-20 Daniel Jacobowitz <drow@mvista.com>
-
- * f-typeprint.c: Delete unused function f_type_print_args.
- * p-typeprint.c: Delete unused function pascal_type_print_args.
-
-2002-01-20 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbtypes.h (struct type): Fix whitespace. Remove obsolete
- comment. Add ``artificial'' to ``union field_location''.
-
- * dwarf2read.c: Remove ad-hoc TYPE_FIELD_ARTIFICIAL.
-
- * buildsym.c (finish_block): Initialize TYPE_FIELD_ARTIFICIAL to 0.
- * mdebugread.c (parse_symbol): Likewise.
- * stabsread.c (define_symbol): Likewise.
- * hp-symtab-read.c (hpread_function_type): Likewise, instead of
- initializing TYPE_FIELD_BITPOS to n (obsolete).
- (hpread_doc_function_type): Likewise.
- * hpread.c (hpread_function_type): Likewise.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- * configure.in (host_makefile_frag): Only require a host makefile
- fragment when a native build.
- * configure: Re-generate.
-
-2002-01-20 Andrew Cagney <ac131313@redhat.com>
-
- * doublest.h (floatformat_from_type): Declare.
- * doublest.c (floatformat_from_type): New function.
- (convert_typed_floating): Use.
-
- * valprint.c (print_floating): Replace checks for IEEE_FLOAT with
- call to function floatformat_from_type.
-
- * gdbarch.sh (IEEE_FLOAT): Delete.
- * gdbarch.h, gdbarch.c: Re-generate.
- * config/i960/tm-i960.h (IEEE_FLOAT): Delete macro.
- * config/i386/tm-i386.h (IEEE_FLOAT): Ditto.
- * config/z8k/tm-z8k.h (IEEE_FLOAT): Ditto.
- * config/sparc/tm-sparc.h (IEEE_FLOAT): Ditto.
- * config/pa/tm-hppa.h (IEEE_FLOAT): Ditto.
- * config/m88k/tm-m88k.h (IEEE_FLOAT): Ditto.
- * config/m68k/tm-m68k.h (IEEE_FLOAT): Ditto.
- * config/h8500/tm-h8500.h (IEEE_FLOAT): Ditto.
- * config/h8300/tm-h8300.h (IEEE_FLOAT): Ditto.
- * config/fr30/tm-fr30.h (IEEE_FLOAT): Ditto.
- * config/arm/tm-arm.h (IEEE_FLOAT): Ditto.
- * config/alpha/tm-alpha.h (IEEE_FLOAT): Ditto.
-
- * s390-tdep.c (s390_gdbarch_init): Do not set ieee_float.
- * x86-64-tdep.c (i386_gdbarch_init): Ditto.
- * sparc-tdep.c (sparc_gdbarch_init): Ditto.
- * sh-tdep.c (sh_gdbarch_init): Ditto.
- * mips-tdep.c (mips_gdbarch_init): Ditto.
- * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
- * cris-tdep.c (cris_gdbarch_init): Ditto.
-
-2002-01-20 Jiri Smid <smid@suse.cz>
-
- * configure.host, configure.tgt: Support x86-64.
- * NEWS: Note new target x86-64.
-
- * config/i386/x86-64linux.mh (NATDEPFILES): x86-64-nat.o removed.
- * x86-64-linux-nat.c (x86_64_register_u_addr): New function.
- * config/i386/nm-x86-64.h (ATTACH_LWP): Removed.
- * Makefile.in (x86-64-tdep.o, x86-64-linux-tdep.o,
- x86-64-linux-nat.o): Fix dependencies.
-
-2002-01-19 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c: Remove #ifndef MALLOC_INCOMPATIBLE.
- * config/sparc/xm-sun4os4.h (PTRACE_ARG3_TYPE): Move macro ....
- * config/sparc/nm-sun4os4.h (PTRACE_ARG3_TYPE): ... to here.
- * config/sparc/xm-sun4os4.h: Delete file.
- * config/sparc/sun4os4.mh (XM_FILE): Delete makefile variable.
-
-2002-01-19 Andrew Cagney <ac131313@redhat.com>
-
- * config/sparc/sparclynx.mh (XM_FILE): Delete.
- * config/rs6000/rs6000lynx.mh (XM_FILE): Delete.
- * config/m68k/m68klynx.mh (XM_FILE): Delete.
- * config/i386/i386lynx.mh (XM_FILE): Delete.
- * config/rs6000/xm-rs6000ly.h: Delete file.
- * config/sparc/xm-sparclynx.h: Delete file.
- * config/m68k/xm-m68klynx.h: Delete file.
- * config/i386/xm-i386lynx.h: Delete file.
- * config/xm-lynx.h: Delete file.
- * config/djgpp/fnchange.lst: Update.
-
-2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_register_byte): New function.
- (alpha_register_raw_size): Ditto.
- (alpha_register_virtual_size): Ditto.
- (alpha_skip_prologue_internal): Renamed from
- alpha_skip_prologue.
- (alpha_skip_prologue): New version that calls
- alpha_skip_prologue_internal.
- (alpha_in_lenient_prologue): Use alpha_skip_prologue_internal.
- * config/alpha/tm-alpha.h (SKIP_PROLOGUE): Remove
- second argument from alpha_skip_prologue.
- (REGISTER_BYTE): Use alpha_register_byte.
- (REGISTER_RAW_SIZE): Use alpha_register_raw_size.
- (REGISTER_VIRTUAL_SIZE): Use alpha_register_virtual_size.
- (FRAMELESS_FUNCTION_INVOCATION): Use
- generic_frameless_function_invocation_not.
- (FRAME_NUM_ARGS): Use frame_num_args_unknown.
- (COERCE_FLOAT_TO_DOUBLE): Use standard_coerce_float_to_double.
-
-2002-01-19 Andrew Cagney <ac131313@redhat.com>
-
- * config/mips/xm-news-mips.h: Delete file.
- * config/mips/news-mips.mh (XM_FILE): Delete makefile variable.
-
- * config/m88k/xm-m88k.h: Delete file.
- * config/m88k/xm-dgux.h: Do not include xm-m88k.h.
- * config/m88k/xm-delta88v4.h: Ditto.
- * config/m88k/xm-delta88.h: Ditto.
-
- * config/alpha/xm-fbsd.h: Delete file.
- * config/alpha/fbsd.mh (XM_FILE): Delete makefile variable.
-
- * config/sparc/xm-sparc.h: Delete file.
- * Makefile.in (xm-sun4os4.h): Delete dependency.
- * config/sparc/xm-sun4sol2.h: Do not include xm-sparc.h.
- * config/sparc/xm-sun4os4.h: Ditto.
- * config/sparc/xm-linux.h: Ditto.
-
- * config/i386/xm-windows.h: Delete file.
-
-2002-01-19 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c: Include <sys/param.h> for MAXPATHLEN.
- (gdb_realpath): Use MAXPATHLEN when PATH_MAX is not defined.
-
-2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_call_dummy_words): New.
- * config/alpha/tm-alpha.h (CALL_DUMMY): Remove.
- (CALL_DUMMY_P): Define.
- (CALL_DUMMY_WORDS): Define.
- (SIZEOF_CALL_DUMMY_WORDS): Define.
-
-2002-01-19 Per Bothner <per@bothner.com>
-
- * gnu-v3-abi.c (gnuv3_rtti_type): Guard that vtable_symbol_name
- isn't NULL, which can happen with some gcj-3.x-produced code.
-
-2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_register_virtual_type): New function.
- (alpha_init_frame_pc_first): Ditto.
- (alpha_fix_call_dummy): Ditto.
- (alpha_store_struct_return): Ditto.
- (alpha_extract_struct_value_address): Ditto.
- * config/alpha/tm-alpha.h (REGISTER_VIRTUAL_TYPE): Use
- alpha_register_virtual_type.
- (STORE_STRUCT_RETURN): Use alpha_store_struct_return.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Use
- alpha_extract_struct_value_address.
- (FIX_CALL_DUMMY): Use alpha_fix_call_dummy.
- (INIT_FRAME_PC): Use init_frame_pc_noop.
- (INIT_FRAME_PC_FIRST): Use alpha_init_frame_pc_first.
-
-2002-01-19 Mark Kettenis <kettenis@gnu.org>
-
- * i386gnu-nat.c: Include "i386-tdep.h".
- (fetch_fpregs): Simplify code dealing with uninitialized floating
- point states such that it doesn't require FP7_REGNUM.
-
-2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (frame_extra_info): New.
- (alpha_find_saved_regs): Make static. Use
- frame->extra_info.
- (alpha_frame_init_saved_regs): New function.
- (alpha_frame_saved_pc): Use frame->extra_info.
- (temp_saved_regs): Don't declare as struct frame_saved_regs.
- (heuristic_proc_desc): Adjust for temp_saved_regs changes.
- (init_extra_frame_info): Rename to...
- (alpha_init_extra_frame_info): ...this. Use frame->extra_info.
- (alpha_print_extra_frame_info): New function.
- (alpha_frame_locals_address): Ditto.
- (alpha_frame_args_address): Ditto.
- (alpha_pop_frame): Use frame->extra_info.
- * config/alpha/tm-alpha.h (FRAME_ARGS_ADDRESS): Use
- alpha_frame_args_address.
- (FRAME_LOCALS_ADDRESS): Use alpha_frame_locals_address.
- (alpha_find_saved_regs): Remove prototype.
- (FRAME_INIT_SAVED_REGS): Use alpha_frame_init_saved_regs.
- (EXTRA_FRAME_INFO): Remove.
- (INIT_EXTRA_FRAME_INFO): Use alpha_init_extra_frame_info.
- (PRINT_EXTRA_FRAME_INFO): Use alpha_print_extra_frame_info.
-
-2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_osf_in_sigtramp): New function.
- (alpha_cannot_fetch_register): Ditto.
- (alpha_cannot_store_register): Ditto.
- (alpha_register_convertible): Ditto.
- (alpha_use_struct_convention): Ditto.
- * config/alpha/tm-alpha.h: Update copyright years.
- (IN_SIGTRAMP): Use alpha_osf_in_sigtramp.
- (INNER_THAN): Use core_addr_lessthan.
- (CANNOT_FETCH_REGISTER): Use alpha_cannot_fetch_register.
- (CANNOT_STORE_REGISTER): Use alpha_cannot_store_register.
- (REGISTER_CONVERTIBLE): Use alpha_register_convertible.
- (USE_STRUCT_CONVENTION): Use alpha_use_struct_convention.
- (FRAME_CHAIN): Remove unnecessary cast.
-
-2002-01-18 Andrew Cagney <ac131313@redhat.com>
-
- * NEWS: Document that testsuite/gdb.hp/gdb.threads-hp/ is
- obsolete.
-
-2002-01-18 Andrew Cagney <ac131313@redhat.com>
-
- * infptrace.c: Remove ATTRIBUTE_UNUSED. Update copyright.
- * monitor.c, remote-array.c, remote-bug.c: Ditto.
- * remote-e7000.c, remote-es.c, remote-mips.c: Ditto.
- * remote-nindy.c, remote-os9k.c, remote-rdi.c: Ditto.
- * remote-rdp.c, remote-sds.c, remote-sim.c: Ditto.
- * remote-st.c, remote-vx.c, remote.c, win32-nat.c: Ditto.
- * x86-64-linux-nat.c: Ditto.
-
-2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c (alpha_register_name): New function.
- * config/alpha/tm-alpha.h (REGISTER_NAMES): Remove.
- (REGISTER_NAME): Define.
-
-2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
-
- * config/nm-nbsd.h (KERNEL_U_ADDR): Remove.
-
-2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alpha-tdep.c: Update copyright years.
- (alpha_next_pc): New function.
- (alpha_software_single_step): Ditto.
- * config/alpha/tm-alpha.h: Add prototype for
- alpha_software_single_step.
-
-2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
-
- * alphabsd-nat.c: Update copyright years.
- (fill_gregset): Use regcache_collect.
- (fill_fpregset): Likewise.
- (fetch_inferior_registers): Only fetch integer registers
- if requested to do so.
- (store_inferior_registers): Only store integer registers
- if requested to do so.
-
-2002-01-17 Andrew Cagney <ac131313@redhat.com>
-
- * config/alpha/alpha-osf3.mh (XDEPFILES): Delete.
- * config/alpha/alpha-osf2.mh (XDEPFILES): Delete.
- * config/alpha/alpha-osf1.mh (XDEPFILES): Delete.
- * config/alpha/alpha-linux.mh (XDEPFILES): Delete.
- * config/alpha/fbsd.mh (XDEPFILES): Delete.
- * config/arm/linux.mh (XDEPFILES): Delete.
- * config/arm/nbsd.mh (XDEPFILES): Delete.
- * config/i386/i386dgux.mh (XDEPFILES): Delete.
- * config/i386/i386sol2.mh (XDEPFILES): Delete.
- * config/i386/i386m3.mh (XDEPFILES): Delete.
- (NATDEPFILES): Move i387-tdep.o and core-aout.o to here.
- * config/i386/i386gnu.mh (XDEPFILES): Delete.
- * config/i386/fbsd.mh (XDEPFILES): Delete.
- * config/i386/i386bsd.mh (XDEPFILES): Delete.
- * config/i386/i386sco5.mh (XDEPFILES): Delete.
- * config/i386/i386v4.mh (XDEPFILES): Delete.
- * config/i386/i386v42mp.mh (XDEPFILES): Delete.
- * config/i386/i386sco4.mh (XDEPFILES): Delete.
- * config/i386/i386aix.mh (XDEPFILES): Delete.
- * config/i386/go32.mh (XDEPFILES): Delete.
- * config/i386/cygwin.mh (XDEPFILES): Delete.
- * config/i386/i386lynx.mh (XDEPFILES): Delete.
- * config/i386/i386mach.mh (XDEPFILES): Delete.
- * config/i386/i386v32.mh (XDEPFILES): Delete.
- * config/i386/linux.mh (XDEPFILES): Delete.
- * config/i386/nbsdelf.mh (XDEPFILES): Delete.
- * config/i386/ncr3000.mh (XDEPFILES): Delete.
- * config/i386/i386mk.mh (NATDEPFILES): Rename XDEPFILES.
- * config/i386/i386sco.mh (XDEPFILES): Delete.
- * config/i386/i386v.mh (XDEPFILES): Delete.
- * config/i386/nbsd.mh (XDEPFILES): Delete.
- * config/i386/ptx.mh (NATDEPFILES): Rename XDEPFILES.
- * config/i386/ptx4.mh (NATDEPFILES): Rename XDEPFILES.
- * config/i386/symmetry.mh (XDEPFILES): Delete.
- * config/i386/obsd.mh (XDEPFILES): Delete.
- * config/i386/x86-64linux.mh (XDEPFILES): Delete.
- * config/ia64/linux.mh (XDEPFILES): Delete.
- * config/ia64/aix.mh (XDEPFILES): Delete.
- * config/m68k/apollo68b.mh (XDEPFILES): Delete.
- * config/m68k/dpx2.mh (XDEPFILES): Delete.
- * config/m68k/3b1.mh (NATDEPFILES): Rename XDEPFILES.
- * config/m68k/apollo68v.mh (XDEPFILES): Delete.
- * config/m68k/hp300bsd.mh (XDEPFILES): Delete.
- * config/m68k/linux.mh (XDEPFILES): Delete.
- * config/m68k/m68klynx.mh (XDEPFILES): Delete.
- * config/m68k/m68kv4.mh (XDEPFILES): Delete.
- * config/m68k/nbsd.mh (XDEPFILES): Delete.
- * config/m68k/sun2os3.mh (XDEPFILES): Delete.
- * config/m68k/sun2os4.mh (XDEPFILES): Delete.
- * config/m68k/sun3os3.mh (XDEPFILES): Delete.
- * config/m68k/sun3os4.mh (XDEPFILES): Delete.
- * config/m88k/delta88.mh (XDEPFILES): Delete.
- * config/m88k/delta88v4.mh (XDEPFILES): Delete.
- * config/m88k/m88k.mh (XDEPFILES): Delete.
- * config/mips/littlemips.mh (NATDEPFILES): Rename XDEPFILES.
- * config/mips/linux.mh (XDEPFILES): Delete.
- * config/mips/irix6.mh (XDEPFILES): Delete.
- * config/mips/irix5.mh (XDEPFILES): Delete.
- * config/mips/irix4.mh (XDEPFILES): Delete.
- * config/mips/irix3.mh (XDEPFILES): Delete.
- * config/mips/decstation.mh (XDEPFILES): Delete.
- * config/mips/mipsm3.mh (XDEPFILES): Delete.
- (NATDEPFILES): Move core-aout.o to here.
- * config/ns32k/nbsd.mh (XDEPFILES): Delete.
- * config/pa/hpux1020.mh (XDEPFILES): Delete.
- * config/pa/hppabsd.mh (XDEPFILES): Delete.
- * config/pa/hppahpux.mh (XDEPFILES): Delete.
- * config/pa/hpux11w.mh (XDEPFILES): Delete.
- * config/pa/hppaosf.mh (XDEPFILES): Delete.
- * config/pa/hpux11.mh (XDEPFILES): Delete.
- * config/powerpc/aix.mh (XDEPFILES): Delete.
- * config/powerpc/nbsd.mh (XDEPFILES): Delete.
- * config/powerpc/linux.mh (XDEPFILES): Delete.
- * config/romp/rtbsd.mh: Rename XDEPFILES.
- * config/rs6000/rs6000lynx.mh (XDEPFILES): Delete.
- * config/rs6000/aix4.mh (XDEPFILES): Delete.
- * config/rs6000/rs6000.mh (XDEPFILES): Delete.
- * config/s390/s390.mh (XDEPFILES): Delete.
- * config/vax/vaxbsd.mh (NATDEPFILES): Rename XDEPFILES.
- * config/sparc/sun4sol2.mh (XDEPFILES): Delete.
- * config/sparc/sun4os4.mh (XDEPFILES): Delete.
- * config/sparc/sparclynx.mh (XDEPFILES): Delete.
- * config/sparc/nbsdelf.mh (XDEPFILES): Delete.
- * config/sparc/nbsd.mh (XDEPFILES): Delete.
- * config/sparc/linux.mh (XDEPFILES): Delete.
- * config/vax/vaxult.mh (XDEPFILES): Delete.
- * config/vax/vaxult2.mh (XDEPFILES): Delete.
- * Makefile.in (DEPFILES): Remove XDEPFILES.
-
-2002-01-17 Andrew Cagney <ac131313@redhat.com>
-
- * utils.c (internal_verror): Fix comments, default is yes not no.
- Update queries to match. Default to quit and dump core.
-
-2002-01-17 Andrew Cagney <ac131313@redhat.com>
-
- * breakpoint.c: Update assuming #if UI_OUT is always true. Update
- copyright.
- * defs.h, event-top.c, gdbcmd.h: Ditto.
- * infcmd.c, infrun.c, main.c, printcmd.c, remote.c: Ditto.
- * source.c, stack.c, symfile.c, symtab.c, thread.c: Ditto.
- * top.c, cli/cli-cmds.c, cli/cli-decode.c: Ditto.
- * cli/cli-script.c, cli/cli-script.h, cli/cli-setshow.c: Ditto.
- * mi/ChangeLog, mi/mi-cmd-break.c, mi/mi-cmd-stack.c: Ditto.
- * mi/mi-main.c:Ditto.
-
- * stack.c, symfile.c: Update copyright.
-
-2002-01-17 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/low-hppabsd.c, gdbserver/low-lynx.c,
- gdbserver/low-nbsd.c, gdbserver/low-sim.c,
- gdbserver/low-sparc.c, gdbserver/low-sun3.c,
- gdbserver/low-linux.c, gdbserver/server.c: Correct copyright notices.
-
-2002-01-17 Daniel Jacobowitz <drow@mvista.com>
-
- * gdbserver/low-hppabsd.c (myattach): New function, returning -1.
- * gdbserver/low-lynx.c (myattach): Likewise.
- * gdbserver/low-nbsd.c (myattach): Likewise.
- * gdbserver/low-sim.c (myattach): Likewise.
- * gdbserver/low-sparc.c (myattach): Likewise.
- * gdbserver/low-sun3.c (myattach): Likewise.
-
- * gdbserver/low-linux.c (myattach): New function.
-
- * gdbserver/server.c (attach_inferior): New function.
- (main): Handle "--attach".
-
-2002-01-16 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS (language support): Daniel Jacobwitz is C++
- maintainer.
-
-2002-01-15 Daniel Jacobowitz <drow@mvista.com>
-
- * c-typeprint.c (is_type_conversion_operator): Add additional
- check for non-conversion operators.
-
-2002-01-15 Michael Snyder <msnyder@redhat.com>
-
- * linux-proc.c: Add "info proc" command, a la procfs.c.
- (read_mapping): New function, abstract and re-use code.
- (linux_find_memory_regions): Use new func read_mapping.
- (linux_info_proc_cmd): New function, implement "info proc".
- (_initialize_linux_proc): Add new command "info proc".
-
-2002-01-15 Michael Snyder <msnyder@redhat.com>
-
- * symfile.c (generic_load): Use bfd_map_over_sections method
- instead of manipulating bfd structure members directly.
- (add_section_size_callback): New function, bfd sections callback
- used by generic_load.
- (load_sections_callback): New function, bfd sections callback
- used by generic_load.
-
-2002-01-15 Elena Zannoni <ezannoni@redhat.com>
-
- [Based on work by Jim Blandy]
- * gdbtypes.h (builtin_type_v16qi, builtin_type_v8hi): Export.
- (builtin_type_vec128): Export.
- * gdbtypes.c (builtin_type_v16qi, builtin_type_v8hi): New SIMD
- types.
- (builtin_type_vec128): New builtin type for 128 bit vector
- registers.
- (build_gdbtypes): Initialize builtin_type_v16qi and
- builtin_type_v8hi. Create the vec128 register builtin type
- structure.
- (build_builtin_type_vec128): New function.
- (_initialize_gdbtypes): Register builtin_type_v16qi and
- builtin_type_v8hi with gdbarch. Same for builtin_type_vec128.
- * rs6000-tdep.c (rs6000_register_virtual_type): Change type of
- AltiVec register to new builtin type.
-
-2001-01-15 Daniel Jacobowitz <drow@mvista.com>
-
- * stabsread.c (read_type): Pass dbx_lookup_type (typenums)
- to make_cv_type.
-
-2002-01-14 Andrew Cagney <ac131313@redhat.com>
-
- * config/pa/tm-hppa.h (DEPRECATED_CLEAN_UP_REGISTER_VALUE): Rename
- CLEAN_UP_REGISTER_VALUE.
- * regcache.c (supply_register): Update only call.
-
-2002-01-14 Andrew Cagney <ac131313@redhat.com>
-
- * configure.tgt: Mark a29k-*-aout*, a29k-*-coff*, a29k-*-elf*,
- a29k-*-ebmon*, a29k-*-kern*, a29k-*-none*, a29k-*-udi* and
- a29k-*-vxworks* targets as obsolete.
-
-2002-01-14 Michael Snyder <msnyder@redhat.com>
-
- * linux-proc.c (linux_do_thread_registers): Ignore fpxregs
- until we can resolve portability issues.
- * gregset.h: Remove references to fpxregs.
- * gcore.c (gcore_command): Initialize note_sec to NULL.
-
-2002-01-13 Andrew Cagney <ac131313@redhat.com>
-
- * signals.c (target_signal_to_name): Rewrite. Only use
- signals[].name when in bounds and non-NULL.
-
-2002-01-13 Andrew Cagney <ac131313@redhat.com>
-
- From Petr Ledvina <ledvinap@kae.zcu.cz>:
- * signals.c (target_signal_to_name): Verify that SIG is within the
- bounds of the signals array.
-
-2002-01-13 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Remove arm-coff and arm-pe from target list.
-
-2002-01-13 Keith Seitz <keiths@redhat.com>
-
- * stack.c (print_frame_info_base): Print the frame's pc
- only if when print_frame_info_listing_hook is not defined.
-
-2002-01-13 Keith Seitz <keiths@redhat.com>
-
- * varobj.c (varobj_set_value): Make sure that there were no
- errors evaluating the object before attempting to set its
- value.
- value_cast now properly adjusts VALUE_ADDRESS for baseclasses,
- so this offset adjustment is no longer necessary.
- (create_child): Don't set the error flag if the child is
- a CPLUS_FAKE_CHILD.
- (value_of_child): If value_fetch_lazy fails, return NULL
- so that callers will be notified that an error occurred.
- (c_value_of_variable): Delay check of variable's validity
- until later. We actually want all structs and unions to have
- the value "{...}".
- Do not return "???" for variables which could not be evaluated.
- This error condition must be returned to the caller so that it
- can get the error condition from gdb.
- (cplus_name_of_child): Adjust index for vptr before figuring
- out the name of the child.
- (cplus_value_of_child): If a child's (real) parent is not valid,
- don't even bother trying to give a value for it. Just return
- an error. Change all instances in this function.
- (cplus_type_of_child): If our parent is one of the "fake"
- parents, we need to get at the type of the real parent, and
- derive the child's true type using this information.
-
-2002-01-13 Andrew Cagney <ac131313@redhat.com>
-
- From 2002-01-09 John Marshall <johnm@falch.net>:
- * CONTRIBUTE, README, TODO: Change sourceware.cygnus.com to
- sources.redhat.com, and tweak some related URLs which had
- suffered from linkrot.
-
-2002-01-13 Andrew Cagney <ac131313@redhat.com>
-
- From Jeff law:
- * hppa-tdep.c (hppa_push_arguments): Correct handling of 5-7 byte
- structures passed in registers.
-
-2002-01-13 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (save_npx) [__DJGPP_MINOR__ < 3]: Remove extraneous
- white space which prevented compilation. Reported by DSK
- <dsk@student.unsw.edu.au>.
-
-2002-01-11 Michael Snyder <msnyder@redhat.com>
-
- * symfile.c (build_section_addr_info_from_section_tab):
- Use bfd access method instead of manipulating bfd directly.
- (syms_from_objfile): Ditto.
- (simple_overlay_update_1): Ditto.
- (simple_overlay_update): Ditto.
- (generic_load): Ditto.
- (overlay_unmapped_address): FIXME comment, bfd access methods.
- (sections_overlap): FIXME comment, bfd access methods.
- (pc_in_mapped_range): FIXME comment, bfd access methods.
- (pc_in_unmapped_range): FIXME comment, bfd access methods.
- (section_is_mapped): FIXME comment, bfd access methods.
- (section_is_overlay): FIXME comment, bfd access methods.
-
- * symfile.c (generic_load): Whitespace and long line cleanups.
- Remove duplicate variable, change several local variables to
- more appropriate data types.
- (print_transfer_performance): Use %lu instead of %ld for ulongs.
-
-2002-01-12 Andrew Cagney <ac131313@redhat.com>
-
- From Peter Schauer:
- * language.c (longest_local_hex_string_custom): Use phex_nz to
- convert NUM to a hex string.
-
-2002-01-12 Elena Zannoni <ezannoni@redhat.com>
-
- * sh-tdep.c (sh_gdbarch_init): Move setting of long_bit earlier in
- the function.
- Update Copyright year.
-
-2002-01-12 Andrew Cagney <ac131313@redhat.com>
-
- * language.c (longest_raw_hex_string): Delete unused function.
-
-2002-01-11 Petr Sorfa <petrs@caldera.com>
-
- * MAINTAINERS (write-after-approval): Add myself.
- * dwarf2read.c (read_tag_string_type): Handling of
- DW_AT_byte_size.
- (read_tag_string_type): FORTRAN fix to prevent propagation of
- first string size.
- (set_cu_language): Handling of DW_LANG_Fortran95
-
-2002-01-11 Richard Earnshaw <rearnsha@arm.com>
-
- * armnbsd-nat.c (fetch_inferior_registers): Change inferior_pid ->
- GETPID(inferior_ptid).
- (store_inferior_registers): Likewise.
-
-2002-01-10 Jason Merrill <jason@redhat.com>
-
- * dwarf2read.c (decode_locdesc): Implement DW_OP_litn, DW_OP_dup.
- Fix DW_OP_minus.
-
-2002-01-10 Andrew Cagney <ac131313@redhat.com>
-
- * config/djgpp/fnchange.lst: Add renames for bfd/ChangeLog-0001
- and bfd/elf32-sh-nbsd.c.
-
-2002-01-10 Michael Snyder <msnyder@redhat.com>
-
- * NEWS: Mention --pid and corefile/proc-id behavior change.
-
- * Makefile.in: Add rules for gcore.o and linux-proc.o.
- * gcore.c: Include cli/cli-decode.h instead of command.h.
-
- * main.c (captured_main): Add new command line option "--pid".
- If the second command line argument (following the symbol-file)
- begins with a digit, try to attach to it before trying to open
- it as a corefile.
- (print_gdb_help): Document the "--pid" argument.
-
-2002-01-10 Eli Zaretskii <eliz@is.elta.co.il>
-
- * completer.c (command_completer): New function.
-
- * completer.h <command_completer>: Add prototype.
-
- * cli/cli-cmds.c (init_cli_cmds): Make command_completer be the
- completer for the "help" command.
-
-2002-01-09 Jason Merrill <jason@redhat.com>
-
- * c-typeprint.c (is_type_conversion_operator): Fix thinko.
-
-2002-01-09 Michael Snyder <msnyder@redhat.com>
-
- * i386-linux-nat.c (fill_fpxregset): Make global.
- (store_fpxregset): Ditto.
-
- * gregset.h (gdb_fpxregset_t): Define.
- (supply_fpxregset): Prototype.
- (fill_fpxregset): Prototype.
-
- * exec.c (exec_make_note_section): Don't call elfcore_write_prpsinfo.
-
-2002-01-09 Richard Earnshaw <rearnsha@arm.com>
-
- * config/arm/arm-tdep.h (arm_software_single_step): Remove PARAMS.
- * config/arm/nm-nbsd.h (arm_register_u_addr): Likewise.
- * config/arm/tm-nbsd.h (get_longjmp_target): Likewise.
-
-2002-01-09 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Update target maintainer rules so that any
- Maintainer can approve a tested patch for a maintenance-only
- target.
-
-2002-01-09 Richard Earnshaw <rearnsha@arm.com>
-
- * MAINTAINERS (write-after-approval): Add myself.
-
- * arm-tdep.c (arm_init_extra_frame_info): Cast NULL argument to
- IN_SIGTRAMP.
-
-2002-01-08 Michael Snyder <msnyder@redhat.com>
-
- * linux-proc.c (child_pid_to_exec_file): Use readlink to get the
- real name of the executable, rather than the /proc name.
-
-2002-01-03 Michael Snyder <msnyder@redhat.com>
-
- Implement a "generate-core-file" command in gdb, save target state.
- * gcore.c: New file. Implement new command 'generate-core-file'.
- Save a corefile image of the current state of the inferior.
- * linux-proc.c: Add linux-specific code for saving corefiles.
- * target.h (struct target_ops): Add new target vectors for saving
- corefiles; to_find_memory_regions and to_make_corefile_notes.
- (target_find_memory_regions): New macro.
- (target_make_corefile_notes): New macro.
- * target.c (update_current_target): Inherit new target methods.
- (dummy_find_memory_regions): New place-holder method.
- (dummy_make_corefile_notes): New place-holder method.
- (init_dummy_target): Initialize new dummy target vectors.
- * exec.c (exec_set_find_memory_regions): New function.
- Allow the exec_ops vector for memory regions to be taken over.
- (exec_make_note_section): New function, target vector method.
- * defs.h (exec_set_find_memory_regions): Export prototype.
- * procfs.c (proc_find_memory_regions): New function, corefile method.
- (procfs_make_note_section): New function, corefile method.
- (init_procfs_ops): Set new target vector pointers.
- (find_memory_regions_callback): New function.
- (procfs_do_thread_registers): New function.
- (procfs_corefile_thread_callback): New function.
- * sol-thread.c (sol_find_memory_regions): New function.
- (sol_make_note_section): New function.
- (init_sol_thread_ops): Initialize new target vectors.
- * inftarg.c (inftarg_set_find_memory_regions): New function.
- Allow to_find_memory_regions vector to be taken over.
- (inftarg_set_make_corefile_notes): New function.
- Allow to_make_corefile_notes vector to be taken over.
- * thread-db.c (thread_db_new_objfile): Don't activate thread-db
- interface layer if not target_has_execution (may be a corefile).
- * config/i386/linux.mh: Add gcore.o to NATDEPFILES.
- * config/sparc/sun4sol2.mh: Ditto.
- * config/alpha/alpha-linux.mh: Ditto.
- * config/arm/linux.mh: Ditto.
- * config/i386/x86-64linux.mh: Ditto.
- * config/ia64/linux.mh: Ditto.
- * config/m68k/linux.mh: Ditto.
- * config/mips/linux.mh: Ditto.
- * config/powerpc/linux.mh: Ditto.
- * config/sparc/linux.mh: Ditto.
-
-2002-01-07 Michael Snyder <msnyder@redhat.com>
-
- * arm-linux-nat.c: Remove references to regcache.c internal data
- (registers[] and register_valid[]).
-
-2002-01-07 Michael Snyder <msnyder@redhat.com>
-
- * linux-proc.c: New file. Implement child_pid_to_exec_file,
- so that attaching to a pid will automatically read the process's
- symbol file and shlibs.
- * Makefile.in: Add rule for linux-proc.o.
- * config/nm-linux.h: Define CHILD_PID_TO_EXEC_FILE.
- * config/alpha/alpha-linux.mh: Add linux-proc.o to NATDEPFILES.
- * config/arm/linux.mh: Ditto.
- * config/i386/linux.mh: Ditto.
- * config/i386/x86-64linux.mh: Ditto.
- * config/ia64/linux.mh: Ditto.
- * config/m68k/linux.mh: Ditto.
- * config/mips/linux.mh: Ditto.
- * config/powerpc/linux.mh: Ditto.
- * config/sparc/linux.mh: Ditto.
-
-2002-01-06 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * win32-nat.c: Add i386-tdep.h dependency.
-
-2002-01-07 Michael Snyder <msnyder@redhat.com>
-
- * solib.c (info_sharedlibrary_command): Use TARGET_PTR_BIT
- instead of bfd_get_arch_size. Don't bail out just because
- there's no exec_bfd.
-
- * cp-valprint.c (cp_print_value): FIXME comment, alloca size.
- * p-valprint.c (pascal_object_print_value): Ditto.
- * somread.c (som_symtab_read): Ditto.
- * symfile.c (simple_free_overlay_region_table): Ditto.
- * valops.c (value_assign): Ditto.
-
- * tracepoint.c (tracepoint_save_command): From Klee Dienes --
- use tilde_expand and strerror for opening save-tracepoints file.
-
- * thread-db.c (thread_db_new_objfile): Indendation fix.
-
- * infptrace.c (GDB_MAX_ALLOCA): New define.
- (child_xfer_memory): Use xmalloc/xfree instead of alloca if the
- size of the buffer exceeds GDB_MAX_ALLOCA (default 1 megabyte,
- can be overridden with whatever value is appropriate to the host).
- * infttrace.c (child_xfer_memory): Add FIXME warning about use of
- alloca to allocate potentially large buffer.
- * rs6000-nat.c (child_xfer_memory): Ditto.
- * symm-nat.c (child_xfer_memory): Ditto.
- * x86-64-linux-nat.c (child_xfer_memory): Ditto.
-
-2002-01-07 Jackie Smith Cashion <jsmith@redhat.com>
-
- From Nick Clifton <nickc@redhat.com>
- * d10v-tdep.c: Set STACK_START to 0x200bffe.
-
-2002-01-07 Michael Snyder <msnyder@redhat.com>
-
- * solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
- Don't use exec_bfd if it's NULL.
-
-2002-01-06 Mark Kettenis <kettenis@gnu.org>
-
- * valops.c (value_arg_coerce): Fix formatting.
-
-2002-01-06 Andrew Cagney <ac131313@redhat.com>
-
- * hp-psymtab-read.c: Include "gdb_string.h" instead of <string.h>.
- * gnu-nat.c: Ditto.
-
-2002-01-06 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Note that alpha-dec-osf4.0a, arc-elf, arm-coff,
- arm-elf, arm-pe, d30v-elf, fr30-elf, h8300hms, h8500hms,
- i960-coff, m32r-elf, m68k-elf, m88k, mcore-elf, mn10200-elf,
- ns32k-netbsd, hppa1.1-hp-proelf, v850-elf, vax-dec-vms5.5 and
- z8k-coff have not been multi-arched. Update z8k-coff build
- status.
-
-2002-01-06 Andrew Cagney <ac131313@redhat.com>
-
- * MAINTAINERS: Mark a29k target as obsolete.
- * Makefile.in (a29k-tdep.o, remote-adapt.o, remote-eb.o)
- (remote-mm.o, remote-udi.o): Obsolete. Remove references in
- comments.
- * NEWS: Note that a29k targets are obsolete.
- * a29k-tdep.c: Mark as obsolete.
- * configure.tgt: Mark a29k-*-aout*, a29k-*-coff*, a29k-*-elf*,
- a29k-*-ebmon*, a29k-*-kern*, a29k-*-none*, a29k-*-udi* and
- a29k-*-vxworks* targets as obsolete.
- * remote-adapt.c: Obsolete.
- * remote-eb.c: Obsolete.
- * remote-mm.c: Obsolete.
- * remote-udi.c: Obsolete.
- * config/a29k/a29k-udi.mt: Obsolete.
- * config/a29k/a29k.mt: Obsolete.
- * config/a29k/tm-a29k.h: Obsolete.
- * config/a29k/tm-vx29k.h: Obsolete.
- * config/a29k/vx29k.mt: Obsolete.
-
-2002-01-05 Andrew Cagney <ac131313@redhat.com>
-
- * rs6000-tdep.c (rs6000_do_registers_info): Replace BIG_ENDIAN
- with BFD_ENDIAN_BIG.
-
-2002-01-05 Andrew Cagney <ac131313@redhat.com>
-
- * configure.in (AC_CHECK_HEADERS): Do not check for <endian.h>.
- * configure, config.in: Re-generate.
- * config/vax/xm-vaxbsd.h: Do not include <machine/endian.h>.
- * defs.h: Do not include <endian.h>.
-
-2002-01-05 Jason Thorpe <thorpej@wasabisystems.com>
-
- * acconfig.h (HAVE_PT_GETXMMREGS): New.
- * config.in: Regenerate.
- * configure.in: Update copyright years.
- Add test for PT_GETXMMREGS supplied by <sys/ptrace.h>.
- * configure: Regenerate.
- * i386bsd-nat.c: Update copyright years.
- (fill_gregset): Use regcache_collect.
- (fetch_inferior_registers): Only fetch integer registers
- if requested to do so. Add support for XMM registers
- using PT_GETXMMREGS.
- (store_inferior_registers): Only store integer registers
- if requested to do so. Add support for XMM registers
- using PT_SETXMMREGS.
- * i386nbsd-nat.c (fetch_inferior_registers): Remove.
- (store_inferior_registers): Remove.
- (fetch_core_registers): Use supply_gregset and i387_supply_fsave.
- (fetch_elfcore_registers): New function.
- (i386nbsd_elfcore_fns): New.
- (_initialize_i386nbsd_nat): Register i386nbsd_elfcore_fns.
- * config/i386/nbsd.mh (NATDEPFILES): Add i387-nat.o and
- i386bsd-nat.o.
- * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
- * config/i386/nbsd.mt (TDEPFILES): Add i386bsd-nat.o.
- * config/i386/nbsdelf.mt (TDEPFILES): Likewise.
- * config/i386/tm-nbsd.h: Update copyright years.
- (HAVE_SSE_REGS): Define.
- (IN_SIGTRAMP): Define as i386bsd_in_sigtramp.
- (SIGTRAMP_START): Redefine as i386bsd_sigtramp_start.
- (SIGTRAMP_END): Redefine as i386bsd_sigtramp_end.
- (SIGCONTEXT_PC_OFFSET): Remove.
- (FRAME_SAVED_PC): Define as i386bsd_frame_saved_pc.
-
-2002-01-05 Andrew Cagney <ac131313@redhat.com>
-
- * configure.tgt: Remove powerpc-*-macos* target.
- * config/m68k/xm-mpw.h: Delete file.
- * config/xm-mpw.h: Delete file.
- * ser-mac.c: Delete file.
- * mpw-make.sed: Delete file.
- * mpw-config.in: Delete file.
- * mac-xdep.c: Delete file.
- * mac-gdb.r: Delete file.
- * mac-defs.h: Delete file.
- * mac-nat.c: Delete file.
- * config/powerpc/macos.mh: Delete file.
- * config/powerpc/macos.mt: Delete file.
- * config/powerpc/nm-macos.h: Delete file.
- * config/powerpc/tm-macos.h: Delete file.
- * source.c (openp, open_source_file): Remove obsolete code.
- * top.c (gdb_readline): Ditto.
- * utils.c (query): Ditto.
- * event-top.c (display_gdb_prompt): Ditto.
- * Makefile.in (ser-mac.o): Delete obsolete target.
- * NEWS: Update.
-
-2002-01-04 Andrew Cagney <ac131313@redhat.com>
-
- * defs.h (BIG_ENDIAN): Delete macro definition.
- * a29k-tdep.c, arch-utils.c, arm-tdep.c, ax-gdb.c, ch-exp.c,
- coffread.c, cris-tdep.c, d10v-tdep.c, d30v-tdep.c, defs.h,
- findvar.c, infcmd.c, mem-break.c, mips-tdep.c, mn10300-tdep.c,
- printcmd.c, remote-os9k.c, remote-rdi.c, remote-rdp.c,
- remote-sim.c, remote.c, rs6000-tdep.c, sh-tdep.c, sparcl-tdep.c,
- stabsread.c, valops.c, valprint.c, config/a29k/tm-a29k.h,
- config/a29k/tm-vx29k.h, config/arm/tm-arm.h,
- config/d30v/tm-d30v.h, config/fr30/tm-fr30.h,
- config/h8300/tm-h8300.h, config/h8500/tm-h8500.h,
- config/m32r/tm-m32r.h, config/m68k/tm-m68k.h,
- config/m88k/tm-m88k.h, config/mips/tm-mips.h, config/pa/tm-hppa.h,
- config/sparc/tm-sparc.h, config/z8k/tm-z8k.h, mi/mi-cmd-disas.c,
- mi/mi-main.c: Replace BIG_ENDIAN with BFD_ENDIAN_BIG.
- * gdbarch.sh: Replace BIG_ENDIAN with BFD_ENDIAN_BIG.
- * gdbarch.c: Re-generate.
-
-2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+2003-01-31 David Carlton <carlton@math.stanford.edu>
- * thread-db.c (thread_db_new_objfile): Do not enable thread_db
- for core files.
+ From Jim Blandy <jimb@redhat.com>:
+
+ Use a single, consistent representation for an empty minimal
+ symbol table in an objfile.
+ * objfiles.c (terminate_minimal_symbol_table): New function.
+ (allocate_objfile): Call it.
+ * objfiles.h (terminate_minimal_symbol_table): New declaration.
+ (ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
+ non-NULL.
+ * minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
+ objfile has minimal symbols, compare minimal_symbol_count to zero,
+ instead of comparing msymbols with NULL.
+ * objfiles.c (have_minimal_symbols): Same.
+ * solib-sunos.c (solib_add_common_symbols): Call
+ terminate_minimal_symbol_table.
+ * symfile.c (reread_symbols): Same.
-2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+ * objfiles.h: Revert patch from 2003-01-27, to be replaced by
+ similar patch from Jim Blandy.
+ * objfiles.c (objfile_relocate): Ditto.
+ * i386-linux-tdep.c (find_minsym_and_objfile): Ditto.
+ * arm-linux-tdep.c (find_minsym_and_objfile): Ditto.
+ * gdbtypes.h: Delete INTEGER_COERCION_BADNESS,
+ FLOAT_COERCION_BADNESS.
+ * gdbtypes.c (rank_one_type): Replace all uses of
+ INTEGER_COERCION_BADNESS by INTEGER_CONVERSION_BADNESS.
+ * valops.c (find_overload_match): Call cp_func_name.
+ * cp-support.h: Declare cp_func_name.
+ * cp-support.c (cp_func_name): New function.
- * config/arm/nbsd.mh (XDEPFILES): Remove ser-tcp.o.
+2003-01-30 David Carlton <carlton@math.stanford.edu>
-2002-01-04 Andrew Cagney <ac131313@redhat.com>
+ * valops.c (find_overload_match): Move code into
+ find_oload_champ_namespace.
+ (find_oload_champ_namespace): New function, which immediately gets
+ eviscerated and turned into a call to
+ find_oload_champ_namespace_loop.
+ (find_oload_champ_namespace_loop): New function.
+ * symtab.c (make_symbol_overload_list): Move entire body into
+ make_symbol_overload_list_qualified.
+ (make_symbol_overload_list_qualified): New.
+ (read_in_psymtabs): New.
+ (make_symbol_overload_list_qualified): Rewrite.
+ (make_symbol_overload_list_using): New.
+ (lookup_symbol_namespace): Use alloca, not xmalloc.
+ (make_symbol_overload_list): Put some memory management stuff back
+ in.
- * value.h (value_ptr): Delete typedef.
+2003-01-28 David Carlton <carlton@math.stanford.edu>
-2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+ * valops.c (find_overload_match): Calculate func_name via
+ SYMBOL_CPLUS_DEMANGLED_NAME + remove_params.
+ * symtab.c (remove_params): Make extern.
+ * symtab.h: Add declaration for remove_params.
+ * symtab.c (overload_list_add_symbol): Change second arg to const
+ char *.
+ * valops.c (find_overload_match) Update call to
+ make_symbol_overload_list.
+ * symtab.h: Update declaration for make_symbol_overload_list.
+ * symtab.c (make_symbol_overload_list): Change arguments.
+ * valops.c (find_overload_match): Rename cleanups to old_cleanups;
+ handle freeing func_name via cleanups.
- * i386nbsd-nat.c: Update copyright years.
- Include i386-tdep.h.
+2003-01-27 David Carlton <carlton@math.stanford.edu>
-2002-01-04 Elena Zannoni <ezannoni@redhat.com>
+ * objfiles.h: Add comments about objfile->msymbols being NULL.
+ * objfiles.c (objfile_relocate): Enclose ALL_OBJFILE_MSYMBOLS in
+ guard.
+ * i386-linux-tdep.c (find_minsym_and_objfile): Call ALL_MSYMBOLS
+ instead of ALL_OBJFILES and ALL_OBJFILE_MSYMBOLS.
+ * arm-linux-tdep.c (find_minsym_and_objfile): Ditto.
- * stabsread.c: Update copyright years.
+2003-01-24 David Carlton <carlton@math.stanford.edu>
- From Debashis Mahata <debashis.mahata@wipro.com>:
- (read_struct_fields): Deal with Sun C compiler erroneous stab
- output for structs and unions.
- Fix PR gdb/269.
+ * valops.c (find_oload_champ): New function.
+ (find_overload_match): Separate code into find_oload_champ and
+ oload_method_static.
+ (find_oload_champ): Call oload_method_static.
+ (oload_method_static): New function.
+ (find_overload_match): Call classify_oload_match.
+ (classify_oload_match): New function.
+ * value.h: Update declaration of find_overload_match.
+ * eval.c (evaluate_subexp_standard): Pass current block to
+ find_overload_match.
+ * valops.c (find_overload_match): Add CURRENT_BLOCK arg.
-2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+2003-01-20 David Carlton <carlton@math.stanford.edu>
- * p-valprint.c: Include "cp-abi.h" for baseclass_offset
- prototype.
+ * p-exp.y: Add block to OP_FUNCALL.
+ * objc-exp.y: Add block to OP_FUNCALL.
+ * m2-exp.y: Add block to OP_FUNCALL.
+ * c-exp.y: Add block to OP_FUNCALL.
+ * ada-exp.y: Add block to OP_FUNCALL.
+ (write_object_renaming): Ditto.
+ * parse.c (length_of_subexp): Split off OP_FUNCALL.
+ (prefixify_subexp): Ditto.
+ * expprint.c (print_subexp): Change offset for OP_FUNCALL.
+ (dump_subexp): Ditto.
+ * eval.c (evaluate_subexp_standard): Change offset for
+ OP_FUNCALL.
+ * ada-lang.c (ada_resolve_subexp): Add comment on OP_FUNCALL.
+ (replace_operator_with_call): Add block to OP_FUNCALL.
+ (ada_evaluate_subexp): Change offset for OP_FUNCALL.
+ * expression.h (exp_opcode): Change comments before OP_FUNCALL and
+ OP_F77_UNDETERMINED_ARGLIST.
-2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+2003-01-14 David Carlton <carlton@math.stanford.edu>
- * cp-abi.c: Fix whitespace.
- (baseclass_offset): New wrapper function.
- * cp-abi.h (baseclass_offset): Add prototype.
- (struct cp_abi_ops): Add baseclass_offset pointer.
+ * symtab.c (search_symbols): Add comment.
+ (lookup_symbol_aux_using): Function name should start line.
+ (lookup_symbol_aux_using_loop): Ditto.
+ (lookup_block_symbol): Add comment.
- * valops.c (vb_match): Move to...
- * gnu-v2-abi.c (vb_match): here.
- * valops.c (baseclass_offset): Move to...
- * gnu-v2-abi.c (gnuv2_baseclass_offset): here, and rename.
+2003-01-13 David Carlton <carlton@math.stanford.edu>
- * gnu-v3-abi.c (gnuv3_baseclass_offset): New function.
+ * dwarf2read.c (read_structure_scope): Add comment.
+ (add_partial_structure): Ditto.
+ * symtab.c (lookup_transparent_type): Add comment.
- * gnu-v2-abi.c (init_gnuv2_ops): Initialize baseclass_offset.
- * gnu-v3-abi.c (init_gnuv3_ops): Likewise.
- * hpacc-abi.c (init_hpacc_ops): Likewise.
+2003-01-10 David Carlton <carlton@math.stanford.edu>
-2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+ * objfiles.c (allocate_objfile): Always set name.
+ * dwarf2read.c (scan_partial_symbols): Don't call
+ add_partial_structure on unions.
+ (add_partial_structure): Look for enclosing namespace names.
+ (read_structure_scope): Look enclosing namespace/class names.
+ (new_symbol): For C++ structures, always grab the name from the
+ type's name.
- * valops.c (find_overload_match): Accept obj as a
- reference parameter. Update it before returning.
- * value.h (find_overload_match): Update prototype.
- * eval.c (evaluate_subexp_standard): Pass object to
- find_overload_match by reference.
+2003-01-07 David Carlton <carlton@math.stanford.edu>
-2002-01-03 Andrew Cagney <ac131313@redhat.com>
+ * dwarf2read.c (add_partial_structure): New function.
+ (scan_partial_symbols): Call add_partial_structure. New variable
+ info_ptr_updated.
+ * symtab.h (struct general_symbol_info): Make demangled_names
+ const char *.
- * valarith.c: Replace value_ptr with struct value pointer. Remove
- register attribute from value declarations.
- * valops.c: Ditto.
- * value.h: Ditto.
- * scm-lang.c (scm_lookup_name): Ditto.
+2003-01-06 David Carlton <carlton@math.stanford.edu>
-2002-01-03 Michael Snyder <msnyder@redhat.com>
+ * config/djgpp/fnchange.lst: Mention
+ testsuite/gdb.c++/namespace1.cc.
+ * cp-support.h: Declare cp_lookup_namespace_symbol.
+ * cp-support.c (cp_lookup_namespace_symbol): New function.
+ (cp_check_namespace_symbol): Call cp_lookup_namespace_symbol.
+ (cp_lookup_possible_namespace_symbol): Update comment.
+ * symtab.c (lookup_symbol_aux_file): Add 'anonymous_namespace'
+ argument.
+ (lookup_symbol_namespace): Call lookup_symbol_aux_file with new
+ argument.
+ * cp-support.h: Declare cp_is_anonymous.
+ * cp-support.c (cp_is_anonymous): New function.
+ * buildsym.c (add_symbol_to_list): Don't test for anonymous
+ namespace mention here.
+ (scan_for_anonymous_namespaces): Test for it here, instead.
+ * symtab.c (lookup_symbol_aux_minsyms): Delete.
+ (lookup_symbol_aux_nonlocal): Don't call
+ lookup_symbol_aux_minsyms.
- Abstract the functionality of iterating over mapped memory
- regions into a general purpose iterator function.
- * procfs.c (iterate_over_mappings): New function, general purpose
- iterator for memory sections.
- (proc_iterate_over_mappings): Reimplement using iterate_over_mappings.
- (solib_mappings_callback): New function, callback for above.
- (info_proc_mappings): Reimpliment using iterate_over_mappings.
- (info_mappings_callback): New function, callback for above.
+2002-12-24 David Carlton <carlton@math.stanford.edu>
- * procfs.c (proc_set_watchpoint): Add cast to suppress warning.
+ * MAINTAINERS: Delete OBSOLETE targets.
+ * config/sparc/tm-sparc.h: Delete duplicate definition of
+ DEPRECATED_PC_IN_CALL_DUMMY.
-2002-01-01 Mark Kettenis <kettenis@gnu.org>
+2002-12-23 David Carlton <carlton@math.stanford.edu>
- * i386-tdep.h (struct gdbarch_tdep): Add `os_ident' member.
- * i386-tdep.c: Include "elf-bfd.h".
- (process_note_abi_tag_sections): New function.
- (i386_gdbarch_init): Add code to recognize various OS/ABI
- combinations.
+ * symtab.c (search_symbols): Update comment.
+ (lookup_symbol): Don't demangle names.
+ (lookup_symbol_minsym): Delete FIXME comment.
+ (lookup_symbol_linkage): Add comment.
+ (lookup_symbol_aux): Rename 'mangled_name' argument to
+ 'linkage_name'.
+ (lookup_symbol_aux_local): Ditto.
+ (lookup_symbol_aux_block): Ditto.
+ (lookup_symbol_aux_nonlocal): Ditto.
+ (lookup_symbol_aux_file): Ditto.
+ (lookup_symbol_aux_symtabs): Ditto.
+ (lookup_symbol_aux_psymtabs): Ditto.
+ (lookup_symbol_aux_using): Ditto.
+ (lookup_symbol_aux_using_loop): Ditto.
+ (lookup_symbol_namespace): Ditto.
+ (lookup_symbol_aux_minsyms): Ditto.
+ * symfile.c (psymbol_init_demangled_name): Delete unnecessary
+ variable, initialization.
- * maint.c (_initialize_maint_cmds): Add missing \ in
- string-literal.
+ * Merge from mainline; tag is carlton_dictionary-20021223-merge.
-For older changes see ChangeLog-2001
+For older changes see ChangeLog-2002
Local Variables:
mode: change-log
diff --git a/gdb/ChangeLog-2002 b/gdb/ChangeLog-2002
new file mode 100644
index 00000000000..ad2cfdaf1b1
--- /dev/null
+++ b/gdb/ChangeLog-2002
@@ -0,0 +1,15039 @@
+2002-12-31 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb_dirent.h: Cleanup and update code to match the example in
+ the Autoconf manual.
+ * configure.in: Call AC_HEADER_DIRENT. Remove dirent.h,
+ sys/ndir.h, sys/dir.h and ndir.h from call to AC_CHECK_HEADERS.
+ * configure: Regenerated.
+
+2002-12-30 Adam Fedor <fedor@gnu.org>
+
+ * objc-exp.y (parse_number): Cast sscanf arguments to proper type.
+ (yylex): Initialize c to avoid uninitialized warning.
+
+2002-12-29 Kazu Hirata <kazu@cs.umass.edu>
+
+ * doc/fdl.texi: Revert the last change.
+
+2002-12-29 Mark Kettenis <kettenis@gnu.org>
+
+ * tracepoint.c (ISATTY): Removed.
+
+2002-12-26 J. Brobecker <brobecker@gnat.com>
+
+ Continuing work to convert the hppa targets to multiarch partil.
+
+ * hppa-tdep.c: Add some missing forward declarations.
+ (frameless_function_invocation): Prefix the function name
+ by "hppa_" to avoid polluting the namespace. Update all calls
+ to use the new function name.
+ (saved_pc_after_call): Ditto.
+ (init_extra_frame_info): Ditto.
+ (frame_chain): Ditto.
+ (push_dummy_frame): Ditto.
+ (target_read_pc): Ditto.
+ (target_write_pc): Ditto.
+ (in_solib_call_trampoline): Ditto.
+ (in_solib_return_trampoline): Ditto.
+ (skip_trampoline_code): Ditto.
+ (hppa_read_fp): New function, renamed from target_read_fp.
+ (hppa_target_read_fp): New function, using hppa_read_fp.
+ This function conforms to the function profile for the
+ READ_FP gdbarch method.
+ (hppa_extract_struct_value_address): New function, extracted
+ from the definition of the DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+ macro.
+ (hppa_frame_num_args): New function.
+ (hppa_gdbarch_init): Setup the gdbarch vector for the hppa target.
+
+ * config/pa/tm-hppa.h: Wrap around all gdbarch-eligible macros
+ inside "#if !GDB_MULTI_ARCH ... #endif" conditional, in preparation
+ for the switch to multiarch partial.
+ Update some of the macros definitions to match some changes
+ described above in the name of the function they are calling.
+ (PUSH_DUMMY_FRAME): Add a FIXME explaining why this macro will
+ not be straightforward to convert. Do now wrap it inside
+ "#if !... #endif" to remember that this macro has still not
+ been taken care of.
+ (FIX_CALL_DUMMY): Likewise.
+
+2002-12-26 J. Brobecker <brobecker@gnat.com>
+
+ Continuing work to convert the hppa targets to multiarch partial.
+
+ * hppa-tdep.c (hppa_register_raw_size): New function replacing
+ the body of macro REGISTER_RAW_SIZE.
+ * hppa-hpux-tdep.c: Add new functions replacing macro bodies from
+ config/pa/tm-hppah.h. These functions will be used to initialize
+ the gdbarch structure.
+ (hppa_hpux_pc_in_sigtramp): New function.
+ (hppa_hpux_frame_saved_pc_in_sigtramp): New function.
+ (hppa_hpux_frame_base_before_sigtramp): New function.
+ (hppa_hpux_frame_find_saved_regs_in_sigtramp): New function.
+ Add gdbcore.h #include.
+ * config/pa/tm-hppa.h (REGISTER_RAW_SIZE): Change the definition
+ of this gdbarch-eligible macro to a call to the new associated
+ function.
+ * config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Likewise.
+ (FRAME_SAVED_PC_IN_SIGTRAMP): Change the definition of this macro
+ into a call to the new associated function.
+ (FRAME_BASE_BEFORE_SIGTRAMP): Likewise.
+ (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Likewise.
+ * Makefile.in (hppa-hpux-tdep.o): Add dependency on gdbcore.h.
+
+2002-12-24 David Carlton <carlton@math.stanford.edu>
+
+ * config/sparc/tm-sparc.h: Delete duplicate definition of
+ DEPRECATED_PC_IN_CALL_DUMMY.
+
+2002-12-24 Kevin Buettner <kevinb@redhat.com>
+
+ * Makefile.in (mips-linux-tdep.o): Add $(mips_tdep_h) and
+ $(gdb_assert_h).
+ * configure.tgt: Recognize mips64*-*-linux*.
+ * mips-linux-tdep.c (mips-tdep.h, gdb_assert.h): Include.
+ (supply_32_bit_reg): New function.
+ (supply_gregset): Call supply_32bit_reg() instead of supply_register().
+ (fill_gregset): Use regcache_collect() instead of
+ deprecated_registers[].
+ (register_addr): Change name to mips_linux_register_addr().
+ (MIPS64_ELF_NGREG, MIPS64_ELF_NFPREG, MIPS64_FPR_BASE, MIPS64_PC)
+ (MIPS64_CAUSE, MIPS64_BADVADDR, MIPS64_MMHI, MIPS64_MMLO)
+ (MIPS64_FPC_CSR, MIPS64_FPC_EIR, MIPS64_EF_REG0, MIPS64_EF_REG31)
+ (MIPS64_EF_LO, MIPS64_EF_HI, MIPS64_EF_CP0_EPC, MIPS64_EF_CP0_BADVADDR)
+ (MIPS64_EF_CP0_STATUS, MIPS64_EF_CP0_CAUSE, MIPS64_EF_SIZE)
+ (MIPS64_LINUX_JB_PC): New defines.
+ (mips64_elf_greg_t, mips64_elf_gregset_t, mips64_elf_fpreg_t)
+ (mips64_elf_fpregset_t): New typedefs.
+ (mips64_linux_get_longhmp_target, mips64_supply_gregset)
+ (mips64_fill_gregset, mips64_supply_fpregset, mips64_fill_fpregset)
+ (mips64_linux_register_addr, set_mips_linux_register_addr)
+ (register_addr, mips64_linux_svr4_fetch_link_map_offsets):
+ (init_register_addr_data)
+ New functions.
+ (fetch_core_registers): Add support for core file formats with 64-bit
+ registers.
+ (mips_linux_init_abi): Distinguish o32, n32, and n64 ABIs.
+ (register_addr_data): New static global variable.
+ (_initialize_mips_linux_tdep): Initialize register_addr_data. Invoke
+ gdbarch_register_osabi() for each MIPS machine.
+ * config/mips/linux64.mt: New file.
+ * config/mips/tm-linux64.h: New file.
+
+2002-12-23 Adam Fedor <fedor@gnu.org>
+
+ * maint.c (maintenance_demangle): Add switch to demangle
+ ObjC language symbols as well.
+
+2002-12-23 Adam Fedor <fedor@gnu.org>
+
+ * objc-lang.c (lookup_objc_class, lookup_child_selector): Remove
+ last argument from complaint function call.
+
+2002-12-23 Kevin Buettner <kevinb@redhat.com>
+
+ * exec.c (print_section_info): Add FIXME comments regarding format
+ string choices.
+
+2002-12-23 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/pa/nm-hppab.h: Delete duplicate CANNOT_STORE_REGISTER decl.
+ * config/pa/nm-hppao.h: Delete duplicate CANNOT_STORE_REGISTER decl.
+
+2002-12-23 Rodney Brown <rbrown64@csc.com.au>
+
+ * config/pa/nm-hppah.h: Delete duplicate CANNOT_STORE_REGISTER decl.
+
+2002-12-23 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux): Delete 'force_return' variable.
+ (lookup_symbol_aux_minsyms): Delete 'force_return' argument.
+ (search_symbols): Call lookup_symbol_aux_minsyms to find debugging
+ information associated to a minsym, not lookup_symbol.
+
+2002-12-21 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.h (x86_64_init_abi): New prototype.
+ * x86-64-tdep.c (i386_fp_regnum_p): Remove function.
+ (x86_64_init_abi): Make non-static. Set number of pseudo
+ registers to 0.
+ (x86_64_gdbarch_init): Remove function.
+ (_initialize_x86_64_tdep): Renove register_gdbarch_init call.
+ Remove code dealing with dissambly.
+ * x86-64-linux-tdep.c (x86_64_linux_init_abi): New function.
+ (_initialize_x86_64_linux_tdep): New function.
+ * config/i386/x86-64linux.mt (TDEPFILES): Add i386-tdep.o and
+ i386-tdep.o.
+
+2002-12-14 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.c: Include "gdb_assert.h" and "gdb_string.h".
+ (struct gdb_osabi_handler): Remove member `arch'. Add member
+ `arch_info'.
+ (gdbarch_register_osabi): Add new argument `machine'. Use ot to
+ construct a `struct bfd_arch_info' and store it in the `struct
+ gdb_osabi_handler' that is created.
+ (gdbarch_init_osabi): Check for compatibility based on machine
+ type and architecture.
+ * osabi.h (gdbarch_register_osabi): Adjust prototype and update
+ comment.
+ * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add 0 as
+ second argument in call to gdbarch_register_osabi.
+ * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise.
+ * alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise.
+ * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise.
+ * arm-linux-tdep.c (_initialize_arm_linux_tdep): Likewise.
+ * arm-tdep.c (_initialize_arm_tdep): Likewise.
+ * armnbsd-tdep.c (_initialize_armnbsd_tdep): Likewise.
+ * hppa-hpux-tdep.c (_initialize_hppa_hpux_tdep): Likewise.
+ * i386-interix-tdep.c (_initialize_i386_interix_tdep): Likewise.
+ * i386-linux-tdep.c (_initialize_i386_linux_tdep): Likewise.
+ * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Likewise.
+ * i386-tdep.c (_initialize_i386_tdep): Likewise.
+ * i386bsd-tdep.c (_initialize_i386bsd_tdep): Likewise.
+ * i386gnu-tdep.c (_initialize_i386gnu_tdep): Likewise.
+ * i386ly-tdep.c (_initialize_i386lynx_tdep): Renamed from
+ _initialize_i386bsd_tdep and updated likewise.
+ * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Likewise.
+ * i386obsd-tdep.c (_initialize_i386obsd_tdep): Likewise.
+ * mips-irix-tdep.c (_initialize_mips_irix_tdep): Likewise.
+ * mips-linux-tdep.c (_initialize_mips_linux_tdep): Likewise.
+ * mipsnbsd-tdep.c (_initialize_mipsnbsd__tdep): Likewise.
+ * ns32knbsd-tdep.c (_initialize_ns32kmnsd_tdep): Likewise.
+ * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Likewise.
+ * ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Likewise.
+ * shnbsd-tdep.c (_initialize_shnbsd_tdep): Likewise.
+ * sparcnbsd-tdep.c (_initialize_sparcnbsd_tdep): Likewise.
+
+2002-12-20 Kevin Buettner <kevinb@redhat.com>
+
+ * solib-svr4.c (elf_locate_base): Fix sizeof() related bug. Add
+ DT_MIPS_RLD_MAP case for 64-bit targets.
+
+2002-12-20 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (heuristic_proc_desc): Clear memory associated with
+ ``temp_saved_regs'', not the pointer or other storage contiguous
+ to this pointer.
+
+2002-12-20 Kevin Buettner <kevinb@redhat.com>
+
+ * Makefile.in (mips-linux-tdep.o): Add $(osabi_h) and $(gdb_string_h).
+ * config/mips/tm-linux.h (mips_linux_svr4_fetch_link_map_offsets)
+ (mips_linux_get_longjmp_target): Delete declarations.
+ (SVR4_FETCH_LINK_MAP_OFFSETS, GET_LONGJMP_TARGET)
+ (MIPS_LINUX_JB_ELEMENT_SIZE, MIPS_LINUX_JB_PC): Delete definitions.
+ * mips-linux-tdep.c (osabi.h, gdb_string.h): Include.
+ (MIPS_LINUX_JB_ELEMENT_SIZE, MIPS_LINUX_JB_PC): Define.
+ (mips_linux_get_longjmp_target)
+ (mips_linux_svr4_fetch_link_map_offsets): Make static.
+ (mips_linux_init_abi): New function.
+ (_initialize_mips_linux_tdep): Register mips_linux_init_abi().
+
+2002-12-19 Keith Seitz <keiths@redhat.com>
+
+ patch committed by Elena Zannoni <ezannoni@redhat.com>
+ * thread.c (do_captured_list_thread_ids): Call prune_threads and
+ target_find_new_threads. Fix for PR mi/669.
+
+2002-12-19 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (decode_line_1): Move code into decode_all_digits.
+ (decode_all_digits): New function.
+
+2002-12-19 Kevin Buettner <kevinb@redhat.com>
+
+ * exec.c (print_section_info): Select a format string to use with
+ local_hex_string_custom() based upon the value of TARGET_ADDR_BIT.
+
+2002-12-18 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (deprecated_update_current_frame_pc_hack): Replace
+ deprecated_update_current_frame_pc_hack.
+ (deprecated_update_frame_base_hack): New function.
+ * frame.h (deprecated_update_frame_pc_hack): Replace
+ (deprecated_update_frame_base_hack): Declare.
+ * infrun.c (normal_stop): Update.
+
+2002-12-18 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_init_extra_frame_info): Use
+ frame_extra_info_zalloc.
+ (rs6000_frame_args_address): Use get_frame_extra_info.
+ (frame_get_saved_regs): Use get_frame_saved_regs.
+ (frame_initial_stack_address): Use get_frame_saved_regs and
+ get_frame_extra_info.
+ (frame_initial_stack_address): Use get_frame_extra_info.
+
+2002-12-17 Kevin Buettner <kevinb@redhat.com>
+
+ * dve3900-rom.c (r3900_regnames): Don't use NUM_REGS to determine
+ array size.
+ (fetch_bitmapped_register, store_bitmapped_register): Add bounds
+ checks for r3900_regnames[].
+
+2002-12-17 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-tdep.c (ARM_NBSD_JB_PC): Renamed from JB_PC.
+ All uses changed
+ (ARM_NBSD_JB_ELELMENT_SIZE): Similarly.
+
+2002-12-17 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_partial_symbol): Don't search past the end of
+ the partial symbols.
+
+2002-12-17 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (frame_info): Use get_frame_saved_regs.
+ * breakpoint.c (until_break_command): Use get_frame_pc.
+
+2002-12-16 Kevin Buettner <kevinb@redhat.com>
+
+ * buildsym.c (block_end_complaint, anon_block_end_complaint)
+ (innerblock_complaint, innerblock_anon_complaint)
+ (blockvector_complaint): Delete deprecated complaint structs.
+ (finish_block, make_blockvector, end_symtab): Replace calls
+ to complain() with calls to complaint().
+ * coffread.c (ef_complaint, ef_stack_complaint, eb_stack_complaint)
+ (bf_no_aux_complaint, ef_no_aux_complaint, lineno_complaint)
+ (unexpected_type_complaint, bad_sclass_complaint)
+ (misordered_blocks_complaint, tagndx_bad_complaint, eb_complaint):
+ Delete deprecated complaint structs.
+ (coff_symtab_read, enter_linenos, decode_type, decode_base_type):
+ Replace calls to complain() with calls to complaint().
+ * dbxread.c (lbrac_complaint, string_table_offset_complaint)
+ (unknown_symtype_complaint, unknown_symchar_complaint)
+ (lbrac_rbrac_complaint, lbrac_unmatched_complaint)
+ (lbrac_mismatch_complaint, repeated_header_complaint)
+ (unclaimed_bincl_complaint, discarding_local_symbols_complaint):
+ Delete deprecated complaint structs.
+ (unknown_symtype_complaint, lbrac_mismatch_complaint)
+ (repeated_header_complaint)
+ (function_outside_compiliation_unit_complaint): New functions.
+ (add_old_header_file, find_corresponding_bincl_psymtab)
+ (set_namestring, find_stab_function_addr, read_dbx_symtab)
+ (process_one_symbol): Replace calls to complain() with, possibly
+ indirect, calls to complaint().
+ * dwarfread.c (no_bfd_get_N, malformed_die, bad_die_ref)
+ (unknown_attribute_form, unknown_attribute_length)
+ (unexpected_fund_type, unknown_type_modifier, volatile_ignored)
+ (const_ignored, botched_modified_type, op_deref2, op_deref4)
+ (basereg_not_handled, dup_user_type_allocation)
+ (dup_user_type_definition, missing_tag, bad_array_element_type)
+ (subscript_data_items, unhandled_array_subscript_format)
+ (unknown_array_subscript_format, not_row_major)
+ (missing_at_name): Delete deprecated complaint structs.
+ (bad_die_ref_complaint, unknown_attribute_form_complaint)
+ (dup_user_type_definition_complaint)
+ (bad_array_element_type_complaint): New functions.
+ (lookup_utype, alloc_utype, struct_type, decode_array_element_type)
+ (decode_subscript_data_item, dwarf_read_array_type)
+ (read_tag_string_type, read_subroutine_type, read_func_scope)
+ (locval, scan_partial_symbols, decode_modified_type)
+ (decode_func_type, basicdieinfo, completeddieinfo, target_to_host)
+ (attribute_size): Replace calls to complain() with, possibly
+ indirect, calls to complaint().
+ * elfread.c (section_info_complaint, section_info_dup_complaint)
+ (stab_info_mismatch_complaint, stab_info_questionable_complaint):
+ Delete deprecated complaint structs.
+ (elf_symtab_read, elfstab_offset_sections): Replace calls to
+ complain() with calls to complaint().
+ * gdbtypes.c (stub_noname_complaint): Delete deprecated complaint
+ struct.
+ (stub_noname_complaint): New function.
+ (check_typedef, add_mangled_type): Replace calls to complain()
+ with calls to complaint().
+ * hpread.c (string_table_offset_complaint, lbrac_unmatched_complaint)
+ (lbrac_mismatch_complaint, hpread_unhandled_end_common_complaint)
+ (hpread_unhandled_type_complaint, hpread_struct_complaint)
+ (hpread_array_complaint, hpread_type_lookup_complaint)
+ (hpread_unexpected_end_complaint, hpread_tagdef_complaint)
+ (hpread_unhandled_common_complaint)
+ (hpread_unhandled_blockdata_complaint): Delete deprecated complaint
+ struct definitions and declarations.
+ (lbrac_unmatched_complaint, lbrac_mismatch_complaint): New functions.
+ (SET_NAMESTRING, hpread_type_lookup, hpread_process_one_debug_symbol):
+ Replace calls to complain() with, possibly indirect, calls to
+ complaint().
+ * macrotab.c (macro_include, check_for_redefinition, macro_undef):
+ Likewise.
+ * mdebugread.c (bad_file_number_complaint, index_complaint)
+ (aux_index_complaint, block_index_complaint)
+ (unknown_ext_complaint, unknown_sym_complaint)
+ (unknown_st_complaint, block_overflow_complaint)
+ (basic_type_complaint, unknown_type_qual_complaint)
+ (array_index_type_complaint, bad_tag_guess_complaint)
+ (block_member_complaint, stEnd_complaint)
+ (unknown_mdebug_symtype_complaint, stab_unknown_complaint)
+ (pdr_for_nonsymbol_complaint, pdr_static_symbol_complaint)
+ (bad_setjmp_pdr_complaint, bad_fbitfield_complaint)
+ (bad_continued_complaint, bad_rfd_entry_complaint)
+ (unexpected_type_code_complaint, unable_to_cross_ref_complaint)
+ (bad_indirect_xref_complaint, illegal_forward_tq0_complaint)
+ (illegal_forward_bt_complaint, bad_linetable_guess_complaint)
+ (bad_ext_ifd_complaint, bad_ext_iss_complaint): Delete deprecated
+ complaint structs.
+ (index_complaint, unknown_ext_complaint, basic_type_complaint)
+ (bad_tag_guess_complaint, bad_rfd_entry_complaint)
+ (unexpected_type_code_complaint)
+ (function_outside_compilation_unit_complaint): New functions.
+ (parse_symbol, parse_type, upgrade_type, parse_procedure)
+ (parse_partial_symbols, psymtab_to_symtab_1, cross_ref, add_symbol):
+ Replace calls to complain() with, possibly indirect calls to
+ complaint().
+ * objc-lang.c (noclass_lookup_complaint, nosel_lookup_complaint):
+ Delete deprecated complaint structs.
+ (lookup__objc_class, lookup_child_selector): Replace complain()
+ with complaint().
+ * remote-vx.c (cant_contact_target): Delete deprecated complaint
+ struct.
+ (vx_lookup_symbol): Replace complain() with complaint().
+ * stabsread.c (invalid_cpp_abbrev_complaint)
+ (invalid_cpp_type_complaint, member_fn_complaint)
+ (const_vol_complaint, error_type_complaint)
+ (invalid_member_complaint, range_type_base_complaint)
+ (reg_value_complaint, vtbl_notfound_complaint)
+ (unrecognized_cplus_name_complaint, rs6000_builtin_complaint)
+ (unresolved_sym_chain_complaint, stabs_general_complaint)
+ (lrs_general_complaint, multiply_defined_struct): Delete
+ deprecated complaint structs.
+ (invalid_cpp_abbrev_complaint, ref_value_complaint)
+ (stabs_general_complaint, lrs_general_complaint)
+ (msg_unknown_complaint): New functions.
+ (dbx_lookup_type, read_cfront_baseclasses)
+ (read_cfront_member_functions, resolve_symbol_reference)
+ (define_symbol, resolve_live_range, add_live_range, read_type)
+ (rs6000_builtin_type, read_member_functions, read_cpp_abbrev)
+ (read_one_struct_field, read_baseclasses, read_tilde_fields)
+ (read_cfront_static_fields, attach_fields_to_type)
+ (complain_about_struct_wipeout, read_range_type)
+ (common_block_start, common_block_end, cleanup_undefined_types)
+ (scan_file_globals): Replace complain() with complaint().
+ * stabsread.h (unknown_symtype_complaint, unknown_symchar_complaint):
+ Delete deprecated complaint struct declarations.
+ * xcoffread.c (storclass_complaint, bf_notfound_complaint)
+ (ef_complaint, eb_complaint): Delete deprecated complaint structs.
+ (bf_not_found_complaint, ef_complaint, eb_complaint)
+ (function_outside_compilation_unit_complaint): New functions.
+ (record_include_begin, record_include_end, enter_line_range)
+ (xcoff_next_symbol_text, read_xcoff_symtab, process_xcoff_symbol)
+ (read_symbol, read_symbol_lineno, scan_xcoff_symtab) Replace
+ complain() with complaint().
+
+2002-12-16 Andrew Cagney <ac131313@redhat.com>
+
+ * config/arc/arc.mt, config/arc/tm-arc.h: Delete.
+ * config/d30v/d30v.mt, config/d30v/tm-d30v.h: Delete.
+ * config/fr30/fr30.mt, config/fr30/tm-fr30.h: Delete.
+ * config/i386/i386aix.mh, config/i386/i386aix.mt: Delete.
+ * config/i386/i386m3.mh, config/i386/i386m3.mt: Delete.
+ * config/i386/i386mach.mh, config/i386/i386os9k.mt: Delete.
+ * config/i386/nm-i386aix.h, config/i386/nm-i386mach.h: Delete.
+ * config/i386/nm-m3.h, config/i386/tm-i386aix.h: Delete.
+ * config/i386/tm-i386m3.h, config/i386/tm-i386mk.h: Delete.
+ * config/i386/xm-i386aix.h, config/i386/xm-i386m3.h: Delete.
+ * config/i386/xm-i386mach.h, config/i386/xm-i386mk.h: Delete.
+ * config/i960/mon960.mt, config/i960/nindy960.mt: Delete.
+ * config/i960/tm-i960.h, config/i960/tm-mon960.h: Delete.
+ * config/i960/tm-nindy960.h, config/i960/tm-vx960.h: Delete.
+ * config/i960/vxworks960.mt, config/m68k/apollo68b.mh: Delete.
+ * config/m68k/apollo68b.mt, config/m68k/apollo68v.mh: Delete.
+ * config/m68k/hp300bsd.mh, config/m68k/hp300bsd.mt: Delete.
+ * config/m68k/hp300hpux.mh, config/m68k/hp300hpux.mt: Delete.
+ * config/m88k/delta88.mh, config/m88k/delta88.mt: Delete.
+ * config/m88k/delta88v4.mh, config/m88k/delta88v4.mt: Delete.
+ * config/m88k/m88k.mh, config/m88k/m88k.mt: Delete.
+ * config/m88k/nm-delta88v4.h, config/m88k/nm-m88k.h: Delete.
+ * config/m88k/tm-delta88.h, config/m88k/tm-delta88v4.h: Delete.
+ * config/m88k/tm-m88k.h, config/m88k/xm-delta88.h: Delete.
+ * config/m88k/xm-dgux.h: Delete.
+ * fr30-tdep.c, i386aix-nat.c, i386m3-nat.c: Delete.
+ * i386mach-nat.c, i960-tdep.c, m88k-nat.c: Delete.
+ * os9kread.c, remote-bug.c, remote-nindy.c: Delete.
+ * remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete.
+ * d30v-tdep.c, arc-tdep.c, cxux-nat.c, dst.h, dstread.c: Delete.
+ * ch-exp.c, ch-lang.c, ch-lang.h, ch-typeprint.c: Delete.
+ * ch-valprint.c: Delete.
+
+2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * infrun.c (handle_inferior_event): Rearrange code to resume if
+ no catchpoint triggers for an event.
+
+2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * infrun.c (handle_inferior_event): Merge TARGET_WAITKIND_FORKED
+ and TARGET_WAITKIND_VFORKED cases.
+
+2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * infrun.c (handle_inferior_event): Assume that catchpoints
+ are not affected by DECR_PC_AFTER_BREAK.
+
+2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * target.c (update_current_target): Don't inherit DONT_USE.
+ * target.h (struct target_ops): Remove DONT_USE.
+ (target_next): Remove macro.
+
+2002-12-15 Mark Kettenis <kettenis@gnu.org>
+
+ * ui-out.c (MAX_UI_OUT_LEVELS): Raise to 6. Fixes PR cli/654.
+
+2002-12-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (convert_from_extended): New argument to hold the
+ type of floating point result we want to convert to. Make input
+ argument const. Fix all callers.
+ (convert_to_extended): Similarly.
+ (arm_extract_return_value): Now takes a regcache argument. Change
+ code to use regcache accessor functions. Correctly extract
+ smaller-than-word results on big-endian machines.
+ (arm_store_return_value): Now takes a regcache argument. Change
+ code to use regcache accessor functions. Correctly zero/sign extend
+ smaller than word results before storing into r0.
+ (arm_gdbarch_init): Register new-style extract_return_value and
+ store_return_value functions.
+
+2002-12-13 Michael Snyder <msnyder@to-limbo.toronto.redhat.com>
+
+ * thread-db.c (thread_from_lwp): Uniquify error msg.
+ (lwp_from_thread): Ditto.
+ (check_event): Ditto.
+ (find_new_threads_callback): Ditto.
+ (thread_db_pid_to_str): Ditto.
+
+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (get_frame_saved_regs): Declare.
+ (frame_saved_regs_zalloc): Change return type to CORE_ADDR
+ pointer.
+ * frame.c (get_frame_saved_regs): New function.
+ (frame_saved_regs_zalloc): Return the allocated saved_regs.
+
+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (deprecated_update_current_frame_pc_hack): New
+ function.
+ * frame.h (deprecated_update_current_frame_pc_hack): Declare.
+ * infrun.c (normal_stop): Use said function instead of directly
+ modifying the frame's PC.
+
+2002-12-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * frame.h (frame_id_unwind_ftype): Fix typo in return type.
+
+2002-12-13 Kevin Buettner <kevinb@redhat.com>
+
+ * config/mips/tm-mips.h, config/mips/tm-irix3.h,
+ config/mips/tm-irix6.h (NUM_REGS): Delete.
+ * mips-tdep.c (mips_gdbarch_init): Call set_gdbarch_num_regs().
+ (temp_saved_regs): Declare as a pointer rather than an array.
+ (mips32_heuristic_proc_desc, heuristic_proc_desc): Make sure
+ that ``temp_saved_regs'' has storage allocated to it and that
+ it's the correct size.
+
+2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * defs.h (init_last_source_visited): New prototype.
+ (add_path): Ditto.
+ * source.c (add_path): New function that adds to a specified path.
+ (mod_path): Change to call add_path.
+ (init_last_source_visited): New function to allow interfaces to
+ initialize static variable: last_source_visited. Part of fix
+ for PR gdb/741.
+ * Makefile.in: Add support for mi/mi-cmd-env.c.
+
+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (frame_id_unwind): Declare.
+ (struct frame_info): Add fields id_unwind, id_unwind_cache_p and
+ id_unwind_cache.
+ (frame_id_unwind_ftype): Declare.
+ * frame.c (frame_id_unwind): New function.
+ (set_unwind_by_pc): Add unwind_id parameter. Initialized.
+ (create_new_frame, get_prev_frame): Pass id_unwind to
+ set_unwind_by_pc.
+ (frame_saved_regs_id_unwind): New function.
+ (frame_saved_regs_id_unwind): New function.
+ * dummy-frame.c (dummy_frame_id_unwind): New function.
+ (struct dummy_frame): Add field id.
+ (generic_push_dummy_frame): Initialize `id'.
+ * dummy-frame.h (dummy_frame_id_unwind): Declare.
+
+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (run_stack_dummy): Create a frame ID directly and then
+ pass that to set_momentary_breakpoint. Move comments to where they
+ belong.
+ * frame.h (set_current_frame): Delete declaration.
+ * frame.c (set_current_frame): Delete function.
+
+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (frame_extra_info_zalloc): New function.
+ * frame.h (frame_extra_info_zalloc): Declare.
+
+2002-12-13 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c (hppa_pop_frame): Fix a compilation error introduced
+ in the previous prototype change to set_momentary_breakpoint.
+
+2002-12-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * infrun.c (pending_follow): Remove saw_parent_fork, saw_child_fork,
+ and saw_child_exec.
+ (follow_fork, init_wait_for_inferior, handle_inferior_event): Remove
+ references to saw_parent_fork, saw_child_fork, and saw_child_exec.
+ (stop_stepping): Remove outdated check for child vfork events.
+
+2002-12-12 Andrew Cagney <ac131313@redhat.com>
+
+ * GDB 5.3 released from gdb_5_3-branch.
+
+2002-12-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * corelow.c (init_core_ops): Delete references to to_require_attach
+ and to_require_detach.
+ * exec.c (init_exec_ops): Likewise.
+ * hppah-nat.c (child_follow_fork): Call hppa_require_attach and
+ hppa_require_detach directly.
+ * inferior.h (REQUIRE_ATTACH, REQUIRE_DETACH): Delete.
+ * inftarg.c (child_detach): Remove.
+ (child_detach_from_process): Rename to child_detach, remove
+ after_fork argument.
+ (child_attach): Remove.
+ (child_attach_to_process): Rename to child_attach, remove after_fork
+ argument.
+ (init_child_ops): Delete references to to_require_attach
+ and to_require_detach.
+ * infttrace.c (hppa_require_attach): Update comment.
+ * target.c (cleanup_target, update_current_target)
+ (init_dummy_target, setup_target_debug): Delete references to
+ to_require_attach and to_require_detach.
+ (find_default_require_detach, find_default_require_attach)
+ (debug_to_require_attach, debug_to_require_detach): Remove
+ functions.
+ * target.h (struct target_ops): Remove to_require_attach
+ and to_require_detach.
+ (target_require_attach, target_require_detach): Delete macros.
+ (find_default_require_detach, find_default_require_attach): Delete
+ prototypes.
+ * config/pa/nm-hppah.h (REQUIRE_ATTACH, REQUIRE_DETACH): Delete.
+
+2002-12-11 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (get_frame_extra_info): New function.
+ * frame.h (get_frame_extra_info): Declare.
+
+2002-12-11 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.h (struct breakpoint): Replace frame with frame_id.
+ (set_momentary_breaokpoint): Replace `struct frame_info' parameter
+ with `struct frame_id'.
+ (set_longjmp_resume_breakpoint): Ditto.
+ * infrun.c (handle_inferior_event): Update.
+ * breakpoint.c (watch_command_1, until_break_command): Update.
+ * infrun.c (handle_inferior_event, check_sigtramp2): Update.
+ (handle_inferior_event, step_over_function): Update.
+ * breakpoint.c (bpstat_stop_status, print_one_breakpoint): Update.
+ (set_raw_breakpoint, set_longjmp_resume_breakpoint): Update.
+ (set_momentary_breakpoint, deprecated_frame_in_dummy): Update.
+ * infcmd.c (finish_command, run_stack_dummy): Update.
+
+2002-12-11 Kevin Buettner <kevinb@redhat.com>
+
+ * dwarf2read.c (dwarf2_const_ignored, dwarf2_volatile_ignored)
+ (dwarf2_non_const_array_bound_ignored)
+ (dwarf2_missing_line_number_section)
+ (dwarf2_statement_list_fits_in_line_number_section)
+ (dwarf2_mangled_line_number_section, dwarf2_unsupported_die_ref_attr)
+ (dwarf2_unsupported_stack_op, dwarf2_complex_location_expr)
+ (dwarf2_unsupported_tag, dwarf2_unsupported_at_encoding)
+ (dwarf2_unsupported_at_frame_base, dwarf2_unexpected_tag)
+ (dwarf2_missing_at_frame_base, dwarf2_bad_static_member_name)
+ (dwarf2_unsupported_accessibility, dwarf2_bad_member_name_complaint)
+ (dwarf2_missing_member_fn_type_complaint)
+ (dwarf2_vtbl_not_found_complaint, dwarf2_absolute_sibling_complaint)
+ (dwarf2_const_value_length_mismatch)
+ (dwarf2_unsupported_const_value_attr, dwarf2_misplaced_line_number)
+ (dwarf2_line_header_too_long, dwarf2_missing_macinfo_section)
+ (dwarf2_macros_too_long, dwarf2_macros_not_terminated)
+ (dwarf2_macro_outside_file, dwarf2_macro_unmatched_end_file)
+ (dwarf2_macro_malformed_definition, dwarf2_macro_spaces_in_definition)
+ (dwarf2_invalid_attrib_class, dwarf2_invalid_pointer_size): Delete
+ complaints using deprecated struct..
+ (dwarf2_non_const_array_bound_ignored_complaint)
+ (dwarf2_complex_location_expr_complaint)
+ (dwarf2_unsupported_at_frame_base_complaint)
+ (dwarf2_const_value_length_mismatch_complaint)
+ (dwarf2_macros_too_long_complaint)
+ (dwarf2_macro_malformed_definition_complaint)
+ (dwarf2_invalid_attrib_class_complaint): New functions.
+ (read_func_scope, dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
+ (read_structure_scope, read_array_type, read_common_block)
+ (read_tag_pointer_type, read_base_type, read_partial_die)
+ (dwarf_decode_line_header, check_cu_functions, dwarf_decode_lines)
+ (new_symbol, dwarf2_const_value, read_type_die)
+ (dwarf2_get_ref_die_offset, decode_locdesc, consume_improper_spaces)
+ (parse_macro_definition, dwarf_decode_macros): Replace calls to
+ complain() with, possibly indirect, calls to complaint().
+
+2002-12-11 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (deprecated_get_frame_saved_regs): Rename
+ get_frame_saved_regs.
+ * frame.h (deprecated_get_frame_saved_regs): Update declaration.
+ * sparc-tdep.c: Update.
+ * hppa-tdep.c: Update.
+ * h8500-tdep.c: Update.
+
+2002-12-11 Kevin Buettner <kevinb@redhat.com>
+
+ * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME)
+ (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS): Use ``const char *'' instead of
+ ``char *'' for return and parameter types.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * gdbtypes.h, gdbtypes.c (address_space_int_to_name): Change
+ return type from ``char *'' to ``const char *''.
+ * c-typeprint.c (c_type_print_modifier): Make ``address_space_id''
+ const.
+
+2002-12-11 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c: Include "dummy-frame.h".
+ (i386_frame_chain, i386_frame_saved_pc): Replace
+ DEPRECATED_PC_IN_CALL_DUMMY with call to pc_in_dummy_frame.
+ (i386_gdbarch_init): Don't set deprecated_pc_in_call_dummy.
+
+2002-12-10 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
+ Change to a function with predicate.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.c (get_prev_frame): Update. Test
+ DEPRECATED_INIT_FRAME_PC_P.
+ * config/sparc/tm-sparc.h (DEPRECATED_INIT_FRAME_PC): Update.
+ * config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC): Update.
+ * config/mn10200/tm-mn10200.h (DEPRECATED_INIT_FRAME_PC): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * i386-interix-tdep.c (i386_interix_init_abi): Update.
+ * arm-tdep.c: Update comments.
+ * h8300-tdep.c (h8300_gdbarch_init): Explicitly set init_frame_pc.
+ * config/m32r/tm-m32r.h (DEPRECATED_INIT_FRAME_PC): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * x86-64-tdep.c (x86_64_init_abi): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * vax-tdep.c (vax_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+ * config/z8k/tm-z8k.h (INIT_FRAME_PC_FIRST): Delete macro.
+ (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
+
+2002-12-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/pa/nm-hppah.h (CHILD_POST_FOLLOW_VFORK): Change to
+ CHILD_FOLLOW_FORK.
+ * hppah-nat.c (saved_vfork_pid): Add.
+ (child_post_follow_vfork): Remove.
+ (child_follow_fork): New function.
+ (child_wait): Call detach_breakpoints after receiving the child vfork.
+ Call child_resume directly instead of going through resume ().
+ Make sure we have the exec before reporting the vfork.
+ * inferior.h (follow_inferior_reset_breakpoints): Add prototype.
+ * infrun.c (follow_fork, follow_vfork, follow_inferior_fork): Remove.
+ (follow_fork): New function. Call target_follow_fork.
+ (follow_inferior_reset_breakpoints): New function broken out from
+ old follow_inferior_fork.
+ (resume): Remove hack to follow exec after vfork.
+ * inftarg.c (child_post_follow_vfork): Remove.
+ (child_follow_fork): New function.
+ (init_child_ops): Replace to_post_follow_vfork with to_follow_fork.
+ * target.c (cleanup_target): Replace to_post_follow_vfork with
+ to_follow_fork.
+ (update_current_target): Likewise.
+ (setup_target_debug): Likewise.
+ (debug_to_post_follow_vfork): Remove.
+ (debug_to_follow_fork): New function.
+ * target.h (struct target_ops): Replace to_post_folow_vfork with
+ to_follow_fork.
+ (child_post_follow_vfork): Remove prototype.
+ (child_follow_fork): Add prototype.
+ (target_post_follow_vfork): Remove macro.
+ (target_follow_fork): Add macro.
+
+2002-12-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * hppah-nat.c (saved_child_execd_pathname, saved_vfork_state): New.
+ (child_post_follow_vfork): Cancel pending exec event if we follow
+ the parent.
+ (child_wait): Only return TARGET_WAITKIND_VFORKED when all necessary
+ events have been processed. Return a fake TARGET_WAITKIND_EXECD
+ event at the following wait call if necessary.
+ * infrun.c (follow_vfork): Don't follow_exec here.
+ (handle_inferior_event): Add comment to TARGET_WAITKIND_EXECD
+ case about HP/UX 10.20. Remove code pushed down to
+ hppah-nat.c:child_wait.
+ * infttrace.c (child_resume): Use TT_PROC_CONTINUE if
+ vfork_in_flight is set.
+
+2002-12-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * hppah-nat.c (child_wait): Return TARGET_WAITKIND_IGNORE
+ for the parent's fork event.
+ * infrun.c (handle_inferior_event): Only expect one fork event.
+ Call prepare_to_wait for TARGET_WAITKIND_IGNORE. Update comment.
+ * target.h: Update comment for TARGET_WAITKIND_IGNORE.
+
+2002-12-10 Andrew Cagney <ac131313@redhat.com>
+
+ * PROBLEMS: Delete reference to PR gdb/725.
+
+ * MAINTAINERS (gdb.c++): Add David Carlton.
+
+2002-12-09 David Carlton <carlton@math.stanford.edu>
+
+ * cli/cli-setshow.c: #include <readline/tilde.h> after defs.h.
+ * cli/cli-cmds.c: Ditto.
+
+2002-12-09 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (gdbarch_dump): Print NAME_OF_MALLOC using %s. Wrap
+ function address in <>.
+ * gdbarch.c: Re-generate.
+
+2002-12-09 David Carlton <carlton@math.stanford.edu>
+
+ * p-exp.y: Rename TRUE and FALSE to TRUEKEYWORD and FALSEKEYWORD.
+
+2002-12-09 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (symtab_from_filename): New function.
+ (decode_line_1): Move code into symtab_from_filename.
+
+2002-12-09 Kevin Buettner <kevinb@redhat.com>
+
+ * lin-lwp.c (strsignal): Make extern declaration match that of glibc.
+
+2002-12-07 Andrew Cagney <ac131313@redhat.com>
+
+ * f-valprint.c (info_common_command): Use get_frame_pc.
+ * std-regs.c (value_of_builtin_frame_pc_reg): Ditto.
+ * ax-gdb.c (agent_command): Ditto.
+ * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
+ (rs6000_pop_frame): Ditto.
+ (rs6000_frameless_function_invocation): Ditto.
+ (rs6000_frame_saved_pc, frame_get_saved_regs): Ditto.
+ (frame_initial_stack_address, rs6000_frame_chain): Ditto.
+ * macroscope.c (default_macro_scope): Ditto.
+ * stack.c (print_frame_info_base): Ditto.
+ (print_frame, frame_info, print_frame_label_vars): Ditto.
+ (return_command, func_command, get_frame_language): Ditto.
+ * infcmd.c (finish_command): Ditto.
+ * dummy-frame.c (cached_find_dummy_frame): Ditto.
+ * breakpoint.c (deprecated_frame_in_dummy): Ditto.
+ (break_at_finish_at_depth_command_1): Ditto.
+ (break_at_finish_command_1): Ditto.
+ (until_break_command, get_catch_sals): Ditto.
+ * blockframe.c (func_frame_chain_valid): Ditto.
+ (frameless_look_for_prologue): Ditto.
+ (frame_address_in_block, generic_func_frame_chain_valid): Ditto.
+
+2002-12-08 Andrew Cagney <ac131313@redhat.com>
+
+ * config/rs6000/tm-rs6000.h (init_frame_pc_noop): Add declaration.
+ * dwarf2cfi.c (cfi_init_frame_pc): Cast the PC to a pointer.
+
+2002-12-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (INIT_FRAME_PC_FIRST, INIT_FRAME_PC_DEFAULT): Convert
+ to pure functions.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.c (get_prev_frame): Explictly assign prev's pc with value
+ returned by INIT_FRAME_PC_FIRST and INIT_EXTRA_FRAME_INFO.
+
+ * arch-utils.h (init_frame_pc_default, init_frame_pc_noop): Change
+ declaration to a function returning a CORE_ADDR.
+ * x86-64-tdep.h (x86_64_init_frame_pc): Ditto.
+ * arch-utils.c (init_frame_pc_noop): Return the PC value.
+ (init_frame_pc_default): Ditto.
+ * x86-64-linux-tdep.c (x86_64_init_frame_pc): Ditto.
+ * s390-tdep.c (s390_init_frame_pc_first): Ditto.
+ * mips-tdep.c (mips_init_frame_pc_first): Ditto.
+ * dwarf2cfi.h (cfi_init_frame_pc): Ditto.
+ * dwarf2cfi.c (cfi_init_frame_pc): Ditto.
+ * alpha-tdep.c (alpha_init_frame_pc_first): Ditto.
+
+ * i386-interix-tdep.c (i386_interix_init_abi): Set init_frame_pc
+ to init_frame_pc_noop.
+ (i386_interix_init_frame_pc): Delete function.
+ * z8k-tdep.c (init_frame_pc): Delete function.
+ * config/z8k/tm-z8k.h (INIT_FRAME_PC): Define as init_frame_pc_noop.
+ (INIT_FRAME_PC_FIRST): Ditto.
+ * config/mn10200/tm-mn10200.h (INIT_FRAME_PC): Ditto.
+ (INIT_FRAME_PC_FIRST): Ditto.
+ * config/sparc/tm-sparc.h (INIT_FRAME_PC): Ditto.
+ * config/rs6000/tm-rs6000.h (INIT_FRAME_PC): Redefine as
+ init_frame_pc_noop.
+ (INIT_FRAME_PC_FIRST): Convert to an expression.
+ * config/sparc/tm-sparc.h (INIT_FRAME_PC_FIRST): Ditto.
+
+2002-12-08 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c: Use get_frame_base instead of directly accessing
+ the `struct frame_info' member frame.
+ * f-valprint.c, std-regs.c, rs6000-tdep.c: Ditto.
+ * stack.c, dummy-frame.c, breakpoint.c: Ditto.
+
+2002-12-08 Elena Zannoni <ezannoni@redhat.com>
+
+ * Makefile.in (readline_h): Define.
+ (completer.o): Depend on readline_h.
+ (corelow.o): Ditto.
+ (event-top.o): Ditto.
+ (exec.o): Ditto.
+ (solib.o): Ditto.
+ (source.o): Ditto.
+ (symfile.o): Ditto.
+ (symmisc.o): Ditto.
+ (top.o): Ditto.
+ (tracepoint.o): Ditto.
+ (utils.o): Ditto.
+ (cli-dump.o): Ditto.
+ (tui-hooks.o): Ditto.
+ (tuiWin.o): Ditto.
+
+2002-12-08 Elena Zannoni <ezannoni@redhat.com>
+
+ More cleanup from import of readline 4.3.
+ * completer.h (complete_line, readline_line_completion_function):
+ Update prototypes.
+ (line_completion_function): Removed, not used outside of completer.c.
+ * completer.c (readline_line_completion_function,
+ complete_function, line_completion_function): Use const for first
+ parameter.
+ (line_completion_function): Make static.
+ (filename_completer): filename_completion_function is now called
+ rl_filename_completion_function
+ * corelow.c: Include <readline/readline.h>.
+ * exec.c: Ditto.
+ * solib.c: Ditto.
+ * source.c: Ditto.
+ * symfile.c: Ditto.
+ * symmisc.c: Ditto.
+ * top.c (init_main): No need to coerce
+ readline_line_completion_function anymore.
+ * cli/cli-dump.c: Include <readline/readline.h>.
+
+2002-12-08 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (frame_info): Use get_prev_frame.
+ * blockframe.c (frame_address_in_block): Ditto.
+ * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
+ (rs6000_frameless_function_invocation): Ditto.
+ (rs6000_frame_saved_pc): Ditto.
+ (rs6000_frame_chain): Ditto.
+ * arch-utils.c (init_frame_pc_default): Ditto.
+
+2002-12-08 Andrew Cagney <ac131313@redhat.com>
+
+ * config/mn10200/tm-mn10200.h (DEPRECATED_PC_IN_CALL_DUMMY):
+ Delete redundant definition.
+
+2002-12-08 Elena Zannoni <ezannoni@redhat.com>
+
+ Import of readline 4.3:
+ * cli/cli-cmds.c: Include readline/tilde.h.
+ * cli/cli-setshow.c: Ditto.
+ * defs.h: Don't declare tilde_expand anymore, since readline
+ exports it.
+
+2002-12-08 Elena Zannoni <ezannoni@redhat.com>
+
+ * Makefile.in (thread-db.o): Add explicit rule to ignore the use of
+ -Werror on this file.
+
+2002-12-07 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (TARGET_FLOAT_FORMAT): Use the macro when printing
+ the format name.
+ (TARGET_DOUBLE_FORMAT, TARGET_LONG_DOUBLE_FORMAT): Ditto.
+ * gdbarch.c: Regenerate.
+
+2002-12-06 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_INIT_FRAME_PC_FIRST): Rename
+ INIT_FRAME_PC_FIRST. Change to a function with predicate. Do not
+ provide a default value.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * frame.c (get_prev_frame): Update. Check
+ DEPRECATED_INIT_FRAME_PC_FIRST_P.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * config/sparc/tm-sparc.h (DEPRECATED_INIT_FRAME_PC_FIRST): Update.
+ * config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC_FIRST): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+
+2002-12-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * ia64-linux-nat.c: Include gdb_string.h.
+ * alpha-nat.c: Ditto.
+ * ppc-linux-nat.c: Ditto.
+ * Makefile.in (ia64-linux-nat.o, alpha-nat.o, ppc-linux-nat.o):
+ Update dependencies.
+
+2002-12-05 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbthread.h: Include "frame.h".
+ (struct thread_info): Replace step_frame_address with
+ step_frame_id.
+ * inferior.h: Include "frame.h".
+ (step_frame_id): Replace external variable step_frame_address.
+ * gdbthread.h (save_infrun_state): Replace step_frame_address
+ parameter with step_frame_id parameter.
+ (load_infrun_state): Ditto.
+ * Makefile.in (gdbthread_h, inferior_h): Add $(frame_h).
+ * infcmd.c (step_frame_id, step_1, step_once): Update.
+ * thread.c (load_infrun_state, save_infrun_state): Update.
+ * infrun.c (clear_proceed_status, save_inferior_status): Update.
+ (handle_inferior_event, step_over_function): Update.
+ (normal_stop, context_switch, restore_inferior_status): Update.
+ (struct inferior_status): Replace step_frame_address with
+ step_frame_id.
+
+2002-12-05 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf2_add_field): Treat a field that is a
+ DW_TAG_member as well as a declaration as being a C++ static data
+ member.
+ (read_structure_scope): Combine tests for DW_TAG_member and
+ DW_TAG_variable.
+
+2002-12-05 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (decode_compound): New function.
+ (decode_line_1): Move code into decode_compound.
+
+2002-12-05 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux_local): Add 'static_block'
+ argument.
+ (lookup_symbol_aux): Do the 'field_of_this' check before checking
+ the static block. See PR gdb/804.
+
+2002-12-05 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux_block): New function.
+ (lookup_symbol_aux_local): Move code into lookup_symbol_aux_block.
+
+2002-12-05 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh: Dump the predicate function and macro values.
+ (read): Print error on standard error.
+ * gdbarch.c: Regenerate.
+
+2002-12-04 Kevin Buettner <kevinb@redhat.com>
+
+ * Makefile.in (mips_tdep_h): Define.
+ (mips-tdep.o): Add mips_tdep_h to dependency list.
+ * mips-tdep.h: New file.
+ * mips-tdep.c (mips-tdep.h): Include.
+ (enum mips_abi): Move to mips-tdep.h.
+ (mips_abi): New function.
+
+2002-12-04 David Carlton <carlton@math.stanford.edu>
+
+ * Makefile.in (f-exp.tab.c): Don't depend on c-exp.tab.c.
+
+2002-12-04 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux): Move minsym code into a separate
+ function.
+ (lookup_symbol_aux_minsyms): New function.
+
+2002-12-04 J. Brobecker <brobecker@gnat.com>
+
+ * pa64solib.c: s/boolean/int/. Fixes a build failure on hppa64-hpux.
+
+2002-12-04 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Renamed from IN_SIGTRAMP,
+ which is an obsolete macro name.
+
+2002-12-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * doublest.c (convert_floatformat_to_doublest): Cast exp_bias to int.
+ * config/alpha/alpha-linux.mh (MH_CFLAGS): Add -mieee.
+
+2002-12-03 H.J. Lu (hjl@gnu.org)
+
+ * breakpoint.c (create_thread_event_breakpoint): Use xasprintf.
+ (create_breakpoints): Make sure the addr_string field is not
+ NULL.
+
+2002-12-03 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-nat.c (fetch_inferior_registers)
+ (store_inferior_registers): Add comment on problem of LWP vs
+ threads.
+
+ From 2002-11-21 Daniel Jacobowitz <drow@mvista.com>
+ * lin-lwp.c (lin_lwp_fetch_registers): Remove.
+ (lin_lwp_store_registers): Remove.
+ (init_lin_lwp_ops): Use fetch_inferior_registers
+ and store_inferior_registers directly.
+ * sparc-nat.c (fetch_inferior_registers): Honor LWP ID.
+ (store_inferior_registers): Likewise.
+ Fix PR gdb/725.
+
+2002-12-03 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (get_frame_id): Convert to a function.
+ (null_frame_id, frame_id_p): Declare.
+ (frame_id_eq, frame_id_inner): Declare.
+ (frame_id_build): New function.
+ * frame.c (get_frame_id): Update. Use null_frame_id.
+ (frame_find_by_id): Rewrite using frame_id_p, frame_id_eq and
+ frame_id_inner.
+ (null_frame_id, frame_id_p): Define.
+ (frame_id_eq, frame_id_inner): Define.
+ (frame_id_build): New function.
+ * varobj.c (varobj_create): Update.
+ (varobj_update): Update.
+ * valops.c (value_assign): Update.
+ (new_root_variable): Update.
+ * infrun.c (save_inferior_status): Update.
+ * breakpoint.c (watch_command_1): Update.
+
+2002-12-03 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/tm-hppah.h (SNAP1): Remove unused macro.
+ (SNAP2): Likewise.
+
+2002-12-03 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention Daniel Jacobowitz's multi-threaded shared library
+ patch.
+
+ * PROBLEMS: Mention PR gdb/725.
+
+2002-12-03 Andreas Schwab <schwab@suse.de>
+
+ * infcmd.c (construct_inferior_arguments): Handle empty arguments.
+
+2002-12-02 Adam Fedor <fedor@gnu.org>
+ Klee Dienes <kdienes@apple.com>
+
+ * objc-lang.c (objc_printstr): Add width arg to match
+ printstr prototype.
+ (compare_selectors): Add 'const' to arg types.
+ (compare_classes): Likewise.
+ (find_imps): Cast msym pointer to avoid compiler warning.
+ (print_object_command): Validate the address before
+ passing it to the print routine.
+ (find_objc_msgcall_submethod): Change function argument to
+ return an int.
+ * objc-lang.h: Add 'extern' to all function declarations.
+ (value_nsstring): Add declaration.
+
+2002-12-02 J. Brobecker <brobecker@gnat.com>
+
+ * somsolib.c (dld_cache): Replace boolean by int for field is_valid.
+ Fixes a build failure on HP/UX.
+
+ * hpread.c (told_objfile): Replace boolean type by int. Fixes a build
+ failure on HP/UX.
+ (hpread_has_name): Advance declaration to avoid a compilation warning.
+ (pst_syms_count): Add missing variable type. By change, the compiler
+ was defaulting to int, which seems a good choice. Fixes a compilation
+ warning.
+ (pst_syms_size): Likewise.
+
+2002-12-02 J. Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c: Add #include "osabi.h" (for hppa_gdbarch_init).
+ (hppa_gdbarch_init): Detect osabi from objfile. Will be needed
+ later to set the proper gdbarch methods depending on the osabi.
+ * Makefile.in (hppa-tdep.o): Add dependency on osabi.h.
+
+2002-12-02 J. Brobecker <brobecker@gnat.com>
+
+ * osabi.h (gdb_osabi): Add two new enum values for HPUX ELF and SOM.
+ * osabi.c (gdb_osabi_name): Add strings images for the two new
+ enum values.
+ (generic_elf_osabi_sniffer): Handle HPUX objfiles.
+
+2002-12-02 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Java): Global maintainers are responible for Java.
+ (Past Maintainers): Mention both Anthony Green and Per Bothner as
+ part Java maintainers.
+
+2002-12-02 J. Brobecker <brobecker@gnat.com>
+
+ * xcoffread.c (read_symbol_lineno): Replace boolean by int.
+ Fixes a compilation failure on AiX.
+
+2002-12-02 J. Brobecker <brobecker@gnat.com>
+
+ * config/powerpc/aix432.mh (NATDEPFILES): Add a comment explaining
+ why aix-thread.o is not listed.
+
+2002-12-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Rename
+ PC_IN_CALL_DUMMY. Change to predicate. Always allow call.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * config/sparc/tm-sparc.h, config/sparc/tm-sp64.h: Update.
+ * config/mn10200/tm-mn10200.h, config/h8500/tm-h8500.h: Update.
+ * config/pa/tm-hppa.h, frame.h: Update.
+ * x86-64-tdep.c, vax-tdep.c, sparc-tdep.c: Update.
+ * s390-tdep.c, ns32k-tdep.c, mn10300-tdep.c: Update.
+ * m68k-tdep.c, i386-tdep.c, frv-tdep.c: Update.
+ * cris-tdep.c, alpha-tdep.c: Update.
+ * frame.c (set_unwind_by_pc, create_new_frame): Use either
+ DEPRECATED_PC_IN_CALL_DUMMY or pc_in_dummy_frame.
+ (get_prev_frame): Ditto.
+
+2002-11-30 Andrew Cagney <cagney@redhat.com>
+
+ * exec.c (xfer_memory): Replace boolean with int.
+ * p-exp.y: Use 0 instead of false.
+ * corelow.c (gdb_check_format): Change return type to int from
+ boolean.
+ * utils.c: Don't include <curses.h> or <term.h> first.
+
+2002-11-29 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (m68hc11_register_raw_size): Remove.
+ (m68hc11_register_byte): Remove.
+ (m68hc11_gdbarch_init): Don't set the above.
+
+2002-11-29 Andrew Cagney <cagney@redhat.com>
+
+ * remote-mips.c (mips_initialize): Force a selected frame rebuild
+ by calling get_selected_frame.
+ * ocd.c (ocd_start_remote): Use get_selected frame instead of
+ set_current_frame, create_new_frame, select_frame and
+ get_current_frame.
+ * remote-e7000.c (e7000_start_remote): Ditto.
+ * remote-mips.c (common_open): Ditto
+ * remote-rdp.c (remote_rdp_open): Ditto.
+
+2002-11-29 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_frame_chain, m68k_frame_saved_pc)
+ (altos_skip_prologue, delta68_frame_saved_pc, isi_frame_num_args)
+ (delta68_frame_num_args, news_frame_num_args, m68k_skip_prologue)
+ (m68k_frame_init_saved_regs, m68k_saved_pc_after_call): Use
+ read_memory_unsigned_integer instead of read_memory_integer when
+ dealing with addresses and instruction opcodes.
+ * m68klinux-tdep.c (m68k_linux_sigtramp_saved_pc)
+ (m68k_linux_frame_saved_pc): Likewise.
+
+2002-11-29 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (selected_frame, select_frame): Move from here ...
+ * frame.c (selected_frame, select_frame): ... to here. Include
+ "language.h".
+ * Makefile.in (frame.o): Update dependencies.
+ * frame.c (get_selected_frame): New function.
+ * frame.h (get_selected_frame): Declare.
+ (deprecated_selected_frame): Rename selected_frame.
+ * ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
+ * eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
+ * h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
+ * inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
+ * mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
+ * remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
+ * stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
+ * z8k-tdep.c, cli/cli-cmds.c: Update.
+
+2002-11-29 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (get_selected_block): Add comments.
+
+2002-11-28 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (pc_notcurrent): New function.
+ (find_frame_sal): New function.
+ * frame.h (find_frame_sal): Declare.
+ (struct symtab_and_line): Add opaque declaration.
+ * stack.c (print_frame_info_base): Use find_frame_sal instead of
+ find_pc_line.
+ (frame_info): Ditto.
+ * ada-lang.c (find_printable_frame): Ditto.
+
+2002-11-28 J. Brobecker <brobecker@gnat.com>
+
+ * configure.in: Check that the pthdebug library is recent enough
+ before enabling thread support on native AiX.
+ * configure: Regenerate.
+
+ * config/powerpc/aix432.mh (NATDEPFILES): Remove aix-thread.o
+ from the list of object files as it is now appended by configure
+ if thread support is enabled.
+ (NAT_CLIBS): Removed as -lpthdebug is also appended by configure
+ if thread support is enabled.
+
+2002-11-28 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (get_selected_block): In-line get_current_block.
+ * frame.h (get_current_block): Delete declaration.
+ * blockframe.c (get_current_block): Delete function.
+
+2002-11-28 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Rename
+ USE_GENERIC_DUMMY_FRAMES.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * valops.c, frame.c: Update.
+ * config/z8k/tm-z8k.h, config/mn10200/tm-mn10200.h: Update.
+ * config/m32r/tm-m32r.h, config/h8500/tm-h8500.h: Update.
+ * config/pa/tm-hppa.h, blockframe.c: Update.
+ * vax-tdep.c, sparc-tdep.c, ns32k-tdep.c: Ditto.
+ * m68k-tdep.c, alpha-tdep.c: Ditto.
+
+ * arm-tdep.c: Eliminate USE_GENERIC_DUMMY_FRAMES as always 1.
+ * mips-tdep.c: Ditto.
+
+2002-11-27 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (CALL_DUMMY_LOCATION): Default to AT_ENTRY_POINT.
+ (USE_GENERIC_DUMMY_FRAMES): Default to true.
+ (PC_IN_CALL_DUMMY): Default to generic_pc_in_call_dummy.
+ * gdbarch.c, gdbarch.h: Re-generate.
+ * inferior.h (USE_GENERIC_DUMMY_FRAMES): Delete macro definition.
+ (CALL_DUMMY_LOCATION): Delete macro definition.
+ (PC_IN_CALL_DUMMY): Delete macro definitions.
+
+ * arm-tdep.c (arm_gdbarch_init): Do not set pc_in_call_dummy,
+ default is already generic_pc_in_call_dummy.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+
+ * arm-tdep.c (arm_gdbarch_init): Do not set
+ use_generic_dummy_frames, default is already 1.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ call_dummy_location, default is already AT_ENTRY_POINT.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+ * alpha-tdep.c (alpha_gdbarch_init): Ditto.
+
+2002-11-28 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h: Update comments on set_current_frame, create_new_frame,
+ flush_cached_frames, reinit_frame_cache, select_frame and
+ selected_frame.
+
+2002-11-27 Andrew Cagney <cagney@redhat.com>
+
+ * config/z8k/tm-z8k.h (PC_IN_CALL_DUMMY): Update definition to use
+ deprecated pc_in_call_dummy function.
+ * config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Ditto.
+ * config/sparc/tm-sp64.h (PC_IN_CALL_DUMMY): Ditto.
+ * config/pa/tm-hppa.h (PC_IN_CALL_DUMMY): Ditto.
+ * config/mn10200/tm-mn10200.h (PC_IN_CALL_DUMMY): Ditto.
+ * config/h8500/tm-h8500.h (PC_IN_CALL_DUMMY): Ditto.
+
+2002-11-26 Martin M. Hunt <hunt@redhat.com>
+
+ * Makefile.in: Remove Tix dependencies.
+ * acinclude.m4: Ditto.
+ * aclocal.m4: Ditto.
+ * configure.in: Ditto.
+ * configure: Regenerated.
+
+2002-11-26 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (TARGET_FLOAT_FORMAT): Print the float format name.
+ (TARGET_DOUBLE_FORMAT, TARGET_LONG_DOUBLE_FORMAT): Ditto.
+ * gdbarch.c: Re-generate.
+
+2002-11-26 Andrew Cagney <ac131313@redhat.com>
+
+ * config/h8500/tm-h8500.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
+ (USE_GENERIC_DUMMY_FRAMES): Define as zero.
+ (PC_IN_CALL_DUMMY): Define as pc_in_call_dummy_on_stack.
+ * config/mn10200/tm-mn10200.h (PC_IN_CALL_DUMMY): Define as
+ pc_in_call_dummy_at_entry_point.
+ * config/pa/tm-hppa.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
+ (USE_GENERIC_DUMMY_FRAMES): Define as zero.
+ (PC_IN_CALL_DUMMY): Define as pc_in_call_dummy_on_stack.
+ * config/pa/tm-hppa64.h (CALL_DUMMY_LOCATION): Delete undefine.
+ * config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Define as
+ pc_in_call_dummy_on_stack.
+ * config/sparc/tm-sp64.h (PC_IN_CALL_DUMMY): Redefine as
+ pc_in_call_dummy_at_entry_point and pc_in_call_dummy_on_stack.
+ * config/z8k/tm-z8k.h (CALL_DUMMY_LOCATION): Define as ON_STACK.
+ (USE_GENERIC_DUMMY_FRAMES): Define as zero.
+ (PC_IN_CALL_DUMMY): Defile as pc_in_call_dummy_on_stack.
+
+2002-11-26 Andrew Cagney <ac131313@redhat.com>
+
+ * inferior.h (deprecated_pc_in_call_dummy_before_text_end): Rename
+ pc_in_call_dummy_before_text_end
+ (deprecated_pc_in_call_dummy_after_text_end): Rename
+ pc_in_call_dummy_after_text_end.
+ (deprecated_pc_in_call_dummy_on_stack): Rename
+ pc_in_call_dummy_on_stack.
+ (deprecated_pc_in_call_dummy_at_entry_point): Rename
+ pc_in_call_dummy_at_entry_point.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/sparc/tm-sparc.h (PC_IN_CALL_DUMMY): Update.
+ * blockframe.c (deprecated_pc_in_call_dummy_before_text_end)
+ (deprecated_pc_in_call_dummy_after_text_end)
+ (deprecated_pc_in_call_dummy_on_stack)
+ (deprecated_pc_in_call_dummy_at_entry_point): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+
+2002-11-25 Daniel Jacobowitz <drow@mvista.com>
+
+ * acconfig.h (HAVE_PREAD64): Add.
+ * configure.in: Check for pread64.
+ * config.in: Regenerated.
+ * configure: Regenerated.
+ * lin-lwp.c (lin_lwp_xfer_memory): Call linux_proc_xfer_memory.
+ * linux-proc.c (linux_proc_xfer_memory): New function.
+ * config/nm-linux.h (linux_proc_xfer_memory): Add prototype.
+
+2002-11-25 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (scan_partial_symbols): Descend into namespace
+ pdi's with no name.
+
+2002-11-25 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mark h8500 as broken. Breakage occured Fri Nov 5
+ 16:32:04 1999 Andrew Cagney <cagney@b1.cygnus.com>.
+
+2002-11-25 Jim Blandy <jimb@redhat.com>
+
+ * symfile.c (init_objfile_sect_indices): New function.
+ (default_symfile_offsets): Move the section-index-initializing
+ stuff into init_objfile_sect_indices, and call that.
+
+ * symtab.h (SIZEOF_N_SECTION_OFFSETS): New macro.
+ (SIZEOF_SECTION_OFFSETS): Use SIZEOF_N_SECTION_OFFSETS.
+
+ * symfile.c (syms_from_objfile): Adjust indentation.
+
+ * symfile.c (symbol_file_add): Flush gdb_stdout even if from_tty
+ || info_verbose isn't true.
+
+2002-11-24 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS): Change
+ default to get_frame_base.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.c (default_frame_address): Delete function.
+ * arch-utils.h (default_frame_address): Delete declaration
+
+2002-11-24 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * varobj.c (find_frame_addr_in_frame_chain):
+ Use get_frame_base instead of FRAME_FP,
+ obvious fix.
+
+2002-11-19 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (FRAME_FP): Delete macro.
+ (get_frame_base): New function declaration.
+ * frame.c (get_frame_base): New function.
+ (get_frame_id): Use ->frame.
+ (frame_find_by_id): Rewrite to use get_frame_id.
+ * blockframe.c: Use get_frame_base instead of FRAME_FP.
+ * cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
+ * hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
+ * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
+ * mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
+ * sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
+ * v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
+
+2002-11-24 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Do not set get_saved_register.
+
+2002-11-24 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (set_unwind_by_pc): Revert change below, use
+ PC_IN_CALL_DUMMY.
+ (get_prev_frame): Ditto.
+
+2002-11-24 Andrew Cagney <ac131313@redhat.com>
+
+ * dummy-frame.c (pc_in_dummy_frame): New function.
+ (generic_pc_in_call_dummy): Call pc_in_dummy_frame.
+ (find_dummy_frame): Update comment.
+ (generic_pop_current_frame): Use get_frame_type.
+ * dummy-frame.h (pc_in_dummy_frame): Declare.
+ * frame.c (set_unwind_by_pc): Use pc_in_dummy_frame.
+ (create_new_frame): Use pc_in_dummy_frame.
+ (get_prev_frame): Use pc_in_dummy_frame.
+ (frame_saved_regs_register_unwind): Use get_prev_frame.
+ (deprecated_generic_get_saved_register): Use get_prev_frame.
+
+2002-11-23 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c (find_frame_addr_in_frame_chain): Move function
+ from here ...
+ * varobj.c (find_frame_addr_in_frame_chain): ... to here.
+ (varobj_create): Note that frame ID should be used.
+ * frame.h (find_frame_addr_in_frame_chain): Delete declaration.
+
+2002-11-23 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.c: Include "gdb_assert.h".
+ (deprecated_frame_in_dummy): Assert that generic dummy frames are
+ not being used.
+ * Makefile.in (breakpoint.o): Update dependencies.
+ * ada-lang.c (find_printable_frame): Use get_frame_type instead of
+ deprecated_frame_in_dummy.
+ * stack.c (print_frame_info_base): Ditto.
+ (frame_info): Ditto.
+ (print_frame_info_base): Ditto. Delete dead code.
+
+2002-11-23 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.in (m68k_tdep_h): Define.
+ (abug-rom.o, cpu32bug-rom.o, dbug-rom.o, m68k-tdep.o, m68klinux-nat.o)
+ (remote-est.o, rom68k-rom.o): Add $(m68k_tdep_h).
+ * m68k-tdep.c: Move register number enum ...
+ * m68k-tdep.h: ... to this new file and rename the constants from
+ E_* to M68K_*. All uses changed.
+ * config/m68k/tm-m68k.h (D0_REGNUM, A0_REGNUM): Remove definitions.
+ * abug-rom.c: Include "m68k-tdep.h". Use
+ M68K_D0_REGNUM/M68K_A0_REGNUM instead of D0_REGNUM/A0_REGNUM.
+ * cpu32bug-rom.c: Likewise.
+ * dbug-rom.c: Likewise.
+ * m68k-tdep.c: Likewise.
+ * m68klinux-nat.c: Likewise.
+ * remote-est.c: Likewise.
+ * rom68k-rom.c: Likewise.
+ * config/m68k/tm-linux.h: Likewise.
+
+2002-11-23 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Remove old style non-generic
+ dummy frame initialization code.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+
+2002-11-22 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (child_attach): Reset saw_create counter or subsequent
+ attach will hang.
+
+2002-11-22 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS): Default
+ to default_frame_address.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * d10v-tdep.c (d10v_gdbarch_init): Do not set frame_args_address
+ or frame_locals_address to default_frame_address.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+
+ * cris-tdep.c (cris_frame_args_address): Delete function.
+ (cris_frame_locals_address): Delete function.
+ (cris_gdbarch_init): Do not set frame_args_address or
+ frame_locals_address.
+
+2002-11-22 Michael Snyder <msnyder@redhat.com>
+
+ * thread-db.c (thread_db_load): Tell the user what's going on
+ if dlopen fails on libthread_db.
+
+2002-11-23 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_register_virtual_type): Use architecture
+ invariant return values.
+
+2002-11-22 Andreas Schwab <schwab@suse.de>
+
+ * valops.c (value_slice): Move declaration of `offset' to avoid
+ warning.
+
+2002-11-22 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (psapi_get_dll_name): Fix a compiler warning.
+ (struct so_stuff): Add end_addr field.
+ (register_loaded_dll): Calculate and store end address of loaded dll.
+ (solib_address): New function.
+ (child_solib_loaded_library_pathname): Pass carefully constructed
+ section info to safe_symbol_file_add rather than ignoring it.
+ (get_child_debug_event): Call re_enable_breakpoints_in_shlibs when a
+ DLL is loaded.
+ (do_initial_child_stuff): Call disable_breakpoints_in_shlibs.
+ (child_create_inferior): Fix a compiler warning.
+ * config/i386/tm-cygwin.h (PC_SOLIB): Define new macro.
+ (solib_address): Declare new function.
+
+2002-11-22 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_register_virtual_type): Return int for SR, FPC
+ and FPS registers.
+
+2002-11-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * maint.c (_initialize_maint_cmds): Fix typo. From
+ Francesco Potorti` <pot@gnu.org>.
+
+2002-11-21 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_dump_tdep): Delete references to
+ GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC.
+ * config/mips/tm-mips.h (GDB_TARGET_MASK_DISAS_PC): Delete macro.
+ (GDB_TARGET_UNMASK_DISAS_PC): Delete macro.
+ * printcmd.c (build_address_symbolic): Delete calls to
+ GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC.
+ (address_info): Ditto.
+ Fix PR gdb/773.
+
+2002-11-19 Klee Dienes <kdienes@apple.com>
+ Adam Fedor <fedor@gnu.org>
+
+ * completer.c (skip_quoted_chars): Renamed from skip_chars. Add
+ the ability to explicitly specify the quote characters and word
+ break characters; if NULL is specified for either, use the old
+ behavior of using the characters used by the completer.
+ (skip_chars): New function. Convenience wrapper around
+ skip_quoted_chars to provide the original skip_chars behavior.
+ * completer.h (skip_quoted_chars): Add prototype.
+
+2002-11-19 Andrew Cagney <ac131313@redhat.com>
+
+ Problems reported by Paul Eggert.
+ * gdbarch.sh: Use `sort -k 3`. Fix PR gdb/527.
+
+2002-11-19 Andreas Schwab <schwab@suse.de>
+
+ * m68klinux-nat.c (IS_SIGTRAMP, IS_RT_SIGTRAMP)
+ (m68k_linux_in_sigtramp, SIGCONTEXT_PC_OFFSET)
+ (UCONTEXT_PC_OFFSET, m68k_linux_sigtramp_saved_pc)
+ (m68k_linux_frame_saved_pc): Move to ...
+ * m68klinux-tdep.c: ... here. New file.
+ * Makefile.in (m68klinux-tdep.o): Add dependencies.
+ * config/m68k/linux.mt (TDEPFILES): Add m68klinux-tdep.o.
+
+2002-11-19 Adam Fedor <fedor@gnu.org>
+
+ * objc-exp.y: Revert to old skip_quoted usage.
+
+2002-11-19 Adam Fedor <fedor@gnu.org>
+
+ * Makefile.in (SFILES): Add objc-exp.y objc-lang.c.
+ (objc_lang_h): Define.
+ (YYFILES): Add objc-exp.tab.c.
+ (local-maintainer-clean): Remove objc-exp.tab.c.
+ (objc-exp.tab.c, objc-exp.tab.o, objc-lang.o): New target.
+
+2002-11-19 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y (typecast rule): Add automatic dereference of
+ pascal classes if needed.
+ (THIS): Set current_type.
+ Automatically dereference pascal classes.
+ (typebase rule): Add ^typebase recognition.
+
+2002-11-18 Adam Fedor <fedor@gnu.org>
+
+ * expprint.c (print_subexp): Handle OP_OBJC_NSSTRING,
+ OP_OBJC_MSGCALL, and OP_OBJC_SELF.
+ (op_name): Handle OP_OBJC_SELF.
+ * Makefile.in (expprint.o): Add additional depends.
+
+2002-11-18 Adam Fedor <fedor@gnu.org>
+
+ * expression.h: Rename ObjC ops to OP_OBJC_MSGCALL,
+ OP_OBJC_SELECTOR, OP_OBJC_NSSTRING, and OP_OBJC_SELF.
+ * parse.c (length_of_subexp, prefixify_subexp): Likewise.
+ * objc-exp.y: Likewise.
+
+2002-11-18 Adam Fedor <fedor@gnu.org>
+
+ * gdb/parser-defs.h: (struct objc_class_str): New structure
+ for parsing ObjC classes.
+
+2002-11-18 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (frame_relative_level): Copy function from here ...
+ * frame.c (frame_relative_level): ...to here.
+
+2002-11-18 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (enum frame_type): Define.
+ (get_frame_type): Declare.
+ (struct frame_info): Add field `type'. Delete field
+ signal_handler_caller.
+ (deprecated_set_frame_signal_handler_caller): Declare.
+ * frame.c (get_frame_type): New function.
+ (deprecated_set_frame_type): New function.
+ (create_new_frame): Set the frame's type.
+ (get_prev_frame): Similar.
+ * sparc-tdep.c: Use get_frame_type instead of signal_handler_caller.
+ * s390-tdep.c: Ditto.
+ * m68klinux-nat.c: Ditto.
+ * ns32k-tdep.c: Ditto.
+ * x86-64-linux-tdep.c: Ditto.
+ * vax-tdep.c: Ditto.
+ * rs6000-tdep.c: Ditto.
+ * ppc-linux-tdep.c: Ditto.
+ * i386-interix-tdep.c: Ditto.
+ * mips-tdep.c: Ditto.
+ * m68k-tdep.c: Ditto.
+ * hppa-tdep.c: Ditto.
+ * ia64-tdep.c: Ditto.
+ * cris-tdep.c: Ditto.
+ * arm-tdep.c: Ditto.
+ * alpha-tdep.c: Ditto.
+ * i386-tdep.c: Ditto.
+ * stack.c: Ditto.
+ * ada-lang.c: Ditto.
+ * blockframe.c: Update.
+ * i386-interix-tdep.c (i386_interix_back_one_frame): Use
+ deprecated_set_frame_type instead of signal_handler_caller.
+ * ppc-linux-tdep.c (ppc_linux_init_extra_frame_info): Ditto.
+ * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto.
+ * breakpoint.h: Delete FIXME suggesting get_frame_type.
+
+2002-11-18 Klee Dienes <kdienes@apple.com>
+
+ * Makefile.in (buildsym.o): Add dependency for gdb_assert.h.
+
+2002-11-18 Klee Dienes <kdienes@apple.com>
+
+ * buildsym.c (pop_context): Add comment.
+
+2002-11-18 Klee Dienes <kdienes@apple.com>
+
+ * buildsym.h (pop_context): Convert to function, defined in
+ buildsym.c.
+ * buildsym.c: Include gdb_assert.h.
+ (pop_context): Implement as C function. Add check for stack
+ underflow.
+ * dbxread.c (process_one_symbol): Complain and stop processing
+ that symbol if we are already at the top of the context stack for
+ a function-end N_FUN (this would imply an umatched RBRAC). Ditto
+ when processing N_RBRAC.
+
+2002-11-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/pa/nm-hppah.h (CHILD_POST_FOLLOW_INFERIOR_BY_CLONE): Don't
+ define.
+ (struct target_waitstatus): Add opaque definition.
+ * corelow.c (init_core_ops): Don't set to_clone_and_follow_inferior.
+ * exec.c (init_exec_ops): Likewise.
+ * fork-child.c (clone_and_follow_inferior): Remove.
+ * hppah-nat.c (child_post_follow_inferior_by_clone): Remove.
+ * inferior.h (clone_and_follow_inferior): Remove prototype.
+ * infrun.c (follow_fork_mode_both): Remove.
+ (follow_fork_mode_kind_names): Remove commented out "both".
+ (follow_inferior_fork): Remove follow_fork_mode_both support.
+ * inftarg.c (child_clone_and_follow_inferior): Remove.
+ (child_post_follow_inferior_by_clone): Remove.
+ (init_child_ops): Don't set to_clone_and_follow_inferior
+ or to_post_follow_inferior_by_clone.
+ * target.c (default_clone_and_follow_inferior): Remove.
+ (cleanup_target): Don't set to_clone_and_follow_inferior
+ or to_post_follow_inferior_by_clone.
+ (find_default_clone_and_follow_inferior): Remove.
+ (init_dummy_target): Don't set to_clone_and_follow_inferior.
+ (debug_to_clone_and_follow_inferior): Remove.
+ (debug_to_post_follow_inferior_by_clone): Remove.
+ (setup_target_debug): Don't set to_clone_and_follow_inferior
+ or to_post_follow_inferior_by_clone.
+ * target.h (struct target_ops): Remove to_clone_and_follow_inferior
+ and to_post_follow_inferior_by_clone.
+ (child_clone_and_follow_inferior): Remove prototype.
+ (child_post_follow_inferior_by_clone): Remove prototype.
+ (target_clone_and_follow_inferior): Remove macro.
+ (target_post_follow_inferior_by_clone): Remove macro.
+ (find_default_clone_and_follow_inferior): Remove prototype.
+
+2002-11-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (bpstat_stop_status): Call inferior_has_forked,
+ inferior_has_vforked, and inferior_has_execd instead of
+ target_has_forked, target_has_vforked, and target_has_execd.
+ * config/pa/nm-hppah.h (CHILD_HAS_FORKED, CHILD_HAS_VFORKED)
+ (CHILD_HAS_EXECD, CHILD_HAS_SYSCALL_EVENT): Don't define.
+ (CHILD_WAIT): Define.
+ (child_wait): Add prototype.
+ * hppah-nat.c (hpux_has_forked): Rename from child_has_forked.
+ Add prototype.
+ (hpux_has_vforked): Likewise, from child_has_vforked.
+ (hpux_has_execd): Likewise, from child_has_execd.
+ (hpux_has_syscall_event): Likewise, from child_has_syscall_event.
+ (not_same_real_pid, child_wait): New, copied from inftarg.c.
+ Call hpux_has_forked, hpux_has_vforked, hpux_has_execd,
+ and hpux_has_syscall_event instead of the target hooks.
+ * infrun.c (inferior_has_forked, inferior_has_vforked)
+ (inferior_has_execd): New functions.
+ * inftarg.c (not_same_real_pid): Remove.
+ (child_wait): Remove references to not_same_real_pid,
+ target_has_forked, target_has_vforked, target_has_execd,
+ and target_has_syscall_event.
+ (child_has_forked, child_has_vforked, child_has_execd)
+ (child_has_syscall_event): Remove.
+ (init_child_ops): Remove references to child_has_forked,
+ child_has_vforked, child_has_execd, and child_has_syscall_event.
+ * infttrace.c (hpux_has_forked): Rename from child_has_forked.
+ (hpux_has_vforked): Likewise, from child_has_vforked.
+ (hpux_has_execd): Likewise, from child_has_execd.
+ (hpux_has_syscall_event): Likewise, from child_has_syscall_event.
+ * target.c (cleanup_target): Remove references to
+ to_has_forked, to_has_vforked, to_has_execd, and
+ to_has_syscall_event.
+ (update_current_target): Likewise.
+ (setup_target_debug): Likewise.
+ (debug_to_has_forked): Remove.
+ (debug_to_has_vforked): Remove.
+ (debug_to_has_execd): Remove.
+ (debug_to_has_syscall_event): Remove.
+ * target.h (struct target_ops): Remove to_has_forked.
+ to_has_vforked, to_has_execd, and to_has_syscall_event.
+ (child_has_forked, child_has_vforked, child_has_execd)
+ (child_has_syscall_event): Remove prototypes.
+ (inferior_has_forked, inferior_has_vforked, inferior_has_execd): Add
+ prototypes.
+ (target_has_forked, target_has_vforked, target_has_execd)
+ (target_has_syscall_event): Remove macros.
+
+2002-11-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * hppah-nat.c (child_can_follow_vfork_prior_to_exec): Remove.
+ * inftarg.c (child_can_follow_vfork_prior_to_exec): Remove.
+ (init_child_ops): Don't initialize to_can_follow_vfork_prior_to_exec.
+ * infttrace.c (child_can_follow_vfork_prior_to_exec): Remove.
+ * target.c (cleanup_target): Remove reference to
+ to_can_follow_vfork_prior_to_exec.
+ (update_current_target): Likewise.
+ (debug_to_can_follow_vfork_prior_to_exec): Remove.
+ (setup_target_debug): Remove reference to
+ to_can_follow_vfork_prior_to_exec.
+ * target.h (struct target_ops): Remove
+ to_can_follow_vfork_prior_to_exec.
+ (child_can_follow_vfork_prior_to_exec): Remove prototype.
+ (target_can_follow_vfork_prior_to_exec): Remove definition.
+ * config/pa/nm-hppah.h (CHILD_CAN_FOLLOW_VFORK_PRIOR_TO_EXEC): Don't
+ define.
+ * infrun.c (follow_vfork_when_exec): Remove.
+ (follow_inferior_fork): Remove references to follow_vfork_when_exec.
+ (follow_exec): Likewise.
+ (handle_inferior_event): Likewise.
+ (keep_going): Likewise.
+
+2002-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (generic_unwind_get_saved_register): Make static.
+ * frame.h (generic_unwind_get_saved_register): Delete declaration.
+ * avr-tdep.c (avr_gdbarch_init): Do not set get_saved_register,
+ defaults to generic_unwind_get_saved_register.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Delete macro.
+
+2002-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * x86-64-linux-nat.c (i386_sse_regnum_p): New function. Copy from
+ i386-tdep.c.
+
+2002-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (sigtramp_saved_pc): Delete declaration.
+ * blockframe.c (sigtramp_saved_pc): Delete function.
+ * ns32k-tdep.c (ns32k_sigtramp_saved_pc): New function.
+ (ns32k_frame_saved_pc): Call ns32k_sigtramp_saved_pc.
+ * vax-tdep.c (vax_sigtramp_saved_pc): New function.
+ (vax_frame_saved_pc): Call vax_sigtramp_saved_pc.
+
+2002-11-15 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (frame_pc_unwind): New function.
+ (frame_saved_regs_pc_unwind): New function.
+ (frame_register_unwind): Pass unwind_cache instead of
+ register_unwind_cache.
+ (set_unwind_by_pc): Add unwind_pc parameter, set.
+ (create_new_frame): Pass frame->pc_unwind to set_unwind_by_pc.
+ (get_prev_frame): Ditto.
+ * frame.h (frame_pc_unwind_ftype): Declare.
+ (struct frame_info): Add pc_unwind, pc_unwind_cache_p and
+ pc_unwind_cache. Rename register_unwind_cache to unwind_cache.
+ (frame_pc_unwind): Declare.
+ * dummy-frame.c (dummy_frame_pc_unwind): New function.
+ (struct dummy_frame): Add comment mentioning that values are for
+ previous frame.
+ * dummy-frame.h (dummy_frame_pc_unwind): Declare.
+ * blockframe.c (file_frame_chain_valid): Use frame_pc_unwind.
+ (generic_file_frame_chain_valid): Ditto.
+ * stack.c (frame_info): Ditto.
+
+2002-11-15 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (locate_first_half): New function.
+ (decode_line_1): Move code into locate_first_half.
+
+2002-11-15 Andrew Cagney <ac131313@redhat.com>
+
+ * complaints.h: Add comment explaining how to eliminate a
+ deprecated_complain call.
+ * complaints.h: Fix spelling errors.
+
+2002-11-15 David Carlton <carlton@math.stanford.edu>
+
+ * printcmd.c: Remove #include "disasm.h".
+
+2002-11-14 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h: Move the most relevant interface functions to the start
+ of the file.
+
+2002-11-14 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (deprecated_registers): Rename registers.
+ * a68v-nat.c, alpha-nat.c, arch-utils.c, core-sol2.c: Update.
+ * hp300ux-nat.c, hppab-nat.c, hppah-nat.c: Update.
+ * hppam3-nat.c, hpux-thread.c, i386gnu-nat.c: Update.
+ * ia64-aix-nat.c, ia64-linux-nat.c, ia64-tdep.c: Update.
+ * irix4-nat.c, irix5-nat.c, lynx-nat.c, m68k-tdep.c: Update.
+ * m68knbsd-nat.c, mips-linux-tdep.c, mipsm3-nat.c: Update.
+ * mipsv4-nat.c, ns32knbsd-nat.c, ppc-bdm.c: Update.
+ * ppc-sysv-tdep.c, ptx4-nat.c, regcache.c, remote-es.c: Update.
+ * remote-sds.c, remote-vx68.c, remote-vxmips.c: Update.
+ * remote-vxsparc.c, rs6000-tdep.c, sol-thread.c: Update.
+ * sparc-nat.c, sparc-tdep.c, sun3-nat.c, symm-nat.c: Update.
+ * v850ice.c: Update.
+
+Wed Nov 13 19:51:05 2002 Andrew Cagney <cagney@redhat.com>
+
+ * utils.c (gdb_realpath): Add comment mentioning realpath with a
+ NULL buffer.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_bytes): Rename
+ read_register_bytes.
+ (deprecated_write_register_bytes): Rename write_register_bytes.
+ * alpha-tdep.c, arm-tdep.c, cris-tdep.c, d10v-tdep.c: Update.
+ * dwarf2cfi.c, frv-tdep.c, hppa-tdep.c, ia64-tdep.c: Update.
+ * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Update.
+ * ns32k-tdep.c, regcache.c, remote-sds.c, remote-vx.c: Update.
+ * remote.c, rs6000-tdep.c, s390-tdep.c, sh-tdep.c: Update.
+ * sparc-tdep.c, v850-tdep.c, vax-tdep.c, x86-64-tdep.c: Update.
+ * xstormy16-tdep.c, z8k-tdep.c, config/nm-gnu.h: Update.
+ * config/nm-m3.h, config/h8500/tm-h8500.h: Update.
+ * config/i386/nm-ptx4.h, config/i386/nm-symmetry.h: Update.
+ * config/m32r/tm-m32r.h, config/m68k/nm-sun3.h: Update.
+ * config/m68k/tm-delta68.h, config/m68k/tm-linux.h: Update.
+ * config/mn10200/tm-mn10200.h, config/pa/tm-hppa64.h: Update.
+ * config/sparc/nm-nbsd.h, config/sparc/nm-sun4os4.h: Update.
+ * config/sparc/nm-sun4sol2.h, config/sparc/tm-sparclet.h: Update.
+
+2002-11-13 Jim Blandy <jimb@redhat.com>
+
+ * findvar.c (read_var_value): Doc fix.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (struct regcache): Replace passthough_p with
+ readonly_p.
+ (regcache_xmalloc): Initialize readonly_p.
+ (build_regcache): Initialize readonly_p.
+ (regcache_save): New function.
+ (regcache_restore): New function.
+ (regcache_cpy): Re-implement using regcache_save and
+ regcache_restore.
+ (regcache_raw_read): Update.
+ (regcache_cooked_read): When a read-only cache, checked for cached
+ pseudo register values.
+ (regcache_raw_write): Assert that the cache is not read-only.
+ Remove code handling a non-passthrough cache.
+ * regcache.h (regcache_save): Declare.
+ (regcache_restore): Declare.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (struct regcache_descr): Add fields
+ sizeof_cooked_registers and sizeof_cooked_register_valid_p.
+ (init_legacy_regcache_descr): Compute the size of a cooked
+ register cache and then assign that to sizeof_raw_registers. Set
+ sizeof_raw_register_valid_p to sizeof_cooked_register_valid_p
+ (init_legacy_regcache_descr): Ditto.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (register_buffer): Move to near start of file, update
+ description.
+ (regcache_raw_read): Use.
+ (regcache_raw_write): Use.
+ (struct regcache): Rename raw_registers to registers and
+ raw_register_valid_p to register_valid_p.
+ (regcache_xmalloc): Update.
+ (regcache_xfree): Update.
+ (register_buffer): Update.
+ (regcache_cpy): Update.
+ (regcache_cpy_no_passthrough): Update.
+ (regcache_valid_p): Update.
+ (deprecated_grub_regcache_for_registers): Update.
+ (deprecated_grub_regcache_for_register_valid): Update.
+ (set_register_cached): Update.
+ (regcache_raw_write): Update.
+
+2002-11-13 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y (name_not_typename): Use copy_name to
+ set current_type variable for fields of THIS.
+
+2002-11-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * gnu-nat.c (init_gnu_ops): Remove NULL initializations.
+ * monitor.c (init_base_monitor_ops): Likewise.
+ * ppc-bdm.c (init_bdm_ppc_ops): Likewise.
+ * remote-array.c (init_array_ops): Likewise.
+ * remote-e7000.c (init_e7000_ops): Likewise.
+ * remote-es.c (init_es1800_ops): Likewise.
+ (init_es1800_child_ops): Likewise.
+ * remote-rdp.c (init_remote_rdp_ops): Likewise.
+ * remote-sim.c (init_gdbsim_ops): Likewise.
+ * remote-st.c (init_st2000_ops): Likewise.
+ * sol-thread.c (init_sol_core_ops): Likewise.
+ (init_sol_thread_ops): Likewise.
+ * v850ice.c (init_850ice_ops): Likewise.
+ * win32-nat.c (init_child_ops): Likewise.
+ * wince.c (init_child_ops): Likewise.
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (gdb_realpath): Make rp a constant pointer.
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (gdb_realpath): Rewrite. Try, in order: realpath() with
+ a constant buffer; cannonicalize_file_name(); realpath() with a
+ pathconf() defined buffer, xstrdup().
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Fix typo, hang1.c to hang1.C; hang2.c
+ to hang2.C; hang3.c to hang3.C.
+
+2002-11-11 Elena Zannoni <ezannoni@redhat.com>
+
+ * findvar.c (read_var_value): Reenable TLS code.
+
+2002-11-11 Elena Zannoni <ezannoni@redhat.com>
+ Jim Blandy <jimb@redhat.com>
+
+ * gdb_thread_db.h (enum): Add TD_NOTALLOC.
+ * target.c (update_current_target): Add
+ to_get_thread_local_address.
+ * target.h (to_get_thread_local_address): Export.
+ (target_get_thread_local_address): Define.
+ (target_get_thread_local_address_p): Define.
+ * thread-db.c: Include solib-svr4.h.
+ (td_thr_tls_get_addr_p): Define.
+ (thread_db_load): Get a pointer to td_thr_tls_get_addr.
+ (thread_db_get_thread_local_address): New function.
+ (init_thread_db_ops): Initialize to_get_thread_local_address.
+ * configure.in: Add test for TD_NOTALLOC in thread_db.h.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
+2002-11-11 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (set_flags): New function.
+ (decode_line_1): Move code into set_flags.
+
+2002-11-11 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (decode_line_1): Move chunks of code to separate
+ functions.
+ (initialize_defaults): New function.
+ (decode_indirect): New function.
+
+2002-11-11 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c (sigtramp_saved_pc): Fix tipo. void_func_ptr
+ instead of void_code_ptr.
+ (sigtramp_saved_pc): Ditto.
+
+ * x86-64-tdep.c (i386_fp_regnum_p): Copy i386-tdep.c's
+ i386_fp_regnum_p.
+
+2002-11-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct main_type): Move artificial flag out of
+ loc. New member of ``struct field'' named static_kind. Reduce
+ overloaded meaning of bitsize.
+ (FIELD_ARTIFICIAL, SET_FIELD_PHYSNAME, SET_FIELD_PHYSADDR)
+ (TYPE_FIELD_STATIC, TYPE_FIELD_STATIC_HAS_ADDR): Likewise.
+ (FIELD_STATIC_KIND, TYPE_FIELD_STATIC_KIND): New macros.
+
+ * ada-lang.c (fill_in_ada_prototype): Initialize static_kind for
+ new fields.
+ (template_to_fixed_record_type, template_to_static_fixed_type)
+ (to_record_with_fixed_variant_part): Likewise.
+ * coffread.c (coff_read_struct_type, coff_read_enum_type): Likewise.
+ * dwarf2read.c (dwarf2_add_field, read_enumeration): Likewise.
+ * dwarfread.c (struct_type, enum_type): Likewise.
+ * hpread.c (hpread_read_enum_type)
+ (hpread_read_function_type, hpread_read_doc_function_type)
+ (hpread_read_struct_type): Likewise.
+ * mdebugread.c (parse_symbol): Likewise.
+
+2002-11-10 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.h (deprecated_frame_in_dummy): Rename frame_in_dummy.
+ * stack.c (print_frame_info_base): Update.
+ (print_frame_info_base, frame_info): Update.
+ * sparc-tdep.c (sparc_init_extra_frame_info): Update.
+ (sparc_frame_saved_pc): Update.
+ * ada-lang.c (find_printable_frame): Update.
+ * breakpoint.c (deprecated_frame_in_dummy): Update.
+
+2002-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (ORIG_EAX): Define to -1 if not already
+ defined.
+ (regmap): Extend to cover all registers.
+ (PT_READ_U, PT_WRITE_U, PTRACE_XFER_TYPE,
+ OLD_CANNOT_FETCH_REGISTERS, OLD_CANNOT_STORE_REGISTERS): Remove
+ definitions.
+ (fetch_register, sore_register): Simplify.
+ (old_fetch_inferior_registers, old_store_inferior_registers):
+ Remove functions.
+ (cannot_fetch_register, cannot_store_register): Change
+ implementation to use regmap array to decide which registers
+ cannot be fetched/stored. This removes $orig_eax from the
+ registers that cannot be fetched/stored.
+ (fetch_inferior_registers): Call fetch_register directly instead
+ of calling old_fetch_inferior_registers.
+ (store_inferior_registers): Call store_register directly instead
+ of calling old_store_inferior_registers.
+ (i386_linux_dr_get): Replace PT_READ_U with PTRACE_PEEKUSER.
+ (i386_linux_dr_set): Replace PT_WRITE_U with PTRACE_POKEUSER.
+ * config/i386/nm-linux.h (U_REGS_OFFSET): Remove definition.
+
+2002-11-09 Klee Dienes <kdienes@apple.com>
+
+ * i387-tdep.c (i387_supply_register): When called with NULL as a
+ buffer, mark the register as not provided (to mirror the behavior
+ of supply_register).
+ (i387_supply_fxsave): Ditto.
+ (i387_supply_fsave): Ditto (inherits the behavior from
+ i387_supply_register).
+
+2002-11-09 Klee Dienes <kdienes@apple.com>
+
+ * blockframe.c (sigtramp_saved_pc): Use
+ builtin_type_void_code_ptr, not builtin_type_void_data_ptr (we are
+ extracting the PC). Use TYPE_LENGTH (builtin_type_void_code_ptr)
+ instead of (TARGET_PTR_BIT / TARGET_CHAR_BIT).
+
+2002-11-09 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (get_prev_frame): Test prev_p to identify a previously
+ unwound frame. Initialize prev_p.
+ * frame.h (struct frame_info): Add field prev_p. Expand prev/next
+ comment.
+
+2002-11-09 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (get_prev_frame): Cleanups. Eliminate redundant tests
+ for a NULL NEXT_FRAME. Simplify fromleaf initialization. Add
+ more comments. Zap dead code.
+
+2002-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ * infcmd.c (print_vector_info, print_float_info): Move code that
+ checks whether the target has any registers and whether there is a
+ selected frame up, such that it is also used if a target provides
+ multi-arch definitions of these functions.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (DESTDIR): Define.
+ (install-only, install-gdbtk, uninstall-gdbtk): Add $(DESTDIR)
+ prefix.
+
+ * config/djgpp/fnchange.lst: 8.3 proof i386obsd-nat.c and
+ i386obsd-tdep.c. Rename to "gdb.cxx", paths containing "gdb.c++".
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * i386-linux-tdep.c: Include "reggroups.h".
+ (i386_linux_register_reggroup_p): New function.
+ (i386_linux_init_abi): Set register_reggroup_p to
+ i386_linux_register_reggroup_p.
+ * i386-tdep.h (i386_register_reggroup_p): Declare.
+ * i386-tdep.c: Include "reggroups.h".
+ (i386_init_reggroups): New function.
+ (i386_add_reggroups): New function.
+ (i386_register_reggroup_p): New function.
+ (i386_sse_reggroup, i386_mmx_reggroup): New variables.
+ (_initialize_i386_tdep): Call i386_init_reggroups.
+ (i386_gdbarch_init): Set register_reggroup_p and add in the i386
+ specific reggroups.
+
+2002-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ * infptrace.c (child_xfer_memory): Make use of the new PT_IO
+ request that's available in *BSD.
+
+ * i386-tdep.h (IS_FPU_CTRL_REGNUM): Remove.
+
+ * i387-tdep.c (i387_fill_fxsave): Use FOOFF_REGNUM instead of
+ FDOFF_REGNUM.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (set_unwind_by_pc): Use dummy_frame_register_unwind.
+ * dummy-frame.c (find_dummy_frame): Rename
+ generic_find_dummy_frame, make static. Return the dummy frame
+ instead of the regcache.
+ (generic_find_dummy_frame): Re-implement using find_dummy_frame,
+ (cached_find_dummy_frame): New function. Use find_dummy_frame.
+ (dummy_frame_register_unwind): Rename
+ generic_call_dummy_register_unwind. Use cached_find_dummy_frame.
+ * dummy-frame.h (dummy_frame_register_unwind): Rename
+ generic_call_dummy_register_unwind.
+
+2002-11-08 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386v42mp.h: Remove file. Move its contents,
+ except the inclusion of "i386/tm-i386.h", to...
+ * config/i386/nm-i386v42mp.h: ...here.
+ * config/i386/i386v42mp.mt (TM_FILE): Set to tm-i386.h.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (frame.o): Update dependencies.
+ * blockframe.c (current_frame, frame_obstack_alloc)
+ (frame_saved_regs_zalloc, get_current_frame)
+ (set_current_frame, create_new_frame)
+ (set_unwind_by_pc, get_next_frame)
+ (flush_cached_frames, reinit_frame_cache)
+ (frame_saved_regs_register_unwind)
+ (deprecated_generic_get_saved_register)
+ (get_prev_frame, get_frame_pc, get_frame_saved_regs)
+ (_initialize_blockframe): Move frame code from here...
+ * frame.c: ...to here. Include "gdb_obstack.h", "gdbcore.h",
+ "annotate.h" and "dummy-frame.h".
+ (_initialize_frame): New function.
+
+2002-11-08 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (read_func_scope): Restore list_in_scope properly
+ when we finish a function a context.
+ * buildsym.h (outermost_context_p): New macro.
+ (Bug analyzed by David Edelsohn.)
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c: Include "dummy-frame.h".
+ (struct dummy_frame, dummy_frame_stack)
+ (generic_find_dummy_frame, deprecated_generic_find_dummy_frame)
+ (generic_pc_in_call_dummy, deprecated_read_register_dummy)
+ (generic_push_dummy_frame, generic_save_dummy_frame_tos)
+ (generic_save_call_dummy_addr, generic_pop_current_frame)
+ (generic_pop_dummy_frame, generic_fix_call_dummy)
+ (generic_fix_call_dummy, generic_call_dummy_register_unwind): Move
+ dummy frame code from here...
+ * dummy-frame.c: ...to here. New file.
+ * dummy-frame.h: New file.
+ (generic_call_dummy_register_unwind): Declare.
+ (generic_find_dummy_frame): Declare.
+ * Makefile.in (SFILES): Add dummy-frame.c.
+ (dummy-frame.o): Specify dependencies.
+ (dummy_frame_h): Define.
+ (COMMON_OBS): Add dummy-frame.o.
+ (blockframe.o): Update dependencies.
+
+2002-11-08 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (read_func_scope): Restore local_symbols and
+ param_symbols after we finish the function context. (Based on a
+ patch from David Edelsohn.)
+
+2002-11-08 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (symbol_found): New function.
+ (minsym_found): New function.
+ (decode_line_1): Separate out some code into separate functions.
+
+2002-11-08 Joel Brobecker <brobecker@gnat.com>
+
+ * i386-tdep.c (i386_frameless_signal_p): Make non static for
+ the benefit of the interix target.
+ * i386-tdep.h (i386_frameless_signal_p): Declare.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * i386-tdep.h (i386_linux_orig_eax_regnum_p): Delete stray
+ declaration that snuck in from change below.
+
+2002-11-06 Andrew Cagney <cagney@redhat.com>
+
+ * i386-tdep.c (i386_mmx_regnum_p): Rename mmx_regnum_p. Update
+ all callers.
+ (i386_fp_regnum_p): New function. Use instead of FP_REGNUM_P.
+ (i386_fpc_regnum_p): New function. Use instead of FPC_REGNUM_P.
+ (i386_sse_regnum_p): New function. Use instead of SSE_REGNUM_P.
+ (i386_mxcsr_regnum_p): new function. Use instead of
+ MXCSR_REGNUM_P.
+ * i386-tdep.h (SSE_REGNUM_P): Delete macro.
+ (i386_sse_regnum_p): Declare.
+ (i386_mxcsr_regnum_p): Declare.
+ (FP_REGNUM_P, FPC_REGNUM_P): Delete macros.
+ (i386_fp_regnum_p, i386_fpc_regnum_p): Declare.
+ (IS_FP_REGNUM): Update definition.
+ (IS_FPU_CTRL_REGNUM): Update definition..
+ (IS_SSE_REGNUM): Update definition..
+ * i386v-nat.c (register_u_addr): Update.
+ * go32-nat.c (fetch_register): Update.
+ (store_register): Update.
+
+2002-11-07 Joel Brobecker <brobecker@gnat.com>
+
+ Preparation work to convert the hppa targets to multiarch partial.
+
+ * hppa-tdep.c: Add new functions replacing macro bodies from
+ config/pa/tm-hppa.h. These function will be used to initialize
+ the gdbarch structure. Import some comments from tm-hppa.h,
+ and place them where appropriate, to avoid loosing them when
+ we cleanup this file.
+ (hppa_reg_struct_has_addr): New function.
+ (hppa_inner_than): New function.
+ (hppa_stack_align): New function.
+ (hppa_pc_requires_run_before_use): New function.
+ (hppa_instruction_nullified): New function.
+ (hppa_register_byte): New function.
+ (hppa_register_virtual_type): New function.
+ (hppa_store_struct_return): New function.
+ (hppa_cannot_store_register): New function.
+ (hppa_frame_args_address): New function.
+ (hppa_frame_locals_address): New function.
+ (hppa_smash_text_address): New function.
+ (hppa_coerce_float_to_double): New function. Requires the inclusion
+ of "language.h".
+
+ * Makefile.in (hppa-tdep.o): Add dependency on language.h.
+
+ * tm-hppa.h (REG_STRUCT_HAS_ADDR): Change the definition of this
+ gdbarch-eligible macro to a call to the new associated function
+ created in hppa-tdep.c.
+ (INNER_THAN): Likewise.
+ (STACK_ALIGN): Likewise.
+ (PC_REQUIRES_RUN_BEFORE_USE): Likewise.
+ (INSTRUCTION_NULLIFIED): Likewise.
+ (REGISTER_BYTE): Likewise.
+ (REGISTER_VIRTUAL_TYPE): Likewise.
+ (STORE_STRUCT_RETURN): Likewise.
+ (CANNOT_STORE_REGISTER): Likewise.
+ (FRAME_ARGS_ADDRESS): Likewise.
+ (FRAME_LOCALS_ADDRESS): Likewise.
+ (SMASH_TEXT_ADDRESS): Likewise.
+ (COERCE_FLOAT_TO_DOUBLE): Likewise.
+ (ABOUT_TO_RETURN): Delete, as no longer used.
+
+2002-11-07 Fernando Nasser <fnasser@redhat.com>
+
+ * printcmd.c (disassemble_command): Remove obsolete function.
+ (_initialize_printcmd): Do not create disassemble command here.
+ * cli/cli-cmds.c (disassemble_command): New function. Implements
+ disassemble command.
+ (init_cli_cmds): Create disassemble command here instead.
+
+2002-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add Daniel Jacobowitz to global maintainers list.
+
+2002-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (regcache_cooked_read_using_offset_hack)
+ (regcache_cooked_write_using_offset_hack): Delete declarations.
+ (register_changed): Delete declaration.
+ * regcache.c (regcache_cooked_read_using_offset_hack)
+ (regcache_cooked_write_using_offset_hack): Delete functions.
+ (cooked_xfer_using_offset_hack): Delete function.
+ (register_changed): Delete function.
+
+2002-11-07 Jim Blandy <jimb@redhat.com>
+
+ * macroscope.c: #include "complaints.h".
+ (sal_macro_scope): Cope with filenames that appear in the symtabs,
+ but not in the macro table.
+ * Makefile.in (macroscope.o): Record dependency.
+
+2002-11-07 Joel Brobecker <brobecker@gnat.com>
+
+ * PROBLEMS: Document gdb/816 (unable to read core file on alpha-osf).
+
+2002-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (deprecated_registers_fetched): Update.
+ * regcache.h (deprecated_registers_fetched): Rename
+ registers_fetched.
+ * remote-vxsparc.c (vx_read_register): Update.
+ * remote-vxmips.c (vx_read_register): Update.
+ * remote-vx68.c (vx_read_register): Update.
+ * irix5-nat.c (fetch_core_registers): Update.
+ * mipsm3-nat.c (fetch_inferior_registers): Update.
+ * sun3-nat.c (fetch_inferior_registers): Update.
+ * symm-nat.c (fetch_inferior_registers): Update.
+ * ns32knbsd-nat.c (fetch_inferior_registers): Update.
+ (fetch_core_registers): Update.
+ (fetch_kcore_registers): Update.
+ * mips-nat.c (fetch_inferior_registers): Update.
+ * corelow.c (get_core_registers): Update.
+ * a68v-nat.c (fetch_inferior_registers): Update.
+
+2002-11-06 Joel Brobecker <brobecker@gnat.com>
+
+ Put in place the framework necessary for multiarching the hppa targets.
+ * hppa-tdep.c (hppa_gdbarch_init): New function.
+ (hppa_dump_tdep): New function.
+ (_initialize_hppa_tdep): Register the hppa gdbarch init function and
+ tdep structure dumper.
+ * config/pa/tm-hppa.h (GDB_MULTI_ARCH): New macro, defined to 0
+ until the multi-arching conversion has partially been completed.
+
+2002-11-06 Andrew Cagney <ac131313@redhat.com>
+
+ * valops.c (value_assign): Merge lval_register case into
+ lval_reg_frame_relative. Use frame_register and
+ regcache_cooked_write instead of get_saved_register and
+ write_register_bytes. After flushing the register cache, try to
+ re-select the selected frame.
+
+2002-11-06 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (deprecated_register_valid): Rename register_valid.
+ * regcache.c: Update.
+ * ia64-aix-nat.c: Update.
+ * i386gnu-nat.c: Update.
+ * alpha-nat.c: Update.
+ * sparc-nat.c: Update.
+ * lynx-nat.c: Update.
+ * remote-mips.c: Update.
+
+2002-11-06 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c (_initialize_hppa_tdep): Move function body
+ to end of file, to be more consistent with the pratice followed
+ by other targets.
+
+2002-11-06 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c: Include "reggroups.h" and <ctype.h>.
+ (print_float_info): Print registers in float_reggroup.
+ (print_vector_info): Print registers in vector_reggroup.
+ (default_print_registers_info): When all, print registers in
+ all_reggroup. Otherwize, print registers in general_reggroup.
+ (registers_info): Rewrite. Add support for register groups.
+ Eliminate a goto.
+
+2002-11-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (methods_info): Delete. It has been ifdeffed out for
+ ages.
+ (symtab_symbol_info): Remove eons old ifdeffed out code.
+ (_initialize_symtab): Remove prehistoric disabled 'info methods'
+ command.
+
+2002-11-06 Theodore A. Roth <troth@openavr.org>
+
+ * c-exp.y: Add missing semi-colons.
+ * f-exp.y: Add missing semi-colons.
+ * m2-exp.y: Add missing semi-colons.
+ * p-exp.y: Add missing semi-colons.
+ Add empty action to start rule to avoid a type clash error when
+ building with bison >= 1.50.
+
+2002-11-06 Jim Blandy <jimb@redhat.com>
+
+ * macrotab.h (struct macro_source_file): Doc fix.
+
+2002-11-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * varobj.c (child_exists, cplus_number_of_children): Change
+ STREQ macro references to strcmp.
+ (cplus_name_of_child): Change code to handle the fact that
+ fields are not necessarily contiguous with regards to their
+ access control. This is a fix for PR gdb/792.
+
+2002-11-05 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (GET_SAVED_REGISTER): Change to a predicate function.
+ * gdbarch.h, gdbarch.c: Regnerate.
+ * frame.h (frame_register): Declare.
+ * frame.c (frame_register): New function.
+ (get_saved_register): Test GET_SAVED_REGISTER_P before calling
+ GET_SAVED_REGISTER, otherwize call
+ generic_unwind_get_saved_register.
+ (frame_register_read): Use frame_register instead of
+ get_saved_register.
+
+2002-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ From Jim Ingham <jingham@apple.com>:
+ * event-top.c (gdb_disable_readline): New function.
+ (_initialize_event_loop): Move comment.
+
+2002-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-loop.c (start_event_loop): Add comment.
+ Update copyright.
+
+2002-11-05 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (default_print_registers_info): Do not call
+ PRINT_REGISTER_HOOK.
+
+2002-11-05 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc_print_register_hook): Make static.
+ (sparc_print_registers_info): New function.
+ (sparc_do_registers_info): New function.
+ (sparclet_print_registers_info): New function.
+ (sparclet_do_registers_info): New function.
+ (do_sparc_print_registers_info): New function.
+ (sparc_print_registers): New static function, clone of infcmd.c's
+ default_print_registers_info.
+ * config/sparc/tm-sparclet.h (PRINT_REGISTER_HOOK): Delete macro.
+ (sparclet_do_registers_info): Declare.
+ (DEPRECATED_DO_REGISTERS_INFO): Re-define.
+ * config/sparc/tm-sparc.h (DEPRECATED_DO_REGISTERS_INFO):
+ Re-define.
+ (sparc_do_registers_info): Declare.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (sparc_print_register_hook): Delete declaration.
+
+2002-11-05 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux): Move chunks of code into separate
+ functions.
+ (lookup_symbol_aux_local): New function.
+ (lookup_symbol_aux_symtabs): New function.
+ (lookup_symbol_aux_psymtabs): New function.
+
+2002-11-05 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux): In minsym sections, don't use the
+ previous values of 'objfile' and 'block'.
+
+2002-11-05 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * values.c (value_change_enclosing_type): Set
+ enclosing_type field correctly also for the case where
+ more memory needs to be allocated.
+
+2002-11-03 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c (i387_print_float_info): Call fputs_filtered instead
+ of puts_filtered.
+
+ * i387-tdep.c (i387_print_float_info): Replace calls to
+ register_read and deprecated_read_register_gen with calls to
+ frame_register_read, and make the necessary adjustments to the
+ surrounding code.
+
+2002-11-02 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (register_reggroup_p): Allow default value.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-11-02 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h: Add coment indicating replacements for deprecated
+ functions.
+
+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * reggroups.h, reggroups.c: New files.
+ * regcache.c: Include "reggroups.h".
+ (enum regcache_dump_what): Add `regcache_dump_groups'.
+ (regcache_dump): Contract size of the "Type" column. When
+ specified, dump the register's groups.
+ (maintenance_print_register_groups): New function.
+ (_initialize_regcache): Add command `maint print register-groups'.
+ * Makefile.in (COMMON_OBS): Add reggroups.o
+ (SFILES): Add reggroups.c.
+ (reggroups_h): Define.
+ (regcache.o, gdbarch.o): Update dependencies.
+ (reggroups.o): Specify dependencies.
+ * gdbarch.sh (register_reggroup_p): Add pure multi-arch method.
+ Add opaque declaration for `struct reggroup' in generated .h file.
+ Include "reggroups.h" in generated .c file.
+ gdbarch.h, gdbarch.c: Re-generate.
+
+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_gen): Rename
+ read_register_gen.
+ (deprecated_write_register_gen): Rename write_register_gen.
+ * i387-tdep.c: Update.
+ * x86-64-linux-nat.c: Update
+ * wince.c: Update.
+ * thread-db.c: Update.
+ * win32-nat.c: Update.
+ * mips-tdep.c: Update.
+ * d10v-tdep.c: Update.
+ * cris-tdep.c: Update.
+ * remote-sim.c: Update.
+ * remote-rdi.c: Update.
+ * remote-rdp.c: Update.
+ * frame.c: Update.
+ * target.c: Update.
+ * blockframe.c: Update.
+ * x86-64-tdep.c: Update.
+ * xstormy16-tdep.c: Update.
+ * sh-tdep.c: Update.
+ * s390-tdep.c: Update.
+ * rs6000-tdep.c: Update.
+ * sparc-tdep.c: Update.
+ * i386-tdep.c: Update.
+ * dwarf2cfi.c: Update.
+ * regcache.c: Update.
+
+2002-11-01 Joel Brobecker <brobecker@gnat.com>
+
+ New interix-specific files:
+ * config/i386/nm-interix.h: New file.
+ * config/i386/interix.mh: New file.
+ * config/i386/interix.mt: New file.
+ * i386-interix-nat.c: New file.
+ * i386-interix-tdep.c: New file.
+
+2002-11-01 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_generic_get_saved_register): Rename
+ generic_get_saved_register.
+ * blockframe.c (deprecated_generic_get_saved_register): Update.
+ * xstormy16-tdep.c (xstormy16_get_saved_register): Update.
+ (xstormy16_frame_saved_register): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_get_saved_register): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/m32r/tm-m32r.h (GET_SAVED_REGISTER): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * lin-lwp.c (lin_lwp_resume): Remove resume_all test for !step.
+
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
+ trampolines in sigaction.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * h8300-tdep.c: Include "gdb_assert.h".
+ (h8300_print_register): Add gdbarch, file and frame parameters.
+ Use frame_read_unsigned_register to read the register's value.
+ Use fprintf_filtered to display output.
+ (h8300_print_registers_info): Replace h8300_do_registers_info.
+ (h8300_gdbarch_init): Set print_registers_info.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (frame_read_unsigned_register): New function.
+ (frame_read_signed_register): New function.
+ * frame.h (frame_read_unsigned_register): Declare.
+ (frame_read_signed_register): Declare.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * h8500-tdep.c (h8500_print_registers_info): New static function,
+ clone of infcmd.c's default_print_registers_info.
+ (h8500_do_registers_info): New funtion.
+ (h8500_print_register_hook): Rename print_register_hook, make
+ static.
+
+ * config/h8500/tm-h8500.h: Update copyright.
+ (DEPRECATED_DO_REGISTERS_INFO): Define.
+ (h8500_do_registers_info: Declare.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (print_register_hook): Delete function.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * z8k-tdep.c (z8k_print_register_hook): Make static.
+ (z8k_print_registers_info): New static function, clone of
+ infcmd.c's default_print_registers_info.
+ (z8k_do_registers_info): New function. Wrap
+ z8k_print_registers_info.
+ * config/z8k/tm-z8k.h: Update copyright.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (z8k_print_register_hook): Delete declaration.
+ (DEPRECATED_DO_REGISTERS_INFO): Define.
+ (z8k_do_registers_info): Declare.
+
+2002-10-30 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c (find_function_in_inferior): Remove this extern,
+ as this is already provided by value.h, and was actually causing
+ a compilation error because of a conflict in parameter type
+ declaration due to a missing const keyword.
+ (low_text_segment_addres): Fix a compilation warning.
+
+2002-10-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-linux-nat.c (mips_linux_cannot_fetch_register): Don't fetch
+ registers without a name.
+ (mips_linux_cannot_store_register): Don't store registers without
+ a name.
+
+2002-10-28 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (find_addr_symbol): Delete. (It was already commented
+ out.)
+ * symtab.h: Delete prototype for find_addr_symbol.
+
+2002-10-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_DO_REGISTERS_INFO): Rename
+ DO_REGISTERS_INFO.
+ gdbarch.h, gdbarch.c: Re-generate.
+ * infcmd.c (default_print_registers_info): Update reference.
+ * mips-tdep.c (mips_gdbarch_init): Set deprecated_do_registers_info.
+ (mips_dump_tdep): Do not print DO_REGISTERS_INFO.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+
+2002-10-26 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_init_abi): Set init_extra_frame_info to
+ cfi_init_extra_frame_info.
+ * x86-64-tdep.h (x86_64_init_extra_frame_info): Remove prototype.
+ * x86-64-linux-tdep.c (x86_64_init_extra_frame_info): Remove function.
+
+ * x86-64-tdep.c (x86_64_init_abi): Add calls to override the i386
+ target where necessary. Add more comments and remove the ones
+ that don't provide any useful information.
+
+ * i386-tdep.c (i386_frame_saved_pc): Replace call to
+ deprecated_read_register_dummy with
+ frame_unwind_unsigned_register.
+
+ * i386-tdep.c (i386_extract_struct_value_address): Use
+ regcache_raw_read_unsigned instead of
+ regcache_cooked_read_unsigned since we know that the register
+ we're reading isn't a pseudo register. Rename variable 'val' into
+ the more descriptive 'addr'.
+
+ * x86-64-tdep.c: Fix some formatting problems, mostly in comments.
+ (x86_64_push_return_address): Add comment.
+ (x86_64_pop_frame): Make static.
+ (examine_argument): Clarify comment.
+ (x86_64_skip_prologue): Make prolog_expact variable static.
+
+ * dwarf2cfi.c: Fix some formatting problems.
+ (context_cpy, read_encoded_pointer): Clarify comments.
+
+ * x86-64-tdep.c (x86_64_breakpoint_from_pc): Constify.
+ (x86_64_init_abi): Move set_gdbarch_* calls that overlap with the
+ i386 target back into x86_64_gdbarch_init. Add some comments and
+ remove meaningless ones.
+
+2002-10-25 Andrew Cagney <cagney@redhat.com>
+
+ * complaints.h (struct deprecated_complaint): Rename `struct
+ complaint'.
+ * complaints.c (complain): Update.
+ * remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete
+ incorrect comment indicating that "symfile.h" was being included
+ for the `struct complaint' definition.
+ * remote-vx.c: Update.
+ * objc-lang.c: Update.
+ * xcoffread.c: Update.
+ * hpread.c: Update.
+ * mdebugread.c: Update.
+ * stabsread.c: Update.
+ * dwarf2read.c: Update.
+ * dwarfread.c: Update.
+ * elfread.c: Update.
+ * coffread.c: Update.
+ * stabsread.h: Update.
+ * dbxread.c: Update.
+ * buildsym.c: Update.
+ * gdbtypes.c: Update.
+ * macrotab.c: Update.
+
+2002-10-25 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_gdbarch_init): Make a bit more similar to
+ the version in i386-tdep.c. Move set_gdbarch_* calls out into...
+ (x86_64_init_abi): ...new function.
+
+ * Makefile.in (i386v-nat.o): Add $(i386_tdep_h).
+ * i386v-nat.c: Include "i386-tdep.h".
+
+2002-10-25 Andrew Cagney <cagney@redhat.com>
+
+ * gdbtypes.c (address_space_name_to_int): Update.
+ (address_space_int_to_name): Update.
+ * gdbarch.sh (address_class_type_flags_to_name): Change to a pure
+ multi-arch predicate.
+ (address_class_name_to_type_flags): Ditto.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * MAINTAINERS: Check all warnings when h8300hms and alpha-elf.
+
+2002-10-24 Martin M. Hunt <hunt@redhat.com>
+
+ * utils.c (string_to_core_addr): Revert patch from 11 Oct.
+
+2002-10-24 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (INIT_SAL): Delete macro.
+ (init_sal): Export.
+ * symtab.c (init_sal): New function.
+
+ * ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
+ to init_sal function call.
+ (find_sal_from_funcs_and_line): Ditto.
+ (all_sals_for_line): Ditto.
+ * breakpoint.c (create_internal_breakpoint): Ditto.
+ (create_fork_vfork_event_catchpoint): Ditto.
+ (create_exec_event_catchpoint): Ditto.
+ (parse_breakpoint_sals): Ditto.
+ (watch_command_1): Ditto.
+ (handle_gnu_4_16_catch_command): Ditto.
+ (clear_command): Ditto.
+ * hppa-tdep.c (child_enable_exception_callback): Ditto.
+ * infcmd.c (run_stack_dummy): Ditto.
+ * infrun.c (process_event_stop_test): Ditto.
+ (check_sigtramp2): Ditto.
+ (step_over_function): Ditto.
+ * linespec.c (decode_line_2): Ditto.
+ (decode_line_1): Ditto.
+ * source.c (line_info): Ditto.
+ * symtab.c (find_pc_sect_line): Ditto.
+
+2002-10-24 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (struct context)
+ (struct context_reg): Moved to dwarf2cfi.h
+ (context_alloc, frame_state_alloc, context_cpy):
+ Made extern instead of static, removed prototypes.
+ * dwarf2cfi.h (struct context)
+ (struct context_reg): New, moved from dwarf2cfi.c
+ (context_alloc, frame_state_alloc, context_cpy):
+ New prototypes.
+ * x86-64-linux-tdep.c (x86_64_linux_sigtramp_saved_pc):
+ Changed from static to extern.
+ (LINUX_SIGINFO_SIZE, LINUX_SIGCONTEXT_PC_OFFSET)
+ (LINUX_SIGCONTEXT_FP_OFFSET)
+ (LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Adjusted.
+ (x86_64_linux_in_sigtramp, x86_64_linux_frame_chain)
+ (x86_64_init_frame_pc, x86_64_init_extra_frame_info): New.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Several
+ set_gdbarch_*() calls now use x86-64 specific functions
+ instead of DWARF2 CFI ones.
+ * x86-64-tdep.h (x86_64_linux_in_sigtramp)
+ (x86_64_linux_frame_chain, x86_64_init_frame_pc)
+ (x86_64_init_extra_frame_info): New prototypes.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c: #include "parser-defs.h".
+ Delete prototype for find_template_name_end.
+ * Makefile.in (linespec.o): Depend on $(parser_defs_h).
+
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: add recent mi fixes.
+ * varobj.c (struct varobj): Add new "updated" flag.
+ (new_variable): Default "updated" flag to 0.
+ (varobj_set_value): Set "updated" flag to 1 if value
+ changes.
+ (varobj_update): Check varobj "updated" flag before
+ comparing old and refreshed values. Fix for
+ PR gdb/702.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * parse.c (parse_exp_1): Use BLOCK_START.
+ * x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END,
+ SYMBOL_BLOCK_VALUE.
+ * objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c: Delete cplusplus_hint.
+ Delete prototype for find_template_name_end.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h: Update comment.
+
+2002-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * printcmd.c (address_info): Restore quotes in output.
+ * valops.c (value_of_local): Restore quotes in error message.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (symbol_demangled_name): New function.
+ * symtab.h (SYMBOL_DEMANGLED_NAME): Simplify macro, by
+ turning most of it into a function.
+ (symbol_demangled_name): Export.
+
+2002-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * valops.c (value_of_local): Restore quotes in error message.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (symbol_init_language_specific): New function.
+ * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): Simplify macro, by
+ turning most of it into a function.
+ (symbol_init_language_specific): Export.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf_tag_name): Add DWARF 3 names.
+ (dwarf_attr_name): Ditto.
+ (dwarf_type_encoding_name): Ditto.
+ (scan_partial_symbols): Descend into DW_TAG_namespace entries.
+ (process_die): Handle DW_TAG_namespace,
+ DW_TAG_imported_declaration, DW_TAG_imported_module.
+ (read_namespace): New function.
+
+2002-10-22 Joel Brobecker <brobecker@gnat.com>
+
+ * configure.in: Define NEW_PROC_API on Interix too.
+ * configure: Regenerate.
+
+2002-10-21 Joel Brobecker <brobecker@gnat.com>
+
+ * configure: Regenerate using the proper version of autoconf.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * findvar.c (read_var_value): Temporarily disable TLS code, until
+ complete TLS support is added.
+
+2002-10-21 Jim Blandy <jimb@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC
+ for thread local storage locations.
+ (struct symbol): Add objfile field.
+ (SYMBOL_OBJFILE): Define.
+ * dwarf2read.c (is_thread_local): New static variable.
+ (new_symbol): If variable is in thread local fill in address class
+ and objfile appropriately.
+ (decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address
+ stack operation.
+ * printcmd.c (address_info): Print the information for thread
+ local storage variable.
+ * findvar.c (read_var_value): In case of thread local variable,
+ defer to the target vector code to compute address.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * solib-svr4.c (svr4_fetch_objfile_link_map): New function.
+ * solib-svr4.h (svr4_fetch_objfile_link_map): Export.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (address_class): Rename
+ LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC.
+ * hpread.c (hpread_process_one_debug_symbol): Ditto.
+ * printcmd.c (address_info): Ditto.
+ * findvar.c (symbol_read_needs_frame, read_var_value): Ditto.
+
+2002-10-20 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-nat.c (i386bsd_dr_set, i386bsd_dr_get_status): Use
+ DBREG_DRX macro to acces debug registers.
+
+ * Makefile.in (i386obsd-tdep.o): New target.
+
+ * solib-sunos.c: Include "bcache.h" and "regcache.h".
+ * Makefile.in (solib-sunos.o): Add $(bcache_h) and $(regcache_h).
+
+ * configure.tgt (i[3456]86-*-openbsd*): Set gdb_target to obds.
+ * config/i386/obsd.mt: New file.
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Introduce
+ i386obsd_sc_pc_offset and i386obsd_sc_sp_offset;
+ * i386obsd-nat.c (_initialize_i386obsd_nat): Set
+ i386obsd_sigtramp_start and i386obsd_sigtramp_end instead of
+ i386nbsd_sigtramp_start and i386nbsd_sigtramp_end.
+ * i386obsd-tdep.c: New file.
+
+2002-10-19 Adam Fedor <fedor@gnu.org>
+
+ * objc-exp.y (name_not_typename): Fix invalid comment.
+
+2002-10-20 Mark Kettenis <kettenis@gnu.org>
+
+ * solib-sunos.c (allocate_rt_common_objfile): Use bcache_xmalloc
+ to allocate partial syms and macro byte caches.
+
+2002-10-18 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h: Delete 'struct source' and 'struct sourcevector'.
+
+2002-10-18 Adam Fedor <fedor@gnu.org>
+
+ * stabsread.c (find_name_end): New function.
+ (define_symbol): Use it.
+
+2002-10-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/alpha/nm-fbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-linux.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-nbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-osf.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+
+2002-10-17 David Carlton <carlton@math.stanford.edu>
+
+ * symfile.h: Add opaque declaration for struct obstack.
+ Declare obsavestring to take a const char *.
+ * symfile.c (obsavestring): Make first argument a const char *.
+
+2002-10-16 Adam Fedor <fedor@gnu.org>
+
+ * breakpoint.c (parse_breakpoint_sals): Ignore ObjC method
+ names when matching breakpoints in current file.
+
+2002-10-16 Kevin Buettner <kevinb@redhat.com>
+
+ * dwarf2read.c (dwarf2_invalid_pointer_size): New complaint.
+ (read_tag_pointer_type): Add address class support.
+ * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS)
+ (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, ADDRESS_CLASS_NAME_TO_TYPE_FLAGS):
+ New methods.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * gdbtypes.c (address_space_name_to_int, address_space_int_to_name)
+ (make_type_with_address_space, recursive_type_dump): Add address
+ class support.
+ * gdbtypes.h (TYPE_FLAG_ADDRESS_CLASS_1, TYPE_FLAG_ADDRESS_CLASS_2)
+ (TYPE_FLAG_ADDRESS_CLASS_ALL, TYPE_ADDRESS_CLASS_1)
+ (TYPE_ADDRESS_CLASS_2, TYPE_ADDRESS_CLASS_ALL): New defines
+
+2002-10-16 Klee Dienes <kdienes@apple.com>
+
+ * stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2]
+ to get the last character of a char[] buffer, not
+ name[sizeof(vptr_name)-1].
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * symtab.h: New objc_specific struct.
+ (SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC.
+ (SYMBOL_DEMANGLED_NAME): Likewise.
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * symfile.c (init_filename_language_table): Add ObjC file extension.
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * utils.c (puts_filtered_tabular): New function.
+ (fprintf_symbol_filtered): Get ObjC demangled name.
+ * defs.h (puts_filtered_tabular): Declared.
+
+2002-10-14 Kevin Buettner <kevinb@redhat.com>
+
+ * c-lang.h (c_type_print_varspec_prefix): Delete.
+ * c-typeprint.c (c_type_print_varspec_prefix): Make static. Add
+ ``need_post_space'' parameter. Adjust all callers.
+
+2002-10-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/mips/nm-irix4.h (HAVE_NONSTEPPABLE_WATCHPOINT): Define to 1.
+ * config/mips/nm-irix5.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+ * config/mips/tm-embed.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+ * config/pa/nm-hppah.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * source.c (print_source_lines): Update comments.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * valops.c (value_of_local): New function.
+ (value_of_this): Use it.
+ * value.h (value_of_local): Declared.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * parse.c: (length_of_subexp, prefixify_subexp): Handle
+ OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
+
+2002-10-12 Adam Fedor <fedor@gnu.org>
+
+ * language.c (binop_result_type): Add language_objc to case.
+ (integral_type): Likewise.
+ (character_type): Likewise.
+ (string_type): Likewise.
+ (boolean_type): Likewise.
+ (structured_type): Likewise.
+ (binop_type_check): Likewise.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * printcmd.c (address_info): Print 'self' for ObjC.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * expression.h: New ops OP_NSSTRING, OP_SELECTOR, OP_MSGCALL, and
+ OP_SELF.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * language.h (CAST_IS_CONVERSION): Add language_objc.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * defs.h (enum language): Add language_objc.
+
+2002-10-11 Klee Dienes <kdienes@apple.com>
+
+ * corefile.c (read_memory_typed_address): New function.
+ * gdbcore.h (read_memory_typed_address): Add prototype.
+ * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address
+ to read a value destined for a CORE_ADDR, not read_memory_integer.
+ * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
+ (f77_get_dynamic_lowerbound): Ditto.
+
+2002-10-11 Martin M. Hunt <hunt@redhat.com>
+
+ * utils.c (string_to_core_addr): After turning string into
+ a number, convert to a CORE_ADDR using INTEGER_TO_ADDRESS
+ which will do necessary sign-extension, etc.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * cp-valprint.c (vtbl_ptr_name_old): Delete.
+ (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old.
+ * demangle.c (cplus_markers): Update comment. Put '$'
+ first. Remove CPLUS_MARKER.
+ (_initialize_demangler): Don't call set_cplus_marker_for_demangling.
+ * jv-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER.
+ * objc-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * p-exp.y (yylex): Remove reference to CPLUS_MARKER.
+ * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'.
+ (read_member_functions): Likewise for opname.
+ (read_tilde_fields): Use is_cplus_marker.
+
+ * defs.h (CPLUS_MARKER): Don't define.
+ * config/tm-sysv4.h (CPLUS_MARKER): Likewise.
+ * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise.
+ * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise.
+
+ * config/i386/tm-i386v4.h: Delete file.
+ * config/djgpp/fnchange.lst: Delete tm-i386v4.h.
+ * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead.
+ * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h.
+ * config/i386/i386sco5.mt (TM_FILE): Likewise.
+ * config/i386/i386v4.mt (TM_FILE): Likewise.
+ * config/i386/ncr3000.mt (TM_FILE): Likewise.
+
+2002-10-10 Marko Mlinar <markom@opencores.org>
+
+ * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C,
+ accidentially not commited 2002-10-09
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-09 Marko Mlinar <markom@opencores.org>
+
+ * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C.
+ * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-08 Petr Sorfa <petrs@caldera.com>
+
+ Revised and re-submitted by John Wolfe <jlw@caldera.com>
+
+ Move the Dwarf 2 abbrev table to a per-compilation-unit structure,
+ so we can work on more than one compilation unit at a time. This
+ helps prepare GDB to handle inter-CU die references.
+ * dwarf2read.c (ABBREV_HASH_SIZE): moved definition forward in
+ the code to be defined before struct comp_unit_head.
+ (comp_unit_head): Added new members - offset, cu_head,
+ begin_die, next and dwarf2_abbrevs.
+ (dwarf2_abbrevs): Removed single static var; now member of
+ struct comp_unit_head.
+ dwarf2_build_psymtabs_hard): Complete new struct comp_unit_head
+ members.
+ (psymtab_to_symtab_1): Changed to work with the new
+ struct comp_unit_head.
+ (dwarf2_read_abbrevs): Now accepts a cu_header parameter and
+ constructs the dwarf2_abbrevs[] inside the cu_header.
+ (dwarf2_empty_abbrev_table): Now expects a ptr to a
+ dwarf2_abbrev table to clean up.
+ (dwarf2_lookup_abbrev): Now accepts a cu_header parameter and
+ handling of dwarf2_abbrevs inside the cu_header.
+ (read_partial_die): Now supports the call to the new
+ dwarf2_lookup_abbrev.
+ (read_full_die): Now supports the call to the new
+ dwarf2_lookup_abbrev.
+
+2002-10-06 Christopher Faylor <cgf@redhat.com>
+
+ * Makefile.in (install-gdbtk): Add missing continuation backslash to
+ insure that shell variables, such as "transformed_name" are propagated
+ to later shell statements in rule.
+
+2002-10-06 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-i386sco.h: Add protection against
+ multiple-inclusion. Include "i386/nm-i386v.h".
+ (REGISTER_U_ADDR): Remove define.
+ (i386_register_u_addr): Remove prototype.
+
+2002-10-04 Michael Snyder <msnyder@redhat.com>
+
+ * m32r-stub.c (handle_exception): Make sure exception is "trap"
+ before treating it as a single-step event.
+
+2002-10-03 Adam Fedor <fedor@gnu.org>
+
+ * objc-lang.c: ARI fixes. Change string.h to gdb_string.h.
+ (objc_demangle): Remove assignment in if statements, Replace
+ free with xfree.
+ (add_msglist): Likewise.
+ (end_msglist): Likewise.
+ (complare_selectors): Likewise.
+ (selectors_info): Likewise.
+ (compare_classes): Likewise.
+ (classes_info): Likewise.
+ (print_object_command): Likewise.
+ (find_objc_msgcall_submethod): Replace PTR with void *.
+ * objc-lang.h: Remove check for __STDC__.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ui-out.h (ui_out_field_fmt_int): New prototype.
+ * ui-out.c (ui_out_field_fmt_int): New function allowing specification
+ of field width and alignment.
+ * stack.c (print_frame_info_base): When printing frame level, use
+ ui_out_field_fmt_int with a width of 2 and left alignment. Fix for
+ PR gdb/192
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MAINTAINERS: Add self to Write After Approval list.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * infcmd.c (interrupt_target_command_wrapper): Delete.
+ (interrupt_target_command): Make non static.
+ (nofp_registers_info): Make static.
+ * stack.c (return_command_wrapper): Delete.
+ (return_command): Make non static.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-top.c (gdb_setup_readline): New function. Code moved from
+ _initialize_event_loop().
+ (_initialize_event_loop): Call gdb_setup_readline().
+
+2002-10-02 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (resume): Convert #ifdef CANNOT_STEP_BREAKPOINT into C.
+ * gdbarch.sh (CANNOT_STEP_BREAKPOINT): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-02 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/778
+ * gdbtypes.c (fill_in_vptr_fieldno): Call check_typedef
+ before recursing.
+ * gnu-v3-abi.c (gnuv3_virtual_fn_field): Check return value
+ of fill_in_vptr_fieldno.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * inferior.h (registers_info, stepi_command, nexti_command,
+ continue_command, interrupt_target_command): Export from infcmd.c.
+ * frame.h (args_info, selected_frame_level_changed_hook,
+ return_command): Export from stack.c.
+ * v850ice.c (stepi_command, nexti_command, continue_command): use
+ prototypes from inferior.h.
+ * tracepoint.c (registers_info, args_info, locals_info): Use
+ prototypes from frame.h and inferior.h.
+ * Makefile.in (mi-main.o): Add dependency on frame.h.
+
+2002-10-02 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return
+ value in register 3 adjusted by ppc_gp0_regnum.
+
+ * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum.
+
+2002-10-02 Marko Mlinar <markom@opencores.org>
+
+ * MAINTAINERS: Add myself to the Write After Approval list.
+
+2002-10-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * mips-tdep.c (mips_find_abi_section): .mdebug.abi64 is the name
+ of the section for the N64 ABI, fixed.
+
+ * config/mips/tm-irix6.h: Include solib.h.
+
+2002-10-01 Elena Zannoni <ezannoni@redhat.com>
+
+ * dwarf2read.c (dwarf_stack_op_name): Recognize more dwarf3 and
+ GNU operators.
+
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that MI syntax, selected by "mi" changed to "mi2"
+ and that "mi0" syntax has been removed.
+
+2002-09-30 David Carlton <carlton@math.stanford.edu>
+
+ * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
+ * ppc-sysv-tdep.c: #include "gdb_string.h".
+ * remote-sds.c (getmessage): Add semicolon after 'retry' label to
+ pacify GCC.
+
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): For powerpc:7400, fix
+ "vrsave"'s register number.
+
+2002-09-30 Andrew Cagney <ac131313@redhat.com>
+
+ * mips-tdep.c (mips_frame_saved_pc): When a generic dummy frame,
+ use frame_unwind_signed_register to obtain the PC.
+ (mips_frame_chain): Handle a generic dummy frame.
+ (mips_init_extra_frame_info): When a generic dummy frame, don't
+ re-compute the frame base.
+ (mips_pop_frame): Handle generic dummy frames.
+ (mips_gdbarch_init): When generic dummy frames, set
+ use_generic_dummy_frames, push_dummy_frame to
+ generic_push_dummy_frame, pc_in_call_dummy to
+ generic_pc_in_call_dummy, and save_dummy_frame_top_of_stack to
+ generic_save_dummy_frame_tos.
+
+2002-09-30 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c (generic_find_dummy_frame): Rewrite. Only test
+ against TOP when TOP was explictly set.
+ (generic_push_dummy_frame): Set TOP to zero.
+
+2002-09-30 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-loop.c (start_event_loop): Rename variable 'result' to
+ 'gdb_result', to avoid conflicts with upcoming intepreters changes.
+
+2002-09-30 Keith Seitz <keiths@redhat.com>
+
+ * gdb-events.sh (selected_thread_changed): New event.
+ * gdb-events.c: Regenerated.
+ * gdb-events.h: Regenerated.
+
+2002-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * MAINTAINERS: Add self to Write After Approval list.
+
+2002-09-30 Fernando Nasser <fnasser@redhat.com>
+
+ * disasm.c: New file.
+ * disasm.h: New file.
+ * mi/mi-cmd-disas.c (gdb_dis_asm_read_memory): Moved to disasm.c.
+ (compare_lines): Ditto.
+ (dump_insns): Ditto.
+ (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout
+ argument.
+ (do_assembly_only): Ditto.
+ (do_disassembly): Renamed to gdb_disassembly and moved to
+ disasm.c. Sdded uiout argument.
+ * Makefile.in: Add new files. Reorder SFILES list. Update
+ dependencies. Include libgdb.a later in the insight executable.
+
+2002-09-29 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Rename bfd/elf64-alpha.c and
+ bfd/elf64-alpha-fbsd.c.
+
+2002-09-29 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Rename i386gnu-nat.c and
+ i386gnu-tdep.c.
+
+2002-09-29 Andrew Cagney <ac131313@redhat.com>
+
+ * gnu-nat.h (debug): Use __FILE__ and __LINE__ instead of
+ __FUNCTION__.
+ * gnu-nat.c (do_mach_notify_no_senders): Replace __FUNCTION__ with
+ function name.
+ (do_mach_notify_port_deleted, do_mach_notify_msg_accepted): Ditto.
+ (do_mach_notify_port_destroyed, do_mach_notify_send_once): Ditto.
+ (S_proc_setmsgport_reply, S_proc_getmsgport_reply): Ditto.
+ (S_msg_sig_post_reply): Ditto.
+
+2002-09-28 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh_use_struct_convention): Use definition according
+ to ABI.
+ (sh_push_arguments): Store in register with correct endianess.
+ (sh_default_store_return_value): Ditto.
+ (sh_gdbarch_init): Set sizeof long double to 8.
+
+2002-09-27 Mark Kettenis <kettenis@gnu.org>
+
+ * defs.h: Move inclusion of "ansidecl.h" before "gdb_locale.h".
+ Fix some whitespace problems.
+
+2002-09-27 David Carlton <carlton@math.stanford.edu>
+
+ * Makefile.in (cris-tdep.o): Depend on gdb_string_h.
+ (mcore-tdep.o): Ditto.
+ (ns32k-tdep.o): Ditto.
+ (ns32knbsd-tdep.o): Ditto.
+ (sh3-rom.o): Ditto.
+ (vax-tdep.o): Ditto.
+ * cris-tdep.c: #include "gdb_string.h"
+ * mcore-tdep.c: Ditto.
+ * ns32k-tdep.c: Ditto.
+ * ns32knbsd-tdep.c: Ditto.
+ * sh3-rom.c: Ditto.
+ * vax-tdep.c: Ditto.
+
+2002-09-27 David Carlton <carlton@math.stanford.edu>
+
+ * config/djgpp/fnchange.lst: Add entries for
+ gdb/testsuite/gdb.c++/m-static files.
+
+2002-09-27 Jim Wilson <wilson@redhat.com>
+
+ * MAINTAINERS: Add myself to the Write After Approval list.
+
+2002-09-26 Martin M. Hunt <hunt@redhat.com>
+
+ * mips-tdep.c (find_proc_desc): Initialize startaddr.
+
+
+2002-09-26 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy
+ frame.
+
+2002-09-26 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_extract_struct_value_address): Return 0.
+ (rs6000_struct_return_address): Delete variable.
+ (rs6000_store_struct_return): Update.
+ (rs6000_gdbarch_init): Set extract_struct_value_address instead of
+ deprecated_extract_struct_value_address.
+ (rs6000_frame_align): New function.
+ (rs6000_gdbarch_init): Set frame_align.
+
+2002-09-26 Andrew Cagney <ac131313@redhat.com>
+
+ From Grace Sainsbury <graces@redhat.com>:
+ * Makefile.in (gdbtk-main.o): New target.
+ (gdb.o): New target.
+ (main_h): Define.
+ (main.o): Update dependencies.
+ (gdb$(EXEEXT)): Add gdb.o.
+ (SUBDIR_GDBTK_SRCS): Add gdbtk-main.c.
+ (SUBDIR_GDBTK_ALL, SUBDIR_GDBTK_UNINSTALL): Set.
+ (SUBDIR_GDBTK_CLEAN): Set.
+ (install-gdbtk): Install the insight binary.
+ (uninstall-gdbtk): New target.
+ (all-gdbtk, clean-gdbtk): New rule.
+ * top.c (use_windows): Default to zero.
+ * main.c: Include "main.h".
+ (main): Delete.
+ (struct captured_main_args): Delete.
+ (gdb_main): New function.
+ * main.h: New file.
+ * gdb.c: New File.
+
+2002-09-25 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c: Include "gdb_string.h" and "builtin-regs.h".
+ (frame_map_regnum_to_name): New function.
+ (frame_map_name_to_regnum): New function.
+ * frame.h (frame_map_name_to_regnum): Declare.
+ (frame_map_regnum_to_name): Declare.
+ * builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
+ * builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
+ * parse.c: Do not include "builtin-regs.h".
+ (target_map_name_to_register): Delete function.
+ (write_dollar_variable): Use frame_map_name_to_regnum.
+ * parser-defs.h (target_map_name_to_register): Delete declaration.
+ * expprint.c: Include "frame.h".
+ (print_subexp): Use frame_map_regnum_to_name.
+ * eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
+ * infcmd.c (registers_info): Use frame_map_name_to_regnum.
+
+2002-09-25 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_frame_saved_pc): If the link register
+ wasn't saved, and the next innermost frame is a dummy, return the
+ dummy frame's link register.
+
+2002-09-24 Jim Blandy <jimb@redhat.com>
+
+ Fix from Paul Breed:
+ * main.c (captured_main): Add a `break' after the case for 'b'.
+
+2002-09-24 Keith Seitz <keiths@redhat.com>
+
+ * varobj.c (c_type_of_child): Use get_target_type instead
+ of TYPE_TARGET_TYPE.
+
+2002-09-22 Fernando Nasser <fnasser@redhat.com>
+
+ * source.c (get_current_or_default_source_symtab_and_line): Remove
+ function.
+ (set_default_source_symtab_and_line): New function. Attempts to
+ determine a source file to list lines from if one is not currently
+ defined.
+ (get_current_source_symtab_and_line): Initialize sal.pc and
+ sal.end fields.
+ (set_current_source_symtab_and_line): Mark argument as const.
+ * source.h: Update declarations and comments.
+ * linespec.c (decode_line_1): Replace call to removed routine above.
+ * stack.c (print_frame_info_base): Ditto.
+ * cli/cli-cmds.c (edit_command): Ditto.
+ (list_command): Ditto.
+
+2002-09-22 Fernando Nasser <fnasser@redhat.com>
+
+ * source.c (get_current_or_default_source_symtab_and_line): Initialize
+ sal.pc and sal.end fields.
+ (get_current_or_default_source_symtab_and_line): Ditto.
+ * breakpoint.c (parse_breakpoint_sals): Use correct accessor function
+ so we do not cause a new source symtab to be searched for (reverting an
+ unintentional change from the 2002-09-20 patch).
+ * scm-lang.c (scm_unpac): Ditto.
+
+2002-09-21 Andrew Cagney <cagney@redhat.com>
+
+ * complaints.c (symfile_explanations): Remove new-line from
+ ``isolated_message''.
+ (vcomplaint): When ISOLATED_MESSAGE, force a line break.
+ (clear_complaints): When a SUBSEQUENT_MESSAGE, force a line break.
+
+2002-09-20 Nick Clifton <nickc@redhat.com>
+
+ * NEWS: Announce that V850EA ISA is no longer supported.
+ * v850-tdep.c: Remove reference to bfd_mach_v850ea.
+
+2002-09-20 David Carlton <carlton@math.stanford.edu>
+
+ * Makefile.in (c-lang.o): Correct dependencies.
+ (utils.o): Gather dependencies.
+ (charset.o): Move.
+ * c-lang.c: #include "gdb_string.h"
+
+2002-09-20 Fernando Nasser <fnasser@redhat.com>
+
+ From 2002-07-02 George Helffrich <george@gly.bris.ac.uk>
+ * cli/cli-cmds.c (list_command): New function. Implements the new
+ cli edit command.
+ (_init_cli_cmds): Add new command definition.
+ * gdb.1: Document edit command.
+ * doc/gdb.texinfo: Document edit command.
+
+2002-09-20 Fernando Nasser <fnasser@redhat.com>
+
+ * source.c: Make global variables current_source_symtab and
+ current_source_line static.
+ (list_command): Moved to cli/cli-cmds.c.
+ (ambiguous_line_spec): Moved to cli/cli-cmds.c.
+ (get_first_line_listed): New accessor function.
+ (get_lines_to_list): New accessor function.
+ (get_current_source_symtab_and_line): New function. Retrieves the
+ position in the source code that we consider current.
+ (get_current_or_default_source_symtab_and_line): New function.
+ Like the above but attempts to determine a default position if one
+ is not currently defined.
+ (set_current_source_symtab_and_line): New function. Sets the source
+ code position considered current and returns the previously set one.
+ (clear_current_source_symtab_and_line): Reset stored information about
+ a current source line.
+ (_initialize_source): Remove registration for the "list" command and
+ its alias.
+ * source.h: Add declarations for the new functions above.
+ * symtab.h: Remove declarations for the global variables mentioned
+ above.
+ * breakpoint.c (parse_breakpoint_sals): Use accessor functions to
+ obtain current source line.
+ * linespec.c (decode_line_1): Ditto.
+ * macroscope.c (default_macro_scope): Ditto.
+ * scm-lang.c (scm_unpac): Ditto.
+ * stack.c (print_frame_info_base): Ditto.
+ * symfile.c (clear_symtab_users): Ditto.
+ * symtab.c (decode_line_spec): Ditto.
+ * cli/cli-cmds.c (list_command): Moved here from source.c.
+ (ambiguous_line_spec): Moved here from source.c.
+ (_init_cli_cmds): Add definition for "list" and its alias.
+ * Makefile.in: Update dependencies.
+
+2002-09-20 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300_examine_prologue): Match saved regs location
+ with what gcc thinks is correct.
+
+2002-09-20 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300_examine_prologue): Fix loop for saved regs in
+ multiple register push instruction.
+
+2002-09-19 Jim Blandy <jimb@redhat.com>
+
+ Add support for distinct host and target character sets.
+ * charset.c, charset.h: New files.
+ * c-exp.y: #include "charset.h".
+ (yylex): Convert character and string literals to the target
+ character set, before returning them as the semantic value of the
+ token.
+ * c-lang.c: #include "charset.h".
+ (c_emit_char): Use charset-specific methods to recognize
+ characters with backslash escape forms, to decide which characters
+ to print literally and which to print using numeric escape
+ sequences, and to convert target characters to host characters
+ before printing.
+ * utils.c: #include "charset.h".
+ (no_control_char_error): New function.
+ (parse_escape): Use charset-specific methods to recognize
+ backslash escapes, parse `control character' notation, and convert
+ characters from the host character set to the target character set.
+ * configure.in: Set the default host character set.
+ Check where to find iconv, and what its argument types might be.
+ * acinclude.m4 (AM_ICONV): New macro, borrowed from GCC.
+ * Makefile.in (SFILES): List charset.c.
+ (COMMON_OBS): List charset.o.
+ (charset.o): New rule.
+ (charset_h): New header dependency variable.
+ (c-lang.o, utils.o, c-exp.tab.o): Note dependency on $(charset_h).
+ (LIBICONV): New variable, set by configure.
+ (CLIBS): Include $(LIBICONV) here.
+ * aclocal.m4, config.in, configure: Regenerated.
+
+2002-09-19 Joel Brobecker <brobecker@gnat.com>
+
+ * ada-exp.y: Add missing semicolons to end rules. Fixes a
+ bison 1.35 warning.
+
+2002-09-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * gdb_mbuild.sh: New file.
+
+2002-09-19 Andrew Cagney <ac131313@redhat.com>
+
+ * objc-exp.y, objc-lang.h, objc-lang.c: Fix copyright notice.
+
+2002-09-18 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.c, c-exp.y, defs.h, elfread.c, expression.h,
+ jv-exp.y, language.c, language.h, p-exp.y, parse.c, parser-defs.h,
+ printcmd.c, source.c, stabsread.c, symfile.c, symtab.h, utils.c,
+ valops.c, value.h: Revert previous change.
+
+2002-09-18 Michael Snyder <msnyder@redhat.com>
+
+ Preliminary support for Objective-C:
+ * defs.h (language_objc): New enum value.
+ (puts_filtered_tabular): Declaration only, exported from utils.c.
+ (skip_quoted): Delete, declared in completer.h.
+ * c-exp.y: Include completer.h.
+ * p-exp.y: Ditto.
+ * jv-exp.y: Ditto.
+ * expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING):
+ New operator enum values.
+ * language.h (CAST_IS_CONVERSION): Test for language_objc.
+ * language.c (binop_result_type): Handle language_objc case.
+ (integral_type, character_type, string_type, boolean_type,
+ structured_type, binop_type_check): Ditto.
+ * symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define.
+ (struct objc_specific): Add to general_symbol_info.
+ (SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization.
+ (SYMBOL_DEMANGLED_NAME): Handle objc case.
+ * parser-defs.h (struct objc_class_str): New struct type.
+ (start_msglist, end_msglist, add_msglist): Declaration only,
+ exported from objc-lang.c.
+ * value.h (value_of_local, value_nsstring,
+ call_function_by_hand_expecting_type): Exported from valops.c.
+ * valops.c (find_function_addr): Export.
+ (call_function_by_hand_expecting_type): New function.
+ (value_of_local): New function.
+ * symfile.c (init_filename_language_table): Add ".m" extension
+ for Objective-C.
+ * utils.c (puts_filtered_tabular): New function.
+ (fprintf_symbol_filtered): Add objc demangling support (disabled).
+ (set/show demangle): Extend help-string to refer to ObjC.
+ * elfread.c (elf_symtab_read): Skip Objective-C special symbols.
+ * stabsread.c (symbol_reference_defined): Objective-C symbols
+ may contain colons: make allowances when scanning stabs strings
+ for colons.
+ (objc_find_colon): New function.
+ * printcmd.c (address_info): If language == objc then print
+ "self" instead of "this".
+ * parse.c (length_of_subexp): Handle new operators OP_MSGCALL,
+ OP_NSSTRING, and OP_SELF.
+ (prefixify_subexp): Ditto.
+ * source.c (print_source_lines): Mention objc in comment.
+ * breakpoint.c (parse_breakpoint_sals): Recognize Objective-C
+ method names.
+
+2002-09-18 Andrew Cagney <ac131313@redhat.com>
+
+ * complaints.h: Update copyright.
+ (struct complaints): Declare.
+ (struct complaint): Make `message' constant.
+ (internal_complaint): Declare.
+ (complaint): Declare.
+ (complaint_root): Delete declaration.
+ (symfile_complaints): Delete declaration.
+ (struct complaints): Add opaque declaration.
+ (clear_complaints): Add a complaints parameter.
+ * complaints.c: Update copyright.
+ (enum complaint_series): Define.
+ (complaint_root): Delete.
+ (struct complaints): Define.
+ (complaint_sentinel, symfile_complaint_book): New variables.
+ (symfile_explanations, symfile_complaints): New variables.
+ New variables.
+ (get_complaints): New function.
+ (vcomplaint): New function.
+ (complaint): New function.
+ (internal_complaint): New function.
+ (complain): Call vcomplain with symfile_complaint.
+ (clear_complaints): Rewrite.
+ (_initialize_complaints): Use add_setshow_command.
+ * Makefile.in (complaints.o): Update dependencies.
+ * symfile.c (syms_from_objfile): Add symfile_complaints parameter
+ to call to clear_complaints.
+ (new_symfile_objfile, reread_symbols): Ditto.
+ (oldsyms_complaint): Delete.
+ (empty_symtab_complaint, unknown_option_complaint): Delete.
+ (free_named_symtabs): Use complaint instead of complain.
+
+2002-09-18 Michael Snyder <msnyder@redhat.com>
+
+ Contributed by Apple Computer, Inc. Merged with current sources
+ by Adam Fedor <fedor@doc.com> [cagney].
+
+ * objc-lang.c: First clean-up round: comments, indentation.
+ * objc-lang.h: Ditto.
+ * objc-lang.y: Ditto.
+
+2002-09-18 Andrew Cagney <ac131313@redhat.com>
+
+ * maint.c (maintenance_internal_error): Print the parameter as the
+ error message.
+ (maintenance_internal_warning): New function.
+ (_initialize_maint_cmds): Add command `maint internal-warning'.
+
+ * defs.h (internal_warning, internal_vwarning): Declare.
+ * utils.c (struct internal_problem): Define.
+ (internal_vproblem): New function.
+ (internal_warning): New function.
+ (internal_vwarning): New function.
+ (internal_warning_problem, internal_error_problem): New variables.
+ (internal_verror): Just call internal_vproblem.
+
+2002-09-18 Michael Snyder <msnyder@redhat.com>
+
+ * objc-lang.c: New file, support for Objective-C.
+ Preliminary check-in, not yet integrated into gdb.
+ * objc-lang.h: New file.
+ * objc-exp.y: New file.
+
+2002-09-18 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (signal_stop_update): Convert definition to ISO C.
+ (signal_print_update): Ditto.
+ (signal_pass_update): Ditto.
+ * inflow.c (terminal_save_ours): Ditto.
+
+ * h8300-tdep.c (h8300_gdbarch_init): Use C instead of C++
+ comments.
+
+ * config/djgpp/fnchange.lst: Handle name clashes between
+ bfd/coff-tic30.c, bfd/coff-tic4x.c, bfd/coff-tic54x.c and
+ bfd/coff-tic80.c.
+
+ * i386-linux-tdep.h: Fix tipo.
+
+2002-09-18 Adam Fedor <fedor@gnu.org>
+
+ * MAINTAINERS: Add myself to the Write After Approval list.
+
+2002-09-18 Jim Blandy <jimb@redhat.com>
+
+ * dbxread.c, mdebugread.c: Revert my change of 2001-10-23. Moving
+ texthigh and textlow to reader-specific structs caused
+ objfile_relocate to miss them. This is fixable, but the work that
+ the change was supposed to prepare GDB for never got done anyway.
+
+2002-09-18 David Carlton <carlton@math.stanford.edu>
+
+ * MAINTAINERS: Alphabetize Write After Approval list.
+
+2002-09-18 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/709
+ * values.c (value_static_field): Call read_var_value.
+
+2002-09-18 Andrew Cagney <ac131313@redhat.com>
+
+ * valops.c (hand_function_call): Align the initial stack pointer
+ and STRUCT_ADDR using frame_align. When STRUCT_RETURN and
+ FRAME_ALIGN_P, use STRUCT_ADDR to obtain the called function's
+ return value.
+ * mips-tdep.c (mips_frame_align): New function.
+ (mips_gdbarch_init): Set frame_align.
+ * gdbarch.sh (FRAME_ALIGN): New method.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-09-18 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (x86_64_regmap): Added CS and SS
+ registers.
+
+2002-09-17 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that MIPS $fp behavior changed.
+ * mipsnbsd-tdep.c (mipsnbsd_cannot_fetch_register): Delete
+ reference to FP_REGNUM.
+ (mipsnbsd_cannot_store_register): Ditto.
+ * mips-linux-nat.c: Update copyright.
+ (mips_linux_cannot_fetch_register): Delete reference to FP_REGNUM.
+ (mips_linux_cannot_store_register): Ditto.
+ * mips-linux-tdep.c (supply_gregset): Ditto. Update copyright.
+ * config/mips/tm-mips.h: Update copyright.
+ (FP_REGNUM): Delete macro.
+ (MIPS_REGISTER_NAMES): Replace "fp" with "".
+ * config/mips/tm-irix6.h (FP_REGNUM): Delete macro.
+ * mips-tdep.c (mips_gdbarch_init): Set read_fp to mips_read_sp.
+ (mips_r3041_reg_names, mips_r3051_reg_names)
+ (mips_r3081_reg_names): Replace "fp" with "".
+ Fix PR gdb/480.
+
+2002-09-17 Theodore A. Roth <troth@verinet.com>
+
+ * gdb/avr-tdep.c(avr_scan_prologue): Fix bad call to
+ generic_read_register_dummy() (PR gdb/703).
+ (avr_push_return_address): #if 0 out unused vars.
+ (avr_gdbarch_init): Enable use of avr_push_return_address().
+
+2002-09-17 Michael Snyder <msnyder@redhat.com>
+
+ * m32r-stub.c (restore_and_return): Postpone restoring of PSW.
+ RTE will take care of it.
+
+2002-09-17 Andrew Cagney <ac131313@redhat.com>
+
+ * arch-utils.c (legacy_virtual_frame_pointer): If FP_REGNUM is
+ invalid, return SP_REGNUM.
+
+2002-09-17 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_pop_frame): Read saved values of floating
+ point registers without sign extension.
+
+2002-09-17 Andrew Cagney <cagney@redhat.com>
+
+ * blockframe.c (deprecated_read_register_dummy): Rename
+ generic_read_register_dummy.
+ * frame.c (frame_unwind_signed_register): New function.
+ (frame_unwind_unsigned_register): New function.
+ * frame.h (frame_unwind_signed_register): Declare.
+ (frame_unwind_unsigned_register): Declare.
+ (deprecated_read_register_dummy): Rename
+ generic_read_register_dummy.
+
+ * h8300-tdep.c (h8300_frame_chain): Update.
+ (h8300_frame_saved_pc): Update.
+ * xstormy16-tdep.c (xstormy16_frame_saved_pc): Update.
+ * rs6000-tdep.c (rs6000_frame_saved_pc): Update.
+ * s390-tdep.c (s390_frame_saved_pc_nofix): Update.
+ (s390_frame_chain): Update.
+ * v850-tdep.c (v850_find_callers_reg): Update.
+ (v850_frame_saved_pc): Update.
+ * m32r-tdep.c (m32r_init_extra_frame_info): Update.
+ (m32r_find_callers_reg): Update.
+ (m32r_frame_saved_pc): Update.
+ * sh-tdep.c (sh_find_callers_reg): Update.
+ (sh64_get_saved_pr): Update.
+ (sh_init_extra_frame_info): Update.
+ (sh_init_extra_frame_info): Update.
+ (sh64_init_extra_frame_info): Update.
+ (sh64_init_extra_frame_info): Update.
+ * mcore-tdep.c (mcore_find_callers_reg): Update.
+ (mcore_frame_saved_pc): Update.
+ (mcore_init_extra_frame_info): Update.
+ * i386-tdep.c (i386_frame_saved_pc): Update.
+ * ia64-tdep.c (ia64_frame_saved_pc): Update.
+ (ia64_init_extra_frame_info): Update.
+ (ia64_init_extra_frame_info): Update.
+ * d10v-tdep.c (d10v_frame_saved_pc): Update.
+ * cris-tdep.c (cris_init_extra_frame_info): Update.
+ * avr-tdep.c (avr_frame_chain): Update.
+ (avr_init_extra_frame_info): Update.
+ (avr_frame_saved_pc): Update.
+ * arm-tdep.c (arm_find_callers_reg): Update.
+ (arm_init_extra_frame_info): Update.
+ (arm_frame_saved_pc): Update.
+
+2002-09-17 Tom Tromey <tromey@redhat.com>
+
+ * c-lang.c (c_emit_char): Don't treat \0 specially unless quoter
+ is "'".
+
+2002-09-17 Corinna Vinschen <vinschen@redhat.com>
+
+ * MAINTAINERS: Remove "non multi-arched" text from h8300.
+ * h8300-tdep.c (h8300_next_prologue_insn) Renamed from
+ NEXT_PROLOGUE_INSN.
+ (h8300_examine_prologue): Call h8300_next_prologue_insn instead of
+ NEXT_PROLOGUE_INSN.
+
+2002-09-16 Joel Brobecker <brobecker@gnat.com>
+
+ * osfsolib.c: Remove file, replaced by solib-osf.c.
+ * Makefile.in: Remove compilation rules for osfsolib.c.
+
+2002-09-16 David Carlton <carlton@math.stanford.edu>
+
+ * cp-valprint.c (cp_print_class_method): Correct args to
+ check_stub_method_group.
+
+2002-09-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c: Multiarch. Drop `set machine' command in favor of
+ `set architecture'. Unify naming convention of functions.
+ (h8300_skip_prologue): Improve prologue analysis.
+ (h8300_push_arguments): Rewritten to more closely match GCC's
+ bizarre argument-passing behavior, along with the comment describing
+ said behavior.
+ * remote-hms.c (hms_regnames): Don't use NUM_REGS in definition.
+ * config/h8300/tm-h8300.h: Multiarch. Just keep stuff needed by
+ sim, remote-e7000.c, remote-hms.c and remote.c
+
+2002-09-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (gdb_print_insn_i386): Removed.
+ (i386_print_insn): New function.
+ (i386_gdbarch_init): Set print_insn to i386_print_insns.
+ (_initialize_i386_tdep): Don't initialize tm_print_insn and
+ tm_print_insn_info.
+
+2002-09-14 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbtypes.c (check_stub_method_group): Initialize found_stub to
+ zero.
+
+2002-09-14 Corinna Vinschen <vinschen@redhat.com>
+
+ * arch-utils.c (legacy_pc_in_sigtramp): Move preprocessor expression
+ for IN_SIGTRAMP to here. Use IN_SIGTRAMP only if it's defined.
+ Guard usage of SIGTRAMP_START() by using SIGTRAMP_START_P.
+
+2002-09-13 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (child_create_inferior): Honor 'tty' command.
+
+2002-09-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.c (check_stub_method): Make static.
+ (check_stub_method_group): New function.
+ * gdbtypes.h: Update prototypes.
+ * cp-support.c: New file.
+ * cp-support.h: New file.
+
+ * stabsread.c: Include "cp-abi.h" and "cp-support.h".
+ (update_method_name_from_physname): New function.
+ (read_member_functions): Correct method names for operators
+ and v3 constructors/destructors. Separate v2 constructors and
+ destructors.
+ * Makefile.in (stabsread.o): Update dependencies.
+ (SFILES): Add cp-support.c.
+ (COMMON_OBS): Add cp-support.o.
+ (cp_support_h, cp-support.o): Add.
+
+ * cp-valprint.c (cp_print_class_method): Call
+ check_stub_method_group instead of check_stub_method. Remove
+ extraneous QUITs.
+ * p-valprint.c (pascal_object_print_class_method): Likewise.
+ * valops.c (search_struct_method): Likewise.
+ (find_method_list, value_struct_elt_for_reference): Likewise.
+
+2002-09-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (SIGTRAMP_END): Change to a predicate function.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-09-13 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (find_saved_register): Delete function.
+ * frame.h (find_saved_register): Delete declaration.
+ Fix PR gdb/631.
+
+Fri Sep 13 14:59:55 2002 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (read_next_frame_reg): Re-hack using
+ frame_register_unwind.
+
+Fri Sep 13 07:42:09 2002 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_get_saved_register): Re-hack using
+ frame_register_unwind.
+
+2002-09-12 Joel Brobecker <brobecker@gnat.com>
+
+ * gdbarch.sh (NAME_OF_MALLOC): New variable in the architecture
+ vector. Will be useful for Interix.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * valops.c (value_allocate_space_in_inferior): Replace hard-coded
+ name of the malloc function by NAME_OF_MALLOC.
+
+2002-09-12 Joel Brobecker <brobecker@gnat.com>
+
+ * value.h (find_function_in_inferior): Add const keyword to
+ one of the parameters. Allows us to invoke this function with
+ a const char *.
+ * valops.c (find_function_in_inferior): Likewise.
+
+2002-09-12 Joel Brobecker <brobecker@gnat.com>
+
+ * exec.c (xfer_memory): Fix compilation warning with old versions
+ of GCC.
+ * tracepoint.c (trace_find_tracepoint_command): Likewise.
+
+2002-09-12 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h: Run through gdb_indent.h.
+ Add 2002 to Copyright year list.
+
+2002-09-12 Alan Modra <amodra@bigpond.net.au>
+
+ * x86-64-tdep.c (_initialize_x86_64_tdep): Don't use hard-coded
+ mach constants.
+ * MAINTAINERS: Add myself to write after approval list.
+
+2002-09-11 J. Brobecker <brobecker@gnat.com>
+
+ * osabi.c (gdb_osabi_name): Add entry for GDB_OSABI_INTERIX.
+
+2002-09-11 J. Brobecker <brobecker@gnat.com>
+
+ * osabi.h (gdb_osabi): Add new GDB_OSABI_INTERIX enum value for
+ Interix.
+
+2002-06-05 Paul N. Hilfinger <hilfingr@otisco.mckusick.com>
+
+ * procfs.c (do_detach): Clear current signal, not just fault.
+ Corrects problem with breakpoint trap signal leaking to detached
+ process on Tru64.
+
+2002-09-10 Michael Snyder <msnyder@redhat.com>
+
+ * buildsym.c (finish_block): Protect against null pointer.
+
+2002-09-10 Andrew Cagney <cagney@redhat.com>
+
+ * infcmd.c (default_print_registers_info): Send all output to
+ ``file'' instead of ``gdb_stdout''.
+
+2002-09-10 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_extract_struct_value_address): Make val a
+ LONGEST, and use signed register read (addresses are sign-
+ extended for mips).
+
+2002-09-10 Stephane Carrez <stcarrez@nerim.fr>
+
+ * event-loop.c (gdb_do_one_event): Make public.
+ * event-loop.h (gdb_do_one_event): Declare.
+
+2002-09-10 Jeff Law <law@redhat.com>
+
+ * infttrace.c (child_resume): Simplify and rework to avoid
+ TT_PROC_CONTINUE.
+
+2002-09-09 Fred Fish <fnf@intrinsity.com>
+
+ * printcmd.c (print_scalar_formatted): "len" is the number of
+ target bytes, NOT the number of target bits.
+
+2002-09-09 Elena Zannoni <ezannoni@redhat.com>
+
+ From: Emmanuel Thome' <thome@lix.polytechnique.fr>
+ * top.c (init_main): Set rl_terminal_name.
+
+2002-09-08 Aidan Skinner <aidan@velvet.net>
+
+ * ada-lang.c (ada_array_bound, ada_type_match,
+ _initialize_ada_language): Fix K&R definitions.
+ * ada-tasks.c (get_current_task): Fix K&R definitions.
+ * ada-valprint.c (adjust_type_signedness): Fix K&R definitions.
+
+2002-09-07 Christopher Faylor <cgf@redhat.com>
+
+ * MAINTAINERS: Remove CE from list of maintainership responsibilities.
+ Add XP.
+
+2002-09-06 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_register_virtual_type,
+ i386_register_convertible, i386_register_convert_to_virtual,
+ i386_register_comvert_to_raw): Use FP_REGNUM_P and SSE_REGNUM_P
+ instead of IS_FP_REGNUM and IS_SSE_REGNUM.
+ (i386_gdbarch_init): Fix comment. Add comments on calls that set
+ sp_regnum, fp_regnum, pc_regnum, ps_regnum and fp0_regnum.
+ Don't set push_arguments twice.
+
+ * i386bsd-tdep.c (i386bsd_init_abi): Set sigtramp_start and
+ sigtramp_end to i386bsd_sigtramp_start and i386bsd_sigtramp_end.
+ * i386nbsd-tdep.c (i386nbsd_init_abi): Set sigtramp_start and
+ sigtramp_end to NULL.
+ * config/i386/tm-fbsd.h (SIGTRAMP_START, SIGTRAMP_END): Remove
+ defines.
+ (i386bsd_sigtramp_start, i386_sigtramp_end): Remove prototypes.
+
+ * i386nbsd-tdep.c (i386nbsd_pc_in_sigtramp): Remove spurious
+ whitespace.
+
+ * gdbarch.sh (SIGTRAMP_START, SIGTRAMP_END): New methods.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * blockframe.c (find_pc_sect_partial_function): Convert to use
+ SIGTRAMP_START_P predicate.
+
+2002-09-05 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c (arm_init_extra_frame_info): Distinguish between
+ generic_dummy_frame method and old method. Also distinguish
+ between ARM_FP_REGNUM and THUMB_FP_REGNUM.
+ (arm_extract_return_value): Use new regcache method.
+
+ * mips-tdep.c (mips_n32n64_push_arguments): Remove alignment
+ adjustment that doesn't conform to the ABI.
+ (mips_extract_struct_value_address): Retrieve V0_REGNUM from
+ saved regcache, not from current regcache.
+
+2002-09-05 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Update for 5.3. Add new section ``Changes since 5.3''.
+ * README: Update.
+
+2002-09-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * arm-tdep.c (arm_addr_bits_remove): Don't check for Thumb mode
+ if arm_apcs_32 is false.
+
+2002-09-04 Andrew Cagney <ac131313@redhat.com>
+
+ GDB 5.3 branch created.
+
+2002-09-03 Theodore A. Roth <troth@verinet.com>
+
+ * gdb/avr-tdep.c (avr_gdbarch_init): Use
+ generic_unwind_get_saved_register.
+
+2002-09-03 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf2_add_member_fn): Add the 'type'
+ argument (PR gdb/653). Update call to smash_to_method_type.
+ (read_structure_scope): Update call to dwarf2_add_member_fn.
+
+2002-09-03 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-tdep.c: Include gdb_string.h
+ * x86-64-linux-nat.c: Ditto.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ada-exp.y (yyname, yyrule): Remap global variables that appear
+ when YYDEBUG is set to 1.
+ * c-exp.y: Likewise.
+ * f-exp.y: Likewise.
+ * jv-exp.y: Likewise.
+ * m2-exp.y: Likewise.
+ * p-exp.y: Likewise.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (i386nbsd-tdep.o): Add $(solib_svr4_h) to
+ dependency list.
+ * i386nbsd-tdep.c (i386nbsdelf_init_abi): Set
+ solib_svr4_fetch_link_map_offsets to
+ nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
+ * config/i386/nbsd.mt (TDEPFILES): Add solib.o and solib-svr4.o.
+ * config/i386/nbsdaout.mh (NATDEPFILES): Remove solib.o.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Remove solib.o,
+ solib-svr4.o, and solib-legacy.o.
+ * config/i386/tm-nbsd.h: Include solib.h.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.tgt (i[3456]86-*-netbsdelf*): Merge with...
+ (i[3456]86-*-netbsd*): ...this. Set gdb_target to nbsd.
+ (i[3456]86-*-openbsd*): Make this a separate entry. Add a
+ comment noting that this needs its own target configuration.
+ * config/i386/nbsd.mt: New file.
+ * config/i386/nbsdaout.mt: Remove.
+ * config/i386/nbsdelf.mt: Ditto.
+ * config/i386/tm-nbsdaout.h: Ditto.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * i386nbsd-tdep.c (i386nbsd_sigtramp_offset): New function.
+ (i386nbsd_pc_in_sigtramp): Rewrite to use i386nbsd_sigtramp_offset.
+ (i386nbsd_init_abi): Don't initialize tdep->sigtramp_start or
+ tdep->sigtramp_end.
+ (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end): Remove.
+ * config/i386/tm-nbsd.h (SIGTRAMP_START, SIGTRAMP_END)
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (i386nbsd-tdep.o): Add $(arch_utils_h),
+ $(i386_tdep_h), and $(nbsd_tdep_h) to dependency list.
+ * i386-tdep.h (i386bsd_init_abi): New prototype.
+ * i386bsd-tdep.c (i386bsd_init_abi): Remove "static" from
+ function declaration.
+ (_initialize_i386bsd_tdep): Don't register OS ABI handlers
+ for NetBSD-a.out or NetBSD-ELF.
+ (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end)
+ (i386nbsd_sc_pc_offset, i386nbsd_sc_sp_offset)
+ (i386nbsd_init_abi, i386nbsdelf_init_abi): Move to...
+ * i386nbsd-tdep.c: ...here. Include arch-utils.h, i386-tdep.h,
+ and nbsd-tdep.h.
+ (i386nbsd_pc_in_sigtramp): New function.
+ (i386nbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ i386nbsd_pc_in_sigtramp.
+ (_initialize_i386nbsd_tdep): Register i386nbsd_init_abi
+ and i386nbsdelf_init_abi OS ABI handlers.
+ * config/i386/nbsdaout.mt (TDEPFILES): Add nbsd-tdep.o.
+ * config/i386/nbsdelf.mt (TDEPFILES): Likewise.
+
+2002-09-02 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (dummy_sse_values): Only try to fill in the SSE
+ registers if the target really has them.
+
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (mipsnbsd-tdep.o): Use $(nbsd_tdep_h) rather
+ than nbsd-tdep.h.
+
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (alphanbsd-tdep.o): Add $(frame_h) to dependency
+ list.
+ * alphanbsd-tdep.c (alphanbsd_sigcontext_addr)
+ (alphanbsd_skip_sigtramp_frame): New functions.
+ (alphanbsd_init_abi): Set tdep->skip_sigtramp_frame to
+ alphanbsd_skip_sigtramp_frame. Set tdep->sigcontext_addr
+ to alphanbsd_sigcontext_addr.
+
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (mipsnbsd-tdep.o): Add nbsd-tdep.h to dependency
+ list.
+ (nbsd-tdep.o): Add $(gdb_string_h) to dependency list.
+ * alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): Use
+ nbsd_pc_in_sigtramp.
+ * mipsnbsd-tdep.c: Include nbsd-tdep.h.
+ (mipsnbsd_pc_in_sigtramp): Use nbsd_pc_in_sigtramp.
+ * nbsd-tdep.c: Include gdb_string.h.
+ (nbsd_pc_in_sigtramp): New function.
+ * nbsd-tdep.h (nbsd_pc_in_sigtramp): New prototype.
+ * ppcnbsd-tdep.c (ppcnbsd_pc_in_sigtramp): New function.
+ (ppcnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ ppcnbsd_pc_in_sigtramp.
+ * shnbsd-tdep.c (shnbsd_pc_in_sigtramp): New function.
+ (shnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ shnbsd_pc_in_sigtramp.
+ * sparcnbsd-tdep.c (sparcnbsd_init_abi_elf): Set
+ gdbarch_pc_in_sigtramp to nbsd_pc_in_sigtramp.
+ * config/mips/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
+
+2002-08-30 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * breakpoint.c (breakpoint_init_inferior): Reset the val field of
+ watchpoints to NULL.
+ (insert_breakpoints): set val field of watchpoints if NULL.
+
+
+2002-08-29 Jim Blandy <jimb@redhat.com>
+
+ * symtab.c (lookup_symbol_aux): In the cases where we find a
+ minimal symbol of an appropriate name and use its address to
+ select a symtab to read and search, use `name' (as passed to us)
+ as the demangled name when searching the symtab's global and
+ static blocks, not the minsym's name.
+
+2002-08-29 Keith Seitz <keiths@redhat.com>
+
+ * stack.c (print_frame_info_base): Always set current_source_symtab
+ and current_source_line.
+
+2002-08-29 Donn Terry <donnte@microsoft.com>
+
+ * proc-api.c (rw_table): Fix typo in #ifdef PCSHOLD (missing S).
+
+2002-08-28 Keith Seitz <keiths@redhat.com>
+
+ * stack.c (select_frame): Add FIXME concerning selected-frame
+ events.
+ (select_frame_command): Send selected-frame-level-changed
+ event notification, but only if the level actually changed.
+ (up_silently_base): Add selected-frame-level-changed event
+ notification.
+ (down_silently_base): Likewise.
+
+2002-08-28 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in: Update dependencies for all gdb/*.c files.
+
+2002-08-27 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (osabi.o, i387-tdep.o, i386-linux-nat.o, lin-lwp.o,
+ ax-gdb.o, signals.o, jv-valprint.o, c-valprint.o, cp-abi.o):
+ Update dependencies.
+ * i387-tdep.c: Include gdb_string.h.
+ * osabi.c: Likewise.
+ * i386-linux-nat.c: Likewise.
+ * lin-lwp.c: Likewise.
+ * ax-gdb.c: Likewise.
+ * signals/signals.c: Likewise.
+ * jv-valprint.c: Likewise.
+ * p-lang.c: Likewise.
+ * c-valprint.c: Likewise.
+ * cp-abi.c: Likewise.
+
+2002-08-27 Elena Zannoni <ezannoni@redhat.com>
+
+ * cli/cli-script.h (copy_command_lines): Export.
+ * breakpoint.c: Include cli/cli-script.h.
+ * Makefile.in (breakpoint.o): Update dependencies.
+
+2002-08-26 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (insert_breakpoints): Protect all references
+ to 'process_warning'. Shorten long lines.
+
+2002-08-26 Joel Brobecker <brobecker@gnat.com>
+
+ * cli/cli-script.c (copy_command_lines): New function.
+ * defs.h (copy_command_lines): Export.
+ * testsuite/gdb.base/commands.exp: New tests for commands
+ attached to a temporary breakpoint, and for commands that
+ delete the breakpoint they are attached to.
+
+2002-08-26 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (bpstat_stop_status): Instead of copying the
+ pointer to the breakpoint commands struct, make a new copy
+ of the struct and point to that.
+ (bpstat_clear): Free the commands struct.
+ (bpstat_clear_actions): Free the commands struct.
+ (bpstat_do_actions): Free the command actions. Also execute
+ the local cleanups, instead of deleting them.
+ (delete_breakpoint): Leave the commands field of the bpstat
+ chain alone -- it will be freed later.
+
+2002-08-26 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c (altivec_register_p): Restore function inadvertently
+ deleted in 2002-08-20 commit. This function is still used by
+ ppc-linux-nat.c.
+
+2002-08-26 Keith Seitz <keiths@redhat.com>
+
+ * gdb-events.sh: Add selected-frame-level-changed event.
+ * gdb-events.c: Regenerated.
+ * gdb-events.h: Regenerated.
+
+2002-08-26 Stephane Carrez <stcarrez@nerim.fr>
+
+ Fix PR gdb/393:
+ * inflow.c (terminal_save_ours): New function to save terminal
+ settings.
+ * inferior.h (terminal_save_ours): Declare.
+ * target.c (debug_to_terminal_save_ours): New function.
+ (cleanup_target): Defaults to_terminal_save_ours.
+ (update_current_target): Inherit to_terminal_save_ours.
+ (setup_target_debug): Set to_terminal_save_ours.
+ * target.h (target_terminal_save_ours): New to save terminal settings.
+ (target_ops): New member to_terminal_save_ours.
+ * gnu-nat.c (init_gnu_ops): Set to_terminal_save_ours.
+ * hpux-thread.c (init_hpux_thread_ops): Likewise.
+ * inftarg.c (init_child_ops): Likewise.
+ * m3-nat.c (init_m3_ops): Likewise.
+ * procfs.c (init_procfs_ops): Likewise.
+ * wince.c (init_child_ops): Likewise.
+ * win32-nat.c (init_child_ops): Likewise.
+ * sol-thread.c (init_sol_thread_ops): Likewise.
+
+2002-08-26 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_store_return_value): Undeprecate. Convert to
+ use regcache_* functions.
+ (i386_gdbarch_init): Set store_return_value instead of
+ deprecated_store_return_value.
+
+ * regcache.c (regcache_raw_write_signed,
+ regcache_raw_write_unsigned): New functions.
+ * regcache.h (regcache_raw_write_signed,
+ regcache_raw_write_unsigned): New prototypes.
+
+2002-08-25 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (c-exp.tab.o, jv-exp.tab.o, f-exp.tab.o)
+ (m2-exp.tab.o, p-exp.tab.o, ada-exp.tab.o): Move to before the
+ source file dependencies. Cleanup corresponding generator rules.
+
+2002-08-25 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (register_offset_hack): Declare.
+ (regcache_cooked_read_using_offset_hack): Declare.
+ (regcache_cooked_write_using_offset_hack): Declare.
+
+ * regcache.c (register_offset_hack): New function.
+ (regcache_cooked_read_using_offset_hack): New function.
+ (regcache_cooked_write_using_offset_hack): New function.
+ (regcache_dump): Check that the registers, according to their
+ offset, are packed hard against each other.
+ (cooked_xfer_using_offset_hack): New function.
+
+2002-08-25 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (struct regcache_descr): Add field register_type.
+ (init_legacy_regcache_descr): Pass a pre-allocated regcache_descr
+ in as a parameter
+ (init_regcache_descr): Initialize register_type. Pass the descr
+ to init_legacy_regcache_descr. Use register_type instead of
+ REGISTER_VIRTUAL_TYPE.
+ (register_type): New function.
+ (regcache_dump): Replace REGISTER_VIRTUAL_TYPE with register_type.
+ * regcache.h (register_type): Declare.
+
+2002-08-25 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Set store_struct_return
+ instead of deprecated_store_return_value. Fix fallout from
+ 2002-08-23 Andrew Cagney <cagney@redhat.com>.
+
+2002-08-25 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (max_register_size): New function.
+ (init_legacy_regcache_descr): Ensure that max_register_size is
+ large enough for REGISTER_VIRTUAL_SIZE.
+ * regcache.h (max_register_size): Declare.
+
+2002-08-24 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use deprecated version of
+ store_return_value.
+ (e500_extract_return_value): Change type of valbuf pointer to
+ void.
+
+2002-08-24 Mark Kettenis <kettenis@gnu.org>
+
+ * PROBLEMS: Clarify problems with FreeBSD's compiler and suggest
+ workaround.
+
+ * valprint.c (print_longest) [CC_HAS_LONG_LONG &&
+ PRINTF_HAS_LONG_LONG]: Cast val_long to (long long) or (unsigned
+ long long) to prevent compiler warning on 64-bit systems.
+
+2002-08-23 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (STORE_RETURN_VALUE): Add regcache parameter.
+ (DEPRECATED_STORE_RETURN_VALUE): New method.
+ (EXTRACT_RETURN_VALUE): Make buffer parameter a void pointer.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * values.c (set_return_value): Pass current_regcache to
+ STORE_RETURN_VALUE.
+ * arch-utils.h (legacy_store_return_value): Declare.
+ * arch-utils.c (legacy_store_return_value): New function.
+ (legacy_extract_return_value): Update parameters.
+
+ * config/pa/tm-hppa.h (DEPRECATED_STORE_RETURN_VALUE): Rename
+ STORE_RETURN_VALUE.
+ * config/pa/tm-hppa64.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/z8k/tm-z8k.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/sparc/tm-sparclet.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/mn10200/tm-mn10200.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/m68k/tm-linux.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/m32r/tm-m32r.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/h8500/tm-h8500.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+ * config/h8300/tm-h8300.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * i386-tdep.c (i386_extract_return_value): Update.
+ * arch-utils.c (legacy_extract_return_value): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+
+2002-08-23 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Add entries for bfd/elf32-ppcqnx.c,
+ bfd/elf32-ppc.c, bfd/elf32-sh.c and bfd/elf32-shqnx.c.
+
+2002-08-24 Mark Kettenis <kettenis@gnu.org>
+
+ * PROBLEMS: Refer to GDB 5.3 instead of 5.2. Mention FreeBSD
+ problems.
+
+2002-08-23 Joel Brobecker <brobecker@gnat.com>
+
+ * infrun.c (handle_inferior_event): Move a comment outside of a
+ function call, in order to avoid indent reformatting this part
+ of the code in an unreadable way.
+
+2002-08-23 Grace Sainsbury <graces@redhat.com>
+
+ * infrun.c (normal_stop, proceed): Remove call to print_sys_errmsg
+ when breakpoints fail. Move general breakpoint error messages to
+ insert_breakpoints.
+ * breakpoint.c (insert_breakpoints): Change warnings when
+ breakpoints are nto inserted to specify the type. Remove call to
+ memory_error when hardware breakpoints can't be inserted. Remove
+ multiple calls to warning so all messages are sent to the user at
+ once.
+ (delete_breakpoints): Make insert error messsages more explicit.
+
+2002-08-23 Daniel Jacobowitz <drow@mvista.com>
+
+ * ChangeLog: Move gdbserver entries after GDB 5.2 to
+ gdbserver/ChangeLog.
+
+2002-08-23 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c: Include "objfiles.h".
+ (i386_svr4_init_abi): Set in_solib_call_trampoline and
+ skip_trampoline_code.
+ * config/i386/tm-i386v4.h: Don't include "config/tm-sysv4.h".
+ (CPLUS_MARKER): Define to '.'.
+
+ * linux-proc.c (struct linux_corefile_thread_data): Add num_notes
+ member.
+ (linux_corefile_thread_callback): Increase args->num_notes.
+ (linux_make_note_section): Initialize thread_args.num_notes, and
+ use it to determine whether notes for any threads were created.
+
+2002-08-23 Donn Terry <donnte@microsoft.com>
+
+ * proc-api.c (rw_table): Do not include a row for PCDSTOP if the
+ corresponding macro is not defined. Likewise for PCNICE, PCSHOLD
+ and PCUNKILL.
+ (write_with_trace): Conditionalize out the switch branch handling
+ PCSHOLD if the corresponding macro is not defined. Likewise for
+ PRSABORT and PRSTOP.
+ This change will be needed by the Interix port.
+
+2002-08-22 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_arguments): use
+ write_register wherever possible instead of manipulating the
+ register bytes directly.
+ Assign VALUE_CONTENTS to a variable and use that.
+ The GPR numbers are now dependent on the architecture.
+
+2002-08-22 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (struct rs6000_framedata): Add saved_ev and
+ ev_offset fields.
+ (skip_prologue): Add support for BookE/e500 instructions.
+ (e500_extract_return_value): New function.
+ (frame_get_saved_regs): Add support for saving ev registers and
+ pseudo gpr's.
+ (e500_store_return_value): New function.
+ (rs6000_gdbarch_init): Move up default intializations of
+ deprecated_extract_return_value and store_return_value. Overwrite
+ init of store_return_value with e500 specific version.
+ Set extract_return_value for e500.
+
+2002-08-22 Elena Zannoni <ezannoni@redhat.com>
+
+ * blockframe.c (generic_call_dummy_register_unwind): Use
+ regcache_cooked_read to catch cases in which the variable is
+ stored in a pseudo register.
+
+2002-08-22 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention that the i960 has been made obsolete.
+ * Makefile.in (SFILES): Delete remote-nrom.c, remote-nindy.c and
+ i960-tdep.c
+ (remote-nrom.o): Obsolete target.
+ (remote-nindy.o, i960-tdep.o): Ditto.
+ * remote-nrom.c: Make file obsolete.
+ * remote-nindy.c, remote-vx960.c: Ditto.
+ * config/i960/vxworks960.mt, config/i960/nindy960.mt: Ditto.
+ * config/i960/mon960.mt, config/i960/tm-i960.h: Ditto.
+ * config/i960/tm-vx960.h, config/i960/tm-nindy960.h: Ditto.
+ * config/i960/tm-mon960.h, i960-tdep.c: Ditto.
+ * configure.tgt: Make i960-*-bout*, i960-nindy-coff*,
+ i960-*-coff*, i960-nindy-elf*, i960-*-elf*, i960-*-nindy* and
+ i960-*-vxworks* obsolete.
+ * MAINTAINERS: Note that the i960 is obsolete.
+
+2002-08-21 Corinna Vinschen <vinschen@redhat.com
+
+ * aix-thread.c (aix_thread_detach): Disable thread debugging on
+ detach to allow reinitialization.
+
+2002-08-22 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Change the s390 target to s390-linux-gnu (second
+ attempt).
+
+2002-08-22 Jim Blandy <jimb@redhat.com>
+
+ * coffread.c (coff_symfile_read): Don't try to read the line
+ number table from disk if the image file doesn't have a symbol
+ table; we'll never actually look at the info anyway, and Windows
+ ships DLL's with bogus file offsets for the line number data.
+
+2002-08-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Figure out whether we have
+ an e500 executable.
+
+2002-08-21 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (MSYMBOL_IS_SPECIAL): Replace macro with function.
+ (MSYMBOL_SIZE): Replace macro with function.
+ (DEFAULT_MIPS_TYPE): Delete unused macro.
+ * config/mips/tm-mips.h (DEFAULT_MIPS_TYPE): Delete unused macro.
+ * config/mips/tm-embed.h (DEFAULT_MIPS_TYPE): Delete unused macro.
+
+2002-08-21 Jim Blandy <jimb@redhat.com>
+
+ * valops.c (value_cast): Simplify and correct logic for doing a
+ static cast from a pointer to a base class to a pointer to a
+ derived class.
+
+2002-08-21 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (default_print_registers_info): Replace
+ do_registers_info.
+ (registers_info): Use gdbarch_print_registers_info instead of
+ DO_REGISTERS_INFO.
+ * inferior.h (default_print_registers_info): Replace
+ do_registers_info.
+ * gdbarch.sh (PRINT_REGISTERS_INFO): New method.
+ (DO_REGISTERS_INFO): Change to a predicate function.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-21 Keith Seitz <keiths@redhat.com>
+
+ * gdb-events.sh: Add target-changed event.
+ * gdb-events.c: Regenerated.
+ * gdb-events.c: Regenerated.
+ * valops.c (value_assign): Add target-changed event notification
+ to inlval_register, lval_memory, and lval_reg_frame_relative.
+
+2002-08-21 Joel Brobecker <brobecker@gnat.com>
+
+ * NEWS: Add an entry regarding the improvement of the next/step
+ operation on Alpha Tru64 multi-processor machines.
+
+2002-08-21 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in: Update dependencies for mi/ cli/ and tui/
+ directores.
+ * Makefile.in: Update all _h macro definitions.
+ * Makefile.in (install-gdbtk): Move to install section.
+ (rdi-share/libangsd.a): Move to end of file.
+
+2002-08-19 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (frame_register_unwind): When a register, set addrp to
+ the register's byte.
+
+2002-08-20 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): These are only
+ used locally, so move them from the target machine header to here.
+ (mips_set_processor_type, mips_register_name, mips32_next_pc,
+ mips16_next_pc, cached_proc_desc, mips_set_processor_type):
+ Make static.
+ * config/mips/tm-mips.h (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Delete.
+
+2002-08-20 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention that the Apollo line was made obsolete.
+ * configure.tgt: Make m68*-apollo*-bsd*, m68*-hp-bsd*, and
+ m68*-hp-hpux* obsolete.
+ * configure.host: Make m68*-apollo*-sysv*, m68*-apollo*-bsd*,
+ m68*-hp-bsd* and m68*-hp-hpux* obsolete.
+ * buildsym.c (make_blockvector): Make static.
+ * buildsym.h (make_blockvector): Make extern declaration obsolete.
+ * Makefile.in (HFILES_NO_SRCDIR): Remove dst.h
+ (ALLDEPFILES): Remove dstread.c.
+ (dstread.o): Obsolete make rule.
+ * dstread.c: Makefile obsolete.
+ * dst.h: Ditto.
+ * config/m68k/hp300hpux.mt: Ditto.
+ * config/m68k/hp300hpux.mh: Ditto.
+ * config/m68k/hp300bsd.mt: Ditto.
+ * config/m68k/hp300bsd.mh: Ditto.
+ * config/m68k/apollo68b.mt: Ditto.
+ * config/m68k/apollo68v.mh: Ditto.
+ * config/m68k/apollo68b.mh: Ditto.
+
+2002-08-20 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_in_return_stub): Make static.
+ (mips_gdbarch_init): Set in_solib_return_trampoline.
+ * config/mips/tm-mips.h (IN_SOLIB_RETURN_TRAMPOLINE): Delete.
+
+2002-08-20 Michael Snyder <msnyder@redhat.com>
+
+ * gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Add.
+ * gdbarch.c, gdbarch.h: Regenerate.
+ * arch-utils.c, arch-utils.h (generic_in_solib_return_trampoline):
+ Add.
+ * infrun.c (IN_SOLIB_RETURN_TRAMPOLINE): Delete default definition.
+
+2002-08-20 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_skip_stub, mips_in_call_stub): Make static.
+ (mips_gdbarch_init): Set skip_trampoline_code,
+ in_solib_call_trampoline.
+ * config/mips/tm-mips.h (REGISTER_NAME): Delete.
+ (IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE): Delete.
+
+2002-08-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-tdep.h (struct gdbarch_tdep): Add ev registers.
+
+ * rs6000-tdep.c (rs6000_register_virtual_type): Return 64 bit
+ vector type for ev registers.
+ (e500_pseudo_register_read): New function.
+ (e500_pseudo_register_write): New function.
+ (e500_dwarf2_reg_to_regnum): New function.
+ (PPC_UISA_NOFP_SPRS): New macro.
+ (PPC_EV_REGS): New macro.
+ (PPC_GPRS_PSEUDO_REGS): New macro.
+ (registers_e500): New register set for e500.
+ (variants): Add e500 variant.
+ (rs6000_gdbarch_init): Move setting of pc, sp, fp regnums to
+ before setting architectural dependent variations. Initialize ev
+ registers numbers. Add case for e500 architecture. Set the
+ number of pseudo registers.
+
+2002-08-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c: Clean up comments.
+
+2002-08-20 Andrew Cagney <cagney@redhat.com>
+
+ * h8300-tdep.c: Re-indent file.
+
+2002-08-20 Jim Blandy <jimb@redhat.com>
+
+ * Makefile.in (LDFLAGS): Allow the configure script to establish a
+ default for this.
+
+2002-08-20 Keith Seitz <keiths@redhat.com>
+
+ * breakpoints.c (watch_command_1): Use internal breakpoint
+ when setting a watchpoint_scope breakpoint.
+
+2002-08-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdbtypes.c (build_builtin_type_vec64): Add name to type.
+ (build_builtin_type_vec64i): Ditto.
+ (build_builtin_type_vec128): Ditto.
+ (build_builtin_type_vec128i): Ditto.
+
+2002-08-19 Michael Snyder <msnyder@redhat.com>
+
+ * config/mips/tm-mips.h (ELF_MAKE_MSYMBOL_SPECIAL): Delete.
+ (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Change into functions.
+ (FIX_CALL_DUMMY, PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME,
+ POP_FRAME, INIT_EXTRA_FRAME_INFO): Delete.
+ (CALL_DUMMY_START_OFFSET, CALL_DUMMY_BREAKPOINT_OFFSET,
+ CALL_DUMMY_ADDRESS): Delete.
+ * mips-tdep.c (mips_elf_make_msymbol_special, mips_msymbol_size,
+ mips_msymbol_is_special, mips_fix_call_dummy): New functions.
+ (mips_gdbarch_init): Set elf_make_msymbol_special, pop_frame,
+ push_dummy_frame, fix_call_dummy, init_extra_frame_info,
+ push_return_address.
+ (mips_register_raw_size, mips_eabi_use_struct_convention,
+ mips_n32n64_use_struct_convention, mips_o32_use_struct_convention,
+ mips_o32_reg_struct_has_addr, mips_frame_saved_pc, mips_frame_chain,
+ mips_init_extra_frame_info, mips_eabi_push_arguments,
+ mips_n32n64_push_arguments, mips_push_return_address,
+ mips_push_dummy_frame, mips_pop_frame, mips_skip_prologue,
+ mips_breakpoint_from_pc, mips_call_dummy_address): Make static.
+
+2002-08-19 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_frame_num_args): New function.
+ (mips_gdbarch_init): Set frame_chain, frameless_function_invocation,
+ frame_saved_pc, frame_args_address, frame_locals_address,
+ frame_num_args, and frame_args_skip.
+ * config/mips/tm-mips.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION,
+ FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
+ FRAME_NUM_ARGS, FRAME_ARGS_SKIP): Delete.
+ * config/mips/tm-mipsv4.h (FRAME_CHAIN_VALID): Delete.
+
+2002-08-20 Michael Snyder <msnyder@redhat.com>
+
+ * config/mips/tm-mips.h (STORE_STRUCT_RETURN): Delete.
+ (EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
+ * mips-tdep.c (mips_store_struct_return): New function.
+ (mips_extract_struct_value_address): New function.
+ (mips_gdbarch_init): Set store_struct_return and
+ extract_struct_value_address.
+
+2002-08-20 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf2_build_psymtabs): Check that
+ dwarf_line_offset is nonzero before creating dwarf_line_buffer.
+ (read_file_scope): Check that line_header is nonzero before
+ decoding macro information.
+
+2002-08-20 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (FP_REGNUM_P): Change such that we don't incorrectly
+ flag the general-purpose registers as floating-point on targets
+ that don't support the floating-point registers.
+
+2002-08-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (altivec_register_p): Delete.
+ (rs6000_do_altivec_registers): Delete.
+ (rs6000_altivec_registers_info): Delete.
+ (rs6000_do_registers_info): Delete.
+ (_initialize_rs6000_tdep): Remove command 'info powerpc altivec'.
+ (rs6000_gdbarch_init): Remove setting of do_registers_info.
+
+2002-08-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * infcmd.c (do_registers_info): Print vector registers in hex
+ format only.
+ (print_vector_info): Check that printing registers
+ makes sense.
+ (print_float_info): Ditto.
+
+2002-08-20 Andrew Cagney <ac131313@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ (mips_o32_extract_return_value): Rewrite.
+ (mips_o32_store_return_value): Rewrite.
+ (mips_o32_xfer_return_value): New function.
+ (mips_xfer_register): Tweak debug print message. Allow for
+ buf_offset when dumping the value transfered.
+
+2002-08-20 Andrew Cagney <ac131313@redhat.com>
+
+ * config/mips/tm-nbsd.h (MIPS_DEFAULT_ABI): Delete.
+ * config/mips/tm-linux.h (MIPS_DEFAULT_ABI): Delete.
+ * config/mips/tm-irix5.h (MIPS_DEFAULT_ABI): Delete.
+ * config/mips/tm-irix6.h (MIPS_DEFAULT_ABI): Delete.
+ * mips-tdep.c (mips_gdbarch_init) [MIPS_DEFAULT_ABI]: Delete code.
+
+2002-08-14 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_frame_chain): Check for call-dummy frames.
+
+2002-08-19 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (struct reg): Add field to indicate a pseudo
+ register.
+ (P): New macro to define a register as a pseudo register.
+ (R, R4, R8, R16, FR32, R64, R0): Updated.
+ (struct variant): Add new fields for number of pseudo registers
+ and number of total registers.
+ (tot_num_registers): New macro replacing....
+ (num_registers): ...deleted macro.
+ (num_registers): New function.
+ (num_pseudo_registers): New function.
+ (variants): Update all variants to intialize new fields correctly.
+ Postpone initialization of number of pseudo regs and real regs.
+ (init_variants): New function.
+ (rs6000_gdbarch_init): Initialize variants. Update calculation of
+ registers offsets.
+
+2002-08-19 David Carlton <carlton@math.stanford.edu>
+
+ * valops.c (search_struct_field): Change error message to treat
+ return value of 0 from value_static_field as meaning that field is
+ optimized out.
+ (value_struct_elt_for_reference): Ditto.
+ * values.c (value_static_field): Treat an unresolved location the
+ same as a nonexistent symbol. Fix PR gdb/635.
+ * gnu-v2-abi.c (gnuv2_value_rtti_type): Eliminate test for being
+ enclosed. Fix PR gdb/574.
+ * MAINTAINERS: Add self to Write After Approval list.
+
+2002-08-19 Andrew Cagney <ac131313@redhat.com>
+
+ * mips-tdep.c (mips_xfer_register): New function.
+ (mips_n32n64_extract_return_value): Rewrite.
+ (mips_gdbarch_init): For N32 and N64, set extract_return_value
+ instead of deprecated_extract_return_value.
+
+2002-08-19 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (TDEP): Delete macro.
+ (branch_dest): Replace use of TDEP macro with its body.
+ (rs6000_pop_frame): Ditto.
+ (rs6000_push_arguments): Ditto.
+ (rs6000_skip_trampoline_code): Ditto.
+ (rs6000_frame_saved_pc): Ditto.
+ (rs6000_frame_chain): Ditto.
+ (rs6000_register_name): Ditto.
+ (rs6000_register_byte): Ditto.
+ (rs6000_register_raw_size): Ditto.
+ (rs6000_register_virtual_type): Ditto.
+ (rs6000_register_convertible): Ditto.
+ (rs6000_convert_from_func_ptr_addr): Ditto.
+
+2002-08-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/mips/tm-linux.h (REALTIME_LO, REALTIME_HI): Define
+ conditionally.
+ (JB_PC, JB_ELEMENT_SIZE): Rename to MIPS_LINUX_JB_PC and
+ MIPS_LINUX_JB_ELEMENT_SIZE.
+ * mips-linux-tdep.c (supply_gregset, fill_gregset): Use alloca
+ for MAX_REGISTER_RAW_SIZE arrays.
+ (mips_linux_get_longjmp_target): Use MIPS_LINUX_JB_PC and
+ MIPS_LINUX_JB_ELEMENT_SIZE.
+
+2002-08-19 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * i387-tdep.c (i387_print_float_info): Fix typo in comment.
+
+2002-08-19 Aidan Skinner <aidan@velvet.net>
+
+ * Makefile.in (SFILES): Add ada-exp.y ada-lang.c ada-typeprint.c
+ ada-valprint.c ada-tasks.c.
+ (YYFILES): Add ada-exp.y.
+ (ada-exp.tab.c ada-lex.c ada-lang.o): New target.
+ (ada-tasks.o ada-typeprint.o ada-valprint.o): New target.
+ (ada-exp.tab.o): New target.
+
+2002-08-18 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (regcache_xfer_part): New function.
+ (regcache_raw_read_part): New function.
+ (regcache_raw_write_part): New function.
+ (regcache_cooked_read_part): New function.
+ (regcache_cooked_write_part): New function.
+ * regcache.h (regcache_raw_read_part): Declare.
+ (regcache_raw_write_part): Declare.
+ (regcache_cooked_read_part): Declare.
+ (regcache_cooked_write_part): Declare.
+
+2002-08-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * remote.c (remote_open_1): Add async_p.
+ (remote_async_open_1): Delete.
+ (open_remote_target): Delete.
+ (remote_open, extended_remote_open): Update calls to remote_open_1.
+ (remote_async_open, extended_remote_async_open): Call
+ remote_open_1 instead of remote_async_open_1.
+
+2002-08-19 Mark Kettenis <kettenis@gnu.org>
+
+ * blockframe.c: Fix a few coding standard violations.
+
+2002-08-19 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-i386sco5.h (START_INFERIOR_TRAPS_EXPECTED): Moved
+ here from ...
+ * config/i386/tm-i386sco5.h: ... here. File removed.
+ * config/i386/i386sco5.mt (TM_FILE): Set to tm-i386v4.h.
+
+ * config/i386/nm-i386v.h (START_INFERIOR_TRAPS_EXPECTED): New define.
+ * config/i386/i386aout.mt (TDEPFILES): Add i387-tdep.o
+ (TM_FILE): Set to tm-i386.h.
+ * config/i386/i386v.mt (TM_FILE): Set to tm-i386.h.
+ * config/i386/tm-i386v.h: Remove file.
+ * config/i386/tm-ptx.h [!SEQUENT_PTX4]: Include "i386/tm-i386.h"
+ instead of "i386/tm-i386v.h".
+ (START_INFERIOR_TRAPS_EXPECTED): Remove define.
+ * config/i386/tm-symmetry: Include "i386/tm-i386.h" instead of
+ "i386/tm-i386v.h".
+ (START_INFERIOR_TRAPS_EXPECTED): Remove define.
+ * config/i386/tm-vxworks.h: Include "i386/tm-i386.h" instead of
+ "i386/tm-i386.h".
+
+2002-08-18 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-i386v.h: Add protection against
+ multiple-inclusion.
+ (i386_register_u_addr): Remove prototype.
+ (register_u_addr): New prototype.
+ (REGISTER_U_ADDR): Redefine accordingly.
+ * i386v-nat.c: Improve several comments.
+ (i386_register_u_addr): Change signature and rename to
+ register_u_addr. Use FP_REGNUM_P. Rewrite slightly to get rid of
+ ubase variable.
+
+2002-08-18 Andrew Cagney <ac131313@redhat.com>
+
+ * config/mips/tm-mips.h (STORE_RETURN_VALUE): Delete macro.
+ (DEPRECATED_EXTRACT_RETURN_VALUE): Delete macro.
+ * mips-tdep.c (mips_gdbarch_init): Set store_return_value and
+ deprecated_extract_return_value.
+ (mips_o32_push_arguments, mips_o64_push_arguments): Clone and
+ rename mips_o32o64_push_arguments.
+ (mips_gdbarch_init): Update.
+ (mips_extract_return_value): Delete.
+ (mips_o32_extract_return_value): Clone mips_extract_return_value.
+ (mips_o64_extract_return_value): Clone mips_extract_return_value.
+ (mips_eabi_extract_return_value): Clone mips_extract_return_value.
+ (mips_n32n64_extract_return_value): Clone
+ mips_extract_return_value.
+ (mips_store_return_value): Delete.
+ (mips_o32_store_return_value): Clone mips_store_return_value.
+ (mips_o64_store_return_value): Clone mips_store_return_value.
+ (mips_eabi_store_return_value): Clone mips_store_return_value.
+ (mips_n32n64_store_return_value): Clone mips_store_return_value.
+
+2002-08-18 Aidan Skinner <aidan@velvet.net>
+
+ * ada-lang.c: Use gdb_string.h instead of <string.h>.
+ * ada-typeprint.c: Use gdb_string.h instead of <string.h>.
+
+2002-08-18 Aidan Skinner <aidan@velvet.net>
+
+ * ada-lang.c: Run through gdb_indent.sh.
+ * ada-lang.h: Run through gdb_indent.sh.
+ * ada-tasks.c: Run through gdb_indent.sh.
+ * ada-typeprint.c: Run through gdb_indent.sh.
+ * ada-valprint.c: Run through gdb_indent.sh.
+
+2002-08-18 Andrew Cagney <ac131313@redhat.com>
+
+ * osabi.c (gdbarch_init_osabi): Don't complain about an unknown
+ ABI.
+
+2002-08-18 Mark Kettenis <kettenis@gnu.org>
+
+ * i386b-nat.c [FETCH_INFERIOR_REGISTERS]: Remove dead code.
+
+ * config/i386/nm-i386bsd.h (FLOAT_INFO): Remove redundant #undef.
+ * i386b-nat.c [FLOAT_INFO]: Remove dead code.
+
+ * i386-tdep.c (i386_do_pop_frame, i386_store_return_value): Call
+ write_register_gen instead of write_register_bytes.
+
+ * NEWS: Mention that the i[3456]-*mach3*, i[3456]-*-mach* and
+ i[3456]-*-osf1mk* configurations have been made obsolete.
+ * configure.host: Make i[3456]86-*-mach3*, i[3456]86-*mach* and
+ i[3456]86-*-osf1mk* hosts obsolete.
+ * confighure.tgt: Make i[3456]86-*-mach3*, i[3456]86-*-osf1mk*
+ targets obsolete.
+ * config/i386/i386mach.mh, config/i386/nm-i386mach.h,
+ config/i386/xm-i386mach.h, config/i386/i386m3.mh,
+ config/i386/i386m3.mt, config/i386/nm-m3.h,
+ config/i386/tm-i386m3.h, config/i386/xm-i386m3.h,
+ config/i386/i386mk.mh, config/i386/i386mk.mt,
+ config/i386/tm-i386mk.h, config/i386/xm-i386mk.h: Make files
+ obsolete.
+ * i386mach-nat.c, i386m3-nat.c: Make files obsolete.
+ * Makefile.in (ALLDEPFILES): Remove i386mach.c i386m3-nat.c
+ (i386mach-nat.o, i386m3-nat.o):Make targets obsolete.
+
+2002-08-18 Andrew Cagney <ac131313@redhat.com>
+
+ * config/pa/tm-hppa.h (hppa_store_return_value): Declare.
+ (hppa_value_returned_from_stack): Declare.
+ (hppa_extract_return_value): Declare.
+ * config/pa/hppa.mt: New file.
+ * configure.tgt: Recognize hppa*-*-*.
+ * MAINTAINERS: Change HPPA target to hppa-elf. Still broken.
+
+2002-08-18 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Fix typo in
+ comment.
+
+2002-08-17 Mark Kettenis <kettenis@gnu.org>
+
+ * top.c (gdb_rl_operate_and_get_next): Make sure
+ operate-and-get-next functions correctly even when the history
+ list is completely filled.
+
+2002-08-18 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Target Instruction Set Architectures): Rename
+ Target/Architectures. Replace vax-dec-vms5.5 with vax-netbsd.
+ Replace s390-linux with s390-linux-gnu. Remove i386-aout,
+ mcore-pe, mips64-elf, sparc64-elf. Remove i586-pc-msdosdjgpp,
+ already listed under Host/Native.
+
+ * configure.tgt: Combine i[3456]86-*-coff*, i[3456]86-*-elf*,
+ i[3456]86-*-pe*, and i[3456]86-*-aout* into i[3456]86-*-*. Add
+ mips*-*-*.
+
+2002-08-17 Andrew Cagney <ac131313@redhat.com>
+
+ * config/ia64/ia64.mt: New file.
+ * config/alpha/alpha.mt: New file.
+ * MAINTAINERS: Change the alpha target to alpha-elf and IA-64 to
+ ia64-linux-gnu. Mention that ia64-elf is broken.
+ * configure.tgt: Add alpha*-*-* and ia64*-*-* patterns.
+
+2002-08-17 Mark Kettenis <kettenis@elgar.kettenis.dyndns.org>
+
+ * i386-tdep.c (i386_svr4_init_abi, i386_nw_init_abi): Use
+ generic_func_frame_valid instead of func_frame_valid.
+
+2002-08-16 Joel Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (alpha_osf1_init_abi): Unfortunately,
+ procfs appears to be broken when debugging on multi-processor
+ machines. So enable software single stepping in order to avoid
+ using the procfs interface to do next/step operations, using
+ internal breakpoints instead.
+
+ * infrun.c (handle_inferior_event): Readjust the stop_pc by
+ DECR_PC_AFTER_BREAK when hitting a single step breakpoint, to
+ make this pc address equal to the value it would have if the
+ system stepping capability was used. Also set a new flag used
+ to ensure that we don't readjust the PC one more time later.
+
+ * breakpoint.c (bpstat_stop_status): Do not adjust the PC
+ address by DECR_PC_AFTER_BREAK when software single step is
+ in use for this architecture, as this has already been taken
+ care of in handle_inferior_event().
+
+2002-08-16 Joel Brobecker <brobecker@gnat.com>
+
+ * infrun.c (handle_inferior_event): Minor reformatting, to make
+ a rather long condition expression easier to read.
+
+2002-08-16 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (gdbtk.o): Move to end of file.
+ (gdbtk-bp.o, gdbtk-cmds.o): Ditto.
+ (gdbtk-hooks.o, gdbtk-register.o): Ditto.
+ (gdbtk-stack.o, gdbtk-varobj.o): Ditto.
+ (gdbtk-wrapper.o, gdbres.o): Ditto.
+
+2002-08-16 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (copying.o): Separate out compile rule.
+ (hpux-thread.o, procfs.o, signals.o): Ditto.
+ (v850ice.o, z8k-tdep.o): Ditto.
+ (tui-file.o): Move to TUI section.
+ (xdr_ptrace.o, xdr_rdb.o, xdr_ld.o): Move to separate section.
+ (nindy.o, Onindy.o, ttyflush.o): Move to separate section.
+
+2002-08-16 Joel Brobecker <brobecker@gnat.com>
+
+ * i386-tdep.c (i386_pe_skip_trampoline_code): renamed from
+ skip_trampoline_code, for better namespace-proofing.
+
+ * i386-tdep.h (i386_pe_skip_trampoline_code): Add declaration.
+
+2002-08-16 Joel Brobecker <brobecker@gnat.com>
+
+ * config/i386/tm-cygwin.h: Remove some "#if 0"'ed macros.
+
+2002-08-16 Joel Brobecker <brobecker@gnat.com>
+
+ * infrun.c (handle_inferior_event): When receiving a SIGTRAP
+ signal, check whether we hit a breakpoint before checking for a
+ single step breakpoint. Otherwise, GDB fails to notice that a
+ breakpoint has been hit when stepping onto a breakpoint.
+
+2002-08-16 Keith Seitz <keiths@redhat.com>
+
+ * gdb-events.sh (clear_gdb_event_hooks): New function.
+ * gdb-events.c: Regenerate.
+ * gdb-events.h: Regenerate.
+
+2002-08-16 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.c (bpstat_stop_status): Rename not_a_breakpoint to
+ not_a_sw_breakpoint.
+ * breakpoint.h (bpstat_stop_status): Add parameter names.
+
+2002-08-16 Grace Sainsbury <graces@redhat.com>
+
+ * remote.c (remote_insert_hw_breakpoint)
+ (remote_remove_hw_breakpoint): Fix calculation of length field
+ for Z-packet.
+
+2002-08-15 Michael Snyder <msnyder@redhat.com>
+
+ * irix5-nat.c (supply_gregset): Allocate plenty-big buffer
+ (32 bytes) instead of using MAX_REGISTER_RAW_SIZE.
+ (supply_fpregset): Ditto.
+
+ * config/mips/tm-mips.h (REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE,
+ MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
+ (TARGET_READ_SP): Delete.
+ (DO_REGISTERS_INFO): Delete.
+ (FUNCTION_START_OFFSET, IN_SIGTRAMP, REGISTER_VIRTUAL_SIZE):
+ Delete.
+ (REGISTER_CONVERT_FROM_TYPE, REGISTER_CONVERT_TO_TYPE): Convert
+ from macros to functions.
+
+ * mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
+ (mips_register_convertible, mips_register_convert_to_virtual,
+ mips_register_convert_to_raw): Make static.
+ (mips_read_sp): New function.
+ (mips_gdbarch_init): Set gdbarch read_sp to mips_read_sp.
+ (mips_do_registers_info): Make static.
+ (mips_gdbarch_init): Insert mips_do_registers_info into gdbarch.
+ (in_sigtramp): Make static, rename to mips_pc_in_sigtramp.
+ (mips_register_convert_from_type, mips_register_convert_to_type):
+ New functions.
+ (mips_gdbarch_init): Set up function_start_offset,
+ register_virtual_size, pc_in_sigtramp.
+
+2002-08-15 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (vector_info): New function.
+ (_initialize_infcmd): Add command "info vector".
+ (print_vector_info): New function.
+
+ * gdbarch.sh (PRINT_VECTOR_INFO): New method
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-15 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (do_registers_info): Rename parameter ``fpregs'' to
+ ``print_all''. Only print vector registers when ``print_all''.
+
+2002-08-15 Andrew Cagney <ac131313@redhat.com>
+
+ * i387-tdep.h (i387_print_float_info): Add `args' parameter.
+ * i387-tdep.c (i387_print_float_info): Add `args' parameter.
+
+ * gdbarch.sh (PRINT_FLOAT_INFO): Change to a predicate method.
+ Add `args' parameter.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * arm-tdep.c (arm_print_float_info): Add the parameter `args'.
+
+ * infcmd.c (float_info): Call print_float_info.
+ (print_float_info): New function. By default, print the
+ floating-point registers.
+
+ * arch-utils.h (default_print_float_info): Delete declaration.
+ * arch-utils.c (default_print_float_info): Delete function.
+
+2002-08-16 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-i386v.h (FLOAT_INFO): Remove already commented
+ out define.
+
+ * i387-tdep.c (i387_print_float_info): Add comment about ignoring
+ FRAME.
+
+ * NEWS: Mention that the i[3456]-*-aix target has been made obsolete.
+ * configure.host: Make i[3456]86-*-aix host obsolete.
+ * configure.tgt: Make i[3456]86-*-aix target obsolete.
+ * config/i386/i386aix.mh, config/i386/i386aix.mt,
+ config/i386/nm-i386aix.h, condig/i386/tm-i386aix.h,
+ config/i386/xm-i386aix.h: Make files obsolete.
+ * i386aix-nat.c: Make file obsolete.
+ * Makefile.in (ALLDEPFILES): Remove i386aix-nat.c.
+ (i386aix-nat.o): Make target obsolete.
+
+ * config/i386/nm-gnu.h: Removed.
+ * config/i386/nm-i386gnu.h: New file.
+ (THREAD_STATE_FLAVOR, THREAD_STATE_SIZE,
+ THREAD_STATE_SET_TRACED, THREAD_STATE_CLEAR_STATE, ATTACH_DETACH):
+ Moved here from ...
+ * config/i386/tm-i386gnu.h: ... here. Removed.
+ * config/i386/xm-i386gnu.h: Removed.
+ * config/i386/i386gnu.mh (XM_FILE): Set to xm-i386.h.
+ (NAT_FILE): Set to nm-i386gnu.h.
+ * config/i386/i386gnu.mt (TDEPFILES): Add i386gnu-tdep.o.
+ * i386-tdep.c: New file.
+ * Makefile.in (ALLDEPFILES): Add i386gnu-nat.c and i386gnu-tdep.c.
+ (i386gnu-tdep.o): Specify dependencies.
+
+2002-08-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386sco5.h: Include "i386/tm-i386v4.h" instead of
+ "i386/tm-i386.h", "i386/tm-i386v.h" and "config/tm-sysv.h".
+ Adjust a few comments to reflect reality a bit closer.
+ (KERNEL_U_SIZE, TARGET_HAS_HARDWARE_WATCHPOINTS,
+ TARGET_CAN_USE_HARDWARE_WATCHPOINT, HAVE_CONTINUEABLE_WATCHPOINT,
+ HAVE_STEPPABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT,
+ target_insert_watchpoint, target_remove_watchpoint):
+ Move defines to ...
+ * config/i386/nm-i386sco5.h: ... here.
+ (kernel_u_size): Add prototype. Improve a few comments and add
+ protection against multiple inclusion.
+
+ * config/i386/nm-i386sco.h (FLOAT_INFO): Remove already commented
+ out define.
+
+ * uw-thread.c (SP_ARG0): Define if not already defined.
+ * config/i386/tm-i386.h (SO_ARG0): Remove define.
+
+ * config/i386/tm-i386v4.h (HAVE_I387_REGS): Remove define.
+
+ * config/i386/tm-i386.h: Don't include "regcache.h".
+
+ * i387-tdep.h (i387_print_float_info): New prototype.
+ * i387-tdep.c (print_i387_value, print_i387_ext,
+ print_i387_status_word, print_i387_control_word): Add `struct
+ ui_file *' argument and use it for output.
+ (i387_print_float_info): Renamed from i387_float_info. Add
+ `struct gdbarch *' and `struct ui_file *' arguments and use the
+ latter for output.
+ * i386-tdep.c: Include "i387-tdep.h".
+ (i386_gdbarch_init): Set print_float_info.
+ * config/i386/tm-i386.h (i387_float_info): Remove prototype.
+ (FLOAT_INFO): Remove define.
+
+2002-08-13 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_push_arguments): Rename to
+ mips_eabi_push_arguments, and tune for EABI.
+ (MIPS_REGS_HAVE_HOME_P): Delete.
+ (struct gdbarch_tdep): Remove mips_regs_have_home_p field.
+ (mips_gdbarch_init): Set gdbarch push_arguments for eabi.
+ Delete references to mips_regs_have_home_p.
+
+2002-08-14 Keith Seitz <keiths@redhat.com>
+
+ * Makefile.in (install-gdbtk): Create insight plugin directory.
+ Install plugins.tcl file.
+
+2002-08-14 Keith Seitz <keiths@redhat.com>
+
+ * configure.in: Move SUBDIRS to near top of the file so that
+ --enable options may add things to it.
+ If gdbtk is enabled, add gdbtk directory to SUBDIRS and configdirs.
+ * configure: Regenerate.
+
+2002-08-13 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_o32o64_push_arguments): New function,
+ cloned from mips_push_arguments, tuned for o32/o64 ABI.
+ (mips_gdbarch_init): Set gdbarch_push_arguments to new func.
+
+2002-08-13 Andrew Cagney <ac131313@redhat.com>
+
+ * vax-tdep.c (vax_get_saved_register): Delete function.
+ (vax_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_get_saved_register): Delete function.
+ (ns32k_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_get_saved_register): Delete function.
+ (alpha_gdbarch_init): Update.
+
+2002-08-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (init_regcache_descr): Overallocate the
+ raw_register_valid_p array including space for NUM_PSEUDO_REGS.
+ (registers_changed): Replace NUM_REGS+NUM_PSEUDO_REGS with
+ nr_raw_registers.
+ (set_register_cached): Add range checking assertions. Use
+ current_regcache.
+
+2002-08-13 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_stab_reg_to_regnum): Return correct register
+ numbers for MMX registers.
+
+2002-08-13 Andrew Cagney <cagney@redhat.com>
+
+ * i386-tdep.c (i386_gdbarch_init): Use
+ generic_unwind_get_saved_register.
+
+2002-08-13 Kevin Buettner <kevinb@redhat.com>
+
+ * procfs.c (procfs_can_use_hw_breakpoint): New function.
+ (init_procfs_ops): Define ``to_can_use_hw_breakpoint'' for procfs
+ target vector.
+ * config/mips/nm-irix5.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT):
+ Delete. Add comment regarding this now-deleted target method.
+
+2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (M68HC12_NUM_PSEUDO_REGS): New define.
+ (M68HC12_HARD_PC_REGNUM): Define specific PC for 68HC12 (pseudo reg).
+ (m68hc11_pseudo_register_read): Compute the 68HC12 PC using the
+ real PC and the page number (if it's within the memory bank window).
+ (m68hc11_pseudo_register_write): Likewise when saving.
+ (m68hc11_register_name): Name the virtual pc 'pc' and the real one ppc.
+ (m68hc11_register_virtual_type): Return uint32 for virtual pc.
+ (m68hc11_register_raw_size): And use 32-bit for it.
+ (m68hc11_gdbarch_init): Use 32-bit address for 68HC12 if the
+ 16K memory bank is used by the prog; also use the virtual pc.
+
+2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (m68hc11_elf_make_msymbol_special): New function.
+ (m68hc11_gdbarch_init): Install it in gdbarch.
+ (MSYMBOL_SET_RTC, MSYMBOL_SET_RTI): New to set symbol specific flags.
+ (MSYMBOL_IS_RTC, MSYMBOL_IS_RTI): New to test these flags.
+ (MSYMBOL_SIZE): New for documentation.
+ (insn_return_kind): Enum to specify how a function returns.
+ (frame_extra_info): Cleanup and record the return mode.
+ (gdbarch_tdep, USE_PAGE_REGISTER): New to control the use of page
+ register in address computation.
+ (m68hc11_get_return_insn): New to obtain the return instruction used
+ by the function.
+ (m68hc11_frame_init_saved_regs): Take into account the return
+ instruction used by the function for far and interrupt functions.
+ (m68hc11_init_extra_frame_info): Take into account page register.
+ (m68hc11_frame_args_address): Adjust according to the return mode.
+ (show_regs): Print page register only when it's used.
+
+2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (HARD_PAGE_REGNUM): Define for 68HC12 page register.
+ (M68HC11_LAST_HARD_REG, m68hc11_register_names): Update.
+ (m68hc11_register_virtual_type): Return a 8-bit type for 8-bit
+ registers.
+ (m68hc11_register_raw_size): Likewise.
+
+2002-08-13 Andrew Cagney <cagney@redhat.com>
+
+ * i386-tdep.c (i386_register_name): Handle mmx registers.
+ (mmx_regnum_p): New function.
+ (i386_mmx_names): New array.
+ (mmx_num_regs): New variable.
+ (i386_pseudo_register_read): New function.
+ (i386_pseudo_register_write): New function.
+ (mmx_regnum_to_fp_regnum): New function. Code from Fernando Nasser.
+
+ * regcache.c (regcache_raw_read_unsigned): New function.
+ (regcache_raw_read_signed): New function.
+ * regcache.h (regcache_raw_read_unsigned): Declare.
+ (regcache_raw_read_signed): Declare.
+
+2002-08-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (regcache_raw_read_as_address): Delete function.
+ (regcache_cooked_read_signed): New function.
+ (regcache_cooked_read_unsigned): New function.
+ * regcache.h (regcache_cooked_read_signed): Declare.
+ (regcache_cooked_read_unsigned): Declare.
+ (regcache_raw_read_as_address): Delete declaration.
+
+ * blockframe.c (generic_read_register_dummy): Use
+ regcache_cooked_read_unsigned.
+ * i386-tdep.c (i386_extract_struct_value_address): Use
+ regcache_cooked_read_unsigned.
+
+2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Set int, double and long
+ double sizes according to ELF ABI flags.
+ (gdbarch_tdep): Record elf_flags.
+
+2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (M6812_OP_PSHX, M6812_OP_PSHY): New defines.
+ (m6812_prolog): They can appear in 68HC12 function prologue.
+ (m68hc11_frame_chain): Cleanup.
+
+2002-08-12 Andrew Cagney <cagney@redhat.com>
+
+ * i386-tdep.h (i386_register_byte, i386_register_raw_size): Delete
+ declarations.
+ * i386-linux-tdep.c (i386_linux_register_byte): Delete function.
+ (i386_linux_register_raw_size): Delete function.
+ (i386_linux_init_abi): Update.
+ * i386-tdep.c (i386_register_raw_size): Delete function.
+ (i386_register_byte): Delete function.
+ (i386_gdbarch_init): Update.
+ (i386_register_size): Delete array.
+ (i386_register_offset): Delete array.
+
+ * config/i386/tm-symmetry.h (REGISTER_BYTE): Delete macro.
+ (REGISTER_RAW_SIZE): Delete macro.
+ * config/i386/tm-ptx.h (REGISTER_RAW_SIZE): Delete macro.
+ (REGISTER_BYTE): Delete macro.
+
+2002-08-11 Aidan Skinner <aidan@velvet.net>
+
+ * ada-lang.c (ada_lookup_partial_symbol)
+ (to_fixed_variant_branch_type) (find_line_in_linetable): Fix
+ prototype names so that grep ^func works properly.
+
+ * ada-lang.c (ada_array_element_type)
+ (ada_lookup_partial_symbol): Fix typos in parameter list.
+
+ * ada-valprint.c (val_print_packed_array_elements) (ada_val_print_1):
+ Fix prototype names so that grep ^func works properly.
+
+2002-08-10 Andrew Cagney <cagney@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Martin M. Hunt <hunt@redhat.com>
+
+ * gdbtypes.c (build_builtin_type_vec128): Set the vector bit.
+ (build_builtin_type_vec128i): Set the vector bit.
+ * gdbtypes.h (builtin_type_vec64, builtin_type_vec64i): Declare.
+ * gdbtypes.c (builtin_type_vec64, builtin_type_vec64i): Define.
+ (build_builtin_type_vec64): New function.
+ (build_builtin_type_vec64i): New function.
+ (build_gdbtypes): Initialize builtin_type_vec64 and
+ builtin_type_vec64i.
+
+2002-08-09 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (regcache_dump): Compare the register offset
+ with REGISTER_BYTE.
+ * arch-utils.c (generic_register_byte): New function.
+ * arch-utils.h (generic_register_byte): Declare.
+ * gdbarch.sh (REGISTER_BYTE): Default to generic_register_byte.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-09 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c: Include "gdbcmd.h"
+ (_initialize_regcache): Add commands "maintenance print
+ registers", "maintenance print raw-registers" and "maintenance
+ print cooked-registers".
+ (enum regcache_dump_what): Define.
+ (dump_endian_bytes): New function.
+ (regcache_dump): New function.
+ (regcache_print): New function.
+ (maintenance_print_registers): New function.
+ (maintenance_print_raw_registers): New function.
+ (maintenance_print_cooked_registers): New function.
+ * Makefile.in (regcache.o): Update dependencies.
+
+2002-08-09 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (ROUND_DOWN, ROUND_UP): Move to global scope.
+ (mips_push_arguments): Correct some comments. Use paddr_nz
+ for printing addresses in debug output. Replace static
+ allocation using MAX_REGISTER_RAW_SIZE with alloca.
+ (mips_n32n64_push_arguments): New function, cloned from
+ mips_push_arguments and tuned for the n32/n64 ABI.
+ (mips_push_register): Buffer needs dynamic allocation.
+ (mips_print_register): Ditto.
+ (do_gp_register_row): Ditto.
+ (mips_store_return_value): Ditto.
+ (mips_gdbarch_init): Set gdbarch_push_arguments per ABI.
+
+2002-08-09 Don Howard <dhoward@redhat.com>
+
+ * memattr.c (mem_info_command): Print special case of upper bound
+ as max CORE_ADDR + 1.
+
+2002-08-08 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_n32n64_use_struct_convention): N32 only
+ returns structs by ref if they're too big to fit in two registers.
+
+2002-08-09 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's
+ saved regs value.
+ (read_next_frame_reg): Call FRAME_INIT_SAVED_REGS instead of
+ mips_find_saved_regs().
+ (mips_pop_frame): Likewise.
+
+2002-08-09 Kevin Buettner <kevinb@redhat.com>
+
+ * blockframe.c (frame_saved_regs_register_unwind): Revise
+ PC_IN_CALL_DUMMY assertion to only apply when generic dummy
+ frames are in use.
+
+2002-08-09 Grace Sainsbury <graces@redhat.com>
+
+ * remote.c: (remote_wait, remote_async_wait): Add check for awatch
+ T-packets; the 'a' is not taken as a register number.
+ (remote_check_watch_resources, remote_stopped_by_watchpoint)
+ (remote_stopped_data_address): New functions; add to target
+ vector.
+ (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Change
+ prototypes to match other implementations of this
+ function. replace integer argument with pointer -- the length
+ field in the Z-packet is the length of what is pointed to or 1 if
+ pointer is null. Add to target vector.
+ (remote_insert_watchpoint, remote_remove_watchpoint): Add to
+ target vector.
+
+ From Mark Salter:
+ * remote.c (remote_wait): Add support to extract optional
+ watchpoint information from T-packet. Ignore unrecognized
+ optional info in T-packet.
+ (remote_async_wait): Ditto.
+
+2002-08-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * cli/cli-dump.c: Change fopen modes to use binary open modes
+ as defined in include/fopen-bin.h throughout.
+
+2002-08-08 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c: Minor whitespace and indentation clean-ups.
+
+2002-08-08 Kevin Buettner <kevinb@redhat.com>
+
+ * doublest.c (store_floating): Avoid floatformat_from_doublest()
+ assertion failure by returning early after a warning.
+
+2002-08-08 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_find_saved_regs): Make static.
+ (mips_frame_init_saved_regs): New function.
+ (mips_gdbarch_init): Setup FRAME_INIT_SAVED_REGS method.
+ * config/mips/tm-mips.h (FRAME_INIT_SAVED_REGS): Delete macro.
+ (mips_find_saved_regs): Delete declaration.
+
+2002-08-08 Grace Sainsbury <graces@redhat.com>
+
+ * remote.c (remote_wait, remote_async_wait): Change
+ thread_num from int to ULONGEST.
+ (unpack_varlen_hex): Change result parameter from
+ int * to ULONGEST *.
+
+2002-08-08 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.tgt: Replace powerpc-*-sysv*, powerpc-*-elf*,
+ powerpcle-*-eabi*, powerpcle-*-sysv* and powerpcle-*-elf* with
+ powerpc*-*-*.
+ * MAINTAINERS: Remove redundant rs6000-ibm-aix4.1 target.
+
+2002-08-08 Andrew Cagney <cagney@redhat.com>
+
+ * gcore.c (override_derive_stack_segment): Delete variable.
+ (preempt_derive_stack_segment): Delete function.
+ (derive_stack_segment): Delete function.
+ (default_derive_stack_segment): Renamed to derive_stack_segment.
+ (override_derive_heap_segment): Delete variable.
+ (preempt_derive_heap_segment): Delete function.
+ (derive_heap_segment): Delete function.
+ (default_derive_heap_segment): Rename to derive_heap_segment.
+
+2002-08-06 Michael Snyder <msnyder@redhat.com>
+
+ * config/mips/tm-mips.h: Remove #define USE_STRUCT_CONVENTION.
+ * mips-tdep.c (mips_EABI_use_struct_convention,
+ mips_OABI_use_struct_convention, mips_NABI_use_struct_convention):
+ New functions. (mips_use_struct_convention): Delete.
+ (mips_gdbarch_init): set use_gdbarch_convention.
+
+2002-08-06 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c: gdbarch-ify reg_struct_has_addr.
+ (mips_eabi_reg_struct_has_addr, mips_n32n64_reg_struct_has_addr,
+ mips_o32_reg_struct_has_addr): New functions.
+ (mips_gdbarch_init): Set gdbarch reg_struct_has_addr.
+
+2002-08-07 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (pseudo_register): Delete function.
+ (fetch_register): Delete function.
+ (store_register): Delete function.
+ (regcache_raw_read, legacy_read_register_gen): Use
+ target_fetch_registers instead of fetch_register.
+ (legacy_write_register_gen, regcache_raw_write): Use
+ target_store_register instead of store_register.
+ (write_register_bytes): Ditto.
+
+ * gdbarch.sh (FETCH_PSEUDO_REGISTER): Delete.
+ (STORE_PSEUDO_REGISTER): Delete.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-06 Corinna Vinschen <vinschen@redhat.com>
+
+ * cli/cli-dump.c (add_dump_command): Explicitely use "b" flag to
+ write dump file binary.
+
+2002-08-05 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_find_saved_regs): Adjust stack according
+ to MIPS_SAVED_REGSIZE, not GDB_TARGET_IS_MIPS64. Enhance comment.
+ (mips_gdbarch_init): Set N32 target to be mips64.
+
+2002-08-06 Kevin Buettner <kevinb@redhat.com>
+
+ * frame.c (find_saved_register): Break out of loop once saved
+ register address is found. Don't mention sparc in loop comment
+ anymore.
+
+2002-08-06 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): For the N32 ABI, set
+ mips_default_saved_regsize to 8.
+
+2002-08-06 Andrew Cagney <ac131313@redhat.com>
+
+ * gcore.c: Do not include <sys/procfs.h>.
+ * Makefile.in (gcore.o): Update dependencies.
+
+2002-08-06 Andrew Cagney <cagney@redhat.com>
+
+ * configure.tgt: Make arc-*-* obsolete.
+ * NEWS: Mention that arc-*-* has been identifed as obsolete.
+ * MAINTAINERS: Make arc-elf obsolete.
+ * arc-tdep.c: Make file obsolete.
+ * config/arc/arc.mt: Ditto.
+ * config/arc/tm-arc.h: Ditto.
+
+2002-08-05 Theodore A. Roth <troth@verinet.com>
+
+ * avr-tdep.c (avr_skip_prologue): Fix to return the correct pc.
+
+2002-08-05 Andrew Cagney <ac131313@redhat.com>
+
+ * mcore-tdep.c (mcore_gdbarch_init): Use
+ generic_unwind_get_saved_register instead of
+ generic_get_saved_register.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Ditto.
+ * config/h8300/tm-h8300.h (GET_SAVED_REGISTER): Ditto.
+
+2002-08-05 Joel Brobecker <brobecker@gnat.com>
+
+ * objfiles.h: Add missing #include "symfile.h"
+
+ * Makefile.in (objfiles_h): Add dependency on symfile.h and dependents.
+
+2002-08-04 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-08-01 david carlton <carlton@math.stanford.edu>:
+ * hpread.c (hpread_read_struct_type): Deleted superfluous setting
+ of FIELD_BITSIZE.
+
+2002-08-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Cleanup and nitpick.
+
+2002-08-03 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Cleanup. Use *-linux*-gnu*. Only use `*' for headings.
+
+2002-08-03 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (gdbtk-bp.o): Update dependencies.
+ (gdbtk-register.o): Ditto.
+ (gdbtk-varobj.o): Ditto.
+
+2002-08-03 Andrew Cagney <cagney@redhat.com>
+
+ * m68hc11-tdep.c (m68hc11_pseudo_register_read): Replace
+ m68hc11_fetch_pseudo_register.
+ (m68hc11_pseudo_register_write): Replace
+ m68hc11_store_pseudo_register.
+ (m68hc11_gdbarch_init): Update.
+
+Fri Aug 2 15:53:50 2002 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Include "gdb_string.h".
+ * gdbarch.c: Regenerate.
+
+ * regcache.c: Include "gdb_string.h".
+ * ax-general.c: Ditto.
+ * varobj.c: Ditto.
+ * std-regs.c: Ditto.
+ * fbsd-proc.c: Ditto.
+ * thread.c: Ditto.
+
+ * Makefile.in (regcache.o): Update dependencies.
+ (thread.o, gdbarch.o): Ditto.
+ (ax-general.o, gdbarch.o): Ditto.
+ (varobj.o, std-regs.o): Ditto.
+ (fbsd-proc.o): Specify dependencies.
+
+2002-08-02 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (regcache_cooked_read): Rename rawnum parameter to
+ regnum.
+ (regcache_cooked_write): Ditto.
+
+2002-08-02 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (regcache_cooked_read): New function.
+ (regcache_cooked_write): New function.
+ (read_register_gen): Rewrite using regcache_cooked_read.
+ (write_register_gen): Rewrite using regcache_cooked_write.
+
+ * regcache.h (regcache_cooked_read, regcache_cooked_write):
+ Declare.
+
+2002-08-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (pseudo_register_read, pseudo_register_write):
+ Replace the architecture methods register_read and register_write.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * regcache.c (init_regcache_descr): Update.
+ (read_register_gen): Update.
+ (write_register_gen): Update.
+ (supply_register): Update comment.
+
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ (sh_pseudo_register_read, sh64_pseudo_register_read): Add
+ `regcache' and `gdbarch' parameters. Make `buffer' a void
+ pointer. Update code.
+ (sh_pseudo_register_write, sh64_pseudo_register_write): Add
+ `regcache' and `gdbarch' parameters. Make `buffer' a constant
+ void pointer. Update code.
+ (sh64_register_write): Delete.
+ (sh4_register_read): Delete.
+ (sh64_register_read): Delete.
+ (sh4_register_write): Delete.
+ (sh_sh4_register_convert_to_raw): Make `from' parameter a constant
+ void pointer, `to' parameter a void pointer.
+ (sh_sh64_register_convert_to_raw): Ditto.
+
+2002-08-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_register_virtual_type): Use architecture
+ invariant return values.
+
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * linux-proc.c: Include "gdb_string.h".
+ * Makefile.in (linux-proc.o): Update dependency list.
+
+2002-08-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Add comments. Fix typo in
+ comment.
+
+2002-08-01 Grace Sainsbury <graces@redhat.com>
+
+ * target.h: Add to_insert_hw_breakpoint, to_remove_hw_breakpoint,
+ to_insert_watchpoint, to_remove_watchpoint,
+ to_stopped_by_watchpoint, to_stopped_data_address,
+ to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint to
+ target vecctor. Define their corresponding macros so they call
+ them.
+
+ * target.c: Add default and debug versions of for
+ to_insert_hw_breakpoint, to_remove_hw_breakpoint,
+ to_insert_watchpoint, to_remove_watchpoint,
+ to_stopped_by_watchpoint, to_stopped_data_address,
+ to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint.
+
+2002-08-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_register_virtual_type): New function.
+ (mips_gdbarch_init): Register mips_register_virtual_type()
+ with gdbarch machinery.
+ * config/mips/tm-irix6.h (mips/tm-bigmips64.h): Include
+ this file instead of tm-bigmips.h.
+ (MIPS_REGSIZE): Delete this macro.
+ (REGISTER_VIRTUAL_TYPE): Delete macro. Undef macro so that
+ multiarch version in mips-tdep.c will be found.
+
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Menion that CHILL has been made obsolete.
+
+ * gdbtypes.c (chill_varying_type): Make chill references obsolete.
+ * stabsread.c (read_range_type): Ditto.
+ * gdbtypes.h: Ditto.
+ * language.c (binop_type_check): Ditto.
+ (binop_result_type): Ditto.
+ (integral_type): Ditto.
+ (character_type): Ditto.
+ (string_type): Ditto.
+ (boolean_type): Ditto.
+ (structured_type): Ditto.
+ (lang_bool_type): Ditto.
+ (binop_type_check): Ditto.
+ * language.h (_LANG_chill): Ditto.
+ * dwarfread.c (set_cu_language): Ditto.
+ * dwarfread.c (CHILL_PRODUCER): Ditto.
+ * dwarfread.c (handle_producer): Ditto.
+ * expression.h (enum exp_opcode): Ditto.
+ * eval.c: Ditto for comments.
+ * typeprint.c (typedef_print) [_LANG_chill]: Ditto.
+ * expprint.c (print_subexp): Ditto.
+ (print_subexp): Ditto.
+ * valops.c (value_cast): Ditto.
+ (search_struct_field): Ditto.
+ * value.h (COERCE_VARYING_ARRAY): Ditto.
+ * symfile.c (init_filename_language_table): Ditto.
+ (add_psymbol_with_dem_name_to_list): Ditto.
+ * valarith.c (value_binop): Ditto.
+ (value_neg): Ditto.
+ * valops.c (value_slice): Ditto.
+ * symtab.h (union language_specific): Ditto.
+ (SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
+ (SYMBOL_DEMANGLED_NAME): Ditto.
+ (SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
+ * defs.h (enum language): Ditto.
+ * symtab.c (got_symtab): Ditto.
+ * utils.c (fprintf_symbol_filtered): Ditto.
+
+ * ch-typeprint.c: Make file obsolete.
+ * ch-valprint.c: Make file obsolete.
+ * ch-lang.h: Make file obsolete.
+ * ch-exp.c: Make file obsolete.
+ * ch-lang.c: Make file obsolete.
+
+ * Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
+ CHILL_LIB.
+ (TARGET_FLAGS_TO_PASS): Ditto.
+ (CHILLFLAGS): Obsolete.
+ (CHILL): Obsolete.
+ (CHILL_FOR_TARGET): Obsolete.
+ (CHILL_LIB): Obsolete.
+ (SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
+ ch-valprint.c.
+ (HFILES_NO_SRCDIR): Remove ch-lang.h.
+ (COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
+ ch-lang.o.
+ (ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
+ targets.
+
+2002-07-31 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (set_cu_language): Add handler for LANG_Ada95.
+ This does not change anything at the moment, but will be helpful
+ later when full Ada support is integrated.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (_initialize_mips_tdep): Add "n64" to "set mips abi"
+ help message.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_push_arguments): Fetch gdbarch_tdep struct
+ and save it in a local variable. Use variable in later test.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_find_abi_section): Add N64 ABI recognition
+ test. (Thanks to Daniel Jacobowitz.)
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (enum mips_abi): Add MIPS_ABI_N64.
+ (mips_abi_strings): Add "n64".
+ (mips_gdbarch_init): Add test for n64 abi. Add MIPS_ABI_N64 case.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * config/mips/tm-irix6.h (MIPS_REGSIZE): Define to be 8.
+ (REGISTER_VIRTUAL_TYPE): Some registers are now 64 bits wide.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * utils.c (host_pointer_to_address, address_to_host_pointer):
+ Use gdb_assert() instead of explicit call to internal_error().
+
+2002-07-30 Kevin Buettner <kevinb@redhat.com>
+
+ * Makefile.in (rs6000-nat.o): Update dependencies.
+
+ From Nicholas Duffek:
+ * Makefile.in (ALLDEPFILES): Add aix-thread.c.
+ (aix-thread.o): New rule.
+ * configure.host (gdb_host): Set to aix432 on AIX 4.3.2+.
+ * config/powerpc/aix432.mh: New file.
+
+2002-07-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * ppc-linux-tdep.c (ELF_NGREG, ELF_NFPREG, ELF_NVRREG)
+ (ELF_FPREGSET_SIZE, ELF_GREGSET_SIZE): New enums.
+ (fetch_core_registers, ppc_linux_supply_gregset)
+ (ppc_linux_supply_fpregset): New functions.
+ (ppc_linux_regset_core_fns): New.
+ (_initialize_ppc_linux_tdep): Call add_core_fns.
+ * ppc-tdep.h: Add prototypes for ppc_linux_supply_fpregset
+ and ppc_linux_supply_gregset.
+ * ppc-linux-nat.c (supply_gregset): Call ppc_linux_supply_gregset.
+ (supply_fpregset): Call ppc_linux_supply_fpregset.
+ * config/powerpc/linux.mh (NATDEPFILES): Remove core-regset.o and
+ corelow.o.
+ * config/powerpc/linux.mt (TDEPFILES): Add corelow.o.
+
+2002-07-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.c (lookup_symbol): Demangle before lowercasing.
+
+2002-07-30 Andrew Cagney <ac131313@redhat.com>
+
+ * symtab.h: Replace #include "gdb_obstack.h" with opaque
+ declaration.
+ * cli/cli-cmds.c, cli/cli-script.c: Include "gdb_string.h".
+ * gnu-v3-abi.c, arc-tdep.c, cli/cli-decode.c: Ditto.
+ * avr-tdep.c, mon960-rom.c, i960-tdep.c: Ditto.
+ * arch-utils.c, cli/cli-setshow.c: Unconditionally include
+ "gdb_string.h".
+ * Makefile.in (cli-script.o, cli-cmds.o): Update dependencies.
+ (gnu-v3-abi.o, cli-setshow.o, i960-tdep.o): Ditto.
+ (cli-decode.o, mi-cmd-var.o, mi-cmd-disas.o): Ditto.
+ (avr-tdep.o, mon960-rom.o): Ditto.
+ (aout_stabs_gnu_h): Define.
+ (symtab_h): Remove $(gdb_obstack_h).
+
+2002-07-30 Jim Blandy <jimb@redhat.com>
+
+ Patch from David Carlton <carlton@math.stanford.edu>:
+ * gdbinit.in: Move the `dir' commands that add GDB's own source
+ directory to the search path to the end, so that the `gdb' source
+ directory will be searched first.
+
+2002-07-29 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_obstack.h: New file.
+ * symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
+ (obstack_chunk_alloc, obstack_chunk_free): Delete macros.
+ * objfiles.h: Include "gdb_obstack.h".
+ * Makefile.in (gdb_obstack_h): Define.
+ (symtab_h): Add $(gdb_obstack_h).
+ (objfiles_h): Add $(gdb_obstack_h).
+
+ * objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
+ * macrotab.c, cp-valprint.c, dbxread.c: Ditto.
+ * ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
+ * macroexp.c, p-typeprint.c, stabsread.c: Ditto.
+ * symtab.c, f-typeprint.c, mdebugread.c: Ditto.
+ * p-valprint.c, symmisc.c, typeprint.c: Ditto.
+ * symfile.c, coffread.c, c-typeprint.c: Ditto.
+ * buildsym.c, bcache.c, ada-typeprint.c: Ditto.
+
+ * Makefile.in (bcache.o): Update dependencies.
+ (buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
+ (ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
+ (dbxread.o, dstread.o, f-typeprint.o): Ditto.
+ (objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
+ (stabsread.o, symfile.o, symmisc.o): Ditto.
+ (symtab.o, typeprint.o, macroexp.o): Ditto.
+ (macrotab.o, mdebugread.o): Ditto.
+ (f_lang_h, coff_sym_h, coff_symconst_h): Define.
+ (coff_ecoff_h, aout_aout64_h): Define.
+ (aout_stabs_gnu_h, libaout_h): Define.
+
+2002-07-29 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (struct regcache_descr): Rename nr_registers to
+ nr_cooked_registers. Revise comments describing the structure
+ member fields.
+ (init_regcache_descr): Update.
+ (init_legacy_regcache_descr): Update.
+ (read_register_gen, write_register_gen): When a cooked register in
+ the raw register range, directly access the value from the raw
+ register cache.
+
+2002-07-29 Andrew Cagney <ac131313@redhat.com>
+
+ * z8k-tdep.c: Do not include "obstack.h".
+ * h8300-tdep.c, h8500-tdep.c: Ditto.
+ * m68hc11-tdep.c, sh-tdep.c: Ditto.
+ * valprint.c, v850-tdep.c: Ditto.
+ * d10v-tdep.c, mn10300-tdep.c: Ditto.
+ * mn10200-tdep.c: Ditto.
+
+ * Makefile.in (z8k-tdep.o): Update dependencies.
+ (m68hc11-tdep.o, valprint.o): Ditto.
+ (v850-tdep.o, d10v-tdep.o): Ditto.
+ (mn10300-tdep.o, sparc-tdep.o): Ditto.
+ (sh-tdep.o, h8500-tdep.o, h8300-tdep.o): Ditto.
+ (m32r-tdep.o, mn10200-tdep.o): Specify dependencies.
+ (sh_opc_h, gdb_sim_sh_h): Define.
+ (elf_sh_h, elf_bfd_h): Define.
+ (opcode_m68hc11_h): Define.
+ (OPCODES_SRC, OPCODES_DIR): define.
+ (OPCODES): Use $(OPCODES_DIR).
+ (gdb_sim_d10v_h): Rename sim_d10v_h.
+ (gdb_sim_arm_h): Rename sim_arm_h.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * utils.c (host_pointer_to_address, address_to_host_pointer):
+ Change internal_error() message to indicate function responsible
+ for the error.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * ui-out.c (ui_out_field_core_addr): Remove unnecessary cast in
+ calls to local_hex_string_custom().
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * irix5-nat.c: Move IRIX shared library support from here...
+ * solib-irix.c: ...to here. Revised substantially to work with
+ generic solib framework.
+
+ * osabi.h (gdb_osabi): Add new enum constant GDB_OSABI_IRIX.
+ * osabi.c (gdb_osabi_names): Add corresponding string for Irix.
+ * mips-irix-tdep.c: New file.
+
+ * Makefile.in (ALLDEPFILES): Add mips-irix-tdep.c and solib-irix.c.
+ (mips-irix-tdep.o, solib-irix.o): New rules.
+ * config/mips/irix5.mt (TDEPFILES): Add mips-irix-tdep.o, solib.o,
+ solib-irix.o.
+ * config/mips/irix6.mt (TDEPFILES): Likewise.
+ * config/mips/irix6.mh (NATDEPFILES): Remove solib.o.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (coff/internal.h, bfd/libcoff.h, pthread.h): Remove
+ disabled (via ``#if 0'') includes.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
+ (fetch_regs_user_thread, fetch_regs_kernel_thread, fill_sprs64)
+ (fill_sprs32, store_regs_user_thread, store_regs_kernel_thread):
+ Add support for the fpscr register.
+ * rs6000-nat.c (regmap, fetch_inferior_registers)
+ (store_inferior_registers, fetch_core_registers): Likewise.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-nat.c (language.h): Include.
+ (special_regs): Delete this array.
+ (regmap): New function.
+ (fetch_register, store_register): Use regmap() to map gdb
+ register numbers to ptrace register numbers. Also, use
+ outputs from regmap() to make decisions regarding type of
+ ptrace() call to make. In particular, don't compare against
+ FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
+ (fetch_inferior_registers, store_inferior_registers): Where
+ possible, obtain register numbers from tdep struct. Don't
+ refer to FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
+ * config/rs6000/tm-rs6000.h (FIRST_UISA_SP_REGNUM)
+ (LAST_UISA_SP_REGNUM): Delete.
+
+2002-07-25 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-nat.c (ppc-tdep.h): Include.
+ (fetch_registers, store_register, fetch_core_registers): Don't
+ access registers[] directly. Instead, use supply_register() or
+ regcache_collect() as appropriate.
+ (find_toc_address): Format hex address with local_hex_string().
+
+2002-07-25 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Rename bfd/elf32-fr30.c and
+ bfd/elf32-frv.c.
+
+2002-07-24 Tom Tromey <tromey@redhat.com>
+
+ * jv-exp.y: Marked all strings with _().
+ (ClassInstanceCreationExpression, ArrayCreationExpression): Use
+ internal_error.
+ (MethodInvocation, CastExpression, parse_number, yyerror,
+ java_type_from_name, push_expression_name, yylex): Typo fixes.
+
+2002-07-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * ui-file.c (struct tee_file, tee_file_new, tee_file_delete)
+ (tee_file_flush, tee_file_write, tee_file_fputs)
+ (tee_file_isatty): New.
+ * ui-file.h (tee_file_new): Add prototype.
+
+2002-07-24 Aidan Skinner <aidan@velvet.net>
+
+ * ada-lang.c: Change k&r style function definitions to prototyped
+ form.
+ * ada-typeprint.c: Change k&r style function definitions to prototyped
+ form.
+ * ada-valprint.c: Change k&r style function definitions to prototyped
+ form.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * README: Remove reference to remote-bug.
+ * Makefile.in (ALLDEPFILES): Remove m88k-nat.c, m88k-tdep.c and
+ remote-bug.c.
+ (m88k-nat.o): Delete rule.
+ (m88k-tdep.o): Delete rule.
+ (remote-bug.o): Delete rule.
+ * MAINTAINERS: Mark as obsolete.
+ * elfread.c (elf_symtab_read): Mention that m88k is obsolete.
+ * m88k-tdep.c: Make file obsolete.
+ * config/m88k/m88k.mh: Ditto.
+ * config/m88k/delta88v4.mh: Ditto.
+ * config/m88k/delta88v4.mt: Ditto.
+ * config/m88k/delta88.mt: Ditto.
+ * config/m88k/delta88.mh: Ditto.
+ * remote-bug.c: Ditto.
+ * config/m88k/tm-delta88.h: Ditto.
+ * config/m88k/nm-delta88v4.h: Ditto.
+ * config/m88k/xm-delta88.h: Ditto.
+ * config/m88k/xm-dgux.h: Ditto.
+ * config/m88k/tm-m88k.h: Ditto.
+ * config/m88k/nm-m88k.h: Ditto.
+ * config/m88k/tm-delta88v4.h: Ditto.
+ * m88k-nat.c: Ditto.
+ * cxux-nat.c: Ditto.
+ * configure.host: Make m88*-motorola-sysv4*, m88*-motorola-sysv*
+ and m88*-*-* obsolete.
+ * configure.tgt: Make m88*-motorola-sysv4*, m88*-motorola-* and
+ m88*-*-* obsolete.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * findvar.c (extract_unsigned_integer): Make `addr' parameter
+ constant. Same for local pointer variables.
+ (extract_signed_integer): Ditto.
+ * defs.h (extract_unsigned_integer): Update.
+ (extract_signed_integer): Update.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (regcache_raw_write): Change buf parameter to a
+ constant void pointer.
+ (regcache_raw_read): Change buf parameter to a void pointer.
+ (legacy_write_register_gen): Change myaddr parameter a constant
+ void pointer.
+ (supply_register): Change val parameter to a const void pointer.
+ * regcache.h (regcache_raw_write): Update declaration.
+ (regcache_raw_read): Update declaration.
+ (supply_register): Update declaration.
+
+2002-07-24 Tom Tromey <tromey@redhat.com>
+
+ * defs.h (gdb_readline_wrapper): Declare.
+ * utils.c (prompt_for_continue): Use gdb_readline_wrapper.
+ * tracepoint.c (read_actions): Use gdb_readline_wrapper.
+ * top.c (gdb_readline_wrapper): New function.
+ (command_line_input): Use it.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (regcache_raw_read, regcache_raw_write): Replace
+ regcache_read and regcache_write.
+ (regcache_raw_read_as_address): Replace regcache_read_as_address.
+ * regcache.c: Update.
+ * sh-tdep.c (sh64_push_arguments): Update comment.
+ (sh_pseudo_register_read): Update.
+ (sh_pseudo_register_write): Update.
+ (sh4_register_read): Update.
+ (sh4_register_write): Update.
+ (sh64_pseudo_register_read): Update.
+ (sh64_pseudo_register_write): Update.
+ (sh64_register_read): Update.
+ (sh64_register_write): Update.
+ * i386-tdep.c (i386_extract_return_value): Update.
+ (i386_extract_struct_value_address): Update.
+ (i386_extract_return_value): Update.
+ * blockframe.c (generic_read_register_dummy): Update.
+ (generic_call_dummy_register_unwind): Update
+ * infrun.c (write_inferior_status_register): Update.
+
+2002-07-23 Jim Blandy <jimb@redhat.com>
+
+ * parser-defs.h (expression_context_pc): Make this extern.
+ (Thanks to Michael Snyder.)
+
+2002-07-23 Andrew Cagney <ac131313@redhat.com>
+
+ GDB 5.2.1 released from 5.2 branch.
+ * NEWS: Mention changes in 5.2.1 including addition of AVR target.
+ * README: Update to mention 5.2.1.
+
+2002-07-23 Mark Salter <msalter@redhat.com>
+
+ * remote.c (remote_read_bytes): Fix check for error.
+
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (language.h): Include.
+ (ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
+ (pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc):
+ Print newlines at end of debug messages.
+ (pdc_symbol_addrs, pdc_read_regs, pdc_write_regs, pdc_read_data)
+ (pdc_write_data): Use local_hex_string() instead of %llx formats.
+
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (ppc-tdep.h): Include.
+ (special_register_p): New function.
+ (supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32)
+ (store_regs_user_thread): Use register number information from
+ gdbarch_tdep struct instead of hardcoded offsets relative to
+ FIRST_UISA_SP_REGNUM.
+ (fetch_regs_kernel_thread, store_regs_kernel_thread): Call
+ special_register_p() instead of using FPLAST_REGNUM and
+ LAST_UISA_SP_REGNUM as lower and upper bounds on the special
+ register numbers. Also, don't assume that LAST_UISA_SP_REGNUM
+ will be MQ's register number.
+
+2002-07-22 Michael Snyder <msnyder@redhat.com>
+
+ * aix-thread.c (ops): Rename to aix_thread_ops.
+ (base_ops): Rename to base_target.
+ (ops_attach): Rename to aix_thread_attach.
+ (ops_detach): Rename to aix_thread_detach.
+ (ops_resume): Rename to aix_thread_detach.
+ (ops_wait): Rename to aix_thread_wait.
+ (ops_kill): Rename to aix_thread_kill.
+ (init_ops): Rename to init_aix_thread_ops.
+ (ops_fetch_register): Rename to aix_thread_fetch_register.
+ (ops_store_register): Rename to aix_thread_store_register.
+ (ops_mourn_inferior): Rename to aix_thread_mourn_inferior.
+ (ops_thread_alive): Rename to aix_thread_thread_alive.
+ (ops_extra_thread_info: Rename to aix_thread_extra_thread_info.
+ (ops_pid_to_str): Rename to aix_thread_pid_to_str.
+ (ops_xfer_memory): Rename to aix_thread_xfer_memory.
+ (fetch_regs_lib): Rename to fetch_regs_user_thread.
+ (fetch_regs_kern): Rename to fetch_regs_kernel_thread.
+ (store_regs_lib): Rename to store_regs_user_thread.
+ (store_regs_kern): Rename to store_regs_kernel_thread.
+
+2002-07-22 Michael Snyder <msnyder@redhat.com>
+
+ * aix-thread.c (ops_prepare_to_store): Eliminate.
+ (init_ops): Don't initialize ops.prepare_to_store.
+ (store_regs_kern): Pre-fetch register buffers from child,
+ because some registers may not be in the cache. Copy
+ regs from register cache only if they are cached.
+ (store_regs_lib): Copy regs from register cache only
+ if they are cached.
+ (fill_sprs32, (fill_sprs64, fill_fprs, fill_gprs32,
+ fill_gprs64): Ditto.
+
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (gdb_assert.h): Include.
+ (fill_sprs64, fill_sprs32): Add selected asserts to make sure that
+ register sizes (from register cache) match size of buffer holding
+ register data.
+ (fill_sprs32): Change parameter types to match those in the ptrace()
+ buffer.
+ (store_regs_lib): Likewise, but for 32-bit temporary variables.
+ (ops_prepare_to_store): Rename loop variable ``i'' to ``regno''.
+
+2002-07-22 Michael Snyder <msnyder@redhat.com>
+
+ * aix-thread.c (supply_sprs64): Cosmetic change.
+ (supply_sprs32): Cosmetic change.
+ (fill_gprs64, fill_gprs32, fill_fprs, fill_sprs32): New funcs.
+ (fill_sprs64): Use regcache_collect instead of read_register.
+ (store_regs_lib): Use regcache_collect instead of
+ read_register. Use fill_sprs32 instead of fill_sprs64,
+ if debugging a 32-bit architecture.
+ (store_regs_kern): Use fill_gprs64 etc. to pull the values
+ out of the register cache, instead of passing a pointer into
+ the register cache directly to ptrace. Use regcache_collect
+ insteaad of read_register.
+ (ops_prepare_to_store): Use target_read_registers instead
+ of read_register_bytes.
+
+2002-07-20 Aidan Skinner <aidan@velvet.net>
+
+ * MAINTAINERS: Add self under write after approval.
+
+2002-07-20 Aidan Skinner <aidan@velvet.net>
+
+ * ada-tasks.c: Change k&r style function definitions to prototyped
+ form.
+
+2002-07-19 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (x86-64-tdep.o): Add $(objfiles_h).
+ * x86-64-tdep.c: Include "objfiles.h".
+ (x86_64_gdbarch_init): Set in_solib_call_trampoline to
+ in_plt_section. From 2002-07-18 Michal Ludvig <mludvig@suse.cz>.
+
+2002-07-17 Michal Ludvig <michal@suse.cz>
+
+ * dwarf2cfi.c (execute_stack_op): Complain on unknown DW_OP_ value.
+ (update_context): Initialise cfa variable.
+
+2002-07-17 Michael Snyder <msnyder@redhat.com>
+
+ * aix-thread.c: Shorten some long lines.
+ Bring comments into line with code spec.
+
+2002-07-18 Joel Brobecker <brobecker@gnat.com>
+
+ * infrun.c: Re-indent using gdb_indent.sh.
+
+2002-07-18 Joel Brobecker <brobecker@gnat.com>
+
+ * infrun.c (handle_inferior_event): Remove unneeded extra brace.
+ Leave the indentation temporarily untouched, to minimize the diffs.
+
+2002-07-18 Elena Zannoni <ezannoni@redhat.com>
+
+ * stabsread.c: Make os9k sections of the code obsolete,
+ for real this time.
+ * stabsread.h: Make os9k sections of the code obsolete.
+
+2002-07-18 Michal Ludvig <mludvig@suse.cz>
+
+ * linux-low.c (regsets_store_inferior_registers): Add free()
+ at the end of a loop to prevent memory leak.
+ * linux-x86-64-low.c (x86_64_regmap): Add CS, SS registers.
+ (X86_64_NUM_GREGS): Count it from the size of x86_64_regmap.
+ * config/sparc/tm-sp64linux.h: Make the rest of #endif
+ line a comment.
+ * Makefile.in (x86-64-linux-nat.o): Remove dependency on i387-tdep.h
+
+2002-07-17 Jim Blandy <jimb@redhat.com>
+
+ * macrocmd.c (info_macro_command): Remove newline from error
+ message.
+
+2002-07-17 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * sh-tdep.c (sh_dsp_register_sim_regno): New function.
+ (sh_gdbarch_init): Use it for sh-dsp.
+
+2002-07-16 Kevin Buettner <kevinb@redhat.com>
+
+ * dwarf2read.c (read_initial_length): Handle older, non-standard,
+ 64-bit DWARF2 format.
+
+2002-07-16 Joel Brobecker <brobecker@gnat.com>
+
+ * proc-api.c: use HAVE_SYS_PROC_H macro to avoid including
+ <sys/proc.h> when not available.
+
+2002-07-16 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that the i[34]86-*-os9k has been made obsolete.
+ * stabsread.c: Make os9k sections of the code obsolete.
+ * configure.tgt: Make i[3456]86-*-os9k target obsolete.
+ * config/i386/i386os9k.mt: Make file obsolete.
+ * Makefile.in (ALLDEPFILES): Remove remote-os9k.c.
+ (COMMON_OBS): Remove os9kread.o
+ (SFILES): Remove os9kread.c.
+ (os9kread.o, remote-os9k.o): Make target obsolete.
+ * remote-os9k.c: Make file obsolete.
+ * os9kread.c: Make file obsolete.
+ * Makefile.in
+
+2002-07-16 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that the FR30 has been made obsolete.
+ * fr30-tdep.c: Make file obsolete.
+ * config/fr30/tm-fr30.h: Ditto.
+ * config/fr30/fr30.mt: Ditto.
+ * configure.tgt: Make fr30-*-elf obsolete.
+ * MAINTAINERS: Make fr30-elf obsolete.
+
+2002-07-16 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * blockframe.c (get_pc_function_start): return 0 if the minimal symbol
+ found is not inside a section.
+
+2002-07-15 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (ptrace_check): Use safe_strerror() instead of
+ strerror().
+ (pdc_realloc): Use xrealloc() instead of realloc().
+
+2002-07-15 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (PD_ERROR, CALL_BASE): Delete.
+ (ops_resume, ops_wait, fetch_regs_lib, store_regs_lib)
+ (ops_xfer_memory, ops_kill): Don't use PD_ERROR or CALL_BASE
+ macros.
+
+2002-07-15 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (ptrace_check): Eliminate goto.
+ (sync_threadlists): Eliminate gotos. Also, fix array overrun
+ problem.
+
+2002-07-15 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (gdbcmd.h): Include.
+ (DEBUG, DBG, DBG2, dbg): Eliminate.
+ (debug_aix_thread): New static global.
+ (ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
+ (pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc)
+ (fetch_regs_lib, store_regs_lib, store_regs_kern): Rewrite
+ invocations to DBG and DBG2 macros to test against
+ ``debug_aix_thread'' and call fprintf_unfiltered().
+ (_initialize_aix_thread): Add new command "set debug aix-thread".
+
+2002-07-15 Andrew Cagney <ac131313@redhat.com>
+
+ From Gerhard Tonn <TON@de.ibm.com>:
+ * s390-nat.c (fill_fpregset, fill_gregset): Use regcache_collect
+ instead of supply_register.
+
+2002-07-15 Andrew Cagney <ac131313@redhat.com>
+
+ * dwarf2cfi.c: Include "gdb_assert.h".
+ (frame_state_for): Use gdb_assert to check that fde->cie_ptr is
+ non-NULL.
+ (update_context): Do not use __func__. Add missing ``break''.
+ (update_context): Do not use __func__.
+
+2002-07-15 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn
+ and its setting. Set gdbarch instruction printing functions
+ directly. For non-rs6000 case use new function
+ gdb_print_insn_powerpc.
+ (gdb_print_insn_powerpc): New function.
+
+2002-07-13 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that the d30v has been marked obsolete.
+ * MAINTAINERS: Note that d30v / d30v-elf has been made obsolete.
+ * configure.tgt: Mark d30v-*-* as obsolete.
+ * d30v-tdep.c: Mark file as obsolete.
+ * config/d30v/d30v.mt: Ditto.
+ * config/d30v/tm-d30v.h: Ditto.
+
+2002-07-13 Aidan Skinner <aidan@velvet.net>
+
+ * ada-tasks.c (add_task_entry): replace calls to
+ malloc() with xmalloc
+ * ada-tasks.c (init_task_list): replace calls to free with xfree()
+
+ * ada-lang.c (replace_operator_with_call, fill_in_ada_prototype,
+ ada_finish_decode_line_1, all_sals_for_line
+ ada_breakpoint_rewrite): replace calls to free() with xfree()
+
+2002-07-12 Kevin Buettner <kevinb@redhat.com>
+
+ From Nicholas Duffek (with minor changes by Martin Hunt,
+ Louis Hamilton, and Kevin Buettner):
+ * aix-thread.c: New file.
+
+2002-07-12 Petr Sorfa <petrs@caldera.com>
+
+ * dwarf2read.c (dwarf2_invalid_attrib_class): New
+ complaint for invalid attribute class or form.
+ (read_func_scope): DW_AT_frame_base
+ better handling of DW_AT_block*.
+ (dwarf2_add_member_fn): DW_AT_vtable_elem_location
+ better handling of DW_AT_block*.
+ (read_common_block): DW_AT_location
+ better handling of DW_AT_block*.
+ (read_partial_die): DW_AT_location better handling
+ of DW_AT_block*.
+ (new_symbol): DW_AT_external better handling of
+ DW_AT_block*. Proper initialization of variable
+ "addr".
+ (attr_form_is_block): New function that returns true
+ if the attribute's form is of DW_FORM_block*.
+
+2002-07-12 Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
+
+ * valops.c (find_method_list): Remove comment about
+ removed STATIC_MEMFUNCP argument.
+ (value_find_oload_method_list): Likewise.
+
+2002-07-12 Kevin Buettner <kevinb@redhat.com>
+
+ From Nicholas Duffek:
+ * rs6000-nat.c (vmap_ldinfo, xcoff_relocate_core): Call
+ target_new_objfile_hook.
+
+2002-07-12 Kevin Buettner <kevinb@redhat.com>
+
+ From Nicholas Duffek:
+ * xcoffread.c (scan_xcoff_symtab): Recognize XMC_TD as a data storage
+ csect.
+
+2002-07-12 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS: Mention --enable-sim-build-warnings.
+ (m68hc11-elf): Disable sim build warnings.
+ (m32r-elf): Mark as broken obsolete candidate.
+ (x86_64-linux-gnu): Mark as buildable with -Werror.
+ (arm-elf): Change -w to ``,'' which enables warnings but not
+ -Werror.
+
+2002-07-12 Andrew Cagney <ac131313@redhat.com>
+
+ * bcache.h: Update copyright.
+ (struct bstring, struct bcache): Move definition to "bcache.c".
+ Replaced by opaque declaration.
+ (bcache_xfree): Replace free_bcache.
+ (bcache_xmalloc, bcache_memory_used): Declare.
+
+ * bcache.c: Update copyright.
+ (struct bstring, struct bcache): Moved to here from "bcache.h".
+ Update comments.
+ (bcache_xmalloc, bcache_memory_used): New functions.
+ (bcache_xfree): Replace function free_bcache.
+
+ * Makefile.in (objfiles.o): Add $(bcache_h).
+ (objfiles_h): Remove $(bcache_h).
+ (symfile.o): Add $(bcache_h).
+
+ * symmisc.c: Update copyright.
+ (print_symbol_bcache_statistics): Pass psymbol_cache by value.
+ (print_objfile_statistics): Use bcache_memory_used.
+
+ * symfile.c: Include "bcache.h".
+ (reread_symbols): Use bcache_xfree.
+ (reread_symbols): Use bcache_xmalloc and bcache_xfree.
+ (add_psymbol_to_list): Pass psymbol_cache by value.
+ (add_psymbol_with_dem_name_to_list): Ditto.
+
+ * objfiles.h: Update copyright.
+ (struct bcache): Declare opaque. Do not include "bcache.h".
+ (struct objfile): Change psymbol_cache and macro_cache to ``struct
+ bcache'' pointers.
+ * dwarf2read.c (macro_start_file): Pass macro_cache by value.
+
+ * objfiles.c: Include "bcache.h". Update copyright.
+ (allocate_objfile): Use bcache_xmalloc to create psymbol_cache and
+ macro_cache.
+ (free_objfile): Use bcache_xfree.
+
+2002-07-11 Grace Sainsbury <graces@redhat.com>
+
+ * monitor.c (monitor_fetch_register): Make name a constant.
+ (monitor_store_register): Same.
+
+2002-07-11 Daniel Jacobowitz <drow@mvista.com>
+
+ Based on patch from Daniel Berlin <dberlin@dberlin.org>.
+ * buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
+ (finish_block) For non-function blocks, hash the symbol table. For
+ function blocks, mark the symbol table as unhashed.
+ * minsyms.c (msymbol_hash): Return hash value without taking modulus.
+ (msymbol_hash_iw): Likewise.
+ (add_minsym_to_hash_table): Take modulus of msymbol_hash's return
+ value.
+ (add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
+ (lookup_minimal_symbol): Likewise for both.
+ * symtab.h (struct block): Add `hashtable' flag. Comment the
+ hashtable.
+ (BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
+ (ALL_BLOCK_SYMBOLS): Update.
+ (BLOCK_SHOULD_SORT): Do not sort hashed blocks.
+ (struct symbol): Add `hash_next' pointer.
+ * symtab.c (lookup_block_symbol): Search using the hash table when
+ possible.
+ (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
+ (search_symbols, find_addr_symbol): Likewise.
+
+ * dstread.c (process_dst_block): Clear hashtable bit for new block.
+ (read_dst_symtab): Likewise.
+ * jv-lang.c (get_java_class_symtab): Likewise.
+ * mdebugread.c: Include "gdb_assert.h".
+ (shrink_block): Assert that the block being modified is not hashed.
+ * coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
+ * symmisc.c (free_symtab_block): Walk the hash table when freeing
+ symbols.
+ (dump_symtab): Recognize hashed blocks.
+ * printcmd.c (print_frame_args): Assert that function blocks do not
+ have hashed symbol tables.
+ * ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
+ (fill_in_ada_prototype, debug_print_block): Likewise.
+ (ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS. Handle hash tables.
+
+2002-07-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * stack.c (print_frame): Use result of frame_address_in_block()
+ instead of fi->pc when evaluating symbols.
+ (backtrace_command_1): Ditto.
+
+2002-07-11 Andrew Cagney <cagney@redhat.com>
+
+ * cris-tdep.c (cris_saved_pc_after_call): Fix parameter type.
+ Make static.
+
+ * arm-tdep.c (arm_register_name): Make return type constant.
+
+2002-07-10 Andrew Cagney <ac131313@redhat.com>
+
+ * win32-nat.c (has_detach_ability): Convert to strict ISO C
+ prototype.
+ * top.c (gdb_rl_operate_and_get_next_completion): Ditto.
+ * s390-tdep.c (s390_fp_regnum): Ditto.
+ (s390_read_fp): Ditto.
+ (s390_pop_frame): Ditto.
+ (_initialize_s390_tdep): Ditto.
+ * remote.c (get_remote_state): Ditto.
+ * procfs.c (mappingflags): Ditto.
+ * memattr.c (_initialize_mem): Ditto.
+ * mcore-tdep.c (mcore_pop_frame): Ditto.
+ * m68klinux-nat.c (_initialize_m68k_linux_nat): Ditto.
+ * m68k-tdep.c (m68k_register_bytes_ok): Ditto.
+ * language.c (set_case_str): Ditto.
+ * gnu-v3-abi.c (vtable_address_point_offset): Ditto.
+ * frv-tdep.c (new_variant): Ditto.
+ (frv_stopped_data_address): Ditto.
+ * dwarf2cfi.c (fde_chunks_need_space): Ditto.
+ (context_alloc): Ditto.
+ (frame_state_alloc): Ditto.
+ (unwind_tmp_obstack_init): Ditto.
+ (unwind_tmp_obstack_free): Ditto.
+ (cfi_read_fp): Ditto.
+ * cris-tdep.c (cris_saved_pc_after_call): Ditto.
+ (cris_pop_frame): Ditto.
+ * c-lang.c (scanning_macro_expansion): Ditto.
+ (finished_macro_expansion): Ditto.
+ (c_preprocess_and_parse): Ditto.
+ * gdbarch.sh: Ditto.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * config/mn10200/tm-mn10200.h: Adjust indentation.
+ * target.c: Adjust indentation.
+ * symtab.h: Adjust indentation.
+ * stabsread.h: Adjust indentation.
+ * remote-es.c: Adjust indentation.
+ * os9kread.c: Adjust indentation.
+
+2002-07-10 Andrew Cagney <ac131313@redhat.com>
+
+ * wince.c (_initialize_wince): Rename _initialize_inftarg.
+ * win32-nat.c (_initialize_win32_nat): Rename _initialize_inftarg.
+
+2002-07-10 Grace Sainsbury <graces@redhat.com>
+
+ * NEWS: Mention m68k, mcore multi-arching.
+ * MAINTAINERS: Change status of m68k, mcore to reflect
+ multi-arching.
+
+2002-07-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * valops.c (find_overload_match): Free oload_syms.
+
+2002-07-09 Joel Brobecker <brobecker@gnat.com>
+
+ Define HAVE_SYS_PROC_H if sys/proc.h exists
+ * configure.in: Add check for sys/proc.h
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2002-07-09 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h: Remove macros wrapped in
+ #if !GDB_MULTI_ARCH.
+
+2002-07-08 Andrew Cagney <ac131313@redhat.com>
+
+ * config.in, configure: Regenerate.
+
+2002-07-08 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2cfi.c: Include "gcore.h".
+ (execute_stack_op): Fix implementation of the
+ DW_OP_deref and DW_OP_deref_size operators by letting do their
+ lookup in the target.
+
+2002-07-07 Mark Kettenis <kettenis@gnu.org>
+
+ From Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.de>:
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Correct value for
+ tdep->sc_sp_offset.
+
+2002-07-05 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/595, gdb/602
+ * gnu-v3-abi.c (gnuv3_baseclass_offset): Remove unused variables.
+ Don't call value_cast, just read the vtable pointer; update comments
+ to match.
+
+2002-07-05 Grace Sainsbury <graces@redhat.com>
+
+ * config/mcore/tm-mcore.h: Remove file.
+ * config/mcore/mcore.mt: Remove definition of TM_FILE
+ * configure.tgt: Set gdb_multi_arch to yes for the mcore target.
+
+2002-07-05 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-tdep.c: Include "gdb_string.h".
+
+2002-07-04 Grace Sainsbury <graces@redhat.com>
+
+ * config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Set to 2.
+ (PR_REGNUM, FIRST_ARGREG, LAST_ARGREG,RETVAL_REGNUM): Move to
+ mcore-tdep.
+ (REG_STRUCT_HAS_ADDR, USE_STRUCT_CONVENTION, GET_SAVED_REGISTER)
+ (TARGET_VIRTUAL_FRAME_POINTER, BELIEVE_PCC_PROMOTION): Remove.
+ * mcore-tdep.c (PR_REGNUM, FIRST_ARGREG, LAST_ARGREG)
+ (RETVAL_REGNUM): Move macros from tm-mcore.h
+ (mcore_reg_struct_has_addr): New function.
+ (mcore_gdbarch_init): Added initializations for the macros removed
+ from tm-mcore.h.
+
+2002-07-04 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.c (generic_elf_osabi_sniffer): Add check for FreeBSD 3.x's
+ traditonal string branding within the ELF header.
+
+2002-07-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.c (remove_params): New function.
+ (make_symbol_overload_list): Use it instead of cplus_demangle.
+ (overload_list_add_symbol): Likewise. Reorder. Fix memory leak.
+
+2002-07-04 Mark Kettenis <kettenis@gnu.org>
+
+ * i386obsd-nat.c (_initialize_i386obsd_nat): Fix typo in prototype.
+
+ * i386bsd-tdep.c (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end):
+ New variables.
+ (i386nbsd_init_abi): Use these to initialize tdep->sigtramp_start
+ and tdep->sigtramp_end.
+ * i386obsd-nat.c: New file.
+ * config/i386/obsd.mh (NATDEPFILES): Add i386obsd-nat.o.
+
+ * dwarf2cfi.c (cfi_pop_frame): Use alloca() for regbuf.
+ Don't call get_current_frame().
+
+2002-07-04 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * i386-nat.c (child_post_startup_inferior): New function
+ calling i386_cleanup_dregs if
+ I386_USE_GENERIC_WATCHPOINTS is defined.
+ * config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
+ conditional to acknowledge that i386-nat.c has its
+ own child_post_startup_inferior function.
+
+2002-07-04 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (I386_MAX_REGISTER_SIZE): New define.
+ * i386-tdep.c (i386_do_pop_frame): Use I386_MAX_REGISTER_SIZE
+ instead of MAX_REGISTER_RAW_SIZE.
+ (i386_extract_return_value, i386_extract_struct_value_address):
+ Convert to use regcache.
+ (i386_gdbarch_init): Set max_register_raw_size and
+ max_register_virtual_size to I386_MAX_REGISTER_SIZE.
+ Set extract_return_value and extract_struct_value_address instead
+ of their deprecated variants.
+
+ Convert i386 target to generic dummy frames.
+ * i386-tdep.c: Include "symfile.h".
+ (i386_frameless_signal_p): Consider a function to be frameless if
+ the pc points at the first instruction of the function.
+ (i386_frame_chain): Handle (generic) call dummies.
+ (i386_frame_saved_pc): Likewise.
+ (i386_frame_init_saved_regs): Remove code dealing with call
+ dummies on the stack.
+ (i386_push_dummy_frame): Removed.
+ (i386_call_dummy_words): Removed.
+ (i386_fix_call_dummy): Removed.
+ (i386_push_return_address): New function.
+ (i386_do_pop_frame): Renamed from i386_pop_frame. Add FRAME
+ parameter, and don't call get_current_frame.
+ (i386_pop_frame): New function.
+ (i386_gdbarch_init): Set use_generic_dummy_frames to 1, set
+ call_dummy_location to AT_ENTRY_POINT, set call_dummy_address to
+ entry_point_address, set call_dummy_breakpoint_offset to 0, set
+ call_dummy_length to 0, set call_dummy_words to NULL, set
+ sizeof_call_dummy_words to 0, set fix_call_dummy to
+ generic_fix_call_dummy, set pc_in_call_dummy to
+ pc_in_call_dummy_at_entry_point, set push_dummy_frame to
+ generic_push_dummy_frame, set push_return_address to
+ i386_push_return_address and set frame_chain_valid to
+ generic_file_frame_chain_valid.
+
+2002-07-03 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (struct regcache): Add opaque declaration.
+ (EXTRACT_RETURN_VALUE): New architecture method.
+ (EXTRACT_STRUCT_VALUE_ADDRESS): Ditto.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.c (legacy_extract_return_value): New function.
+ * arch-utils.h (legacy_extract_return_value): Declare.
+ * values.c (value_being_returned): Re-enable code handling
+ EXTRACT_STRUCT_VALUE_ADDRESS. Move
+ deprecated_grub_regcache_for_registers call to block handling
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+ (EXTRACT_RETURN_VALUE): Do not define.
+
+2002-07-03 Grace Sainsbury <graces@redhat.com>
+
+ * config/mcore/tm-mcore.h (REGISTER_BYTES, NUM_REGS, PC_REGNUM)
+ (SP_REGNUM, FP_REGNUM, FUNCTION_START_OFFSET, DECR_PC_AFTER_BREAK)
+ (BREAKPOINT_FROM_PC, INNER_THAN, SAVED_PC_AFTER_CALL)
+ (INIT_EXTRA_FRAME_INFO, FRAME_INIT_SAVED_REGS, INIT_FRAME_PC)
+ (FRAME_CHAIN, FRAME_CHAIN_VALID, FRAME_SAVED_PC)
+ (STORE_RETURN_VALUE, DEPRECATED_EXTRACT_RETURN_VALUE)
+ (STORE_STRUCT_RETURN, DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+ (SKIP_PROLOGUE, FRAME_ARGS_SKIP, FRAME_ARGS_ADDRESS)
+ (FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS, POP_FRAME)
+ (PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME, PUSH_ARGUMENTS): Remove.
+ * mcore-tdep.c (mcore_init_extra_frame_info): Add fromleaf
+ argument so the function fits the prototype in the architecture
+ vector.
+ (mcore_pop_frame): Remove argument so the function fits the
+ prototype. Use get_current_frame instead of the argument.
+ (mcore_push_arguments): Change type of struct_return so the
+ function can be used in the architecture vector.
+ (mcore_store_struct_return): Add.
+ (mcore_frame_init_saved_regs): Add.
+ (mcore_gdbarch_init): Add function calls to replace the macros
+ removed from tm-mcore.h
+
+2002-07-03 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (print_return_value): Remove compatibility code calling
+ deprecated_grub_regcache_for_registers.
+
+ * values.c: Include "regcache.h".
+ (value_being_returned): Update. Use
+ deprecated_grub_regcache_for_registers to extract the register
+ buffer address.
+ * value.h (value_being_returned): Change ``retbuf'' parameter to a
+ ``struct regcache''.
+ * Makefile.in (values.o): Add dependency on $(regcache_h).
+
+ * inferior.h (run_stack_dummy): Change type of second parameter to
+ a ``struct regcache''.
+ * valops.c (hand_function_call): Change type of retbuf to ``struct
+ regcache''. Allocate using regcache_xmalloc, clean using
+ make_cleanup_regcache_xfree.
+ * infcmd.c (run_stack_dummy): Update. Use
+ regcache_cpu_no_passthrough instead of memcpy to copy the buffer.
+
+ * regcache.c (do_regcache_xfree): New function.
+ (make_cleanup_regcache_xfree): New function.
+ * regcache.h (make_cleanup_regcache_xfree): Declare.
+
+2002-07-03 Martin M. Hunt <hunt@redhat.com>
+
+ * event-top.c (command_line_handler): Don't read past
+ beginning of buffer.
+
+2002-07-03 Martin M. Hunt <hunt@redhat.com>
+
+ * varobj.c (struct varobj_root): Change frame from CORE_ADDR to
+ struct frame_id.
+ (varobj_create): Store frame_id for root.
+ (varobj_gen_name): Use xasprintf.
+ (varobj_update): Save and restore frame using get_frame_id() and
+ frame_find_by_id().
+ (create_child): Use xasprintf.
+ (new_root_variable): Initialize frame_id.
+ (c_name_of_child): Use xasprintf. Call find_frame_by_id().
+ (c_value_of_variable): Use xasprintf. Move mem_fileopen call
+ to prevent memory leak.
+
+2002-07-03 Andrew Cagney <ac131313@redhat.com>
+
+ * valops.c (hand_function_call): Move declaration of retbuf to
+ start of function, allocate using malloc, add a cleanup but before
+ the inf_status cleanup, cleanup the buffer. Rename local variable
+ old_chain to inf_status_cleanup.
+
+2002-07-03 Martin M. Hunt <hunt@redhat.com>
+
+ * top.c (execute_command): Use cmd_func() and cmd_func_p().
+
+ * cli/cli-decode.c (cmd_func_p): New function.
+ (cmd_func): New function.
+
+ * command.h: Add cmd_func() and cmd_func_p().
+
+2002-07-03 Grace Sainsbury <graces@redhat.com>
+
+ * config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Add macro. Set to 0.
+ (REGISTER_SIZE): Remove.
+ (MAX_REGISTER_RAW_SIZE): Remove.
+ (REGISTER_VIRTUAL_TYPE): Remove.
+ (MAX_REGISTER_VIRTUAL_SIZE): Remove.
+ (REGISTER_NAME): Remove.
+ (USE_GENERIC_DUMMY_FRAMES): Remove.
+ (CALL_DUMMY): Remove.
+ (CALL_DUMMY_START_OFFSET): Remove.
+ (CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
+ (CALL_DUMMY_LOCATION): Remove.
+ (FIX_CALL_DUMMY): Remove.
+ (CALL_DUMMY_ADDRESS): Remove.
+ (SIZEOF_CALL_DUMMY_WORDS): Remove.
+ (SAVE_DUMMY_FRAME_TOS): Remove.
+ * mcore-tdep.c (MCORE_REG_SIZE, MCORE_NUM_REGS): Add macros.
+ (mcore_register_virtual_type): New function.
+ (mcore_register_byte): New function.
+ (mcore_register_size): New function.
+ (mcore_register_name): New function.
+ (mcore_gdbarch_init): New function. Add set_gdbarch calls for
+ macros removed from tm-mcore.h.
+ (mcore_dump_tdep): Add.
+ (_initialize_mcore_tdep): Add gdbarch_register call.
+
+2002-07-03 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_frameless_signal_p): Provide an argument in to
+ frameless_look_for_prologue, such that we actually call this
+ function.
+
+2002-07-02 Joel Brobecker <brobecker@gnat.com>
+
+ * frame.h (frame_address_in_block): New function.
+
+ * blockframe.c (frame_address_in_block): New function extracted
+ from get_frame_block().
+ (get_frame_block): Use frame_address_in_block().
+ (block_innermost_frame): Use frame_address_in_block() to match
+ the frame pc address against the block boundaries rather than
+ the frame pc directly. This prevents a failure when a frame pc
+ is actually a return-address pointing immediately after the end
+ of the given block.
+
+2002-07-02 Grace Sainsbury <graces@redhat.com>
+
+ * MAINTAINERS: Add self under write after approval.
+
+2002-07-02 Grace Sainsbury <graces@redhat.com>
+
+ * m68k-tdep.c (m68k_remote_breakpoint_from_pc): Add. Currently not
+ used in architecture vector. The default is
+ m68k_local_breakpoint_from_pc.
+ (m68k_local_breakpoint_from_pc): Add.
+ (enum): Add register numbers from tm-m68k.h.
+ (m68k_gdbarch_init): Add breakpoint_from_pc to architecture
+ vector.
+ * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Set to
+ GDB_MULTI_ARCH_PARTIAL.
+ (BPT_VECTOR, REGISTER_BYTES_FP, REGISTER_BYTES_NOFP)
+ (NUM_FREGS, SIG_PC_FP_OFFSET, SP_ARG0, REMOTE_BPT_VECTOR): Move to
+ m68k-tdep.c.
+ (BREAKPOINT, REMOTE_BREAKPOINT): Remove.
+ (A1_REGNUM, FP0_REGNUM, FPC_REGNUM, FPS_REGNUM, FPI_REGNUM): Move
+ to enum in m68k-tdep.c
+
+2002-07-02 Joel Brobecker <brobecker@gnat.com>
+
+ * solib-osf.c (open_map): Compute the list of shared libraries
+ loaded by the inferior, rather than the list of libraries loaded
+ by GDB itself. Otherwise, GDB ends up reading the symbols from
+ the wrong shared libraries...
+
+2002-07-02 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-tdep.c (i386_linux_sigcontext_addr): Make static.
+ (LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONEXT_SP_OFFSET): Remove
+ macros.
+ (i386_linux_sigtramp_saved_pc, i386_linux_sigtramp_saved_sp):
+ Remove functions.
+ (FRAMELESS_SIGNAL): Remove function.
+ (i386_linux_frame_chain, i386_linux_frame_saved_pc,
+ i386_linux_saved_pc_after_call): Removed.
+ (i386_linux_init_abi): Initialize tdep->sigcontext_addr,
+ tdep->sc_pc_offset and tdep->sc_sp_offset. Don't override
+ frame_chain, frame_saved_pc and saved_pc_after_call any longer.
+
+ * i386-tdep.c (i386_frameless_signal_p): New function.
+ (i386_frame_chain): Deal with frameless signals.
+ (i386_sigtramp_saved_sp): New function.
+ (i386_frame_saved_pc): Deal with frameless signals.
+ (i386_saved_pc_after_call): Make sure the correct value is
+ returned just after entry into a sigtramp.
+ * i386bsd-tdep.c (i386bsd_sc_sp_offset, i386nbsd_sc_sp_offset,
+ i386fbsd4_sc_sp_offset): New variables.
+ (i386bsd_init_abi, i386nbsd_init_abi, i386fbsd4_init_abi): Use
+ these variables to initialize tdep->sc_sp_offset. * i386bsd-nat.c
+ (_initialize_i386bsd_nat): Add sanity check for sc_sp_offset
+ similiar to what we already did for sc_pc_offset.
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Initialize
+ tdep->sc_sp_offset.
+
+ * i386nbsd-tdep.c (fetch_elfcore_registers): Wrap long line.
+
+2002-07-02 Michal Ludvig <mludvig@suse.cz>
+
+ * config/i386/tm-x86-64linux.h: New.
+ * config/i386/x86-64linux.mt: Add GDB_MULTI_ARCH and TM_FILE
+ definitions.
+ * config/i386/nm-x86-64.h: Rename to ...
+ * config/i386/nm-x86-64linux.h: ... this one.
+ * config/i386/x86-64linux.mh: Reflect the above change.
+
+2002-07-01 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (struct gdbarch_tdep): Replace sigtramp_saved_pc
+ with sigcontext_addr. Add sc_sp_offset.
+ (i386bsd_sigtramp_saved_pc): Remove prototype.
+ (i386bsd_sicontext_addr): Add prototype.
+ * i386-tdep.c (i386_sigtramp_saved_pc): New function.
+ (i386_frame_saved_pc): Rewrite to call i386_sigtramp_saved_pc.
+ (i386_svr4_sigtramp_saved_pc): Removed.
+ (i386_svr4_sigcontext_addr): New function.
+ (i386_svr4_init_abi): Don't initialize tdep->sigtramp_saved_pc.
+ Initialize tdep->sigcontext_addr instead. Initialize
+ tdep->sc_pc_offset and tdep->sc_sp_offset.
+ (i386_gdbarch_init): Likewise.
+ * i386bsd-tdep.c (i386bsd_sigcontext_addr): Don't make it static
+ any more.
+ (i386bsd_sigtramp_saved_pc): Remove function.
+ (i386bsd_init_abi): Don't initialize tdep->sigtramp_saved_pc.
+ Initialize tdep->sigcontext_addr instead. Initialize
+ tdep->sc_pc_offset.
+ * i386-linux-tdep.c (i386_linux_init_abi): Remove initialization
+ of tdep->sigtramp_saved_pc.
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Don't initialize
+ tdep->sigtramp_saved_pc. Initialize tdep->sigcontext_addr
+ instead.
+
+ * i386-tdep.c (i386_frameless_function_invocation,
+ i386_frame_num_args, i386_frame_init_saved_regs,
+ i386_skip_prologue, i386_push_dummy_frame, i386_fix_call_dummy,
+ i386_pop_frame, i386_push_arguments, i386_store_struct_return,
+ i386_extract_return_value, i386_store_return_value,
+ i386_extract_struct_value_address, i386_register_virtual_type,
+ i386_register_convertible, i386_register_convert_to_virtual,
+ i386_register_convert_to_raw, i386_svr4_sigtramp_saved_pc,
+ i386_go32_init_abi, i386_nw_init_abi, i386_gdbarch_init): Make
+ static.
+
+2002-07-01 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-tdep.c (i386bsd_frame_saved_pc): Removed.
+
+ * config/i386/tm-i386sol2.h (COERCE_FLOAT_TO_DOUBLE): Removed.
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Adjust for the removal of
+ this macro. Include "value.h".
+
+2002-06-30 Aidan Skinner <aidan@velvet.net>
+
+ * ada-exp.tab.c: remove as it's a generated file
+ * ada-lex.c: remove as it's a generated file
+
+2002-06-30 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (struct frame_info, struct
+ frame_saved_regs, struct value, struct type): Remove forward
+ declarations.
+
+ * config/i386/tm-linux.h [HAVE_PTRACE_GETFPXREGS]
+ (FILL_FPXREGSET, HAVE_SSE_REGS): Remove define.
+ * config/i386/nm-linux.h [HAVE_PTRACE_GETFPXREGS]
+ (FILL_FPXREGSET): Define.
+
+ * config/i386/tm-nbsd.h (HAVE_SSE_REGS): Remove define.
+
+ * configure.tgt (i[3456]86-*-openbsd*): Fold into
+ i[3456]86-*-netbsd* case.
+ * config/i386/tm-obsd.h: Removed.
+ * config/i386/obsd.mt: Removed.
+ * config/i386/obsd.mh (NATDEPFILES): Remove corelow.o and
+ core-aout.o.
+ (MH_CFLAGS): Add -DYYDEBUG=0.
+
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Define SC_PC_OFFSET to
+ i386nbsd_sc_pc_offset on OpenBSD too.
+
+ * config/i386/tm-fbsd.h [!SVR4_SHARED_LIBS]
+ (IN_SOLIB_CALL_TRAMPOLINE): Remove define.
+ * config/i386/tm-nbsdaout.h (IN_SOLIB_CALL_TRAMPOLINE): Remove
+ define.
+ * i386bsd-tdep.c: Include "arch-utils.h".
+ (i386bsd_aout_in_solib_call_trampoline): New function.
+ (i386bsd_init_abi): Set in_solib_call_trampoline to
+ i386bsd_aout_in_solib_call_trampoline.
+ (i386nbsdelf_init_abi, i386fbsd_init_abi): Set
+ in_solib_call_trampoline to generic_in_solib_call_trampoline.
+
+2002-06-28 Andrew Cagney <ac131313@redhat.com>
+
+ * macrotab.h: Do not include "obstack.h" or "bcache.h".
+ (struct obstack, struct bcache): Add opaque declarations.
+ * Makefile.in (macrotab_h): Update
+
+2002-06-28 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c (generic_find_dummy_frame): Change return type to
+ ``struct regcache''.
+ (struct dummy_frame): Replace field ``registers'' with regcache, a
+ struct regcache object.
+ (generic_find_dummy_frame): Update.
+ (generic_push_dummy_frame): Update. Use regcache_xfree,
+ regcache_xmalloc and regcache_cpy.
+ (generic_pop_dummy_frame): Update. Use regcache_cpy and
+ regcache_xfree.
+ (deprecated_generic_find_dummy_frame): Update.
+ (generic_read_register_dummy): Update. Use
+ regcache_read_as_address.
+ (generic_call_dummy_register_unwind): Update. Use regcache_read.
+ (generic_get_saved_register): Update. Use regcache_read.
+
+2002-06-28 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (objfiles_h): Add $(bcache_h).
+ * objfiles.h: Include "bcache.h".
+
+ * Makefile.in (symtab_h): Remove $(bcache_h).
+ * symtab.h: Do not include "bcache.h".
+
+2002-06-28 Andrew Cagney <ac131313@redhat.com>
+
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Set frame_chain_valid to
+ generic_func_frame_chain_valid.
+
+2002-06-28 David O'Brien <obrien@FreeBSD.org>
+
+ * config/i386/nm-fbsd.h: Include <sys/param.h>.
+ * config/i386/tm-fbsd.h: Likewise.
+
+2002-06-28 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use
+ generic_unwind_get_saved_register.
+
+2002-06-27 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>:
+ * regcache.c (supply_register): Add missing argument to
+ register_buffer call.
+
+2002-06-27 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (init.c): Drop -e option to grep. Not necessary and
+ Solaris /bin/grep does not not like it. From Peter Schauer.
+
+2002-06-26 Tom Tromey <tromey@redhat.com>
+
+ * command.h (add_setshow_cmd): Declare.
+ (add_setshow_cmd_full): Declare.
+ * cli/cli-decode.c (add_setshow_cmd): No longer static. Now
+ returns void. Use add_setshow_cmd_full.
+ (add_setshow_cmd_full): New function.
+ (add_setshow_auto_boolean_cmd): Use add_setshow_cmd_full.
+ (add_setshow_boolean_cmd): Likewise.
+
+2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/vax/tm-vax.h: Protect from multiple inclusion.
+ (TARGET_UPAGES, TARGET_NBPG, STACK_END_ADDR)
+ (SIGTRAMP_START, SIGTRAMP_END, SIGCONTEXT_PC_OFFSET): Move to...
+ * config/vax/tm-vaxbsd.h: ...here. New file.
+ * config/vax/vax.mt (TM_FILE): Set to tm-vaxbsd.h.
+
+2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/vax/tm-vax.h (BREAKPOINT): Remove.
+ (BELIEVE_PCC_PROMOTION): Remove.
+ (AP_REGNUM): Move to...
+ * config/vax/nm-vax.h: ...here.
+ * vax-tdep.c: Use VAX_AP_REGNUM instead of AP_REGNUM.
+ (vax_breakpoint_from_pc): New function.
+ (vax_gdbarch_init): Initialize gdbarch_breakpoint_from_pc
+ and gdbarch_believe_pcc_promotion.
+
+2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (vax_tdep_h): Define.
+ (vax-tdep.o): Use $(vax_tdep_h).
+ * vax-tdep.c (vax_gdbarch_init): Use generic OS ABI framework.
+ (vax_dump_tdep): New function.
+ (_initialize_vax_tdep): Register vax_dump_tdep.
+ * vax-tdep.h: Include osabi.h.
+ (struct gdbarch_tdep): New.
+
+2002-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_generic_find_dummy_frame): Rename
+ generic_find_dummy_frame.
+ * blockframe.c (generic_find_dummy_frame): Make static.
+ (deprecated_generic_find_dummy_frame): New function.
+ * sh-tdep.c (sh_nofp_frame_init_saved_regs): Replace
+ generic_find_dummy_frame with deprecated_find_dummy_frame.
+ (sh64_nofp_frame_init_saved_regs): Ditto.
+ (sh_fp_frame_init_saved_regs): Ditto.
+ * s390-tdep.c (s390_frame_saved_pc_nofix): Ditto.
+ (s390_frame_chain): Ditto.
+ * cris-tdep.c (cris_frame_init_saved_regs): Ditto.
+
+2002-06-26 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h: Rearrange code so macros not in the
+ gdbarch vector are at the top.
+ (NUM_REGS): Remove.
+ (FP_REGNUM, SP_REGNUM, PS_REGNUM, PC_REGNUM, FP0_REGNUM): Remove.
+ (FRAME_ARGS_ADDRESS): Remove.
+ (FRAME_LOCALS_ADDRESS): Remove.
+ (FRAME_NUM_ARGS): Remove.
+ (FRAME_ARGS_SKIP): Remove.
+ * m68k-tdep.c (enum): Add eumeration of special register numbers.
+ (m68k_gdbarch_init): Add gdbarch initializations for macros
+ undefined in tm-m68k.h
+
+2002-06-26 Grace Sainsbury <graces@redhat.com>
+
+ * monitor.h: Add the function regname to monitor_ops
+ structure. This way NUM_REGS does not have to be a constant.
+ * monitor.c (monitor_fetch_register): Added support for regname
+ function. The function is called if the array regnames is NULL.
+ (monitor_store_register): Same.
+ * cpu32bug-rom.c (cpu32bug_regname): Add function. Replaces
+ regnames array.
+ (init_cpu32bug_cmds): set cpu32bug_cmds.regnames to NULL,
+ cpu32bug_cmds.regname to point to new function.
+ * abug-rom.c (abug_regname): Same as above.
+ (init_abug_cmds): Same.
+ * dbug-rom.c (dbug_regname): Same as above.
+ (init_dbug_cmds): Same.
+ * remote-est.c (est_regname): Same.
+ (init_est_cmds): Same.
+ * rom68k-rom.c (rom68k_regname): Same.
+ (init_rom68k_cmds): Same.
+
+2002-06-25 Tom Tromey <tromey@redhat.com>
+
+ * breakpoint.c (delete_command): Don't repeat `delete' commands.
+
+2002-06-25 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (stop_registers): Change variable's type to ``struct
+ regcache'''.
+ (xmalloc_inferior_status): Delete function.
+ (free_inferior_status): Delete function.
+ (normal_stop): Use regcache_cpy.
+ (struct inferior_status): Change type of fields ``stop_registers''
+ and ``registers'' to ``struct regcache''.
+ (write_inferior_status_register): Use regcache_write.
+ (save_inferior_status): Instead of calling
+ xmalloc_inferior_status, allocate the inf_status buffer directly.
+ Use regcache_dup_no_passthrough and regcache_dup to save the
+ buffers.
+ (restore_inferior_status): Use regcache_xfree and regcache_cpy.
+ Replace the stop_registers regcache instead of overriding it. Use
+ regcache_xfree. Instead of calling free_inferior_status, xfree
+ the buffer directly.
+ (discard_inferior_status): Use regcache_xfree. Instead of calling
+ free_inferior_status, xfree the buffer directly.
+ (build_infrun): Use regcache_xmalloc.
+ (_initialize_infrun): Delete redundant call to build_infrun.
+
+ * Makefile.in (infcmd.o): Add $(regcache_h).
+
+ * infcmd.c: Include "regcache.h".
+ (run_stack_dummy): Use deprecated_grub_regcache_for_registers to
+ obtain the address of `stop_registers' register buffer.
+ (print_return_value): Ditto.
+
+ * inferior.h (struct regcache): Add opaque declaration.
+ (stop_registers): Change variable's declared type to ``struct
+ regcache''.
+
+2002-06-24 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-decode.c (add_show_from_set): Fixed typo in comment.
+ * target.c (initialize_targets): Fixed typo in
+ trust-readonly-sections `show' documentation.
+
+ * main.c: Marked all strings with _().
+
+2002-06-24 Don Howard <dhoward@redhat.com>
+
+ * memattr.c (create_mem_region): Treat hi == 0 as a special case
+ that means max CORE_ADDR+1.
+ (lookup_mem_region): Ditto.
+ (mem_info_command): Ditto.
+
+2002-06-24 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h (DECR_PC_AFTER_BREAK): Remove.
+ (REGISTER_BYTES_OK): Remove.
+ (REGISTER_BYTES): Remove.
+ (STORE_STRUCT_RETURN): Remove.
+ (DEPRECATED_EXTRACT_RETURN_VALUE): Remove.
+ (STORE_RETURN_VALUE): Remove.
+ (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Remove.
+ (FRAME_CHAIN): Remove.
+ (FRAMELESS_FUNCTION_INVOCATION): Remove.
+ (FRAME_SAVED_PC): Remove.
+ * m68k-tdep.c (m68k_register_bytes_ok):Add.
+ (m68k_store_struct_return): Add.
+ (m68k_deprecated_extract_return_value): Add.
+ (m68k_deprecated_extract_struct_value_address): Add.
+ (m68k_store_return_value): Add.
+ (m68k_frame_chain): Add.
+ (m68k_frameless_function_invocation): Add.
+ (m68k_frame_saved_pc): Add.
+ (m68k_gdbarch_init): added set_gdbarch calls for new
+ functions and deleted macros.
+
+2002-06-23 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (HFILES_NO_SRCDIR): Remove old files.
+ (ALLDEPFILES): Likewise.
+ (udiheaders): Removed.
+ (udip2soc.o): Likewise.
+ (udi2go32.o): Likewise.
+ (udr.o): Likewise.
+ (HFILES_WITH_SRCDIR): Don't mention udiheaders.
+
+2002-06-22 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (_initialize_infrun): Delete unnecessary call to
+ build_infrun.
+
+ * regcache.h: Update comments describing the regcache_cpy family
+ of functions.
+ (regcache_save, regcache_restore): Delete declaration.
+ (regcache_save_no_passthrough): Delete declaration.
+ (regcache_restore_no_passthrough): Delete declaration.
+ * regcache.c (regcache_save): Delete function.
+ (regcache_save_no_passthrough): Delete function.
+ (regcache_restore): Delete function.
+ (regcache_restore_no_passthrough): Delete function.
+
+2002-06-21 Andrew Cagney <ac131313@redhat.com>
+
+ * config/m68k/tm-m68k.h: Fix typo.
+ (FRAME_INIT_SAVED_REGS): Define when non-multi-arch.
+ (m68k_frame_init_saved_regs): Declare.
+
+2002-06-21 Jim Blandy <jimb@redhat.com>
+
+ Remove some vestiges of Harris 88k support.
+ * dwarf2read.c (decode_locdesc): Remove `#if' block for Harris 88k
+ register numbering quirk.
+ * elfread.c (elf_symtab_read): Remove `#if' block for skipping
+ odd symbols occurring in Harris 88k ELF targets.
+
+2002-06-21 Tom Tromey <tromey@redhat.com>
+
+ * gdb_locale.h: New file.
+ * Makefile.in (GDB_CFLAGS): Define LOCALEDIR.
+ (defs_h): Added gdb_locale.h.
+ * configure, config.in: Rebuilt.
+ * configure.in (PACKAGE): Define.
+ * defs.h: Include gdb_locale.h.
+ * main.c (captured_main): Call setlocale, bindtextdomain,
+ textdomain.
+
+2002-06-21 Dave Brolley <brolley@redhat.com>
+
+ From Stan Shebs, Jim Blandy, Mark Salter, Kevin Buettner:
+ * config/frv/frv.mt: New file.
+ * config/frv/tm-frv.h: New file.
+ * configure.tgt: Support frv-*-*.
+ * Makefile.in (frv-tdep.o): New target.
+ * frv-tdep.c: New file.
+ * NEWS: Mention frv.
+
+2002-06-21 Dave Brolley <brolley@redhat.com>
+
+ * MAINTAINERS: Add self to "Write After Approval" list.
+
+2002-06-21 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h (REGISTER_BYTE, REGISTER_RAW_SIZE)
+ (REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE)
+ (REGISTER_VIRTUAL_TYPE, REGISTER_NAMES, TARGET_LONG_DOUBLE_FORMAT)
+ (FUNCTION_START_OFFSET, SKIP_PROLOGUE, SAVED_PC_AFTER_CALL)
+ (INNER_THAN, STACK_ALIGN, REGISTER_SIZE): Remove macros.
+
+ * m68k-tdep.c: Include arch-utils.h
+ (m68k_register_raw_size): Add.
+ (m68k_register_virtual_size): Add.
+ (m68k_register_virtual_type): Add.
+ (m68k_register_name): Add.
+ (m68k_stack_align): Add.
+ (m68k_register_byte): Add.
+ (m68k_gdbarch_init): Add set_gdbarch calls for macros removed in
+ tm-m68k.h.
+
+2002-06-21 Grace Sainsbury <graces@redhat.com>
+
+ * m68k-tdep.c (m68k_frame_init_saved_regs): Replace
+ m68k_find_saved_regs.
+ (m68k_pop_frame): Removed saved_regs structure, and replaced
+ references to it with frame->saved_regs.
+ (m68k_gdbarch_init): Added function calls to initialize the
+ gdbarch structure.
+ (m68k_fix_call_dummy): Add.
+ * config/m68k/tm-m68k.h: (FRAME_FIND_SAVED_REGS): Remove.
+ (CALL_DUMMY): Remove.
+ (CALL_DUMMY_LENGTH): Remove.
+ (CALL_DUMMY_START_OFFSET): Remove.
+ (CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
+ (FIX_CALL_DUMMY): Remove.
+ (PUSH_DUMMY_FRAME): Remove.
+ (POP_FRAME): Remove.
+
+2002-06-19 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * parse.c (parse_fprintf): New function used to avoid calls to
+ fprintf in bison parser generated debug code.
+ * parser-defs.h: Declaration of new parse_fprintf function.
+ * ada-exp.y, c-exp.y, f-exp.y, jv-exp.y, m2-exp.y, p-exp.y:
+ Set YYDEBUG to 1 by default.
+ Set YYFPRINTF as parse_fprintf.
+
+2002-06-21 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (read_encoded_pointer): Don't handle pointer
+ encoding anymore.
+ (pointer_encoding, enum ptr_encoding): New.
+ (execute_cfa_program): Take care about pointer encoding.
+ (dwarf2_build_frame_info): Only call parse_frame_info for
+ .debug_frame and .eh_frame.
+ (parse_frame_info): New, derived from former dwarf2_build_frame_info.
+ fixed augmentation handling, added relative addressing,
+ ignore duplicate FDEs. Added comments.
+ * dwarf2cfi.c: Reindented.
+
+2002-06-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-top.c (command_handler): Don't use space_at_cmd_start
+ unless there is sbrk() on the host. Assign time and space data
+ to union fields of the appropriate length.
+
+2002-06-20 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_register_nr2name): Rename to
+ x86_64_register_name. Return type changed to 'const char *'.
+ (x86_64_register_name2nr): Rename to x86_64_register_number.
+ (x86_64_gdbarch_init): Update to reflect the change.
+ * x86-64-tdep.h: Ditto.
+ * x86-64-linux-nat.c (x86_64_fxsave_offset)
+ (supply_fpregset): Ditto.
+
+2002-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h: Update copyright.
+ (struct regcache, struct gdbarch): Add opaque declarations.
+ (current_regcache): Declare global variable.
+ (regcache_read, regcache_write): Add gdbarch parameter.
+ (regcache_save, regcache_save_no_passthrough)
+ (regcache_restore, regcache_restore_no_passthrough)
+ (regcache_dup, regcache_dup_no_passthrough)
+ (regcache_cpy, regcache_cpy_no_passthrough)
+ (deprecated_grub_regcache_for_registers)
+ (deprecated_grub_regcache_for_register_valid)
+ (regcache_valid_p): Add function declarations.
+
+ * regcache.c: Update copyright.
+ (regcache_descr_handle): New global variable.
+ (struct regcache_descr): Define.
+ (init_legacy_regcache_descr, init_regcache_descr): New functions.
+ (regcache_descr, xfree_regcache_descr): New functions.
+ (struct regcache): Define.
+ (regcache_xmalloc, regcache_xfree): New functions.
+ (regcache_cpy, regcache_cpy_no_passthrough): New functions.
+ (regcache_dup, regcache_dup_no_passthrough): New functions.
+ (regcache_valid_p, regcache_read_as_address): New functions.
+ (deprecated_grub_regcache_for_registers): New function.
+ (deprecated_grub_regcache_for_register_valid): New function.
+ (current_regcache): New global variable.
+ (register_buffer): Add regcache parameter. Update calls.
+ (regcache_read, regcache_write): Add regcache parameter. Rewrite.
+ (read_register_gen, write_register_gen): Update register_buffer
+ call. Test for legacy_p instead of gdbarch_register_read_p or
+ gdbarch_register_write_p.
+ (regcache_collect): Update register_buffer call.
+ (build_regcache): Rewrite. Use deprecated grub functions.
+ (regcache_save, regcache_save_no_passthrough): New functions.
+ (regcache_restore, regcache_restore_no_passthrough): New
+ functions.
+ (_initialize_regcache): Create the regcache_data_handle. Swap
+ current_regcache global variable.
+
+ * sh-tdep.c (sh_pseudo_register_read): Add current_regcache
+ parameter to regcache_read and regcache_write calls.
+ (sh4_register_read): Ditto.
+ (sh64_pseudo_register_read): Ditto.
+ (sh64_register_read): Ditto.
+ (sh_pseudo_register_write): Ditto.
+ (sh4_register_write): Ditto.
+ (sh64_pseudo_register_write): Ditto.
+ (sh64_register_write): Ditto.
+
+ * defs.h (XCALLOC): Define.
+
+2002-06-19 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Added (set to 0).
+ * m68k-tdep.c (m68k_gdbarch_init): Added.
+ (m68k_dump_tdep): Added.
+
+2002-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * ada-lang.c (fill_in_ada_prototype): Update comment.
+
+2002-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (enum mips_abi): Explicitly start at 0. Add
+ MIPS_ABI_LAST.
+ (mips_abi_string, mips_abi_strings): New.
+ (struct gdbarch_tdep): Remove mips_abi_string, add found_abi.
+ (mips_gdbarch_init): Set tdep->found_abi. Don't set
+ tdep->mips_abi_string. Honor mips_abi_string. Default to
+ O32 if no ABI is found.
+ (mips_dump_tdep): Use mips_abi_strings.
+ (mips_abi_update): New function.
+ (_initialize_mips_tdep): Initialize mips_abi_string. Add
+ ``set mips abi'' and ``show mips abi''. Check the size of
+ mips_abi_strings.
+
+2002-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * i386-linux-tdep.c (i386_linux_register_name): Make return type
+ constant.
+
+2002-06-18 Joel Brobecker <brobecker@gnat.com>
+
+ * alpha-tdep.c (heuristic_proc_desc): Compute the size of the
+ current frame using only the first stack size adjustment. All
+ subsequent size adjustments are not considered to be part of
+ the "static" part of the current frame.
+ Compute the address of the saved registers relative to the
+ Frame Pointer ($fp) instead of the Stack Pointer if $fp is
+ in use in this frame.
+
+2002-06-18 Don Howard <dhoward@redhat.com>
+
+ * valops.c (value_ind): Use value_at_lazy() when dereferencing
+ type int expressions. Thanks to Jim Blandy <jimb@redhat.com> for
+ suggesting this solution.
+
+2002-06-18 Andrew Cagney <ac131313@redhat.com>
+
+ * config/romp/xm-rtbsd.h: Delete file.
+ * config/romp/rtbsd.mh: Delete file.
+
+2002-06-18 Keith Seitz <keiths@redhat.com>
+
+ * breakpoint.c (condition_command): Post breakpoint_modify
+ when a condition is added to an existing breakpoint.
+ (commands_command): Likewise for commands.
+ (set_ignore_count): Likewise for ignore counts.
+ If no tty, do not simply return, still need to send event
+ notification.
+ (ignore_command): Only print a newline if the command came
+ from a tty.
+ Don't call breakpoints_changed, since this is now properly
+ handled by set_ignore_count.
+
+2002-06-18 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS: Note that cris-elf target can be compiled with
+ -Werror.
+ * cris-tdep.c (cris_register_name): Make return type constant.
+ (cris_breakpoint_from_pc): Ditto.
+
+2002-06-18 Michal Ludvig <mludvig@suse.cz>
+
+ * frame.h (struct frame_info): Change type of context to
+ 'struct context'.
+
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (REGISTER_NAME): Change return type a constant string
+ pointer.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * config/mips/tm-mips.h (mips_register_name): Update.
+ * i386-tdep.h (i386_register_name): Update.
+ * mips-tdep.c (mips_register_name): Update
+ * alpha-tdep.c (alpha_register_name): Update.
+ * arch-utils.c (legacy_register_name): Update.
+ * arch-utils.h (legacy_register_name): Update.
+ * avr-tdep.c (avr_register_name): Update.
+ * ia64-tdep.c (ia64_register_name): Update.
+ * i386-tdep.c (i386_register_name): Update.
+ * sparc-tdep.c (sparc32_register_name): Update.
+ (sparc64_register_name): Update.
+ (sparclite_register_name): Update.
+ (sparclet_register_name): Update.
+ * sh-tdep.c (sh_generic_register_name): Update.
+ (sh_sh_register_name): Update.
+ (sh_sh3_register_name): Update.
+ (sh_sh3e_register_name): Update.
+ (sh_sh_dsp_register_name): Update.
+ (sh_sh3_dsp_register_name): Update.
+ (sh_sh4_register_name): Update.
+ (sh_sh64_register_name): Update.
+ * s390-tdep.c (s390_register_name): Update.
+ * rs6000-tdep.c (rs6000_register_name): Update.
+ * ns32k-tdep.c (ns32k_register_name_32082): Update.
+ (ns32k_register_name_32382): Update.
+ * d10v-tdep.c (d10v_ts2_register_name): Update.
+ (d10v_ts3_register_name): Update.
+ * xstormy16-tdep.c (xstormy16_register_name): Update.
+ * vax-tdep.c (vax_register_name): Update.
+ * v850-tdep.c (v850_register_name): Update.
+ * m68hc11-tdep.c (m68hc11_register_name): Update.
+ * mn10300-tdep.c (mn10300_generic_register_name): Update.
+ (am33_register_name): Update.
+
+2002-06-17 Grace Sainsbury <graces@redhat.com>
+
+ * m68k-tdep.c: Reindented.
+
+2002-06-17 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_indent.sh: Add prgregset_t, fpregset_t, and gregset_t to the
+ list of predefined types.
+
+2002-06-16 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE,
+ REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW): Remove defines.
+ (i386_register_virtual_type, i386_register_convertible,
+ i386_register_convert_to_virtual, i386_register_convert_to_raw):
+ Remove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+ * config/i386/tm-i386lynx.h (SAVED_PC_AFTER_CALL): Remove define.
+ (i386lynx_saved_pc_after_call): Remove prototype.
+ * i386ly-tdep.c: Include "i386-tdep.h".
+ (i386lynx_saved_pc_after_call): Make static. Use
+ read_memory_nobpt instead of read_memory. Use
+ read_memory_unsigned_integer instead of read_memory_integer.
+ (i386lynx_init_abi): New function.
+ (i386lynx_coff_osabi_sniffer): New function.
+ (_initialize_i386bsd_tdep): New function.
+
+ * config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
+ CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
+ CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
+ (i386_fix_call_dummy): Remove prototype.
+ * i386-tdep.c (i386_call_dummy_words): New variable.
+ (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * command.h (add_setshow_auto_boolean_cmd): Replace
+ add_set_auto_boolean_cmd.
+ * cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace
+ add_set_auto_boolean_cmd.
+ * cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration.
+ * mips-tdep.c (_initialize_mips_tdep): Update ``set mips
+ mask-address'' command.
+ (show_mask_address): Add cmd parameter.
+ * remote.c (add_packet_config_cmd): Update. Change type of
+ set_func and show_func to cmd_sfunc_ftype.
+ (_initialize_remote): Update `set remote Z-packet'
+ (show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter.
+ (show_remote_protocol_e_packet_cmd): Ditto.
+ (show_remote_protocol_E_packet_cmd): Ditto.
+ (show_remote_protocol_P_packet_cmd): Ditto.
+ (show_remote_protocol_Z_software_bp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_write_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_read_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_access_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_packet_cmd): Ditto.
+ (show_remote_protocol_binary_download_cmd): Ditto.
+ (show_remote_cmd): Pass NULL to all of above.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
+ DEPRECATED_EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, PUSH_DUMMY_FRAME,
+ POP_FRAME): Remove defines.
+ (i386_push_arguments, i386_store_struct_return,
+ i386_extract_return_value, i386_store_return_value,
+ i386_extract_struct_value_address, i386_push_dummy_frame,
+ i386_pop_frame): Renove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (add_setshow_boolean_cmd): Replace
+ add_set_boolean_cmd.
+ (add_setshow_cmd): New function.
+ * command.h (add_setshow_boolean_cmd): Replace
+ add_set_boolean_cmd.
+ * remote-rdi.c (_initialize_remote_rdi): Update ``set rdiheartbeat''
+ and ``set rdiromatzero''.
+ * maint.c (_initialize_maint_cmds): Update commented out code.
+ * cli/cli-decode.h (add_set_boolean_cmd): Delete declaration.
+ * target.c (initialize_targets): Update `set
+ trust-readonly-sections'.
+ * remote.c (_initialize_remote): Update `set remotebreak'.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (FUNCTION_START_OFFSET, INNER_THAN,
+ BREAKPOINT, DECR_PC_AFTER_BREAK): Removed.
+ * i386-tdep.c (i386_skip_prologue): Adjust function signature to
+ fit into multi-arch framework.
+ (i386_breakpoint_from_pc): New function.
+ (i386_gdbarch_init): Adjust for removal of the macros mentioned
+ above.
+
+ * config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION,
+ FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS,
+ FRAME_ARGS_SKIP, FRAME_INIT_SAVED_REGS): Remove defines.
+ (i386_frameless_function_invocation, i386_frame_num_args,
+ i386_frame_init_saved_regs): Remove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (set_cmd_cfunc): Update.
+ (set_cmd_sfunc): Update.
+ * command.h (cmd_cfunc_ftype, cmd_sfunc_ftype): Declare.
+ (set_cmd_sfunc, set_cmd_cfunc): Update.
+ * cli/cli-decode.h: Update.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-sol2-tdep.c (i386_sol2_osabi_sniffer): New function.
+ (_initialize_i386_sol2_tdep): Register i386_sol2_osabi_sniffer.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (auto_boolean): Declare enum.
+ * command.h (cmd_auto_boolean): Delete enum.
+ * mips-tdep.c (mask_address_var): Update.
+ (mips_mask_address_p): Update.
+ (show_mask_address): Update.
+ * remote.c (struct packet_config): Update.
+ (update_packet_config): Update.
+ (show_packet_config_cmd): Update.
+ (packet_ok): Update.
+ (add_packet_config_cmd): Update.
+ (_initialize_remote):
+ * command.h: Update.
+ * cli/cli-setshow.c (parse_auto_binary_operation): Update.
+ (do_setshow_command): Update.
+ * cli/cli-decode.c (add_set_auto_boolean_cmd): Update.
+ * cli/cli-decode.h: Update.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-cygwin.h, config/i386/tm-fbsd.h,
+ config/i386/tm-go32.h, config/i386/tm-i386gnu.h,
+ config/i386/tm-i386sol2.h, config/i386/tm-i386v4.h,
+ config/i386/tm-linux.h, config/i386/tm-nbsd.h,
+ config/i386/tm-obsd.h (HAVE_I387_REGS): Remove define.
+ * config/i386/tm-i386.h: Unconditionally define FLOAT_INFO.
+
+ * i386-tdep.c (i386_coff_osabi_sniffer): Add "coff-go32" to the
+ list of DJGPP COFF targets.
+
+ * config/i386/tm-i386.h (REGISTER_SIZE): Remove define.
+ (NUM_GREGS, NUM_FREGS, NUM_SSE_REGS): Remove defines.
+ (FP_REGNUM, SP_REGNUM, PC_REGNUM, PS_REGNUM): Remove defines.
+ (FP0_REGNUM): Remove define.
+ (MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
+ MAX_REGISTER_VIRTUAL_SIZE): Remove define.
+ (i386_register_virtual_size): Remove protoype.
+ * i386-tdep.c (i386_register_virtual_size): Removed.
+ (i386_extract_return_value, i386_store_return_value): Use
+ FP0_REGNUM instead of NUM_FREGS to determine whether the
+ floating-point registers are available.
+ (i386_gdbarch_init): Tweak FIXME about FPU registers.
+ Adjust for removal of macros mentioned above.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386v4-nat.c: Include "i386-tdep.h". Reformat and tweak various
+ comments.
+ (fill_gregset, supply_gregset, supply_fpregset, fill_fpregset):
+ Remove prototypes.
+ (supply_gregset, fill_gregset): Remove use of register keyword and
+ remove declaration for regmap. Use I386_NUM_GREGS instead of
+ NUM_REGS and NUM_FREGS.
+ (FPREGSET_FSAVE_OFFSET): Remove.
+ (supply_fpregset, fill_fpregset): Use FPO_REGNUM instead of
+ NUM_FREGS to determine whether the floating-point registers are
+ available.
+
+ * i386gnu-nat.c (supply_gregset, gnu_fetch_registers,
+ gnu_store_registers): Replace usage of NUM_GREGS with
+ I386_NUM_GREGS.
+
+ * i386-linux-nat.c (OLD_CANNOT_FETCH_REGISTER,
+ OLD_CANNOT_STORE_REGISTER, supply_gregset, fill_gregset): Replace
+ usage of NUM_GREGS with I386_NUM_GREGS.
+
+ * i386-linux-nat.c (fill_gregset): Remove redundant parentheses.
+
+ * i386bsd-nat.c: Include "i386-tdep.h".
+ (supply_gregset, fill_gregset): Replace usage of NUM_GREGS with
+ I386_NUM_GREGS.
+
+ * i386v-nat.c: Remove copnditional inclusion of <asm/debugreg.h>,
+ and associated comment. They no longer make any sense, since we
+ don't use this file anymore on Linux.
+
+ * config/i386/tm-i386.h (MAX_NUM_REGS): Removed.
+ * i386-tdep.c (i386_register_offset, i386_register_size): Use
+ I386_SSE_NUM_REGS instead of MAX_NUM_REGS for the number of
+ elements in these arrays.
+ (_initialize_i386_tdep): Use I386_SSE_NUM_REGS instead of
+ MAX_NUM_REGS.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.h (gdb_osabi): Add GDB_OSABI_LYNXOS.
+ * osabi.c (gdb_osabi_names): Add entry for "LynxOS".
+
+2002-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename
+ EXTRACT_RETURN_VALUE.
+ (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename
+ EXTRACT_STRUCT_VALUE_ADDRESS.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * values.c (value_being_returned): Handle
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+ (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE.
+
+ * arm-linux-tdep.c (arm_linux_init_abi): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+
+ * config/arc/tm-arc.h: Update.
+ * config/d30v/tm-d30v.h: Update.
+ * config/fr30/tm-fr30.h: Update.
+ * config/h8300/tm-h8300.h: Update.
+ * config/h8500/tm-h8500.h: Update.
+ * config/i386/tm-i386.h: Update.
+ * config/i386/tm-ptx.h: Update.
+ * config/i386/tm-symmetry.h: Update.
+ * config/i960/tm-i960.h: Update.
+ * config/m32r/tm-m32r.h: Update.
+ * config/m68k/tm-delta68.h: Update.
+ * config/m68k/tm-linux.h: Update.
+ * config/m68k/tm-m68k.h: Update.
+ * config/m88k/tm-m88k.h: Update.
+ * config/mcore/tm-mcore.h: Update.
+ * config/mips/tm-mips.h: Update.
+ * config/mn10200/tm-mn10200.h: Update.
+ * config/pa/tm-hppa.h: Update.
+ * config/pa/tm-hppa64.h: Update.
+ * config/sparc/tm-sp64.h: Update.
+ * config/sparc/tm-sparc.h: Update.
+ * config/sparc/tm-sparclet.h: Update.
+ * config/z8k/tm-z8k.h: Update.
+
+2002-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (i386_linux_tdep_h): Define.
+ (i386_tdep_h, i387_tdep_h): Define.
+ (i386-linux-nat.o): Add $(i386_linux_tdep_h),
+ $(i386_tdep_h) and $(i387_tdep_h).
+ * i386-linux-nat.c: Include "i386-linux-tdep.h".
+
+2002-06-14 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (START_INFERIOR_TRAPS_EXPECTED): Removed.
+ Already covered by the default.
+
+ * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT,
+ TARGET_LONG_DOUBLE_BIT): Remove. * i386-tdep.c
+ (i386_gdbarch_init): Initialize long_double_format and long_double
+ bit.
+
+ * config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and
+ i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o.
+ Move these to ...
+ * config/i386/i386sol2.mh: ... here.
+ * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define.
+ (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef.
+ (SIGCONTEXT_PC_OFFSET): Remove define.
+ (IN_SIGTRAMP): Remove define.
+ * i386-sol2-tdep.c: New file.
+
+ * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h.
+ * config/i386/tm-i386nw.h: Removed.
+
+ * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM,
+ USE_STRUCT_CONVENTION): Remove defines.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (IN_SIGTRAMP): Remove define.
+ (i386bsd_in_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+ function. Update comment accordingly
+ (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+ (FRAME_SAVED_PC): Remove define.
+ (i386bsd_frame_saved_pc): Remove prototype.
+ * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC,
+ GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (IN_SIGTRAMP): Remove define.
+ (i386bsd_in_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+ function. Update comment accordingly
+ (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+ (FRAME_SAVED_PC): Remove define.
+ (i386bsd_frame_saved_pc): Remove prototype.
+ * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention):
+ Remove prototype.
+ (USE_STRUCT_CONVENTION): Remove prototype.
+ * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove
+ declaration.
+ (_initialize_i386bsd_nat): Revise logic to determine some
+ constants at compile time when compiling a native GDB. Warn if
+ things don't match up with what we expect.
+ * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end):
+ Remove variables.
+ (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite
+ to use date stored in `struct gdbarch_tdep'.
+ (i386bsd_sigcontext_offset): Remove varaible.
+ (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data
+ stored in `struct gdbarch_tdep'.
+ (i386bsd_frame_saved_pc): Make static.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions.
+ (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset,
+ i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
+ i386fbsd4_sc_pc_offset): New variables.
+ (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi,
+ i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New
+ functions.
+ (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New
+ functions.
+ * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment.
+ Modify the value of i386fbsd_sigtramp_start and
+ i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and
+ i386fbsd_sigtramp_end.
+ * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove
+ function.
+
+ * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move
+ define to i386-linux-tdep.h.
+ (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME,
+ REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove
+ defines.
+ (i386_linux_register_name, i386_linux_register_byte,
+ i386_linux_register_raw_size): Remove prototypes.
+ (i386_linux_svr4_fetch_link_map_offsets): Remove prototype.
+ (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define.
+ (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL,
+ TARGET_WRITE_PC): Remove defines.
+ (i386_linux_in_sigtramp, i386_linux_frame_chain,
+ i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call,
+ i386_linux_write_pc): Remove prototypes.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ * i386-linux-tdep.h: New file.
+ * i386-linux-nat.c: Include "i386-linux-tdep.h".
+ * i386-linux-tdep.c: Include "i386-tdep.h" and
+ "i386-linux-tdep.h".
+ (i386_linux_register_name, i386_linux_register_byte,
+ i386_linux_register_raw_size, i386_linux_in_sigtramp,
+ i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets):
+ Make static.
+ (i386_linux_init_abi): New function.
+ (_initialize_i386_linux_tdep): New function.
+
+ * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define.
+ (i386_saved_pc_after_call): Remove prototype.
+ (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register".
+ (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
+ DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines.
+ (i386_register_name, i386_stab_reg_to_regnum,
+ i386_dwarf_reg_to_regnum): Remove prototypes.
+ (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS,
+ SIZEOF_SSE_REGS): Remove defines.
+ (REGISTER_BYTES): Remove define.
+ (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines.
+ (i386_register_byte, i386_register_raw_size): Remove prototypes.
+ (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines.
+ (i386_frame_chain, i386_frame_saved_pc): Remove prototypes.
+ * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define.
+ (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP,
+ JB_EDX, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines.
+ (sigtramp_saved_pc): Remove define.
+ (i386v4_sigtramp_saved_pc): Remove prototype.
+ * config/i386/tm-go32.h (FRAME_CHAIN,
+ FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines.
+ (i386go32_frame_saved_pc): Remove prototype.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ * i386-tdep.h: Include "osabi.h".
+ (enum i386_abi): Removed.
+ (enum struct_return): New enum.
+ (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset,
+ struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and
+ sc_pc_offset members.
+ (i386_gdbarch_register_os_abi): Remove prototype.
+ (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS,
+ I386_SSE_NUM_REGS): New defines.
+ (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS,
+ I386_SSE_SIZEOF_REGS): New defines.
+ (i386_register_name, i386_register_byte, i386_register_raw_size):
+ New prototypes.
+ (i386_elf_init_abi, i386_svr4_init_abi): New prototypes.
+ (i386bsd_sigtramp_saved_pc): New prototype.
+ * i386-tdep.c: Don't include "elf-bfd.h".
+ (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum,
+ i386_frame_chain, i386_saved_pc_after_call): Make static.
+ (i386_frame_saved_pc): Rewrite to call architecture dependent
+ function to deal with signal handlers. Make static.
+ (i386go32_frame_saved_pc): Removed.
+ [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target):
+ Removed.
+ (i386_get_longjmp_target): New function.
+ (default_struct_convention, pcc_struct_convention,
+ reg_struct_convention, valid_conventions, struct_convention): New
+ variables.
+ (i386_use_struct_convention): New function.
+ (i386v4_sigtramp_saved_pc): Renamed to
+ i386_svr4_sigtramp_saved_pc. Made static. Moved.
+ (i386_pc_in_sigtramp): New function.
+ (i386_abi_names): Removed.
+ (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD,
+ ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD):
+ Removed.
+ (process_note_sections, i386_elf_abi_from_note, i386_elf_abi,
+ i386_gdbarch_register_os_abi): Removed.
+ (struct i386_abi_handler): Removed.
+ (i386_abi_handler_list): Removed.
+ (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New
+ functions.
+ (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi,
+ i386_nw_init_abi): New functions.
+ (i386_gdbarch_init): Rewritten to use generic OS ABI framework.
+ Use set_gdbarch_xxx() calls instead of relying on macros for a
+ number of calls.
+ (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions.
+ (_initialize_i386_tdep): Add new 'struct-convcention' command.
+ Register the various architecture variants defined in this file.
+
+2002-06-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
+ (struct main_type): Remove arg_types member. Update comments for
+ struct field.
+ (TYPE_ARG_TYPES): Remove.
+ (TYPE_FN_FIELD_ARGS): Update.
+ (smash_to_method_type): Update prototype.
+
+ * c-typeprint.c (cp_type_print_method_args): Take method type
+ instead of argument list. Use new argument layout. Simplify.
+ (c_type_print_args): Use new argument layout. Simplify.
+ (c_type_print_base): Update call to cp_type_print_method_args.
+ * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
+ argument; use die->type instead. Update call to
+ smash_to_method_type.
+ (read_structure_scope): Update call to dwarf2_add_member_fn.
+ * gdbtypes.c (allocate_stub_method): Update comment.
+ (smash_to_method_type): Take new NARGS and VARARGS arguments.
+ Use new argument layout.
+ (check_stub_method): Use new argument layout. Don't count
+ void as an argument.
+ (print_arg_types): Update comments. Use new argument layout.
+ (recursive_dump_type): Don't print arg_types member.
+ * hpread.c (hpread_read_struct_type): Use new argument layout.
+ (fixup_class_method_type): Likewise.
+ (hpread_type_lookup): Likewise.
+ * stabsread.c (read_type): Update calls to read_args and
+ smash_to_method_type.
+ (read_args): Use new argument layout. Simplify.
+ * valops.c (typecmp): Use new argument layout. Update parameters
+ and comments. Simplify.
+ (hand_function_call): Use new argument layout.
+ (search_struct_method): Update call to typecmp.
+ (find_overload_match): Use new argument layout.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Mention multithreaded debug support for gdbserver.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * MAINTAINERS: Mention NEWS.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (PROC_SYMBOL): Add warning comment.
+ (struct mips_objfile_private, compare_pdr_entries): New.
+ (non_heuristic_proc_desc): Read the ".pdr" section if it
+ is present.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_push_arguments): Rewrite using a two-pass loop.
+ (arm_debug): New static variable.
+ (_initialize_arm_tdep): Add ``set debug arm'' command.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (sim_arm_h): Define.
+ (arm-tdep.o): Add $(sim_arm_h) and $(gdb_assert_h).
+ * arm-tdep.c: Include "gdb/sim-arm.h" and "gdb_assert.h".
+ (arm_register_sim_regno): New function, map an internal REGNUM
+ onto a simulator register number.
+ (arm_gdbarch_init): Set register_sim_regno.
+
+2002-06-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * MAINTAINERS: Add self.
+
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ * source.c (source_info): Mention whether the symtab has
+ information about preprocessor macros.
+
+ Call the command `info macro', not `show macro'.
+ * macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
+ Fix error message.
+ (_initialize_macrocmd): Register `info_macro_command' in
+ `infolist', not `showlist'.
+
+2002-06-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (MIPS_FPU_TYPE, FP_REGISTER_DOUBLE, MIPS_EABI)
+ (MIPS_LAST_FP_ARG_REGNUM, MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_SAVED_REGSIZE, MIPS_REGS_HAVE_HOME_P)
+ (MIPS_DEFAULT_STACK_ARGSIZE, GDB_TARGET_IS_MIPS64)
+ (MIPS_DEFAULT_MASK_ADDRESS_P): Remove obsolete definitions. Define
+ unconditionally.
+ (set_mipsfpu_single_command, set_mipsfpu_double_command)
+ (set_mipsfpu_none_command): Remove if (GDB_MULTI_ARCH).
+ (_initialize_mips_tdep): Remove dead code.
+ * config/mips/tm-irix5.h (MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+ * config/mips/tm-irix6.h (MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+ * config/mips/tm-mips.h (MIPS_EABI, MIPS_LAST_ARG_REGNUM,
+ MIPS_LAST_FP_ARG_REGNUM): Remove.
+
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (unwind_tmp_obstack_init): New.
+ (unwind_tmp_obstack_free, parse_frame_info)
+ (update_context, cfi_read_fp, cfi_write_fp)
+ (cfi_frame_chain, cfi_init_extra_frame_info)
+ (cfi_virtual_frame_pointer): Use the above function.
+ * dwarf2cfi.c: Reindented (using 'indent dwarf2cfi.c').
+
+2002-06-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c (v850_type_is_scalar): New function.
+ (v850_use_struct_convention): Match current gcc implementation
+ as close as possible.
+ (v850_push_arguments): Fix stack_offset handling. Don't write
+ struct_addr into register. This is done by v850_store_struct_return.
+ (v850_extract_return_value): Care for structs.
+ (v850_store_return_value): Ditto.
+ (v850_store_struct_return): Actually write address.
+
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions
+ without debug information too.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (PRINT_FLOAT_INFO): Add frame and ui_file parameters.
+ Make multi-arch pure.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arm-tdep.c (arm_print_float_info): Update.
+ * arch-utils.h (default_print_float_info): Update.
+ * arch-utils.c (default_print_float_info): Update.
+ * infcmd.c (float_info): Update call.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (init.c): Move the call to _initialize_gdbtypes to
+ the front of the initialize list.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (struct inferior_status): Replace fields
+ selected_frame_address and selected_level with field
+ selected_frame_id.
+ (save_inferior_status): Update. Use get_frame_id.
+ (struct restore_selected_frame_args): Delete.
+ (restore_selected_frame): Update. Use frame_find_by_id.
+ (restore_inferior_status): Update.
+
+ * breakpoint.h (struct breakpoint): Change type of
+ watchpoint_frame to frame_id.
+ * breakpoint.c (insert_breakpoints): Use frame_find_by_id. Remove
+ call to get_current_frame.
+ (do_enable_breakpoint): Use frame_find_by_id. Remove call to
+ get_current_frame.
+ (watchpoint_check): Use frame_find_by_id.
+
+ * frame.h (record_selected_frame): Delete declaration.
+ * stack.c (record_selected_frame): Delete function.
+
+ * frame.h (struct frame_id): Define.
+ (get_frame_id): Declare.
+ (frame_find_by_id): Declare.
+ * frame.c (frame_find_by_id): New function.
+ (get_frame_id): New function.
+
+2002-06-10 Andrey Volkov <avolkov@transas.com>
+
+ * ser-e7kpc.c: Fix duplicated define and call of
+ _initialize_ser_e7000pc
+
+2002-06-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals/signals.c (target_signal_from_host): Fix #ifdef
+ SIGRTMIN case.
+ (do_target_signal_to_host): Likewise.
+
+2002-06-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (mips_find_abi_section): New function.
+ (mips_gdbarch_init): Call it.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * solib-svr4.c (init_fetch_link_map_offsets): Simply return
+ legacy_fetch_link_map_offsets. Adjust comment to reflect reality
+ after Andrew's 2002-06-08 gdbarch change.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (suppy_gregset): Don't supply
+ I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
+ register cache.
+ (fill_gregset): Don't fetch it under the same circumstances.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (callback_h): Define.
+ (remote_sim_h): Update path to remote-sim.h.
+ (remote-rdp.o): Add $(callback_h).
+ (remote-sim.o): Use $(callback_h).
+ * remote-sim.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * remote-rdp.c: Include "gdb/callback.h".
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.h (gdb_osabi): Add GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
+ * osabi.c (gdb_osabi_names): Add "DJGPP" and "NetWare".
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * sparcl-tdep.c: Use __CYGWIN__ instead of __CYGWIN32__.
+ * rdi-share/serpardr.c: Ditto.
+ * rdi-share/unixcomm.c: Ditto.
+ * rdi-share/serdrv.c: Ditto.
+ * rdi-share/hostchan.h: Ditto.
+ * rdi-share/hostchan.c: Ditto.
+ * rdi-share/host.h: Ditto.
+ * rdi-share/devsw.c: Ditto.
+
+ * objfiles.h: Change type of obj_private to void pointer.
+ * pa64solib.c: Update copyright. Don't include "assert.h", use
+ strcmp instead of STREQ, use LONGEST, do not use PTR
+ * somsolib.c: Ditto.
+
+ * config/djgpp/fnchange.lst: Fix problems with bfd/elf32-i386.c,
+ bfd/elf32-i386qnx.c, bfd/elf32-sh.c, bfd/elf32-sh64-nbsd.c,
+ bfd/elf64-sh64-nbsd.c bfd/elf64-sh64.c.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (GET_SAVED_REGISTER): Delete macro definition.
+ (default_get_saved_register): Delete function.
+ * gdbarch.sh (GET_SAVED_REGISTER): Set default to
+ generic_unwind_get_saved_register.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_CHAIN_VALID): Set default to
+ generic_func_frame_chain_valid.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * blockframe.c (generic_func_frame_chain_valid): Only check
+ PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about
+ passing FP to PC_IN_CALL_DUMMY.
+ Fix PR gdb/360.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (struct gdbarch_data): Add field init_p.
+ (register_gdbarch_data): Initialize init_p.
+ (gdbarch_data): Initialize data pointer using the init function.
+ (init_gdbarch_data): Delete function.
+ (gdbarch_update_p): Update.
+ (initialize_non_multiarch): Update.
+ (struct gdbarch): Add field initialized_p.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-07 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (x86_64_fxsave_offset): New.
+ (supply_fpregset, fill_fpregset): Don't call i387_*_fxsave,
+ better do the things actually here.
+ * x86-64-tdep.c (x86_64_register_name2nr): New.
+ (x86_64_register_name): Renamed to x86_64_register_nr2name.
+ (x86_64_gdbarch_init): Respect the above change.
+ * x86-64-tdep.h (x86_64_register_name2nr)
+ (x86_64_register_nr2name): Add prototypes.
+ * config/i386/x86-64linux.mt (TDEPFILES): Remove i387-tdep.o.
+
+2002-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * d10v-tdep.c (d10v_push_arguments): Handle struct_return.
+ Delete extra braces and re-indent.
+ (d10v_store_return_value): Char return values
+ must be shifted over by one byte in R0.
+ (d10v_extract_return_value): Delete extra braces, re-indent.
+
+2002-06-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * d10v-tdep.c (d10v_read_sp, d10v_read_fp): Add prototype.
+ (d10v_register_virtual_type): Make $fp and $sp be pointer to data.
+ (d10v_integer_to_address): Rewrite.
+ (d10v_frame_init_saved_regs): When reading fp and sp registers use
+ the d10v specific functions which take care of converting to the
+ correct space.
+
+2002-06-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * config/djgpp/fnchange.lst: Add testsuite files altivec-abi.c,
+ altivec-abi.exp, altivec-regs.c, altivec-regs.exp.
+
+2002-06-02 Andrew Cagney <ac131313@redhat.com>
+
+ * config/alpha/nm-linux.h: Add "config/" prefix to tm, nm and xm
+ includes.
+ * config/tm-linux.h: Ditto.
+ * config/alpha/tm-alphalinux.h: Ditto.
+ * config/arm/nm-linux.h, config/arm/tm-linux.h: Ditto.
+ * config/arm/xm-nbsd.h, config/i386/nm-gnu.h: Ditto.
+ * config/i386/nm-i386lynx.h, config/i386/nm-i386sol2.h: Ditto.
+ * config/i386/nm-i386v4.h, config/i386/nm-i386v42mp.h: Ditto.
+ * config/i386/nm-linux.h, config/i386/nm-m3.h: Ditto.
+ * config/i386/nm-ptx4.h, config/i386/nm-x86-64.h: Ditto.
+ * config/i386/tm-i386gnu.h, config/i386/tm-i386lynx.h: Ditto.
+ * config/i386/tm-i386m3.h, config/i386/tm-i386sco5.h: Ditto.
+ * config/i386/tm-i386v4.h, config/i386/tm-linux.h: Ditto.
+ * config/i386/tm-ptx4.h, config/i386/tm-vxworks.h: Ditto.
+ * config/i386/xm-i386v4.h, config/i386/xm-nbsd.h: Ditto.
+ * config/i386/xm-ptx.h, config/i386/xm-ptx4.h: Ditto.
+ * config/i960/tm-vx960.h, config/ia64/nm-aix.h: Ditto.
+ * config/ia64/nm-linux.h, config/ia64/tm-aix.h: Ditto.
+ * config/ia64/tm-linux.h, config/ia64/xm-aix.h: Ditto.
+ * config/m68k/nm-linux.h, config/m68k/nm-m68klynx.h: Ditto.
+ * config/m68k/nm-sysv4.h, config/m68k/tm-linux.h: Ditto.
+ * config/m68k/tm-m68klynx.h, config/m68k/tm-m68kv4.h: Ditto.
+ * config/m68k/tm-sun2os4.h, config/m68k/tm-sun3os4.h: Ditto.
+ * config/m68k/tm-vx68.h, config/m68k/xm-m68kv4.h: Ditto.
+ * config/m68k/xm-nbsd.h, config/m88k/nm-delta88v4.h: Ditto.
+ * config/m88k/tm-delta88v4.h, config/m88k/xm-delta88v4.h: Ditto.
+ * config/mips/nm-irix5.h, config/mips/nm-linux.h: Ditto.
+ * config/mips/tm-linux.h, config/mips/tm-mips64.h: Ditto.
+ * config/mips/tm-mipsm3.h, config/mips/tm-mipsv4.h: Ditto.
+ * config/mips/tm-vxmips.h, config/mips/xm-irix5.h: Ditto.
+ * config/mips/xm-mipsv4.h, config/ns32k/xm-nbsd.h: Ditto.
+ * config/pa/nm-hppao.h, config/powerpc/nm-linux.h: Ditto.
+ * config/powerpc/tm-linux.h, config/powerpc/tm-vxworks.h: Ditto.
+ * config/powerpc/xm-aix.h, config/rs6000/nm-rs6000ly.h: Ditto.
+ * config/rs6000/tm-rs6000ly.h, config/rs6000/xm-aix4.h: Ditto.
+ * config/sh/tm-linux.h, config/sparc/nm-linux.h: Ditto.
+ * config/sparc/nm-sparclynx.h, config/sparc/nm-sun4sol2.h: Ditto.
+ * config/sparc/tm-linux.h, config/sparc/tm-sp64linux.h: Ditto.
+ * config/sparc/tm-sp64sim.h, config/sparc/tm-sparclynx.h: Ditto.
+ * config/sparc/tm-sun4os4.h, config/sparc/tm-sun4sol2.h: Ditto.
+ * config/sparc/tm-vxsparc.h, config/sparc/xm-sun4sol2.h: Ditto.
+
+2002-05-04 Aidan Skinner <aidan@velvet.net>
+
+ * ada-exp.tab.c: New file
+ * ada-exp.y: New file
+ * ada-lang.c: New file
+ * ada-lang.h: New file
+ * ada-lex.c: New file
+ * ada-lex.l: New file
+ * ada-tasks.c: New file
+ * ada-typeprint.c: New file
+ * ada-valprint.c: New file
+
+2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Don't set
+ use_struct_convention to ppc_sysv_abi_broken_use_struct_convention.
+
+2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/rs6000/aix4.mt (TDEPFILES): Use ppc-sysv-tdep.o
+ insetead of ppc-linux-tdep.o.
+ * config/rs6000/rs6000.mt (TDEPFILES): Likewise.
+ * config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
+
+2002-06-02 Andrew Cagney <ac131313@redhat.com>
+
+ 2002-05-07 Christian Groessler <chris@groessler.org>
+ * z8k-tdep.c (z8k_print_register_hook): Fix display of 32 and 64
+ bit register contents for little endian hosts.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mention that any `HP/UX reader' can be changed by
+ any maintainer.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.h: Regenerate.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add everyone to write-after-approval list.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (frame_info): Use frame_register_unwind instead of
+ saved_regs. Mention when the SP is on the stack or in a register.
+
+ * frame.h (frame_register_unwind_ftype): Define. Document.
+ (struct frame_info): Add field register_unwind and
+ register_unwind_cache.
+ (frame_register_unwind): Declare.
+ (generic_unwind_get_saved_register): Declare.
+
+ * frame.c (frame_register_unwind): New function.
+ (generic_unwind_get_saved_register): New function.
+
+ * blockframe.c (generic_call_dummy_register_unwind): New function.
+ (frame_saved_regs_register_unwind): New function.
+ (set_unwind_by_pc): New function.
+ (create_new_frame): New function.
+ (get_prev_frame): New function.
+
+2002-05-30 Andrew Cagney <ac131313@redhat.com>
+
+ * a29k-share/: Delete directory.
+ * remote-vx29k.c: Delete file.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/djgpp/fnchange.lst: Add ns32knbsd-nat.c, ns32knbsd-tdep.c,
+ ppcnbsd-nat.c, ppcnbsd-tdep.c, sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add sparc64nbsd-nat.c,
+ sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+ (sparc64nbsd-nat.o)
+ (sparcnbsd-nat.o)
+ (sparcnbsd-tdep.o): New dependency lists.
+ * NEWS: Note new UltraSPARC NetBSD native configuration.
+ * configure.host (sparc64-*-netbsd*): New host.
+ * configure.tgt (sparc-*-netbsdelf*)
+ (sparc-*-netbsd*): Set gdb_target to nbsd.
+ (sparc64-*-netbsd*): New target.
+ * sparc64nbsd-nat.c: New file.
+ * sparcnbsd-nat.c: New file.
+ * sparcnbsd-tdep.c: New file.
+ * sparcnbsd-tdep.h: New file.
+ * config/sparc/nbsd.mt: New file.
+ * config/sparc/nbsd64.mh: New file.
+ * config/sparc/nbsd64.mt: New file.
+ * config/sparc/nbsdaout.mh (NATDEPFILES): Remove corelow.o,
+ sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
+ (HOST_IPC): Remove.
+ * config/sparc/nbsdaout.mt: Remove.
+ * config/sparc/nbsdelf.mh (NATDEPFILES): Remove corelow.o,
+ sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
+ (HOST_IPC): Remove.
+ * config/sparc/nbsdelf.mt: Remove.
+ * config/sparc/nm-nbsd.h: Update copyright years. Remove all
+ sparc-nat.c compatiblity defines.
+ * config/sparc/tm-nbsd.h: Update copyright years. Include solib.h.
+ (GDB_MULTI_ARCH): Set to GDB_MULTI_ARCH_PARTIAL.
+ * config/sparc/tm-nbsd64.h: New file.
+ * config/sparc/tm-nbsdaout.h: Remove.
+ * config/sparc/xm-nbsd.h: Remove.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (sparc-tdep.o): Add osabi.h to dependency list.
+ * sparc-tdep.c: Include osabi.h.
+ (gdbarch_tdep): Add osabi member.
+ (_initialize_sparc_tdep): Use gdbarch_register.
+ (sparc_gdbarch_init): Use generic OS ABI framework.
+ (sparc_dump_tdep): New function.
+
+2002-05-30 Kevin Buettner <kevinb@redhat.com>
+
+ * corefile.c (do_captured_read_memory_integer): Return non-zero
+ result.
+ (safe_read_memory_integer): Copy result of memory read when
+ status is non-zero. Also, add comments.
+
+2002-05-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ppc_tdep_h): Define.
+ (ppc-linux-nat.o)
+ (ppc-linux-tdep.o)
+ (rs6000-tdep.o): Use $(ppc_tdep_h).
+ (ppc-sysv-tdep.o)
+ (ppcnbsd-nat.o)
+ (ppcnbsd-tdep.o): New dependency lists.
+ * ppc-tdep.h: Use generic OS ABI framework.
+ * ppc-linux-tdep.c (_initialize_ppc_linux_tdep)
+ (ppc_linux_init_abi): New functions.
+ (ppc_sysv_abi_broken_use_struct_convention)
+ (ppc_sysv_abi_use_struct_convention)
+ (ppc_sysv_abi_push_arguments): Move to...
+ * ppc-sysv-tdep.c: ...here.
+ * ppcnbsd-nat.c: Don't include gdbcore.h and regcache.h.
+ * rs6000-tdep.c (process_note_abi_tag_sections)
+ (get_elfosabi): Remove.
+ (rs6000_gdbarch_init): Use generic OS ABI framework.
+ (rs6000_dump_tdep): New function.
+ (_initialize_rs6000_tdep): Use gdbarch_register.
+ * config/powerpc/linux.mt (TDEPFILES): Add ppc-sysv-tdep.o.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
+ * config/powerpc/aix.mt (TDEPFILES): Use ppc-sysv-tdep.o instead
+ of ppc-linux-tdep.o.
+ * config/powerpc/nbsd.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
+ * config/powerpc/vxworks.mt (TDEPFILES): Likewise.
+
+2002-05-29 Jim Blandy <jimb@redhat.com>
+
+ * macroscope.c (default_macro_scope): Put `void' in empty argument
+ list.
+
+2002-05-29 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (arch-utils.o): Add $(sim_regno_h).
+ * arch-utils.c: Include "sim-regno.h".
+ * gdbarch.sh: Don't include "sim-regno.h".
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * sim-regno.h (legacy_register_sim_regno): Move declaration from
+ here.
+ * arch-utils.h (legacy_register_sim_regno): To here.
+ * remote-sim.c (legacy_register_sim_regno): Move function from
+ here.
+ * arch-utils.c (legacy_register_sim_regno): To here.
+
+2002-05-28 Andrew Cagney <ac131313@redhat.com>
+
+ * sim-regno.h: New file.
+ * Makefile.in (sim_regno_h): Define.
+ (d10v-tdep.o, remote-sim.o): Add dependency on $(sim_regno_h).
+ * remote-sim.c: Include "sim-regno.h" and "gdb_assert.h".
+ (legacy_register_sim_regno): New function.
+ (one2one_register_sim_regno): New function.
+ (gdbsim_fetch_register): Rewrite.
+ (gdbsim_store_register): Only store a register when
+ REGISTER_SIM_REGNO is valid.
+ * d10v-tdep.c: Include "sim-regno.h".
+ (d10v_ts2_register_sim_regno): Add legacy_regiter_sim_regno check.
+ (d10v_ts3_register_sim_regno): Ditto.
+ * gdbarch.sh: Include "sim-regno.h".
+ (REGISTER_SIM_REGNO): Set default to legacy_register_sim_regno.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.h (default_register_sim_regno): Delete declaration.
+ * arch-utils.c (default_register_sim_regno): Delete function.
+
+2002-05-28 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ppcnbsd-nat.c: Rewrite.
+ * ppcnbsd-tdep.c: New file.
+ * ppcnbsd-tdep.h: New file.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Remove corelow.o,
+ solib.o, and solib-svr4.o.
+ * config/powerpc/nbsd.mt (TDEPFILES): Add ppcnbsd-tdep.o,
+ nbsd-tdep.o, and corelow.o.
+
+2002-05-28 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (--enable-gdb-build-warnings): Rewrite script to use
+ `tr' and `sed'. Mention that `broken' targets are not expected to
+ build.
+
+2002-05-27 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Remove obsolete note.
+ Let PC point right after the prologue before looking up symbols.
+
+2002-05-27 Martin M. Hunt <hunt@redhat.com>
+
+ * i386-tdep.c (i386_register_virtual_type): Return
+ builtin_type_vec128i for SSE registers.
+
+ * gdbtypes.h (builtin_type_vec128i): Declare.
+
+ * gdbtypes.c (build_builtin_type_vec128i): New function.
+ (builtin_type_v2_double, builtin_type_v4_int64): New types.
+ (builtin_type_vec128i): New type for SSE2 128-bit registers.
+ (build_gdbtypes): Initialize new builtin vector types.
+ (_initialize_gdbtypes): Register new vector types with gdbarch.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * MAINTAINERS: ns32k is not longer an obsolete candidate,
+ since it has been multi-arch'd.
+ * NEWS: Note that ns32k-*-* is now partial multi-arch.
+ Move Alpha and VAX multi-arch news entries to same section
+ as other multi-arch news.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c: include gdbtypes.h, inferior.h, regcache.h,
+ target.s, arch-utils.h, ns32k-tdep.h. Make many functions
+ static. Rename some register numbers to put them in ns32k-tdep
+ private namespace.
+ (ns32k_get_saved_register, ns32k_gdbarch_init_32082,
+ ns32k_gdbarch_init_32382, ns32k_gdbarch_init, ns32k_dump_tdep): New
+ functions.
+ (_initialize_ns32k_tdep): Use gdbarch_register.
+ * ns32k-tdep.h: New file.
+ * ns32knbsd-tdep.c: New file.
+ * config/ns32k/nbsdaout.mt (TDEPFILES): Add ns32knbsd-tdep.o.
+ * config/ns32k/tm-nbsd.h: Include "ns32k/tm-ns32k.h".
+ (IN_SOLIB_CALL_TRAMPOLINE, REGISTER_NAME, NUM_REGS,
+ REGISTER_BYTES, REGISTER_BYTE): Remove.
+ * config/ns32k/tm-ns32k.h: New file.
+ * config/ns32k/tm-umax.h: Remove.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_saved_pc_after_call,
+ ns32k_store_struct_return, ns32k_extract_return_value,
+ ns32k_store_return_value, ns32k_extract_struct_value_address): New
+ functions.
+ * config/ns32k/tm-umax.h (SAVED_PC_AFTER_CALL): Define as
+ ns32k_saved_pc_after_call.
+ (STORE_STRUCT_RETURN): Define as ns32k_store_struct_return.
+ (EXTRACT_RETURN_VALUE): Define as ns32k_extract_return_value.
+ (STORE_RETURN_VALUE): Define as ns32k_store_return_value.
+ (EXTRACT_STRUCT_VALUE_ADDRESS): Define as
+ ns32k_extract_struct_value_address.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_call_dummy_words, sizeof_ns32k_call_dummy_words,
+ ns32k_fix_call_dummy): New.
+ * config/ns32k/tm-umax.h (CALL_DUMMY_WORDS): Define as
+ ns32k_call_dummy_words.
+ (SIZEOF_CALL_DUMMY_WORDS): Define as sizeof_ns32k_call_dummy_words.
+ (CALL_DUMMY, CALL_DUMMY_LENGTH, CALL_DUMMY_ADDR,
+ CALL_DUMMY_NARGS): Remove.
+ (FIX_CALL_DUMMY): Define as ns32k_fix_call_dummy.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_breakpoint_from_pc, ns32k_frame_chain,
+ ns32k_frame_saved_pc, ns32k_frame_args_address,
+ ns32k_frame_locals_address, ns32k_frame_init_saved_regs,
+ ns32k_push_dummy_frame, ns32k_pop_frame): New functions.
+ * config/ns32k/tm-nbsd.h (FRAME_SAVED_PC): Remove.
+ * config/ns32k/tm-umax.h (INNER_THAN): Define as core_addr_lessthan.
+ (BREAKPOINT_FROM_PC): Define as ns32k_breakpoint_from_pc.
+ (BREAKPOINT): Remove..
+ (FRAME_CHAIN): Define as ns32k_frame_chain.
+ (FRAME_SAVED_PC): Define as ns32k_frame_saved_pc.
+ (FRAME_ARGS_ADDRESS): Define as ns32k_frame_args_address.
+ (FRAME_LOCALS_ADDRESS): Define as ns32k_frame_locals_address.
+ (FRAME_FIND_SAVED_REGS): Remove.
+ (FRAME_INIT_SAVED_REGS): Define as ns32k_frame_init_saved_regs.
+ (PUSH_DUMMY_FRAME): Define as ns32k_push_dummy_frame.
+ (POP_FRAME): Define as ns32k_pop_frame.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_register_byte_32082,
+ ns32k_register_byte_32382, ns32k_register_raw_size,
+ ns32k_register_virtual_size, ns32k_register_virtual_type): New
+ functions.
+ * config/ns32k/tm-nbsd.h (REGISTER_BYTE): Define as
+ ns32k_register_byte_32382.
+ * config/ns32k/tm-umax.h: Update copyright years.
+ (REGISTER_BYTE): Define as ns32k_register_byte_32082.
+ (REGISTER_RAW_SIZE): Define as ns32k_register_raw_size.
+ (REGISTER_VIRTUAL_SIZE): Define as ns32k_register_virtual_size.
+ (REGISTER_VIRTUAL_TYPE): Define as ns32k_register_virtual_type.
+ (ns32k_get_enter_addr): Fix prototype.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c: Update copyright years.
+ (ns32k_register_name_32082): New function.
+ (ns32k_register_name_32382): Ditto.
+ * config/ns32k/tm-nbsd.h (REGISTER_NAMES): Remove.
+ (REGISTER_NAME): Define as ns32k_register_name_32382.
+ * config/ns32k/tm-umax.h (REGISTER_NAMES): Remove.
+ (REGISTER_NAME): Define as ns32k_register_name_32082.
+
+2002-05-24 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (free_line_header): Use xfree, not free.
+
+2002-05-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/djgpp/fnchange.lst: Add alphabsd-nat.c,
+ alphabsd-tdep.c, mipsnbsd-nat.c, and mipsnbsd-tdep.c
+
+2002-05-23 Andrew Cagney <ac131313@redhat.com>
+
+ * PROBLEMS: Mention s390 and FreeBSD 4.4 build problems.
+
+2002-05-23 Andrew Cagney <ac131313@redhat.com>
+
+ From Ross Alexander at NEC Europe:
+ * config/pa/hpux11w.mh (NATDEPFILES): Add solib.o.
+
+2002-05-23 Michael Snyder <msnyder@redhat.com>
+
+ * cli/cli-dump.c (restore_command): Use parse_and_eval_long
+ for input, rather than parse_and_eval_address.
+
+2002-05-23 Andrew Cagney <ac131313@redhat.com>
+
+ * d10v-tdep.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".
+ * Makefile.in (sim_d10v_h): Update definition.
+
+2002-05-24 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (d10v_gdbarch_init): Revert old code included in
+ change `2002-05-22 Michael Snyder' below.
+ (d10v_push_arguments): Ditto.
+ (d10v_extract_return_value): Ditto.
+
+2002-05-23 Jim Blandy <jimb@redhat.com>
+
+ * macrotab.c (check_for_redefinition): Don't complain if the new
+ definition is the same as the previous one. Take more arguments
+ to allow the comparison.
+ (macro_define_object, macro_define_function): Pass more arguments
+ to check_for_redefinition.
+
+2002-05-22 Michael Snyder <msnyder@redhat.com>
+
+ * d10v-tdep.c: Change a few macros to enums for ease of debugging.
+ (d10v_frame_chain_valid): Add PC_IN_CALL_DUMMY clause.
+ (d10v_frame_saved_pc): Add PC_IN_CALL_DUMMY clause.
+ (d10v_frame_chain): Bail immediately if PC_IN_CALL_DUMMY.
+ Don't bail if return_pc is PC_IN_CALL_DUMMY.
+ Add a temp variable to save a call (and a memory read).
+ (d10v_init_extra_frame_info): Get fi->pc from callee's return_pc
+ if possible (so that PC_IN_CALL_DUMMY will work).
+
+2002-05-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * MAINTAINERS: Remove status `OBSOLETE' from v850.
+
+2002-05-22 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (frame_state_for): Added safety check for a valid
+ fde->cie_ptr.
+ (dwarf2_build_frame_info): Corrected handling of eh_frame.
+ (dwarf2_build_frame_info): Add offset to fde->initial_location
+ so that frames of shared libraries are mapped correctly.
+ (execute_stack_op): Change type of 'result' from ULONGEST to
+ CORE_ADDR.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/tm-nbsd.h: Include solib.h.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Don't make
+ assumptions about the host's byte order.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (alphanbsd-tdep.o, shnbsd-tdep.o): Add solib-svr4.h
+ to dependency list.
+ * alphanbsd-tdep.c: Include solib-svr4.h.
+ * shnbsd-tdep.c: Ditto.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (armnbsd-tdep.o): Add solib-svr4.h and
+ nbsd-tdep.h to dependency list.
+ * configure.host (arm*-*-netbsdelf*, arm*-*-netbsd*,
+ i[3456]86-*-netbsdaout*, i[3456]86-*-netbsd*, m68*-*-netbsd*,
+ ns32k-*-netbsd*, sparc-*-netbsdaout*, sparc-*-netbsd*): Use
+ nbsdaout.mh and nbsdelf.mh consistently.
+ * configure.tgt (i[3456]86-*-netbsd*, m68*-*-netbsd*,
+ ns32k-*-netbsd*, sparc-*-netbsdelf*, sparc-*-netbsd*) Use
+ nbsdaout.mt and nbsdelf.mh consistently.
+ * armnbsd-tdep.c: Include nbsd-tdep.h and solib-svr4.h.
+ (arm_netbsd_elf_init_abi): Use set_solib_svr4_fetch_link_map_offsets
+ to set nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
+ * config/nm-nbsd.h: Garbage-collect SVR4_SHARED_LIBS. Move
+ a.out shared library stuff from here...
+ * config/nm-nbsdaout.h: ...to here.
+ * config/tm-nbsd.h: Remove.
+ * config/alpha/nm-nbsd.h (SVR4_SHARED_LIBS): Remove.
+ * config/arm/nbsd.mh: Remove.
+ * config/arm/nbsd.mt (TDEPFILES): Remove solib-sunos.o, add
+ nbsd-tdep.o.
+ * config/arm/nbsdaout.mh: New file.
+ * config/arm/nbsdelf.mh: New file.
+ * config/arm/nm-nbsdaout.h: New file.
+ * config/i386/nbsd.mh: Remove.
+ * config/i386/nbsd.mt: Remove.
+ * config/i386/nbsdaout.mh: New file.
+ * config/i386/nbsdaout.mt: New file.
+ * config/i386/nbsdelf.mh (NAT_FILE): Use nm-nbsd.h.
+ * config/i386/nbsdelf.mt (TM_FILE): Use tm-nbsd.h.
+ * config/i386/nm-nbsd.h (REGISTER_U_ADDR,
+ i386_register_u_addr): Remove.
+ * config/i386/nm-nbsdaout.h: New file.
+ * config/i386/nm-nbsdelf.h: Remove.
+ * config/i386/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ (USE_STRUCT_CONVENTION): Remove.
+ * config/i386/tm-nbsdaout.h: New file.
+ * config/i386/tm-nbsdelf.h: Remove.
+ * config/m68k/nbsd.mh: Remove.
+ * config/m68k/nbsd.mt: Remove.
+ * config/m68k/nbsdaout.mh: New file.
+ * config/m68k/nbsdaout.mt: New file.
+ * config/m68k/nm-nbsd.h: Use config/nm-nbsd.h.
+ * config/m68k/nm-nbsdaout.h: New file.
+ * config/m68k/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ (IN_SOLIB_CALL_TRAMPOLINE): Define.
+ * config/ns32k/nbsd.mh: Remove.
+ * config/ns32k/nbsd.mt: Remove.
+ * config/ns32k/nbsdaout.mh: New file.
+ * config/ns32k/nbsdaout.mt: New file.
+ * config/ns32k/nm-nbsd.h: Include config/nm-nbsd.h.
+ * config/ns32k/nm-nbsdaout.h: New file.
+ * config/ns32k/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ (IN_SOLIB_CALL_TRAMPOLINE): Define.
+ * config/powerpc/nm-nbsd.h: Include config/nm-nbsd.h.
+ (SVR4_SHARED_LIBS): Remove.
+ * config/powerpc/tm-nbsd.h: Dont' include config/tm-nbsd.h.
+ * config/sparc/nbsd.mh: Remove.
+ * config/sparc/nbsd.mt: Remove.
+ * config/sparc/nbsdaout.mh: New file.
+ * config/sparc/nbsdaout.mt: New file.
+ * config/sparc/nbsdelf.mh (NAT_FILE): Use nm-nbsd.h.
+ * config/sparc/nbsdelf.mt: New file.
+ * config/sparc/nm-nbsdaout.h: New file.
+ * config/sparc/nm-nbsdelf.h: Remove.
+ * config/sparc/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ * config/sparc/tm-nbsdaout.h: New file.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add mipsnbsd-nat.c and
+ mipsnbsd-tdep.c
+ (mipsnbsd-nat.o, mipsnbsd-tdep.o): New dependency lists.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add shnbsd-tdep.c and
+ shnbsd-nat.c.
+ (shnbsd-tdep.o, shnbsd-nat.o): New dependency lists.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * NEWS: Note new MIPS NetBSD native configuration.
+ * configure.host (mips*-*-netbsd*): New host.
+ * configure.tgt (mips*-*-netbsd*): New target.
+ * mipsnbsd-nat.c: New file.
+ * mipsnbsd-tdep.c: New file.
+ * mipsnbsd-tdep.h: New file.
+ * config/mips/nbsd.mh: New file.
+ * config/mips/nbsd.mt: New file.
+ * config/mips/nm-nbsd.h: New file.
+ * config/mips/tm-nbsd.h: New file.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (SFILES): Add osabi.c.
+ (COMMON_OBS): Add osabi.o.
+ (osabi.o): New dependency list.
+ * osabi.c: New file.
+ * osabi.h: New file.
+ * doc/gdbint.texinfo: Document new generic OS ABI framework.
+
+ * Makefile.in (alpha_tdep_h): Define and use instead of
+ alpha-tdep.h.
+ * alpha-tdep.c (alpha_abi_names, process_note_abi_tag_sections,
+ get_elfosabi, alpha_abi_handler_list, alpha_gdbarch_register_os_abi):
+ Remove.
+ (alpha_gdbarch_init, alpha_dump_tdep): Use generic OS ABI framework.
+ * alpha-tdep.h: Include osabi.h.
+ (alpha_abi): Remove.
+ (gdbarch_tdep): Use generic OS ABI framework.
+ * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Use
+ gdbarch_register_osabi.
+ * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise.
+ * alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise.
+ * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise.
+
+ * Makefile.in (sh_tdep_h): Add osabi.h.
+ * sh-tdep.h (sh_osabi): Remove.
+ (gdbarch_tdep): Use generic OS ABI framework.
+ * sh-tdep.c (sh_osabi_names, process_note_abi_tag_sections,
+ sh_osabi_handler_list, sh_gdbarch_register_os_abi): Remove.
+ (sh_gdbarch_init, sh_dump_tdep): Use generic OS ABI framework.
+ * shnbsd-tdep.c (_initialize_shnbsd_tdep): Use gdbarch_register_osabi.
+
+ * Makefile.in (arm_tdep_h): Define and use instead of arm-tdep.h.
+ * arm-linux-tdep.c (_initialize_arm_linux_tdep): Use
+ gdbarch_register_osabi.
+ * arm-tdep.c (arm_abi_names, process_note_abi_tag_sections,
+ arm_abi_handler_list, arm_gdbarch_register_os_abi): Remove.
+ (get_elfosabi): Rename to...
+ (arm_elf_osabi_sniffer): ...this. Adjust to use generic OS
+ ABI framework support routines.
+ (arm_gdbarch_init): Use generic OS ABI framework.
+ (arm_dump_tdep): Likewise.
+ (_initialize_arm_tdep): Likewise.
+ * arm-tdep.h: Include osabi.h.
+ (arm_abi): Remove.
+ (gdbarch_tdep): Remove arm_abi and abi_name members. Add
+ osabi member.
+ (arm_gdbarch_register_os_abi): Remove prototype.
+ * armnbsd-tdep.c (arm_netbsd_aout_osabi_sniffer): New function.
+ (_initialize_arm_netbsd_tdep): Use gdbarch_register_osabi.
+
+ * Makefile.in (mips-tdep.o): Add osabi.h to dependency list.
+ * mips-tdep.c: Include osabi.h.
+ (gdbarch_tdep, mips_gdbarch_init, mips_dump_tdep): Use generic
+ OS ABI framework.
+
+2002-05-20 Kazu Hirata <kazu@cs.umass.edu>
+
+ * h8300-tdep.c: Fix formatting.
+
+2002-05-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
+ printing vector registers.
+
+2002-05-19 Andrew Cagney <ac131313@redhat.com>
+
+ From Fernando Nasser:
+ * remote.c (remote_async_open_1): Re-throw the exception when the
+ connection fails.
+ (remote_cisco_open): Ditto.
+ (remote_open_1): Ditto.
+
+2002-05-19 Andrew Cagney <ac131313@redhat.com>
+
+ * remote.c (remote_start_remote_dummy): Add uiout parameter.
+ (remote_start_remote): Add uiout parameter. Pass through to
+ remote_start_remote_dummy.
+ (remote_open_1): Use catch_exception instead of catch_errors.
+ (remote_async_open_1): Ditto.
+ (remote_cisco_open): Ditto.
+
+2002-05-19 Andrew Cagney <ac131313@redhat.com>
+
+ * remote.c (remote_start_remote): Replace PTR with void pointer.
+ (sigint_remote_twice_token, sigint_remote_token): Ditto. Make
+ static.
+
+2002-05-18 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_indent.sh: Allow the script to be run in the sim directory.
+
+2002-05-18 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-cygwin.h (NO_PTRACE_H): Remove define.
+ * config/i386/nm-go32.h (NO_PTRACE_H): Remove define.
+
+ * corelow.c (core_open): Only call set_gdbarch_from_file if
+ exec_bfd is NULL.
+
+2002-05-17 Andrey Volkov <avolkov@transas.com>
+
+ * h8300-tdep.c: Add support of EXR register
+ * config/h8300/tm-h8300.h: Ditto.
+
+2002-05-17 Andrey Volkov <avolkov@transas.com>
+
+ * h8300-tdep.c: Add additional CCR flags (I,UI,H,U)
+
+2002-05-17 Andrey Volkov <avolkov@transas.com>
+
+ * h8300-tdep.c: Change literal regnums to REGNO.
+
+2002-05-17 Jim Blandy <jimb@redhat.com>
+
+ * NEWS: Note addition of macro support.
+
+ Expand preprocessor macros in C expressions.
+ * c-lang.h: #include "macroexp.h", for macro_lookup_ftype.
+ (scan_macro_expansion, scanning_macro_expansion,
+ finished_macro_expansion): New function declarations.
+ (expression_macro_lookup_func, expression_macro_lookup_baton): New
+ variable declarations.
+ * parser-defs.h (expression_context_pc): New declaration.
+ * parse.c (expression_context_pc): New variable.
+ (parse_exp_1): Set expression_context_pc, as well as
+ expression_context_block.
+ * c-exp.y (yylex): If we're not already reading the result of a
+ macro expansion, try to macro-expand the next token. When we're
+ done scanning a macro expansion, switch back to the mainline text.
+ Commas and `if's in a macro's expansion don't terminate the input.
+ * c-lang.c: #include "macroscope.h" and "gdb_assert.h".
+ (macro_original_text, macro_expanded_text,
+ expression_macro_lookup_func, expression_macro_lookup_baton): New
+ variables.
+ (scan_macro_expansion, scanning_macro_expansion,
+ finished_macro_expansion, scan_macro_cleanup, null_macro_lookup,
+ c_preprocess_and_parse): New functions.
+ (c_language_defn, cplus_language_defn, asm_language_defn): Call
+ c_preprocess_and_parse, instead of c_parse.
+ * Makefile.in (c_lang_h): Note that this #includes macroexp.h.
+ (c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
+
+Fri May 17 14:26:19 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * sh-tdep.c (gdb_print_insn_sh64): Delete.
+ (gdb_print_insn_sh): Just set info->endian and use print_insn_sh.
+ (sh_gdbarch_init): Always use gdb_print_insn_sh.
+
+2002-05-17 Corinna Vinschen <vinschen@redhat.com>
+
+ * NEWS: Add section for multi-arched targets. Add v850 to that section.
+
+2002-05-17 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (sh_tdep_h): Define and use.
+ * config/sh/tm-sh.h (sh_osabi, sh_abi, gdbarch_tdep,
+ register enum): Move to...
+ * * sh-tdep.h: ...here.
+ * sh-tdep.c: Include sh-tdep.h.
+ * sh3-rom.c: Likewise.
+ * shnbsd-tdep.c: Likewise.
+
+2002-05-16 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c: Spelling fix in comment.
+
+2002-05-16 Jim Blandy <jimb@redhat.com>
+
+ Add commands for manually expanding macros and showing their
+ definitions.
+ * macrocmd.c, macroscope.c, macroscope.h: New files.
+ * Makefile.in (SFILES): Add macrocmd.c, macroscope.c.
+ (macroscope_h): New variable.
+ (HFILES_NO_SRCDIR): Add macroscope.h.
+ (COMMON_OBS): Add macrocmd.o, macroscope.o.
+ (macroscope.o, macrocmd.o): New rules.
+
+ Teach the Dwarf 2 reader to read macro information.
+ * dwarf2read.c: #include "macrotab.h".
+ (dwarf_macinfo_buffer): New variable.
+ (struct dwarf2_pinfo): New members: dwarf_macinfo_buffer, and
+ dwarf_macinfo_size.
+ (DWARF_MACINFO_BUFFER, DWARF_MACINFO_SIZE): New macros.
+ (dwarf2_missing_macinfo_section, dwarf2_macros_too_long,
+ dwarf2_macros_not_terminated, dwarf2_macro_outside_file,
+ dwarf2_macro_unmatched_end_file, dwarf2_macro_malformed_definition,
+ dwarf2_macro_spaces_in_definition): New complaints.
+ (dwarf2_has_info): Initialize dwarf_macinfo_offset.
+ (dwarf2_build_psymtabs): Read the .dwarf_macinfo section.
+ (dwarf2_build_psymtabs_hard): Record the buffer and its size in
+ the partial symbol table.
+ (psymtab_to_symtab_1): Set the macinfo buffer and size globals
+ from what's recorded in the partial symbol table.
+ (read_file_scope): If the compilation unit has a
+ `DW_AT_macro_info' attribute, read its macro information.
+ * Makefile.in (dwarf2read.o): Depend on macrotab.h.
+
+2002-05-16 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/546
+ * ser-tcp.c: Don't include <netinet/udp.h>.
+
+2002-05-16 Stephane Carrez <stcarrez@nerim.fr>
+
+ * MAINTAINERS: Update my email address.
+
+2002-05-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/nm-nbsd.h: Use "config/nm-nbsd.h" to include generic
+ include file of the same name.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.tgt: Mark v850 as multi-arched.
+ * config/v850/tm-v850.h: Remove file.
+ * config/v850/v850.mt: Eliminate TM_FILE.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c: Full multi-arch.
+ * config/v850/tm-v850.h: Eliminate or move to v850-tdep.c everything.
+ Define GDB_MULTI_ARCH to 2.
+
+2002-05-16 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y (current_type): New static variable.
+ Carries the type of the expression at the position that is parsed.
+ (push_current_type, pop_current_type): Two new functions. Used
+ to store/restore current_type in expression on specific tokens.
+ (search_field): New static variable. Set to one after parsing a point
+ as at that point only a FIELDNAME token should be searched.
+ (FIELDNAME): New token. After a point only a token belonging to
+ current_type type definition is allowed.
+ (all over token rules): reset and change current_type according
+ to rules.
+ (exp '[' rule): insert implicit array index field if
+ exp is a pascal string type.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c: Fix comment for v850_scan_prologue. Remove extra
+ frame info. Use frame_info's saved_regs instead of matching member
+ in extra_frame_info throughout.
+ (v850_frame_init_saved_regs): New function.
+ (v850_init_extra_frame_info): Move most functionality into
+ v850_frame_init_saved_regs().
+ * config/v850/tm-v850.h (EXTRA_FRAME_INFO): Remove definition.
+ (v850_frame_find_saved_regs): Remove declaration.
+ (FRAME_FIND_SAVED_REGS): Remove definition.
+ (v850_frame_init_saved_regs): Add declaration.
+ (FRAME_INIT_SAVED_REGS): Add definition.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c: Begin multi-arch'ing v850.
+ (v850_target_architecture_hook): Remove function.
+ (v850_gdbarch_init): New function. Add code previously in
+ v850_target_architecture_hook().
+ (_initialize_v850_tdep): Don't set target_architecture_hook.
+ Call register_gdbarch_init() instead.
+
+2002-05-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct cplus_struct_type): Remove args field.
+ * hpread.c (hpread_read_struct_type): Remove assignments to args.
+ (fixup_class_method_type): Likewise.
+
+2002-05-15 Jim Blandy <jimb@redhat.com>
+
+ Add macro structures to GDB's symbol tables. Nobody puts anything
+ in them yet.
+ * symtab.h (struct symtab): New member: `macro_table'.
+ * buildsym.h (pending_macros): New global variable.
+ * buildsym.c: #include "macrotab.h".
+ (buildsym_init): Initialize `pending_macros'.
+ (end_symtab): If we found macro information while reading a CU's
+ debugging info, do build a symtab structure for it. Make the
+ symtab point to the macro information, and clear the
+ `pending_macros' pointer which held it while we were reading the
+ debug info.
+ (really_free_pendings): Free any pending macro table.
+ * objfiles.h (struct objfile): New member: `macro_cache'.
+ * objfiles.c (allocate_objfile): Set allocate and free functions
+ for the macro cache's objstack.
+ (free_objfile): Empty the macro cache's obstack.
+ * symfile.c (reread_symbols): Empty the macro cache's obstack, and
+ set new allocate and free functions for it.
+ * solib-sunos.c (allocate_rt_common_objfile): Set allocate and
+ free functions for the macro cache's objstack. (Why is this
+ function building its own objfile?)
+ * symmisc.c (print_objfile_statistics): Print statistics on the
+ macro bcache.
+ * Makefile.in: Note that buildsym.o depends on macrotab.h.
+
+2002-05-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/nm-nbsd.h: Use <> for include of config/nm-nbsd.h.
+ (REGISTER_U_ADDR): Delete definition.
+ (arm_register_u_addr): Delete declaration.
+
+2002-05-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-linux-tdep.c (ARM_LINUX_JB_PC): Renamed from JB_PC.
+ (ARM_LINUX_JB_ELEMENT_SIZE): Likewise.
+
+2002-05-14 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (register_valid): Revise comments refering to "Not
+ available" and "unavailable".
+ * frame.c (frame_register_read): Ditto.
+ * findvar.c (value_of_register): Ditto.
+
+2002-05-15 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (remote_sim_h): Replace remote-sim_h.
+ (remote-sim.o): Update dependencies.
+ (d10v-tdep.o): Specify dependencies.
+ (sim_d10v_h): Define.
+
+2002-05-14 Jim Blandy <jimb@redhat.com>
+
+ * macroexp.c (init_buffer, gather_arguments, expand): Use NULL, not 0.
+ * macrotab.c (macro_lookup_inclusion, find_definition,
+ new_macro_table): Same.
+
+ * macroexp.c (currently_rescanning, expand): Use `strcmp () == 0',
+ not `! strcmp ()'. This is a dubious improvement.
+ * macrotab.c (macro_lookup_inclusion, find_definition): Same.
+
+ * macrotab.c (macro_lookup_inclusion): Initialize `best_depth',
+ although it's not necessary, to avoid a warning.
+
+2002-05-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h: Update accessor macros to use TYPE_MAIN_TYPE.
+ (TYPE_CONST, TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE): Use
+ TYPE_INSTANCE_FLAGS.
+ (struct main_type): New.
+ (struct type): Move most members to struct main_type. Change
+ cv_type and as_type to new type_chain member. Add instance_flags.
+ (TYPE_MAIN_TYPE, TYPE_CHAIN, TYPE_INSTANCE_FLAGS): New macros.
+ (TYPE_CV_TYPE, TYPE_AS_TYPE): Remove.
+ (finish_cv_type): Remove prototype.
+ * gdbtypes.c (alloc_type): Update comment. Allocate TYPE_MAIN_TYPE.
+ Set TYPE_CHAIN.
+ (alloc_type_instance): New function.
+ (smash_type): New function.
+ (make_pointer_type, make_reference_type, make_function_type)
+ (smash_to_member_type, smash_to_method_type): Call smash_type.
+ (make_qualified_type): New function.
+ (make_type_with_address_space): Call make_qualified_type.
+ (make_cv_type): Likewise.
+ (finish_cv_type): Remove unnecessary function.
+ (replace_type): Update comment. Copy TYPE_MAIN_TYPE.
+ (recursive_dump_type): Dump TYPE_CHAIN and TYPE_INSTANCE_FLAGS;
+ remove TYPE_CV_TYPE and TYPE_AS_TYPE.
+ * c-typeprint.c (c_type_print_modifier): Use TYPE_INSTANCE_FLAGS.
+ * dwarf2read.c (read_structure_scope): Don't call finish_cv_type.
+ * hpread.c (hpread_read_struct_type): Likewise.
+ * stabsread.c (read_struct_type): Likewise.
+
+2002-05-14 Elena Zannoni <ezannoni@redhat.com>
+
+ * configure.tgt: Add a catch all sh* target, for cases like
+ sh[2,3,4]-elf and sh-hms.
+
+2002-05-14 Keith Seitz <keiths@redhat.com>
+
+ * event-loop.c (create_file_handler): Don't do anything but
+ update data when we are given a fd which we are already
+ monitoring.
+
+2002-05-14 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (context_cpy): Copy registers correctly.
+ (update_context): Use __func__ in warnings.
+
+2002-05-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * ser-tcp.c: Include <netinet/udp.h>. Rename tcp_open
+ and tcp_close to net_open and net_close.
+ (net_open): Accept "udp:" and "tcp:" specifications. Connect
+ using UDP if requested. Don't try to disable Nagle on UDP
+ sockets.
+ * remote.c (remote_serial_open): New function. Warn about UDP.
+ (remote_open_1, remote_async_open_1, remote_cisco_open): Call it.
+
+2002-05-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * MAINTAINERS: List sh-elf as buildable with ,-Werror.
+
+2002-05-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * configure.tgt: Remove sh-hms target.
+ * MAINTAINERS: Don't list sh-hms as a separate target.
+
+2002-05-13 Jim Blandy <jimb@redhat.com>
+
+ Add first preprocessor macro-expansion files.
+ * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files.
+ * Makefile.in (SFILES): Add macrotab.c, macroexp.c.
+ (splay_tree_h, macroexp_h, macrotab_h): New variable.
+ (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h.
+ (COMMON_OBS): Add macrotab.o, macroexp.o.
+ (macroexp.o, macrotab.o): New rules.
+
+2002-05-13 Andrew Cagney <ac131313@redhat.com>
+
+ * config/m88k/tm-m88k.h: Update copyright.
+ (m88k_target_write_pc): Declare
+ (TARGET_WRITE_PC): Redefine using m88k_target_write_pc.
+ (M88K_NNPC_REGNUM): Rename NNPC_REGNUM.
+ (SHIFT_INST_REGS): Update definition.
+ * m88k-tdep.c (m88k_target_write_pc): New function. Implement
+ using old definition of TARGET_WRITE_PC.
+ * regcache.c (generic_target_write_pc): Delete code handling
+ NNPC_REGNUM.
+ * gdbarch.sh (NNPC_REGNUM): Delete.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-05-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * builtin-regs.c (value_of_builtin_reg): Correctly calculate the
+ builtin reg number.
+
+2002-05-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary)
+ (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref)
+ (gen_address_of, gen_struct_ref, gen_repeat): Use type
+ access macros.
+ * c-typeprint.c (cp_type_print_method_args): Likewise.
+ (c_type_print_args): Likewise.
+ * d10v-tdep.c (d10v_push_arguments): Likewise.
+ (d10v_extract_return_value): Likewise.
+ * expprint.c (print_subexp): Likewise.
+ * gdbtypes.c (lookup_primitive_typename): Likewise.
+ (lookup_template_type, add_mangled_type, print_arg_types): Likewise.
+ * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB)
+ (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE)
+ (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS)
+ (TYPE_VECTOR): Likewise.
+ * hpread.c (hpread_read_struct_type)
+ (fix_static_member_physnames, fixup_class_method_type)
+ (hpread_type_lookup): Likewise.
+ * mdebugread.c (parse_symbol, parse_type): Likewise.
+ * p-lang.c (is_pascal_string_type): Likewise.
+ * valops.c (hand_function_call): Likewise.
+ * x86-64-tdep.c (classify_argument): Likewise.
+
+ * hpread.c (hpread_read_function_type)
+ (hpread_read_doc_function_type): Call replace_type.
+ * dstread.c (create_new_type): Delete.
+ (decode_dst_structure, process_dst_function): Call alloc_type.
+ Use type access macros.
+
+2002-05-12 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c (i387_supply_fxsave): Skip the SSE registers if
+ the're not supported by the current architecture.
+ (i387_fill_fxsave): Likewise.
+
+2002-05-12 Fred Fish <fnf@redhat.com>
+
+ * symfile.c (default_symfile_offsets): Arrange for uninitialized
+ sect_index_xxx members to index the first slot in section_offsets
+ if all of the section_offsets are zero.
+
+2002-05-12 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.tgt (sparc-*openbsd): Remove entry accidentially
+ checked in with last change.
+
+2002-05-12 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.tgt (i[3456]86-*-unixware*, i[3456]86-*-unixware2*):
+ Remove targets. These are canonicalized to i386-*-sysv4.2uw by
+ config.sub.
+
+2002-05-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in: Update dependencies.
+
+2002-05-11 Andrew Cagney <ac131313@redhat.com>
+
+ * language.c (local_hex_string_custom): Simplify. Do not depend
+ on PRINTF_HAS_LONG_LONG or CC_HAS_LONG_LONG.
+
+ * memattr.c (mem_info_command): Replace calls to
+ longest_local_hex_string and longest_local_hex_string_custom.
+ * buildsym.c (make_blockvector): Ditto.
+ * solib.c (info_sharedlibrary_command): Ditto.
+ * tracepoint.c (tracepoints_info): Ditto.
+ * symtab.c (print_msymbol_info): Ditto.
+
+ * language.c (local_hex_string): Delete.
+ (local_hex_string_custom): Delete.
+ (longest_local_hex_string): Rename to local_hex_string.
+ (longest_local_hex_string_custom): Rename to
+ local_hex_string_custom.
+ * language.h (local_hex_string): Change parameter type to LONGEST.
+ (local_hex_string_custom): Ditto.
+ (longest_local_hex_string): Delete declaration.
+ (longest_local_hex_string_custom): Ditto.
+
+ * solib.c: Update copyright.
+ * memattr.c: Update copyright.
+
+2002-05-11 Andrew Cagney <ac131313@redhat.com>
+
+ * arch-utils.h (legacy_register_to_value): Declare.
+ (legacy_value_to_register): Declare.
+ (legacy_convert_register_p): Declare.
+ * arch-utils.c (legacy_register_to_value): New function.
+ (legacy_value_to_register): New function.
+ (legacy_convert_register_p): New function.
+
+ * gdbarch.sh (REGISTER_TO_VALUE): Define.
+ (VALUE_TO_REGISTER): Define.
+ (CONVERT_REGISTER_P): Define.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * valops.c (value_assign): Use CONVERT_REGISTER_P and
+ VALUE_TO_REGISTER.
+ * findvar.c (value_from_register): Use REGISTER_TO_VALUE and
+ CONVERT_REGISTER_P.
+
+2005-05-11 Daniel Jacobowitz <drow@mvista.com>
+ Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * Makefile.in: Update dependencies for valops.c.
+ * valops.c: Include "gdb_assert.h".
+ (typecmp): Skip THIS parameter to methods.
+ (find_method_list): Remove static_memfuncp argument,
+ update callers. Check for stub methods.
+ (find_value_oload_method_list): Don't set *static_memfuncp.
+ (find_overload_match): Don't check for stub methods. Assert
+ that methods are not stubbed. Handle static methods.
+ (value_find_oload_method_list): Remove static_memfuncp argument.
+ * gdbtypes.c (check_stub_method): Do not add THIS pointer
+ to the argument list for static stub methods.
+ * value.h (value_find_oload_method_list): Update prototype.
+
+2002-05-11 Andrew Cagney <ac131313@redhat.com>
+
+ * arch-utils.h (generic_register_size): Declare.
+ (generic_register_raw_size, generic_register_virtual_size): Delete
+ declarations.
+ * arch-utils.c (generic_register_raw_size): Delete.
+ (generic_register_size): New function.
+ (generic_register_virtual_size): Delete.
+
+ * gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Make
+ default generic_register_size.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * d10v-tdep.c (d10v_gdbarch_init): Use generic_register_size for
+ register_virtual_size.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+
+2002-05-11 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (gdbarch_data): Add gdbarch parameter.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * gnu-v3-abi.c: Update copyright.
+ (vtable_address_point_offset): Update.
+ (gnuv3_rtti_type): Update.
+ (gnuv3_baseclass_offset): Update.
+ * solib-svr4.c (svr4_fetch_link_map_offsets): Update.
+ (init_fetch_link_map_offsets): Update.
+ * remote.c (get_remote_state): Update.
+
+2002-05-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * TODO: Remove value_headof/value_from_vtable_info comment.
+ * printcmd.c (print_command_1): Don't call value_from_vtable_info.
+ * values.c (value_headof, value_from_vtable_info): Delete.
+ * value.h (value_from_vtable_info): Delete prototype.
+
+2002-05-11 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in: Replace gdb_assert.h with $(gdb_assert_h),
+ gdb_string.h with $(gdb_string_h) and gdb_regex.h with
+ $(gdb_regex_h).
+ (gdb_assert_h): Define.
+ (gdb_wait_h): Define.
+ (gdb_regex_h): Define.
+
+2002-05-11 Daniel Jacobowitz <drow@mvista.com>
+
+ From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>:
+ * linespec.c (find_methods): Handle GCC 3.x template constructors.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * nbsd-tdep.c: Fix comment.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add nbsd-tdep.c.
+ (alphanbsd-tdep.o): Add nbsd-tdep.h to dependency list.
+ (nbsd-tdep.o): New dependency list.
+ * alphanbsd-tdep.c: Don't include solib-svr4.h. Include
+ nbsd-tdep.h.
+ (alphanbsd_solib_svr4_fetch_link_map_offsets): Remove.
+ (alphanbsd_init_abi): Use nbsd_lp64_solib_svr4_fetch_link_map_offsets.
+ * nbsd-tdep.c: New file.
+ * nbsd-tdep.h: New file.
+ * shnbsd-tdep.c: Don't include solib-svr4.h. Include
+ nbsd-tdep.h.
+ (shnbsd_solib_svr4_fetch_link_map_offsets): Remove.
+ (shnbsd_init_abi): Use nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
+ * config/alpha/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
+ * config/sh/nbsd.mt (TDEPFILES): Ditto.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/nbsd.mh (NATDEPFILES): Remove corelow.o.
+ * config/alpha/nbsd.mt (TDEPFILES): Add corelow.o.
+ * config/i386/nbsd.mh (NATDEPFILES): Remove corelow.o.
+ * config/i386/nbsd.mt (TDEPFILES): Add corelow.o.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Remove corelow.o.
+ * config/i386/nbsdelf.mt (TDEPFILES): Add corelow.o.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/i386/nbsd.mh (NATDEPFILES): Use line continuations.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
+ * config/m68k/nbsd.mh (NATDEPFILES): Likewise.
+ * config/ns32k/nbsd.mh (NATDEPFILES): Likewise.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Likewise.
+ * config/sparc/nbsd.mh (NATDEPFILES): Likewise.
+ * config/sparc/nbsdelf.mh (NATDEPFILES): Likewise.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * i386nbsd-nat.c: Delete file. Move fetch_core_registers and
+ fetch_elfcore_registers to...
+ * i386nbsd-tdep.c: ...here.
+ (i386nbsd_use_struct_convention): Rename to...
+ (i386nbsd_aout_use_struct_convention): ...this.
+ (i386nbsd_supply_reg): New function.
+ (i386nbsd_fill_reg): New function.
+ (fetch_core_registers): Use i386nbsd_supply_reg.
+ (fetch_elfcore_registers): Likewise.
+ (_initialize_i386nbsd_tdep): New function.
+ * config/i386/nbsd.mh (NATDEPFILES): Remove i386nbsd-nat.o.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
+ * config/i386/nbsdelf.mt (TDEPFILES): Add i386nbsd-tdep.o.
+ * config/i386/tm-nbsd.h (i386nbsd_use_struct_convention): Rename to...
+ (i386nbsd_aout_use_struct_convention): ...this.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * shnbsd-nat.c (fetch_inferior_registers): Use shnbsd_supply_reg.
+ (store_inferior_registers): Use shnbsd_fill_reg.
+ * shnbsd-tdep.c (sh_nbsd_supply_registers,
+ sh_nbsd_supply_register): Collapse into...
+ (shnbsd_supply_reg): ...this.
+ (sh_nbsd_fill_registers, sh_nbsd_fill_register): Collapse into...
+ (shnbsd_fill_reg): ...this.
+ (sh_nbsd_solib_svr4_fetch_link_map_offsets): Rename to...
+ (shnbsd_solib_svr4_fetch_link_map_offsets): ...this.
+ (fetch_core_registers): Use shnbsd_supply_reg.
+ (fetch_elfcore_registers): Use shnbsd_supply_reg.
+ (sh_nbsd_core_fns): Rename to...
+ (shnbsd_core_fns): ...this.
+ (sh_nbsd_elfcore_fns): Rename to...
+ (shnbsd_elfcore_fns): ...this.
+ (sh_nbsd_init_abi): Rename to...
+ (shnbsd_init_abi): ...this.
+ (_initialize_sh_nbsd_tdep): Rename to...
+ (_initialize_shnbsd_tdep): ...this.
+ * shnbsd-tdep.h (sh_nbsd_supply_registers,
+ sh_nbsd_supply_register, sh_nbsd_fill_registers,
+ sh_nbsd_fill_register): Remove prototypes.
+ (shnbsd_supply_reg, shnbsd_fill_reg): Add prototypes.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Remove i387-nat.c.
+ (i387-nat.o): Delete dependency list.
+ (go32-nat.o): Change i387-nat.h to i387-tdep.h.
+ (x86-64-linux-nat.o): Likewise.
+ * i387-nat.c: Delete file, moving contents to...
+ * i387-tdep.c: ...here.
+ * i387-nat.h: Rename...
+ * i387-tdep.h: ...to this.
+ * go32-nat.c: Include i387-tdep.h instead of i387-nat.h.
+ * i386-linux-nat.c: Likewise.
+ * i386bsd-nat.c: Likewise.
+ * i386gnu-nat.c: Likewise.
+ * i386nbsd-nat.c: Likewise.
+ * i386v4-nat.c: Likewise.
+ * x86-64-linux-nat.c: Likewise.
+ * config/i386/fbsd.mh (NATDEPFILES): Remove i387-nat.o.
+ * config/i386/go32.mh (NATDEPFILES): Likewise.
+ * config/i386/i386gnu.mh (NATDEPFILES): Likewise.
+ * config/i386/i386sol2.mh (NATDEPFILES): Likewise.
+ * config/i386/i386v42mp.mh (NATDEPFILES): Likewise.
+ * config/i386/linux.mh (NATDEPFILES): Likewise.
+ * config/i386/nbsd.mh (NATDEPFILES): Likewise.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
+ * config/i386/obsd.mh (NATDEPFILES): Likewise.
+ * config/i386/x86-64linux.mh (NATDEPFILES): Likewise.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Remove alphanbsd-nat.c.
+ (alphanbsd-nat.o): Remove dependency list.
+ (alphanbsd-tdep.o): Add $(regcache_h) to dependency list.
+ * alphanbsd-nat.c: Delete. Contents moved to...
+ * alphanbsd-tdep.c: ...here.
+ (_initialize_alphanbsd_tdep): Register core functions.
+ * config/alpha/nbsd.mh (NATDEPFILES): Remove alphanbsd-nat.o.
+
+2002-05-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add alphabsd-tdep.c.
+ (alphabsd-nat.o): Depend on alphabsd-tdep.h.
+ (alphanbsd-nat.o): Likewise.
+ (alphabsd-tdep.o): New dependency list.
+ * alphabsd-nat.c (supply_gregset): Use alphabsd_supply_reg.
+ (fill_gregset): Use alphabsd_fill_reg.
+ (supply_fpregset): Use alphabsd_supply_fpreg.
+ (fill_fpregset): Use alphabsd_fill_fpreg.
+ (fetch_inferior_registers): Use struct reg and struct fpreg
+ rather than gregset_t and fpregset_t. Use alphabsd_supply_reg
+ and alphabsd_supply_fpreg.
+ (store_inferior_registers): Use struct reg and struct fpreg
+ rather than gregset_t and fpregset_t. Use alphabsd_fill_reg
+ and alphabsd_fill_fpreg.
+ * alphabsd-tdep.c: New file.
+ * alphabsd-tdep.h: New file.
+ * alphanbsd-nat.c (fetch_core_registers): Use alphabsd_supply_fpreg.
+ (fetch_elfcore_registers): Use alphabsd_supply_reg and
+ alphabsd_supply_fpreg.
+ * config/alpha/fbsd.mt (TDEPFILES): Add alphabsd-tdep.o.
+ * config/alpha/nbsd.mt (TDEPFILES): Likewise.
+
+2002-05-11 Eric Christopher <echristo@redhat.com>
+
+ * mips-tdep.c (mips_double_register_type): Fix thinko.
+ (mips_single_register_type): Ditto.
+ * MAINTAINERS: Add self.
+
+2002-05-11 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-nat.c (i387_supply_register, i387_fill_fsave,
+ i387_supply_fxsave, i387_fill_fxsave): Rewrite in order to do the
+ right thing on architectures with different endianness and/or
+ integer sizes.
+
+2002-05-10 Jason Thorpe <thorpej@wasabisystems.com>
+
+ From Christian Limpach <chris@Pin.LU>
+ * configure.in: Change sed expression which comments out
+ NATDEPFILES to also comment out continuation lines.
+ * configure: Regenerate.
+
+2002-05-10 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c: Clean up code erroneously reintroduced by previous
+ big patch.
+
+2002-05-10 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c: Include correct file.
+
+2002-05-10 Elena Zannoni <ezannoni@redhat.com>
+
+ New support for sh64-elf (sh5) target.
+
+ * configure.tgt: For sh64-elf target, default to sh-elf.
+
+ * config/sh/tm-sh.h (enum sh-abi): Possible ABI's.
+ (struct gdbarch_tdep): Add new fields for new registers and ABI
+ info.
+
+ * sh-tdep.c: Include elf-bfd.h, elf/sh.h, gdb/sim-sh.h.
+ (NUM_PSEUDO_REGS_SH_MEDIA, NUM_PSEUDO_REGS_SH_COMPACT,
+ MSYMBOL_IS_SPECIAL, IS_ISA32_ADDR, MAKE_ISA32_ADDR,
+ UNMAKE_ISA32_ADDR, IS_PTABSL_R18, IS_STS_R0, IS_STS_PR,
+ IS_MOV_TO_R15, IS_MOV_R14, IS_STQ_R18_R14, IS_STQ_R18_R15,
+ IS_STL_R18_R15, IS_STQ_R14_R15, IS_STL_R14_R15, IS_ADDIL_SP_MEDIA,
+ IS_ADDI_SP_MEDIA, IS_ADDL_SP_FP_MEDIA, IS_ADD_SP_FP_MEDIA,
+ IS_MOV_SP_FP_MEDIA, IS_MOV_R0, IS_MOVL_R0, IS_ADD_SP_R0,
+ IS_MOV_R14_R0, IS_MEDIA_IND_ARG_MOV, IS_MEDIA_ARG_MOV,
+ IS_MEDIA_MOV_TO_R14, IS_COMPACT_IND_ARG_MOV, IS_COMPACT_ARG_MOV,
+ IS_COMPACT_MOV_TO_R14, IS_JSR_R0, IS_NOP): New macros.
+ (sh_sh64_register_name, sh64_elf_make_msymbol_special,
+ pc_is_isa32, sh_sh64_breakpoint_from_pc, look_for_args_moves,
+ sh64_skip_prologue_hard_way, sh64_use_struct_convention,
+ gdb_print_insn_sh64, translate_insn_rn, sh64_frame_chain,
+ sh64_get_saved_pr, fpp_reg_base_num, is_media_pseudo,
+ sh64_get_gdb_regnum, sh64_media_reg_base_num,
+ sh64_compact_reg_base_num, translate_rn_to_arch_reg_num,
+ sign_extend, sh64_nofp_frame_init_saved_regs,
+ sh64_init_extra_frame_info, sh64_get_saved_register,
+ sh64_extract_struct_value_address, sh64_pop_frame,
+ sh64_push_arguments, sh64_extract_return_value,
+ sh64_store_return_value, sh64_show_media_regs,
+ sh64_show_compact_regs, sh64_show_regs, sh_sh64_register_byte,
+ sh_sh64_register_raw_size, sh_sh64_register_virtual_size,
+ sh_sh64_register_virtual_type,
+ sh_sh64_register_convert_to_virtual,
+ sh_sh64_register_convert_to_raw, sh64_pseudo_register_read,
+ sh64_register_read, sh64_pseudo_register_write,
+ sh64_register_write, do_fv_c_register_info, do_dr_c_register_info,
+ do_r_c_register_info, do_fpp_register_info, do_cr_c_register_info,
+ sh64_do_pseudo_register, sh_compact_do_registers_info,
+ sh64_do_registers_info, sh_gdbarch_init): New functions.
+
+2002-05-10 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_breakpoint_from_pc): Add 'const' to return type.
+
+2002-05-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * linespec.c (decode_line_1): Check for a double quote after
+ a filename correctly.
+
+2002-05-10 Jim Blandy <jimb@redhat.com>
+
+ Properly track the size of the current objfile's .debug_line section.
+ * dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size.
+ (DWARF_LINE_SIZE): New macro.
+ (dwarf2_build_psymtabs_hard): Record the line section's size in
+ the partial symbol table.
+ (psymtab_to_symtab_1): Restore dwarf_line_size from the partial
+ symbol table.
+
+2002-05-10 Petr Sorfa <petrs@caldera.com>
+
+ * ia64-tdep.c: Handle breakpoints on L instruction type
+ in MLX instruction bundle by moving the breakpoint to
+ the third slot (X instruction type) as L holds only data.
+
+2002-05-10 Kevin Buettner <kevinb@redhat.com>
+
+ * dbxread.c (discarding_local_symbols_complaint): New complaint.
+ (process_one_symbol): Complain about discarding local symbols
+ due to a misplaced N_LBRAC entry.
+
+2002-05-09 Elena Zannoni <ezannoni@redhat.com>
+
+ From Daniel Berlin <dan@cgsoftware.com>
+ * linespec.c (find_toplevel_char): '<' and '>' also increase and
+ decrease the depth we are at, in the case of templates.
+
+2002-05-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (mips_float_register_type): New function.
+ (mips_double_register_type): New function.
+ (mips_print_register): Use them.
+ (do_fp_register_row): Likewise.
+
+2002-05-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals/signals.c (signals): Remove conditional compilation around
+ Mach-specific signals. Move them to after TARGET_SIGNAL_DEFAULT.
+ (target_signal_from_name): Loop until TARGET_SIGNAL_LAST.
+
+2002-05-09 Michael Snyder <msnyder@redhat.com>
+
+ * remote-rdp.c (remote_rdp_can_run): Remove.
+
+2002-05-09 Tom Tromey <tromey@redhat.com>
+
+ * jv-valprint.c (java_val_print): Handle `char' as a special case
+ of TYPE_CODE_INT.
+
+2002-05-09 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c (arm_scan_prologue): Accept strb r(0123),[r11,#-nn],
+ strh r(0123),[r11,#-nn], str r(0123),[r11,#-nn], as well as
+ strb r(0123),[sp,#nn], strh r(0123),[sp,#nn] and
+ str r(0123),[sp,#nn].
+ (arm_skip_prologue): Ditto. Also make disassembly
+ order-independent by placing it in a loop.
+
+2002-05-06 Michael Snyder <msnyder@redhat.com>
+
+ * stabsread.c (read_type): Add recognition for new attribute:
+ "@V;" means that an array type is actually a vector.
+ This is analogous to the vector flag that's been added to dwarf2.
+
+2002-05-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (i386_abi): New enum.
+ (struct gdbarch_tdep): Replace os_ident member with abi.
+ (i386_gdbarch_register_os_abi): New prototype.
+ * i386-tdep.c (i386_abi_names): New array.
+ (process_note_abi_tag_sections): Removed.
+ (process_note_sections): New function.
+ (i386_elf_abi_from_note, i386_elf_abi): New functions.
+ (struct i386_abi_handler): New struct.
+ (i386_abi_handler_list): New variable.
+ (i386_gdbarch_register_os_abi): New function.
+ (i386_gdbarch_init): Adapt for the changes given above.
+
+2002-05-08 Daniel Jacobowitz <drow@mvista.com>
+
+ * gregset.h: Say "GNU/Linux".
+
+2002-05-08 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdbtypes.c : Add new builtin type for 64 bit vectors.
+ (build_gdbtypes): Build builtin_type_v2_float.
+ (_initialize_gdbtypes): Register new builtin type.
+
+2002-05-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (init_gdbarch_swap): Do not clear the swap section.
+ (clear_gdbarch_swap): New function.
+ (initialize_non_multiarch): Call.
+ (gdbarch_update_p): Before calling init(), swap out and clear the
+ existing architecture.
+ * gdbarch.c: Regenerate.
+
+2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/djgpp/fnchange.lst: Add alphanbsd-nat.c and
+ alphanbsd-tdep.c.
+
+2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * sh-nbsd-nat.c: Rename to...
+ * shnbsd-nat.c: ...this.
+ * sh-nbsd-tdep.c: Rename to...
+ * shnbsd-tdep.c: ...this.
+ * sh-nbsd-tdep.h: Rename to...
+ * shnbsd-tdep.h: ...this.
+ * config/sh/nbsd.mh: Use shnbsd-nat.o.
+ * config/sh/nbsd.mt: Use shnbsd-tdep.o.
+
+2002-05-08 Richard Earnshaw <rearnsha@arm.com>
+
+ * remote-rdi.c (_initializie_remote_rdi): Use ANSI-style string
+ concatenation for command help messages.
+
+2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * NEWS: Note new sh*-*-netbsdelf* configuration.
+ * configure.host: Set gdb_host_cpu to sh for all sh*.
+ (sh*-*-netbsdelf*): New host.
+ * configure.tgt: Set gdb_target_cpu to sh for all sh*.
+ (sh*-*-netbsdelf*): New target.
+ * sh-nbsd-nat.c: New file.
+ * sh-nbsd-tdep.c: New file.
+ * sh-nbsd-tdep.h: New file.
+ * config/sh/nbsd.mh: New file.
+ * config/sh/nbsd.mt: New file.
+ * config/sh/nm-nbsd.h: New file.
+ * config/sh/tm-nbsd.h: New file.
+
+2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * sh-tdep.c (sh_osabi_names): Declare.
+ (process_note_abi_tag_sections): New function.
+ (get_elfosabi): Ditto.
+ (sh_gdbarch_register_os_abi): Ditto.
+ (sh_dump_tdep): Ditto.
+ _initialize_sh_tdep): Use gdbarch_register to register
+ sh_gdbarch_init and sh_dump_tdep.
+ * config/sh/tm-sh.h (sh_osabi): Declare.
+ (gdbarch_tdep): Add sh_osabi and osabi_name members.
+
+2002-05-07 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_skip_prologue): Handle generic dummy frames.
+ (thumb_scan_prologue): Ditto.
+ (arm_find_callers_reg): Ditto.
+ (arm_frame_chain): Ditto.
+ (arm_init_extra_frame_info): Ditto.
+ (arm_frame_saved_pc): Ditto.
+ (arm_pop_frame): Ditto.
+ (arm_push_return_address): New function.
+ (arm_gdbarch_init): Initialize use_generic_dummy_frames,
+ call_dummy_location, call_dummy_breakpoint_offset_p,
+ call_dummy_breakpoint_offset, call_dummy_p,
+ call_dummy_stack_adjust_p, call_dummy_words,
+ sizeof_call_dummy_words, call_dummy_start_offset,
+ call_dummy_length, fix_call_dummy, pc_in_call_dummy,
+ call_dummy_address, push_return_address and push_dummy_frame for
+ generic dummy frames.
+
+2002-05-07 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * sh-tdep.c (sh_nofp_frame_init_saved_regs): Fix error in
+ size computation for alloca.
+ (sh_fp_frame_init_saved_regs): Likewise.
+
+2002-05-07 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE): Define.
+ (ARM_MAX_REGISTER_VIRTUAL_SIZE): Define.
+ * arm-tdep.c (arm_store_return_value): Use them.
+ Use FP_REGISTER_RAW_SIZE when setting the FPA return value.
+ * remote-rdp.c (remote_rdp_fetch_register): Use
+ ARM_MAX_REGISTER_RAW_SIZE.
+ (remote_rdp_store_register): Likewise.
+
+2002-05-07 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c: Code cleanup, removed unused variables,
+ added default labels to switch {} statements.
+ * x86-64-tdep.c: Ditto.
+ * x86-64-linux-nat.c: Ditto.
+
+2002-05-07 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * solib.h: Protect against multiple inclusion.
+
+2002-05-06 Jim Blandy <jimb@redhat.com>
+
+ Add first preprocessor macro-expansion files.
+ * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files.
+ * Makefile.in (SFILES): Add macrotab.c, macroexp.c.
+ (splay_tree_h, macroexp_h, macrotab_h): New variable.
+ (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h.
+ (COMMON_OBS): Add macrotab.o, macroexp.o.
+ (macroexp.o, macrotab.o): New rules.
+
+ Separate the job of reading the line number info statement program
+ header (...expialidocious) out into its own function.
+ * dwarf2read.c (struct line_head, struct filenames, struct
+ directories): Replace with...
+ (struct line_header): New structure, containing the full
+ contents of the statement program header, including the
+ include directory and file name tables.
+ (read_file_scope): If we have line number info, instead of just
+ calling dwarf_decode_lines to do all the work, call
+ dwarf_decode_line_header first to get a `struct line_header'
+ containing the data in the statement program header, and then
+ pass that to dwarf_decode_lines, which will pick up where that
+ left off. Be sure to clean up the `struct line_header' object.
+ (dwarf_decode_line_header, free_line_header, add_include_dir,
+ add_file_name): New functions.
+ (dwarf_decode_lines): Move all the code to read the statement
+ program header into dwarf_decode_line_header. Take the line
+ header it built as the first argument, instead of the offset to
+ the compilation unit's line number info. Use the new `struct
+ line_header' type instead of the old structures. No need to do
+ cleanups here now, since we don't allocate anything.
+ (dwarf2_statement_list_fits_in_line_number_section,
+ dwarf2_line_header_too_long): New complaints.
+
+2002-05-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdbtypes.c (init_vector_type): New function.
+ (build_builtin_type_vec128): Simplify the representation of SIMD
+ registers.
+ (build_gdbtypes): Initialize new builtin vector types.
+ (_initialize_gdbtypes): Register new vector types with gdbarch.
+ (builtin_type_v4_float, builtin_type_v4_int32,
+ builtin_type_v8_int16, builtin_type_v16_int8,
+ builtin_type_v2_int32, builtin_type_v4_int16,
+ builtin_type_v8_int8): New (renamed) SIMD types.
+
+2002-05-06 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-nat.c (i387_fill_fsave): Use regcache_collect.
+ (i387_fill_fxsave): Likewise.
+
+2002-05-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * alpha-tdep.c (alpha_extract_return_value): Don't use
+ non-constant array size in prototype.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ From Brian Taylor <briant at model dot com>:
+ * ui-out.c (ui_out_field_core_addr): Use the function
+ longest_local_hex_string_custom'to format addresses > 32 bits
+ wide.
+
+ * ui-out.c (ui_out_field_core_addr): Update comment.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (select_and_print_frame): Make static. Delete the
+ parameter `level'.
+ (func_command): Update call.
+ (select_frame_command): Delete code computing the frame level.
+ * frame.h (select_and_print_frame): Delete declaration.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc_get_saved_register): Comment why
+ get_prev_frame call is safe.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (select_frame): Delete level parameter.
+ * stack.c (select_frame): Update. Use frame_relative_level to
+ obtain the frame's level.
+ (select_and_print_frame): Update call.
+ (select_frame_command): Ditto.
+ (up_silently_base): Ditto.
+ (down_silently_base): Ditto.
+ * ocd.c (ocd_start_remote): Ditto.
+ * remote-rdp.c (remote_rdp_open): Ditto.
+ * remote-mips.c (mips_initialize): Ditto.
+ (common_open): Ditto.
+ * remote-e7000.c (e7000_start_remote): Ditto.
+ * m3-nat.c (select_thread): Ditto.
+ * hppa-tdep.c (child_get_current_exception_event): Ditto.
+ (child_get_current_exception_event): Ditto.
+ * varobj.c (varobj_create): Ditto.
+ (varobj_update): Ditto.
+ (c_value_of_root): Ditto.
+ * tracepoint.c (finish_tfind_command): Ditto.
+ * corelow.c (core_open): Ditto.
+ * arch-utils.c (generic_prepare_to_proceed): Ditto.
+ * thread.c (info_threads_command): Ditto.
+ (switch_to_thread): Ditto.
+ * infrun.c (normal_stop): Ditto.
+ (restore_selected_frame): Ditto.
+ (restore_inferior_status): Ditto.
+ * breakpoint.c (insert_breakpoints): Ditto.
+ (watchpoint_check): Ditto.
+ (bpstat_stop_status): Ditto.
+ (do_enable_breakpoint): Ditto.
+ * blockframe.c (flush_cached_frames): Ditto.
+ (reinit_frame_cache): Ditto.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Host/Native): Add Jason Thorpe as NetBSD
+ maintainer.
+
+2002-05-04 Jim Blandy <jimb@redhat.com>
+
+ * gdbtypes.c (replace_type): Doc fix.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * valprint.c (strcat_longest): Delete commented out function.
+ Update copyright.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mark a29k as deleted.
+ * NEWS: Mention that a29k was removed. Add OBSOLETE section.
+ Move new configurations to the top.
+ * configure.tgt: Remove a29k.
+ * config/a29k/tm-vx29k.h: Delete.
+ * config/a29k/vx29k.mt: Delete.
+ * config/a29k/tm-a29k.h: Delete.
+ * config/a29k/a29k-udi.mt: Delete.
+ * config/a29k/a29k.mt: Delete.
+ * a29k-tdep.c: Delete.
+ * remote-udi.c: Delete.
+ * remote-mm.c: Delete.
+ * remote-eb.c: Delete.
+ * remote-adapt.c: Delete.
+ * Makefile.in: Remove obsolete code.
+ * config/s390/s390x.mt: Ditto.
+ * config/s390/s390.mt: Ditto.
+ * config/sparc/sparclynx.mh: Ditto.
+ * config/sparc/linux.mh: Ditto.
+ * config/pa/hppaosf.mh: Ditto.
+ * config/pa/hppabsd.mh: Ditto.
+ * config/ns32k/nbsd.mt: Ditto.
+ * config/mips/vr5000.mt: Ditto.
+ * config/m68k/sun3os4.mh: Ditto.
+ * config/m68k/nbsd.mt: Ditto.
+ * config/m68k/m68klynx.mh: Ditto.
+ * config/m32r/m32r.mt: Ditto.
+ * config/i386/x86-64linux.mt: Ditto.
+ * config/i386/nbsdelf.mt: Ditto.
+ * config/i386/nbsd.mt: Ditto.
+ * config/i386/i386lynx.mh: Ditto.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
+ * target.c (debug_print_register): New function. Handle oversize
+ registers.
+ (debug_to_fetch_registers): Call.
+ (debug_to_store_registers): Call.
+
+2002-05-03 Jim Blandy <jimb@redhat.com>
+
+ * stabsread.c (cleanup_undefined_types): Use replace_type, not memcpy.
+ (read_type): Doc fix.
+ * gdbtypes.c (replace_type): Doc fix.
+
+ * stabsread.c (multiply_defined_struct): New complaint.
+ (read_struct_type): If the type we were passed isn't empty, or
+ incomplete, don't read the new struct type into it; complain,
+ and return the original type unchanged. Take a new `type_code'
+ argument, which is the type code for the new type.
+ (read_type): Rather than storing the type's type code here, pass
+ it as an argument to read_struct_type, and let that take care of
+ storing it. That way, we don't overwrite the original type code,
+ so read_struct_type can use it to decide whether we're overwriting
+ something we shouldn't.
+ (complain_about_struct_wipeout): New function.
+
+2002-05-03 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh: Assert that gdbarch is non-NULL.
+ * gdbarch.c: Regenerate.
+
+2002-05-03 Jason Merrill <jason@redhat.com>
+
+ * gnu-v3-abi.c (gnuv3_rtti_type): If we get confused, just warn
+ and return NULL.
+
+2002-05-03 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_dwarf2gdb_regno_map),
+ (x86_64_dwarf2gdb_regno_map_length),
+ (x86_64_dwarf2_reg_to_regnum): Added.
+ (x86_64_gdbarch_init): Added registration of x86_64_dwarf2_reg_to_regnum.
+ (x86_64_gdbarch_init): Renamed from i386_gdbarch_init.
+ (_initialize_x86_64_tdep): Synced with the change above.
+ (x86_64_skip_prologue): Reformulated message.
+
+2002-05-03 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * f-exp.y: Also use new prev_lexptr variable
+ to improve error reporting. Based on Michael Snyder
+ 2002-04-24 dated patch to c-exp.y.
+ * jv-exp.y: Likewise.
+ * m2-exp.y: Likewise.
+
+2002-05-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * valops.c (value_arg_coerce): Don't coerce arrays to pointers if
+ we are dealing with vectors.
+
+2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * config/m68k/tm-nbsd.h: Obvious fix,
+ correct machine name.
+
+2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-typeprint.c (pascal_type_print_base): Add support
+ for TYPE_CODE_STRING and TYPE_CODE_BITSTRING.
+
+2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-lang.c (pascal_create_fundamental_type): Use TYPE_CODE_CHAR
+ for fondamental pascal 'char' type.
+
+2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-lang.h (is_pascal_string_type): Declaration changed,
+ new sixth argument of type char ** added.
+ * p-lang.c (is_pascal_string_type): Implementation
+ changed. Args length_pos, length_size, string_pos, char_size
+ can now be NULL. New argument arrayname set to the field
+ name of the char array. Return value set to char array
+ field index plus one.
+ * p-valprint.c (pascal_val_print): Adapt to new declaration of
+ is_pascal_string_type function.
+
+2002-05-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (gdbarch_update_p): Revert 2002-05-02 Andrew Cagney
+ <cagney@redhat.com> change.
+ * gdbarch.c: Regenerate.
+
+2002-05-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (gdbarch_update_p): Swap out the old architecture
+ before probing for a new one. Detect errorenous gdbarch_init
+ functions.
+ * gdbarch.c: Regenerate.
+
+2002-05-01 Andrew Cagney <cagney@redhat.com>
+
+ * config/mn10200/tm-mn10200.h: Include "symfile.h" and "symtab.h".
+ * config/mcore/tm-mcore.h: Ditto. Update copyright.
+ * config/v850/tm-v850.h: Ditto. Update copyright.
+
+2002-04-30 Andrew Cagney <ac131313@redhat.com>
+
+ * cris-tdep.c (cris_gdbarch_init): Use arches instead of
+ current_gdbarch.
+
+2002-04-30 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c: Whitespace clean-ups.
+ (arm_skip_prologue): Fix thinko; two lines
+ should have been removed as part of 4/24 change.
+
+2002-04-30 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c: Added comment describing how fpscr register
+ numbers were chosen.
+
+2002-04-30 Michael Snyder <msnyder@redhat.com>
+
+ * gnu-nat.c (gnu_find_memory_regions): Fix merge botch.
+
+2002-04-29 Elena Zannoni <ezannoni@redhat.com>
+
+ * hpread.c (DNTT_TYPE_VECTOR): Rename from TYPE_VECTOR.
+ (DNTT_TYPE_VECTOR_LENGTH): Rename from TYPE_VECTOR_LENGTH.
+ (hpread_symfile_init, hpread_lookup_type): Substitute throughout.
+
+2002-04-29 Kevin Buettner <kevinb@redhat.com>
+
+ From Louis Hamilton <hamilton@redhat.com>:
+ * rs6000-tdep.c (coff/xcoff.h, libxcoff.h): Include.
+ * xcoffread.c (coff/xcoff.h, libxcoff.h): Likewise.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use bfd_xcoff_is_xcoff64(),
+ not bfd-private xcoff data, to determine wordsize.
+ * xcoffread.c (read_xcoff_xymtab, read_symbol_lineno): Likewise.
+
+2002-04-29 Andrew Cagney <ac131313@redhat.com>
+
+ GDB 5.2 released from 5.2 branch.
+
+2002-04-29 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (fill_gregset): Explicit cast to avoid warning.
+ * x86-64-tdep.c (i386_gdbarch_init): Ditto.
+ (x86_64_register_info_table): Added comments with register numbers.
+
+2002-04-29 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_extract_return_value,
+ rs6000_store_return_value): Handle returning vectors.
+ (rs6000_gdbarch_init): Use
+ ppc_sysv_abi_broken_use_struct_convention for native sysv cases.
+ * ppc-linux-tdep.c (ppc_sysv_abi_broken_use_struct_convention):
+ New function.
+ (ppc_sysv_abi_use_struct_convention): Deal with functions returning
+ vectors.
+ (ppc_sysv_abi_push_arguments): Handle vector parameters.
+ * ppc-tdep.h (ppc_sysv_abi_broken_use_struct_convention): Export.
+
+2002-04-24 Pierre Muller <ics.u-strasbg.fr>
+
+ * hpread.c (hpread_psymtab_to_symtab_1,
+ hpread_psymtab_to_symtab): Replace fprintf tab_to_s...)
+ with fprintf_unfiltered (gdb_stderr,...).
+
+2002-04-24 Pierre Muller <ics.u-strasbg.fr>
+
+ * remote-array.c (printf_monitor, write_monitor,
+ array_insert_breakpoint, array_remove_breakpoint ):
+ Replace fprintf (stderr,...
+ with fprintf_unfiltered (gdb_stderr,....
+ * remote-es.c: Likewise.
+ * remote-os9k.c: Likewise.
+ * remote-st.c: Likewise.
+
+2002-04-28 Andreas Schwab <schwab@suse.de>
+
+ * config/s390/s390.mh (NATDEPFILES): Remove solib.o, add
+ linux-proc.o and gcore.o.
+
+2002-04-26 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Print note when debugging
+ code without frame pointers.
+
+2002-04-26 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc_gdbarch_init): Add comment explaining why
+ ON_STACK is needed.
+
+2002-04-26 Ben Elliston <bje@redhat.com>
+
+ * target.c (do_xfer_memory): Correct reference to the new option
+ "trust-readonly-sections".
+
+2002-04-26 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdbtypes.h (TYPE_FLAG_VECTOR, TYPE_VECTOR): Define.
+ * gdbtypes.c (recursive_dump_type): Output the vector flag.
+ * dwarf2read.c (dwarf_attr_name): Handle new attribute for
+ vectors.
+ (read_array_type): Record the fact that this array type is really a
+ vector (i.e. are passed in by value).
+
+2002-04-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.h (gdbarch_tdep): Add sigcontext_addr member.
+ * alpha-tdep.c (alpha_sigcontext_addr): New function.
+ (alpha_find_saved_regs): Use alpha_sigcontext_addr.
+ (alpha_gdbarch_init): Initialize tdep->sigcontext_addr.
+ * alpha-linux-tdep.c: Include frame.h.
+ (alpha_linux_sigcontext_addr): New function.
+ (alpha_linux_init_abi): Set tdep->sigcontext_addr to
+ alpha_linux_sigcontext_addr.
+ * alpha-osf1-tdep.c: Include gdbcore.h.
+ (alpha_osf1_sigcontext_addr): New function.
+ (alpha_osf1_init_abi): Set tdep->sigcontext_addr to
+ alpha_osf1_sigcontext_addr.
+ * config/alpha/tm-alpha.h (SIGCONTEXT_ADDR): Remove.
+ * config/alpha/tm-alphalinux.h (SIGCONTEXT_ADDR): Remove.
+
+2002-04-26 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (selected_frame_level):
+ (select_frame): Do not set selected_frame_level.
+ * frame.h (selected_frame_level): Delete declaration.
+
+2002-04-26 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Only set
+ convert_from_func_ptr-addr when AIX / PowerOpen.
+
+2002-04-25 Andrew Cagney <ac131313@redhat.com>
+
+ * valops.c (hand_function_call): Call
+ generic_save_call_dummy_addr.
+ * frame.h (generic_save_call_dummy_addr): Declare.
+ * blockframe.c (struct dummy_frame): Add fields call_lo and
+ call_hi.
+ (generic_find_dummy_frame): Check for PC in range call_lo to
+ call_hi instead of entry_point_address.
+ (generic_pc_in_call_dummy): Search the dummy frames for a PC in
+ the call_lo to call_hi range. Allow for DECR_PC_AFTER_BREAK.
+ (generic_save_call_dummy_addr): New function.
+
+2002-04-24 David S. Miller <davem@redhat.com>
+
+ * sparc-tdep.c (sparc_gdbarch_skip_prologue): Kill, duplicates
+ sparc_skip_prologue.
+ (sparc_skip_prologue): Kill frameless_p arg, and use line number
+ information to find prologue when possible.
+ (sparc_prologue_frameless_p): Call examine_prologue directly.
+ (sparc_gdbarch_init): Update set_gdbarch_skip_prologue call.
+ * config/sparc/tm-sparc.h (sparc_skip_prologue): Update for killed
+ second argument.
+ (SKIP_PROLOGUE): Likewise.
+
+2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_skip_prologue_internal): Remove
+ GDB_TARGET_HAS_SHARED_LIBS #ifdef and update comment to
+ indicate that the condition it was testing is always true.
+ * config/alpha/nm-linux.h (GDB_TARGET_HAS_SHARED_LIBS): Remove.
+ * config/alpha/nm-nbsd.h (GDB_TARGET_HAS_SHARED_LIBS): Ditto.
+ * config/alpha/nm-osf.h (GDB_TARGET_HAS_SHARED_LIBS): Ditto.
+
+2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.h (gdbarch_tdep): Add jb_pc and jb_elt_size members.
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Initialize
+ tdep->jb_pc and tdep->jb_elt_size.
+ * alpha-osf1-tdep.c (alpha_osf1_init_abi): Likewise.
+ * alphafbsd-tdep.c (alphafbsd_init_abi): Likewise.
+ * alphanbsd-tdep.c (alphanbsd_init_abi): Likewise.
+ * alpha-nat.c (get_longjmp_target): Remove.
+ (JB_ELEMENT_SIZE): Ditto.
+ (JB_PC): Ditto.
+ * alpha-tdep.c (alpha_get_longjmp_target): New function.
+ (alpha_gdbarch_init): Default tdep->jb_pc to -1. If the
+ OS ABI sets jb_pc to a valid value, set gdbarch_get_longjmp_target
+ to alpha_get_longjmp_target.
+ (alpha_dump_tdep): Report tdep->jb_pc and tdep->jb_elt_size.
+ * config/alpha/nm-linux.h (GET_LONGJMP_TARGET): Remove.
+ * config/alpha/nm-osf.h (GET_LONGJMP_TARGET): Remove.
+
+2002-04-25 Andrew Cagney <ac131313@redhat.com>
+
+ * README: Update to GDB 5.2.
+
+2002-04-25 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (LC_ALL): Set to `c'.
+
+2002-04-25 Theodore A. Roth <troth@verinet.com>
+
+ * avr-tdep.c: Ran through gdb_indent.sh.
+
+2002-04-25 Theodore A. Roth <troth@verinet.com>
+
+ * MAINTAINERS: Add myself as AVR maintainer.
+ * NEWS: Note new target avr.
+
+2002-04-25 Theodore A. Roth <troth@verinet.com>
+
+ * Makefile.in: Add support for AVR target.
+ * configure.tgt: Add support for AVR target.
+ * avr-tdep.c: New file
+ * config/avr/avr.mt: New file.
+
+2002-04-25 Theodore A. Roth <troth@verinet.com>
+
+ * MAINTAINERS: Add myself to write-after-approval.
+
+2002-04-24 Pierre Muller <ics.u-strasbg.fr>
+
+ * f-lang.c (get_bf_for_fcn): Replace fprintf (stderr,...
+ with fprintf_unfiltered (gdb_stderr,....
+
+2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Fix PR gdb/508.
+ * symfile.c (add_filename_language): Fix wrong xrealloc size argument.
+
+2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y: Also use new prev_lexptr variable
+ to improve error reporting. Based on Michael Snyder
+ 2002-04-24 dated patch to c-exp.y.
+
+2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_breakpoint_from_pc): New function.
+ (alpha_gdbarch_init): Set gdbarch_breakpoint_from_pc to
+ alpha_breakpoint_from_pc. Set gdbarch_function_start_offset
+ to 0.
+ * config/alpha/tm-alpha.h: Remove forward decls of struct type
+ and struct value.
+ (FUNCTION_START_OFFSET): Remove.
+ (BREAKPOINT): Ditto.
+
+2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * MAINTAINERS: Reflect that multi-arch is enabled for VAX.
+ * NEWS: Ditto.
+
+2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-linux-tdep.c (alpha_linux_pc_in_sigtramp): New function.
+ (alpha_linux_init_abi): Set gdbarch_pc_in_sigtramp to
+ alpha_linux_pc_in_sigtramp.
+ * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): New function.
+ (alpha_osf1_init_abi): Set gdbarch_pc_in_sigtramp to
+ alpha_osf1_pc_in_sigtramp.
+ * alpha-tdep.c (alpha_osf_in_sigtramp): Remove.
+ * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): New function.
+ (alphafbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ alphafbsd_pc_in_sigtramp.
+ * alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): New function.
+ (alphanbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ alphanbsd_pc_in_sigtramp.
+ * config/alpha/tm-alpha.h (IN_SIGTRAMP): Remove.
+ * config/alpha/tm-alphalinux.h (IN_SIGTRAMP): Remove.
+
+2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
+
+2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add alphanbsd-nat.c and
+ alphanbsd-tdep.c.
+ (alphanbsd-nat.o): New dependency list.
+ (alphanbsd-tdep.o): Ditto.
+ * NEWS: Note new native NetBSD/alpha configuration.
+ * alphanbsd-nat.c: New file.
+ * alphanbsd-tdep.c: Ditto.
+ * configure.host (alpha*-*-netbsd*): New host.
+ * configure.tgt (alpha*-*-netbsd*): New target.
+ * config/alpha/nbsd.mh: New file.
+ * config/alpha/nbsd.mt: Ditto.
+ * config/alpha/nm-nbsd.h: Ditto.
+ * config/alpha/tm-nbsd.h: Ditto.
+
+2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add alpha-osf1-tdep.c.
+ (alpha-osf1-tdep.o): New dependency list.
+ * alpha-tdep.h (gdbarch_tdep): Add dynamic_sigtramp_offset
+ and skip_sigtramp_frame members.
+ * alpha-linux-tdep.c: Include gdbcore.h.
+ (alpha_linux_sigtramp_offset): Change return type to LONGEST.
+ (alpha_linux_init_abi): Initialize tdep->dynamic_sigtramp_offset.
+ * alpha-osf1-tdep.c: New file.
+ * alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Moved to
+ alpha-osf1-dep.c.
+ (alpha_frame_past_sigtramp_frame): New function.
+ (alpha_dynamic_sigtramp_offset): Ditto.
+ (alpha_proc_desc_is_dyn_sigtramp): Ditto.
+ (alpha_set_proc_desc_is_dyn_sigtramp): Ditto.
+ (ALPHA_PROC_SIGTRAMP_MAGIC): Define.
+ (push_sigtramp_desc): Use alpha_set_proc_desc_is_dyn_sigtramp.
+ (after_prologue): Use alpha_proc_desc_is_dyn_sigtramp.
+ (find_proc_desc): Use alpha_dynamic_sigtramp_offset.
+ (alpha_frame_chain): Use alpha_frame_past_sigtramp_frame.
+ (alpha_init_extra_frame_info): Use alpha_proc_desc_is_dyn_sigtramp.
+ (alpha_pop_frame): Use alpha_proc_desc_is_dyn_sigtramp.
+ (alpha_gdbarch_init): Initialize tdep->dynamic_sigtramp_offset
+ and tdep->skip_sigtramp_frame. Set gdbarch_skip_trampoline_code
+ to find_solib_trampoline_target.
+ * config/alpha/alpha-osf1.mt (TDEPFILES): Add alpha-osf1-tdep.o.
+ * config/alpha/tm-alpha.h: Remove inclusion of regcache.h.
+ (SKIP_TRAMPOLINE_CODE): Remove.
+ (PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
+ (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
+ (DYNAMIC_SIGTRAMP_OFFSET): Ditto.
+ (FRAME_PAST_SIGTRAMP_FRAME): Ditto.
+ * config/alpha/tm-alphalinux.h (PROC_DESC_IS_DYN_SIGTRAMP): Remove.
+ (PROC_SIGTRAMP_MAGIC): Ditto.
+ (PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
+ (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
+ (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
+ (DYNAMIC_SIGTRAMP_OFFSET): Ditto.
+ (FRAME_PAST_SIGTRAMP_FRAME): Ditto.
+
+2002-04-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * NEWS: Note that Alpha targets are now multi-arch.
+
+2002-04-24 Michael Snyder <msnyder@redhat.com>
+
+ * parser-defs.h (prev_lexptr): New external variable.
+ * parse.c (parse_exp_1): Set prev_lexptr to null before
+ calling the language-specific parser.
+ * c-exp.y (yylex): Set prev_lexptr to start of current token.
+ (yyerror): Use prev_lexptr in error reporting.
+
+2002-04-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/i386/tm-linux.h: Define FILL_FPXREGSET.
+ * gregset.h: If FILL_FPXREGSET is defined, provide
+ gdb_fpxregset_t, supply_fpxregset, and fill_fpxregset.
+ * linux-proc.c (linux_do_thread_registers): If FILL_FPXREGSET
+ is defined, call fill_fpxregset.
+
+2002-04-24 Roland McGrath <roland@frob.com>
+
+ * config/i386/i386gnu.mh (NATDEPFILES): Add core-regset.o here.
+ * i386gnu-nat.c [HAVE_SYS_PROCFS_H]
+ (supply_gregset, supply_fpregset): New functions.
+
+ * gnu-nat.c (gnu_find_memory_regions): New function.
+ (init_gnu_ops): Set `to_find_memory_regions' hook to that.
+ (gnu_xfer_memory): Add a cast.
+
+2002-04-24 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c (arm_scan_prologue): Move "mov ip, sp" into the
+ loop. Add handling for "str lr, [sp, #-4]!" and for saves
+ of argument regs ("str r(0123), [r11, #-nn"]).
+ (arm_skip_prologue): Better handling for frameless functions.
+ Treat "mov ip, sp" as optional. Recognize "str lr, [sp, #-4]".
+ (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].
+
+Wed Apr 24 14:22:21 2002 Andrew Cagney <cagney@redhat.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Add comment that NUM_REGS nor
+ NUM_PSEUDO_REGS can be used.
+
+2002-04-24 Andrew Cagney <ac131313@redhat.com>
+
+ * arch-utils.h: Update copyright.
+
+ * gdbarch.sh (PC_IN_SIGTRAMP): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * inferior.h (IN_SIGTRAMP): Delete definition.
+ * arch-utils.c (legacy_pc_in_sigtramp): New function.
+ * arch-utils.h (legacy_pc_in_sigtramp): Declare.
+
+ * mips-tdep.c (mips_init_extra_frame_info): Use PC_IN_SIGTRAMP.
+ (mips_dump_tdep): Do not print value of IN_SIGTRAMP.
+ * hppa-tdep.c (pc_in_interrupt_handler): Use PC_IN_SIGTRAMP.
+ (find_proc_framesize): Ditto.
+ * alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Ditto.
+ (alpha_init_extra_frame_info): Ditto.
+ * infrun.c (handle_inferior_event): Ditto.
+ (handle_inferior_event): Ditto.
+ (check_sigtramp2): Ditto.
+ * blockframe.c (create_new_frame): Ditto.
+ (get_prev_frame): Ditto.
+ * ppc-linux-tdep.c: Update comments.
+ * i386-linux-tdep.c: Update comments.
+ * breakpoint.c (bpstat_what): Update comment.
+
+2002-04-24 David S. Miller <davem@redhat.com>
+
+ * i960-tdep.c (register_in_window_p): New function.
+ (i960_find_saved_register): Use it instead of
+ REGISTER_IN_WINDOW_P.
+ * config/i960/tm-i960.h (REGISTER_IN_WINDOW): Delete.
+
+ * symtab.h (find_stab_function_addr): Kill extern.
+ * minsyms.c (find_stab_function_addr): Remove from here...
+ * dbxread.c: ... to here, and mark it static.
+
+2002-04-20 David S. Miller <davem@redhat.com>
+
+ * sparc-tdep.c (sparc_pop_frame): Only need to allocate
+ SPARC_INTREG_SIZE * 16 bytes for reg_temp.
+
+2002-04-21 David S. Miller <davem@redhat.com>
+
+ * remote-vxsparc.c (vx_read_register): Fix typo, we want
+ REGISTER_RAW_SIZE of SP_REGNUM not CORE_ADDR.
+ (vx_write_register): Likewise.
+
+2002-04-23 J. Brobecker <brobecker@gnat.com>
+
+ * source.c (is_regular_file): New function.
+ (openp): Check wether file to open is a regular file
+ to avoid opening directories.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * findvar.c (extract_signed_integer): Cast printf argument
+ to suppress format warning.
+ (extract_unsigned_integer): Likewise.
+ * infcmd.c (registers_info): Likewise.
+ * top.c (get_prompt_1): Likewise.
+ * valops.c (value_assign): Likewise.
+ * valprint.c (print_decimal): Likewise.
+
+2002-04-22 H.J. Lu (hjl@gnu.org)
+
+ * c-exp.y (typebase): Support
+
+ [long|long long|short] [signed|unsigned] [int|]
+
+ and
+
+ signed [long|long long|short] int
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (vax-tdep.o): Add $(arch_utils_h), $(inferior_h),
+ and vax-tdep.h.
+ * vax-tdep.h: New file.
+ * vax-tdep.c: Include inferior.h, arch-utils.h, and vax-tdep.h.
+ Make several routines static.
+ (vax_get_saved_register): New function.
+ (vax_gdbarch_init): New function.
+ (_initialize_vax_tdep): Register vax_gdbarch_init.
+ * config/vax/tm-vax.h: Set GDB_MULTI_ARCH to GDB_MULTI_ARCH_PARTIAL.
+ Remove macros now under the control of gdbarch.
+
+2002-04-22 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c (arm_skip_prologue): Recognize "sub sp, sp, #nn".
+ Some whitespace and coding standards tweaks.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * vax-tdep.c: Include regcache.h.
+ (vax_call_dummy_words): New.
+ (sizeof_vax_call_dummy_words): New.
+ (vax_fix_call_dummy): New function.
+ (vax_saved_pc_after_call): Ditto.
+ * config/vax/tm-vax.h: Don't include regcache.h.
+ (SAVED_PC_AFTER_CALL): Use vax_saved_pc_after_call.
+ (CALL_DUMMY): Remove.
+ (CALL_DUMMY_WORDS): Define.
+ (SIZEOF_CALL_DUMMY_WORDS): Define.
+ (FIX_CALL_DUMMY): Use vax_fix_call_dummy.
+
+2002-04-18 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.h: Change regnum defines to enums for ease of debugging.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * vax-tdep.c (vax_frame_chain): New function.
+ (vax_push_dummy_frame): Ditto.
+ (vax_pop_frame): Ditto.
+ * config/vax/tm-vax.h (FRAME_CHAIN): vax_frame_chain.
+ (FRAMELESS_FUNCTION_INVOCATION): Use
+ generic_frameless_function_invocation_not.
+ (PUSH_DUMMY_FRAME): Use vax_push_dummy_frame.
+ (POP_FRAME): Use vax_pop_frame.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * vax-tdep.c (vax_store_struct_return): New function.
+ (vax_extract_return_value): Ditto.
+ (vax_store_return_value): Ditto.
+ (vax_extract_struct_value_address): Ditto.
+ * config/vax/tm-vax.h (STORE_STRUCT_RETURN): Use
+ vax_store_struct_return.
+ (EXTRACT_RETURN_VALUE): Use vax_extract_return_value.
+ (STORE_RETURN_VALUE): Use vax_store_return_value.
+ (EXTRACT_STRUCT_VALUE_ADDRESS): Use vax_extract_struct_value_address.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * vax-tdep.c (vax_frame_saved_pc): New function.
+ (vax_frame_args_address_correct): Ditto.
+ (vax_frame_args_address): Ditto.
+ (vax_frame_locals_address): Ditto.
+ (vax_frame_num_args): Move code to be in proximity to
+ other frame-related functions.
+ * config/vax/tm-vax.h (INNER_THAN): Use core_addr_lessthan.
+ (FRAME_SAVED_PC): Use vax_frame_saved_pc.
+ (FRAME_ARGS_ADDRESS_CORRECT): Use vax_frame_args_address_correct.
+ (FRAME_ARGS_ADDRESS): Use vax_frame_args_address.
+ (FRAME_LOCALS_ADDRESS): Use vax_frame_locals_address.
+
+2002-04-22 H.J. Lu (hjl@gnu.org)
+
+ * Makefile.in (FLAGS_TO_PASS): Add libdir, mandir, datadir and
+ includedir.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * vax-tdep.c (vax_frame_init_saved_regs): New function.
+ * config/vax/tm-vax.h (FRAME_FIND_SAVED_REGS): Remove.
+ (FRAME_INIT_SAVED_REGS): New macro.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * MAINTAINERS: Reflect that the Alpha target has been multi-arch'd.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-nat.c (get_longjmp_target): Use ALPHA_* constants
+ where needed.
+ (fetch_osf_core_registers): Likewise.
+ (supply_gregset): Likewise.
+
+2002-04-22 J. Brobecker <brobecker@gnat.com>
+
+ * symfile.h (get_section_index): Define.
+ * symfile.c (get_section_index): New function.
+ * mdebugread.c (SC_IS_SBSS): New macro.
+ (SC_IS_BSS): Return true for the scBss storage class only, as
+ the scSBss storage class refers to the .sbss section.
+ (parse_partial_symbols): Discard the symbols which associated
+ section does not exist.
+ Make sure to use the .sbss section index for symbols which
+ storage class is scBss, rather than using the .bss section index.
+
+2002-04-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * vax-tdep.c: Update copyright years.
+ (vax_register_name): New function.
+ (vax_register_byte): Ditto.
+ (vax_register_raw_size): Ditto.
+ (vax_register_virtual_size): Ditto.
+ (vax_register_virtual_type): Ditto.
+ * config/vax/tm-vax.h: Update copyright years.
+ (REGISTER_NAMES): Remove.
+ (REGISTER_NAME): Define.
+ (REGISTER_BYTE): Use vax_register_byte.
+ (REGISTER_RAW_SIZE): Use vax_register_raw_size.
+ (REGISTER_VIRTUAL_SIZE): Use vax_register_virtual_size.
+ (REGISTER_VIRTUAL_TYPE): Use vax_register_virtual_type.
+
+2002-04-21 Andrew Cagney <ac131313@redhat.com>
+
+ * config/sparc/tm-sparc.h (sparc_skip_prologue): Restore
+ declaration
+ * arc-tdep.c (arc_prologue_frameless_p): Fix syntax error.
+
+2002-04-21 David S. Miller <davem@redhat.com>
+
+ * arch-utils.c (generic_prologue_frameless_p): Kill
+ SKIP_PROLOGUE_FRAMELESS_P code.
+ * config/arc/tm-arc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete
+ references.
+ (PROLOGUE_FRAMELESS_P, arc_prologue_frameless_p): New.
+ * arc-tdep.c (arc_prologue_frameless_p): Implement.
+ * config/arc/tm-sparc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete
+ references.
+ (PROLOGUE_FRAMELESS_P, sparc_prologue_frameless_p): New.
+ * sparc-tdep.c (sparc_prologue_frameless_p): Implement.
+ (sparc_gdbarch_init): Pass it to
+ set_gdbarch_prologue_frameless_p.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add alphabsd-nat.c.
+ (alphabsd-nat.o): New dependency list.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add alpha-linux-tdep.c and
+ alphafbsd-tdep.c.
+ (alpha-linux-tdep.o): New dependency list.
+ (alphafbsd-tdep.o): Likewise.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-linux-tdep.c: New file. Move alpha_linux_sigtramp_offset
+ to here...
+ * alpha-tdep.c: ...from here.
+ * config/alpha/alpha-linux.mt (TDEPFILES): Add alpha-linux-tdep.o.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/tm-alpha.h: Move alpha_software_single_step
+ prototype from here...
+ * alpha-tdep.h: ...to here.
+
+2002-04-21 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h (selected_frame_level): Document as deprecated.
+ (frame_relative_level): Declare.
+ * stack.c (frame_relative_level): New function.
+ (selected_frame_level): Document as deprecated.
+ (select_frame): Do not set the selected_frame_level.
+
+ * stack.c (frame_info, record_selected_frame): Update.
+ (frame_command, current_frame_command): Update.
+ (up_silently_base, up_command, down_silently_base): Update.
+ (down_command): Update.
+ * inflow.c (kill_command): Update.
+ * tracepoint.c (finish_tfind_command): Update.
+ * corelow.c (core_open): Update.
+ * thread.c (info_threads_command): Update.
+ (do_captured_thread_select): Update.
+ * infcmd.c (finish_command): Update.
+ * breakpoint.c (insert_breakpoints, do_enable_breakpoint): Update.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/tm-fbsd.h (FRAME_CHAIN_VALID): Remove.
+
+2002-04-21 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_breakpoint_from_pc): Make static. Make return
+ type const.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alphafbsd-tdep.c: Update copyright years. Include
+ alpha-tdep.h.
+ (alphafbsd_use_struct_convention): Make static.
+ (alphafbsd_init_abi): New function.
+ (_initialize_alphafbsd_tdep): New function.
+ * config/alpha/tm-fbsd.h: Update copyright years.
+ (USE_STRUCT_CONVENTION): Remove.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_abi_handler): New structure to describe
+ an Alpha ABI variant.
+ (alpha_abi_handler_list): Declare.
+ (alpha_gdbarch_register_os_abi): New function.
+ (alpha_gdbarch_init): Give registered ABI variant handlers a
+ chance to tweak the gdbarch once we have set up defaults.
+ * alpha-tdep.h: Prototype alpha_gdbarch_register_os_abi.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Set coerce_float_to_double
+ to standard_coerce_float_to_double.
+ * config/alpha/tm-alpha.h (COERCE_FLOAT_TO_DOUBLE): Remove.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.h (gdbarch_tdep): Add vm_min_address member.
+ * alpha-tdep.c (heuristic_proc_start): Use vm_min_address
+ from gdbarch_tdep rather than a constant.
+ (alpha_gdbarch_init): Initialize tdep->vm_min_address to
+ the default text address for all Alpha Unix ABIs.
+ (alpha_dump_tdep): Report the value of tdep->vm_min_address.
+ * config/alpha/tm-alpha.h (VM_MIN_ADDRESS): Delete.
+
+2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.h: New file. Includes several Alpha target constants
+ taken from...
+ * config/alpha/tm-alpha.h: ...here. Remove macros that we now
+ let gdbarch deal with.
+ (GDB_MULTI_ARCH): Define as GDB_MULTI_ARCH_PARTIAL.
+ * Makefile.in (alpha-nat.o): Add alpha-tdep.h and $(BFD_SRC)/elf-bfd
+ to dependency list.
+ * alpha-nat.c: Include alpha-tdep.h. Update for adjusted
+ Alpha target register names.
+ * alphabsd-nat.c: Likewise.
+ * alpha-tdep.c: Include alpha-tdep.h. Update for adjusted
+ Alpha target register names. Make serveral routines static.
+ (alpha_get_saved_register): New function.
+ (alpha_abi_names): New.
+ (process_note_abi_tag_sections): New function.
+ (get_elfosabi): New function.
+ (alpha_gdbarch_init): New function.
+ (alpha_dump_tdep): New function.
+ (_initialize_alpha_tdep): Register alpha_gdbarch_init.
+
+2002-04-21 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (find_saved_register): Delete #ifdef
+ HAVE_REGISTER_WINDOWS code.
+ * config/sparc/tm-sparc.h: Update comments.
+ * config/i960/tm-i960.h (HAVE_REGISTER_WINDOWS): Delete macro.
+
+2002-04-21 Andrew Cagney <ac131313@redhat.com>
+
+ * i960-tdep.c (i960_find_saved_register): New function.
+ (i960_get_saved_register): New function.
+ * config/i960/tm-i960.h (GET_SAVED_REGISTER): Define.
+ (i960_get_saved_register): Declare.
+ * config/i960/tm-i960.h, i960-tdep.c: Update copyright.
+
+2002-04-20 David S. Miller <davem@redhat.com>
+
+ * sparc-nat.c (store-inferior_registers): Fix ambiguous else.
+
+2002-04-20 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Use gdbarch_num_pseudo_regs
+ instead of NUM_PSEUDO_REGS.
+
+2002-04-20 David S. Miller <davem@redhat.com>
+
+ * config/sparc/tm-linux.h (GDB_MULTI_ARCH): Define to
+ GDB_MULTI_ARCH_PARTIAL
+ * config/sparc/tm-sp64linux.h (GDB_MULTI_ARCH): Do not
+ define, let tm-sp64.h do it.
+
+2002-04-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * frame.c (find_saved_register): Avoid a NULL pointer
+ dereference and actually walk the frame list.
+
+2002-04-20 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (gdbarch_update_p): Keep the list of architectures
+ sorted in most most-recent-used order. Document.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-04-19 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc_get_saved_register): Use get_prev_frame
+ instead of ->prev.
+ * z8k-tdep.c (z8k_frame_chain): Do not use ->prev.
+ * s390-tdep.c (s390_frame_chain): Do not use ->prev.
+ * rs6000-tdep.c (frame_get_saved_regs): Use rs6000_frame_chain()
+ instead of ->prev.
+
+2002-04-19 Elena Zannoni <ezannoni@redhat.com>
+
+ Fix PR gdb/471.
+ * gdbtypes.c (init_simd_type): Rewrite using new functions.
+ (build_builtin_type_vec128): Ditto.
+ (append_composite_type_field): Fix calculation of type length in
+ union case.
+
+2002-04-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * config/djgpp/README: Update.
+
+ * go32-nat.c (store_register): Cast &a_tss to `char *' to avoid a
+ compiler warnings.
+
+2002-04-19 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (setup_arbitrary_frame): Rename...
+ (alpha_setup_arbitrary_frame): ...to this.
+ * config/alpha/tm-alpha.h (SETUP_ARBITRARY_FRAME): Update
+ for alpha_setup_arbitrary_frame.
+
+2002-04-18 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (BREAKPOINT_FROM_PC): Return a const buffer.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * defs.h (breakpoint_from_pc_fn): Delete type definition.
+ * target.h (memory_breakpoint_from_pc): Update declaration.
+ * config/mcore/tm-mcore.h (mcore_breakpoint_from_p): Ditto.
+
+ * arch-utils.c (legacy_breakpoint_from_pc): Update return type.
+ * mcore-tdep.c (mcore_breakpoint_from_pc): Ditto.
+ * mem-break.c (memory_breakpoint_from_pc): Ditto.
+ * rs6000-tdep.c (rs6000_breakpoint_from_pc): Ditto.
+ * s390-tdep.c (s390_breakpoint_from_pc): Ditto
+ * xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Ditto.
+ * mn10300-tdep.c (mn10300_breakpoint_from_pc): Ditto.
+ * mips-tdep.c (mips_breakpoint_from_pc): Ditto.
+ * m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Ditto.
+ * ia64-tdep.c (ia64_breakpoint_from_pc): Ditto.
+ * d10v-tdep.c (d10v_breakpoint_from_pc): Ditto.
+ * arch-utils.c (legacy_breakpoint_from_pc): Ditto..
+
+ * mem-break.c (default_memory_insert_breakpoint): Make `bp' a
+ const pointer.
+ * monitor.c (monitor_insert_breakpoint): Ditto.
+ * rs6000-tdep.c (rs6000_software_single_step): Ditto for `breakp'.
+
+ * config/mcore/tm-mcore.h: Update copyright.
+ * mem-break.c: Ditto.
+ * xstormy16-tdep.c: Ditto.
+
+2002-04-18 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y: Add precedence rule for '^' token.
+ This removes the shift/reduce conflicts.
+ Remove the comment concerning these shift/reduce conflicts.
+
+2002-04-18 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (COMMON_UISA_NOFP_REGS): New macro.
+ (registers_powerpc_nofp): New register set for processors
+ without floating point unit.
+
+2002-04-18 David S. Miller <davem@redhat.com>
+
+ * MAINTAINERS: Add myself to write-after-approval.
+
+2002-04-17 Michael Snyder <msnyder@redhat.com>
+
+ * MAINTAINERS: Add myself as co-maintainer of testsuite/gdb.asm.
+
+2002-04-17 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (frame_initial_stack_address): Use
+ frame_register_read to read the alloca_reg.
+
+2002-04-17 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (find_saved_register): Find saved registers in the next
+ not prev frame.
+ Fix PR gdb/365.
+
+2002-04-17 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (LANG): Set to ``c''.
+
+2002-04-15 Andrew Cagney <ac131313@redhat.com>
+
+ * PROBLEMS: Mention hppa2.0-hp-hpux10.20 compile problems.
+
+2002-04-15 Andrew Cagney <ac131313@redhat.com>
+
+ * bcache.c: Include <stddef.h> and <stdlib.h> after "defs.h".
+ Update copyright.
+
+ * hpread.c (hpread_get_lntt): Add declaration.
+ Also fix PR gdb/391.
+
+2002-04-14 Andrew Cagney <ac131313@redhat.com>
+
+ * acinclude.m4 (AM_PROG_CC_STDC): Import from automake 1.6.
+ * aclocal.m4, configure: Re-generate.
+ Fix PR gdb/391.
+
+2002-04-14 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi/mi-cmd-disas.c (dump_insns): Use TARGET_PRINT_INSN
+ instead of tm_print_insn.
+
+2002-04-14 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-bdm.c (bdm_ppc_fetch_registers): Fix typo.
+
+2002-04-14 Andrew Cagney <ac131313@redhat.com>
+
+ * config/pa/tm-hppa.h (FRAME_CHAIN_COMBINE): Delete macro.
+ * blockframe.c (FRAME_CHAIN_COMBINE): Delete macro.
+ (get_prev_frame): Do not call FRAME_CHAIN_COMBINE.
+
+2002-04-12 Don Howard <dhoward@redhat.com>
+
+ * cli/cli-cmds.c (init_cli_cmds): Add new user settable value:
+ max_user_call_depth.
+ (init_cmd_lists): Initialize the new value;
+ * cli/cli-script.c (execute_user_command): Limit the call depth of
+ user defined commands. This avoids a core-dump when user commands
+ are infinitly recursive.
+
+2002-04-12 Kevin Buettner <kevinb@redhat.com>
+
+ * ppc-tdep.h (struct gdbarch_tdep): Add new member ``lr_frame_offset''.
+ * rs6000-tdep.c (rs6000_frame_saved_pc): Use ``lr_frame_offset''
+ from tdep struct instead of DEFAULT_LR_SAVE.
+ (rs6000_gdbarch_init): Initialize ``lr_frame_offset''.
+ * config/powerpc/tm-ppc-eabi.h (DEFAULT_LR_SAVE): Delete.
+ * config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Delete.
+
+2002-04-12 Michael Snyder <msnyder@redhat.com>
+
+ * Remote.c: Spelling fix.
+ * gcore.c (default_derive_heap_segment): Use bfd_section_name.
+ If no symbol found for "sbrk", try "_sbrk".
+ (make_output_phdrs): Use bfd_section_name.
+ (gcore_copy_callback): Use bfd_section_name.
+ * eval.c: Indentation fix-ups.
+ * d10v-tdep.c (d10v_make_iaddr): Make it idempotent,
+ in case it gets applied to an address that is already
+ in the instruction space.
+ * cli/cli-decode.c (help_list): Allow long lines to wrap.
+ * symfile.c: Fix indentation, long lines.
+ * source.c: White space fix-up.
+
+2002-04-12 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (read_relative_register_raw_bytes): Delete declaration.
+ * frame.c (frame_register_read): New function. Return non-zero on
+ success.
+ (read_relative_register_raw_bytes_for_frame): Delete.
+ (read_relative_register_raw_bytes): Delete.
+ * frame.h (frame_register_read): Declare.
+ * d30v-tdep.c: Update Copyright. Use frame_register_read.
+ * sh-tdep.c: Ditto.
+ * infcmd.c (do_registers_info): Ditto.
+ * hppa-tdep.c: Ditto.
+ * rs6000-tdep.c: Ditto.
+ * h8500-tdep.c: Ditto.
+ * mips-tdep.c: Ditto.
+ * h8300-tdep.c: Ditto.
+ * z8k-tdep.c: Ditto.
+
+2002-04-12 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use rs6000_* methods for
+ 64-bit SysV ABI.
+
+2002-04-12 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from
+ bfd info.
+
+2002-04-12 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (powerpc64, 630, rs64ii, rs64iii): Define
+ register sets for these processor variants.
+
+2002-04-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * regformats/reg-ppc.dat: Support FPSCR.
+
+2002-04-11 Kevin Buettner <kevinb@redhat.com>
+
+ * ppc-tdep.h (struct gdbarch_tdep): Add new field ``ppc_fpscr_regnum''.
+ * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers):
+ Add fpscr as an invalid/unfetchable register.
+ * ppc-linux-nat.c (ppc_register_u_addr, store_register)
+ (fetch_ppc_registers, store_ppc_registers, supply_fpregset)
+ (fill_fpregset): Add support for register fpscr.
+ (fetch_ppc_registers, store_ppc_registers, supply_gregset)
+ (fill_gregset): Account for the fact that register ``mq'' might
+ not exist.
+ * rs6000-tdep.c (PPC_UISA_SPRS): Use (unused) slot 70 for fpscr.
+ (registers_power): Add fpscr to register set at slot 71.
+ (rs6000_gdbarch_init): Account for the fact that ``mq'' doesn't
+ exist on most PPC architectures. Initialize ppc_fpscr_regnum.
+
+2002-04-11 Michael Snyder <msnyder@redhat.com>
+
+ * configure.in: Autoconfiscate _SYSCALL32 define for solaris.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * acconfig.h: Add define for _SYSCALL32.
+ * core-sol2.c: Remove #define _SYSCALL32.
+ * solib-legacy.c: Remove #define _SYSCALL32.
+
+2002-04-10 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (select_frame): Cleanup internal error message, do not
+ use %p.
+
+2002-04-10 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (select_frame): Check that selected_frame and the
+ specified level are as expected.
+ * blockframe.c (get_prev_frame): Set the `level' from next_frame.
+ Update copyright.
+ * frame.h (struct frame_info): Add field `level'. Update
+ copyright.
+ Work-in-progress PR gdb/464.
+
+2002-04-10 Andrew Cagney <ac131313@redhat.com>
+
+ * maint.c (maint_print_section_info): Rename print_section_info.
+ (print_bfd_section_info, print_objfile_section_info): Update.
+ * inferior.h (struct gdbarch): Add opaque declaration.
+ * gdbarch.sh: Add include of "inferior.h" to gdbarch.sh.
+ * gdbarch.h: Regenerate.
+
+2002-04-10 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (child_resume, child_xfer_memory): Delete.
+ (PTRACE_XFER_TYPE): Moved to config/i386/nm-x86-64.h.
+ (kernel_u_size): Added.
+ * config/i386/nm-x86-64.h (CHILD_XFER_MEMORY, CHILD_RESUME): Delete.
+ (PTRACE_XFER_TYPE): Moved here from config/i386/nm-x86-64.h.
+
+2002-04-04 Jim Ingham <jingham@apple.com>
+
+ * valarith.c (find_size_for_pointer_math): New function, either returns
+ the size for a pointer's target, returns 1 for void *, or errors for
+ incomplete types.
+ (value_add, value_sub): use find_size_for_pointer_math.
+
+2002-04-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * linux-low.c (linux_look_up_symbols): New hook.
+ (linux_target_ops): Add linux_look_up_symbols.
+ * remote-utils.c (decode_address): New function.
+ (look_up_one_symbol): New function.
+ * server.c (handle_query): Call target look_up_symbols hook.
+ * server.h (look_up_one_symbol): Add prototype.
+ * target.h (struct target_ops): Add look_up_symbols hook.
+
+2002-04-09 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (read_relative_register_raw_bytes_for_frame): Do not
+ override FP_REGNUM with frame->fp. Update copyright.
+ * parse.c (num_std_regs, std_regs): Delete.
+ (target_map_name_to_register): Do not search std_regs. Update
+ function description.
+ * parser-defs.h (num_std_regs, std_regs, struct std_regs): Delete
+ declarations. Update copyright.
+ Fix PR gdb/251.
+
+2002-04-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.h (ALL_BLOCK_SYMBOLS): Don't dereference the pointer
+ after the last symbol in a block.
+
+2002-04-09 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y (yylex): Handle also the fact that is_a_field_of_this
+ is non zero as a found symbol.
+
+2002-04-08 Andrew Cagney <ac131313@redhat.com>
+
+ * findvar.c: Include "builtin-regs.h".
+ (value_of_register): Call value_of_builtin_reg when applicable.
+ * parse.c: Include "builtin-regs.h" and "gdb_assert.h".
+ (target_map_name_to_register): Call
+ builtin_reg_map_name_to_regnum.
+ * Makefile.in (SFILES): Add builtin-regs.c and std-regs.c.
+ (COMMON_OBS): Add builtin-regs.o and std-regs.o.
+ (builtin_regs_h): Define.
+ (builtin-regs.o): New target.
+ (findvar.o): Add $(builtin_regs_h).
+ * builtin-regs.c, builtin-regs.h: New files.
+ * std-regs.c: New file.
+ Partial fix for PR gdb/251.
+
+2002-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Don't set tm_print_insn;
+ it's no longer required.
+
+2002-04-08 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (gdbtk-wrapper.o): Add missing dependencies.
+
+2002-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (rs6000_software_single_step): Use
+ rs6000_breakpoint_from_pc() to fetch breakpoint instruction
+ and size. Use target_insert_breakpoint() and
+ target_remove_breakpoint() to insert and remove breakpoints
+ instead of explicit memory reads and writes.
+
+2002-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ * config/powerpc/tm-ppc-eabi.h (ELF_OBJECT_FORMAT): Delete.
+ * rs6000-tdep.c (rs6000_push_arguments): Eliminate
+ ELF_OBJECT_FORMAT ifdef.
+
+2002-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_print_insn().
+
+2002-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (rs6000_fix_call_dummy): Delete unused macro
+ definitions for TOC_ADDR_OFFSET and TARGET_ADDR_OFFSET.
+
+2002-04-07 Mark Kettenis <kettenis@gnu.org>
+
+ * fbsd-proc.c (child_pid_to_exec_file, fbsd_find_memory_regions):
+ s/asprintf/xasprintf/.
+ (fbsd_make_corefile_notes): s/strdup/xstrdup/.
+
+2002-04-07 Andrew Cagney <ac131313@redhat.com>
+
+ I believe Jeff Law denies responsability for this one:
+ * config/pa/hpux11w.mh (MH_CFLAGS): Add -Dvfork=fork.
+ * config/pa/hpux11.mh (MH_CFLAGS): Add -Dvfork=fork.
+ * config/pa/hpux1020.mh (MH_CFLAGS): Add -Dvfork=fork.
+ Work-around for PR gdb/366.
+
+2002-04-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * remote-e7000.c (write_small, e7000_read_inferior_memory,
+ e7000_read_inferior_memory_large, e7000_insert_breakpoint,
+ e7000_remove_breakpoint): Use paddr_nz() to print addresses.
+
+2002-04-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_fp_frame_init_saved_regs,
+ sh_nofp_frame_init_saved_regs): Use alloca() for 'where'
+ information.
+
+2002-04-07 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Misc): List Daniel Jacobowitz as the GDBSERVER
+ maintainer.
+
+2002-04-07 Andrew Cagney <ac131313@redhat.com>
+
+ * README (Reporting Bugs in GDB): Document the bug web page as the
+ prefered way of submitting bugs.
+ Fix PR gdb/402.
+
+2002-04-06 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FP_REGNUM, PC_REGNUM, SP_REGNUM): Allow default of
+ -1. Update comment.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-04-07 Andreas Schwab <schwab@suse.de>
+
+ * m68klinux-nat.c (fill_fpregset): Properly pass address of
+ buffer to regcache_collect.
+
+2002-04-06 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (PS_REGNUM): Add. Document. Default to -1.
+ * gdbarch.c, gdbarch.h: Re-generate.
+
+2002-04-06 Andrew Cagney <ac131313@redhat.com>
+
+ * symtab.c (lookup_symtab): Remove ``const'' from ``rp''
+ declaration. Fix -Werror.
+
+2002-04-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbarch.sh (initialize_non_multiarch): Call init_gdbarch_swap.
+ * gdbarch.c: Regenerate.
+
+2002-04-05 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (clear_command): Rewrite middle section to
+ combine two loops with identical control conditions.
+ Add a cleanup to eliminate a memory leak.
+ * cli/cli-dump.c (restore_section_callback): Use paddr_nz.
+
+2002-04-05 H.J. Lu (hjl@gnu.org)
+
+ * solib-svr4.c (bkpt_names): Add "__start".
+
+2002-04-04 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc_push_dummy_frame): Use GDB_TARGET_IS_SPARC64
+ as test for 64 bit target.
+
+2002-04-05 Andrew Cagney <ac131313@redhat.com>
+
+ * h8500-tdep.c (h8500_write_fp): Delete function.
+ * dwarf2cfi.c (cfi_write_fp): Document as not used.
+ * mips-tdep.c (mips_gdbarch_init): Do not set write_fp.
+ * ia64-tdep.c (ia64_gdbarch_init): Do not set write_fp.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Do not set write_fp.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Do not set write_fp.
+ * s390-tdep.c (s390_gdbarch_init): Do not set write_fp.
+ (s390_write_fp):
+ * sh-tdep.c (sh_gdbarch_init): Do not set write_fp.
+ * x86-64-tdep.c (i386_gdbarch_init): Do not set write_fp.
+ * d10v-tdep.c (d10v_gdbarch_init): Do not set write_fp.
+ (d10v_write_fp): Delete function.
+ * inferior.h (write_fp, generic_target_write_fp): Delete
+ declarations.
+ * regcache.c (generic_target_write_fp): Delete function.
+ (write_fp): Delete function.
+ * gdbarch.sh (TARGET_WRITE_FP): Delete.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * config/v850/tm-v850.h (TARGET_WRITE_FP): Delete macro.
+ * config/sparc/tm-sp64.h (TARGET_WRITE_FP): Delete macro.
+ (sparc64_write_fp): Delete declaration.
+ * config/h8500/tm-h8500.h (TARGET_WRITE_FP): Delete macro.
+ (h8500_write_fp): Delete declaration.
+
+2002-04-04 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc64_write_fp): Delete.
+ (sparc_push_dummy_frame): Replace write_fp call with code to store
+ the FP directly.
+ (sparc_gdbarch_init): Do not initialize write_fp.
+
+2002-04-05 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c (skip_prologue): Eliminate unused/unreachable
+ clause.
+
+2002-03-29 Jim Blandy <jimb@redhat.com>
+
+ * stack.c (get_selected_block): Add new argument `addr_in_block',
+ used to return the exact code address we used to select the block,
+ not just the block.
+ * blockframe.c (get_frame_block, get_current_block): Same.
+ * frame.h (get_frame_block, get_current_block,
+ get_selected_block): Update declarations.
+ * linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c,
+ linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed.
+
+2002-04-05 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (insert_breakpoints): Change 'hw' to 'hardware in
+ warning message.
+
+2002-04-05 J. Brobecker <brobecker@gnat.com>
+
+ * utils.c (xfullpath): New function.
+ * defs.h (xfullpath): Add declaration.
+ * source.c (openp): Use xfullpath in place of gdb_realpath to
+ avoid resolving the basename part of filenames when the
+ associated file is a symbolic link. This fixes a potential
+ inconsistency between the filenames known to GDB and the
+ filenames it prints in the annotations.
+ * symtab.c (lookup_symtab): Use the new xfullpath function, in order
+ to be able to match a filename with either the real filename, or
+ the name of any symbolic link to this file.
+ (lookup_partial_symtab): Ditto.
+
+2002-04-04 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c: Add support for hardware breakpoints in overlays.
+ (overlay_events_enabled): New state variable.
+ (insert_breakpoints): Use overlay_events_enabled to decide
+ whether to attempt to set a breakpoint at the overlay load addr.
+ Handle bp_hardware_breakpoint as well as bp_breakpoint.
+ (remove_breakpoint): Use overlay_events_enabled to decide
+ whether breakpoints need to be removed from overlay load addr.
+ Handle bp_hardware_breakpoint as well as bp_breakpoint.
+ (bpstat_stop_status): Handle bp_hardware_breakpoint in overlays.
+ (create_overlay_event_breakpoint, enable_overlay_breakpoints,
+ disable_overlay_breakpoints): Update overlay_events_enabled.
+
+2002-04-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c (struct function_range): New.
+ (cu_first_fn, cu_last_fn, cu_cached_fn): New.
+ (check_cu_functions): New.
+ (read_file_scope): Initialize global function lists.
+ Call dwarf_decode_line after processing children.
+ (read_func_scope): Add to global function list.
+ (dwarf_decode_lines): Call check_cu_functions everywhere
+ record_line is called. Call record_line with a linenumber
+ of 0 to mark sequence ends.
+
+2002-04-04 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (child_xfer_memory): x86-64 ptrace() ABI
+ change sync with glibc.
+
+2002-04-03 Jim Blandy <jimb@redhat.com>
+
+ * configure.in: Call AC_C_INLINE.
+ * configure: Regenerated.
+
+2002-04-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * rs6000-tdep.c: Change #include of "bfd/libcoff.h"
+ and "bfd/libbfd.h" to "libcoff.h" and "libbfd.h".
+
+2002-03-31 Mark Kettenis <kettenis@gnu.org>
+
+ * NEWS: Mention gcore support on FreeBSD/i386.
+
+ * fbsd-proc.c: New file.
+ * config/i386/nm-fbsd.h (CHILD_PID_TO_EXEC_FILE): Define.
+ * config/i386/fbsd.mh (NATDEPFILES): Add gcore.o and fbsd-proc.o.
+
+ * lin-lwp.c (child_wait): Check SAVE_ERRNO instead of ERRNO in
+ while statement.
+
+2002-03-29 Jim Blandy <jimb@redhat.com>
+
+ * cli/cli-dump.c (_initialize_cli_dump): Older GCC's tolerate
+ unescaped newlines in string literals, but newer ones don't. So
+ escape them.
+
+2002-03-26 Michael Snyder <msnyder@redhat.com>
+ Andrew Cagney <cagney@redhat.com>
+
+ * cli/cli-dump.c: New file. Dump memory to file,
+ restore file to memory.
+ * cli/cli-dump.h: New file.
+ * Makefile.in: Add rules, dependencies for cli-dump.o.
+ * NEWS: Mention new commands.
+
+2002-03-28 Michael Snyder <msnyder@redhat.com>
+
+ * symfile.c (symbol_file_add): Move test for null symbols to later.
+
+2002-03-27 Andrew Cagney <ac131313@redhat.com>
+
+ From veksler at il.ibm.com:
+ * utils.c (gdb_realpath): If canonicalize_file_name fails, return
+ the xstrduped original path.
+ Fix PR gdb/417.
+
+2002-03-27 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (_initialize_breakpoint): Clean up help string.
+ * infcmd.c (_initialize_infcmd): Ditto.
+ * language.c (_initialize_language): Ditto.
+ * symfile.c (_initialize_symfile): Ditto.
+ * top.c (_init_main): Ditto.
+ * cli/cli-cmds.c (init_cli_cmds): Ditto.
+
+2002-03-27 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (struct rs6000_framedata): Add fields for AltiVec
+ vector registers handling.
+ (skip_prologue): Handle new AltiVec instructions. Fill in new
+ fields of frame data.
+ (frame_get_saved_regs): Fill in information for AltiVec registers.
+
+2002-03-27 Jim Blandy <jimb@redhat.com>
+
+ * symtab.h (SYMBOL_INIT_MANGLED_NAME): Turn this macro's body into
+ a function; leave this macro here to invoke that function.
+ (symbol_init_mangled_name): Declaration for that function.
+ * symtab.c (symbol_init_mangled_name): New function.
+
+2002-03-27 Andrew Cagney <ac131313@redhat.com>
+
+ * valarith.c: Replace strerror with safe_strerror.
+ * tracepoint.c: Ditto.
+ * lin-lwp.c: Ditto.
+ * go32-nat.c: Ditto.
+ * inflow.c: Ditto.
+ * gnu-nat.c: Ditto.
+
+2002-03-27 Andreas Schwab <schwab@suse.de>
+
+ * event-top.c (command_line_handler): Remove useless if.
+
+2002-03-27 Andreas Jaeger <aj@suse.de>
+
+ * dwarf2cfi.c: Give credit to Daniel Berlin, reformat copyright
+ comment.
+
+2002-03-27 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.h (X86_64_NUM_REGS, X86_64_NUM_GREGS): Delete #defines.
+ (x86_64_num_regs, x86_64_num_gregs): Added extern variables.
+ * x86-64-linux-nat.c (x86_64_regmap): Swapped RBX <> RDX, added DS, ES, FS, GS.
+ (x86_64_linux_dr_get_status, supply_gregset),
+ (fill_gregset): Changed X86_64_NUM_GREGS to x86_64_num_gregs.
+ * x86-64-tdep.c (x86_64_register_raw_size_table): Delete.
+ (x86_64_register_info_table): Add.
+ (X86_64_NUM_REGS, X86_64_NUM_GREGS): Add.
+ (x86_64_register_raw_size, x86_64_register_virtual_type),
+ (x86_64_register_name, _initialize_x86_64_tdep): Changed to reflect new
+ general x86_64_register_info_table.
+ (i386_gdbarch_init): gdbarch_register_bytes is now set
+ dynamicaly during initialization.
+ * regformats/reg-x86-64.dat: Synced with changes to registers above.
+ * gdbserver/linux-x86-64-low.c: Ditto.
+
+2002-03-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/server.c (main): Call target_signal_to_host_p
+ and target_signal_to_host on signals received from the remote.
+ * gdbserver/remote-utils.c (prepare_resume_reply): Call
+ target_signal_from_host on signals sent to the remote.
+ * gdbserver/server.h: Add prototypes. Include "gdb/signals.h".
+ * gdbserver/Makefile.in: Add signals.o. Add -I${INCLUDE_DIR}.
+
+2002-03-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals/signals.c: Include "server.h" in gdbserver build.
+ (target_signal_from_name): Don't use STREQ.
+ (_initialize_signals): Likewise. Don't include function in
+ gdbserver build.
+
+2002-03-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals.c: Moved to...
+ * signals/signals.c: Here.
+ * Makefile (signals.o): Update.
+
+2002-03-26 Jeff Law (law@redhat.com)
+
+ * somread.c (som_symtab_read): Remove some commented out code and
+ updated related comments. Do not set the minimal symbol table to
+ mst_solib_trampoline for ST_ENTRY symbols with SS_LOCAL scope
+ in a dynamic executable.
+ * hppa-tdep.c (find_proc_framesize): Sanely handle the case
+ where we are unable to find the minimal symbol for the given
+ PC value.
+
+2002-03-25 Jeff Law (law@redhat.com)
+
+ * linux-proc.c (read_mapping): Scan up to end of line for filename.
+
+2002-03-25 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Rewritten from scratch.
+
+2002-03-23 Andrew Cagney <ac131313@redhat.com>
+
+ * command.h: Update copyright.
+ (struct cmd_list_element): Replace definition with opaque
+ declaration.
+ (enum cmd_types): Document that it will eventually be moved to
+ cli/cli-decode.h
+ (CMD_DEPRECATED, DEPRECATED_WARN_USER): Delete macros.
+ (MALLOCED_REPLACEMENT): Delete macro.
+ * Makefile.in (cli_decode_h): Add $(command_h).
+ (top.o, completer.o, maint.o): Add dependency on $(cli_decode_h).
+ * top.c: Include "cli/cli-decode.h".
+ * completer.c: Include "cli/cli-decode.h".
+ * maint.c: Include "cli/cli-decode.h".
+ * cli/cli-decode.h: Include "command.h".
+ (enum command_class): Delete.
+ (enum cmd_types): Comment out.
+ (enum cmd_auto_boolean): Delete.
+ (enum var_types): Delete.
+
+2002-03-23 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c: Include "gdb_assert.h".
+ (add_set_or_show_cmd): New static function.
+ (add_set_cmd): Rewrite. Use add_set_or_show_cmd.
+ (add_show_from_set): Rewrite. Use add_set_or_show_cmd. Don't copy
+ all fields, such as func, from the set command.
+
+2002-03-23 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (sh-elf): Change warning flag to -w.
+
+2002-03-23 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (error): Add printf format attribute.
+ * thread-db.c (thread_from_lwp): Fix error format string.
+ * stack.c (parse_frame_specification): Ditto.
+ * cli/cli-decode.c (undef_cmd_error): Ditto.
+ * scm-lang.c (scm_lookup_name): Ditto.
+ * tracepoint.c (trace_error): Ditto.
+ * remote-utils.c (usage): Ditto.
+ * remote.c (compare_sections_command): Ditto.
+ Fix PR gdb/328.
+
+2002-03-22 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbtypes.c (append_composite_type_field): New function.
+ (init_composite_type): New function.
+ * gdbtypes.h (append_composite_type_field): Declare.
+ (init_composite_type): Ditto.
+
+2002-03-22 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-linux-tdep.c (ppc_sysv_abi_use_struct_convention): New
+ function.
+ * ppc-tdep.h (ppc_sysv_abi_use_struct_convention): Export.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use different
+ structure returning convention for SYSV ABI case, but not
+ for GNU/Linux, FreeBSD, or NetBSD.
+
+2002-03-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.h (lookup_block_symbol): Add mangled_name argument
+ to prototype.
+
+ * symmisc.c (maintenance_check_symtabs): Call lookup_block_symbol
+ with new mangled_name argument.
+ * linespec.c (decode_line_1): Likewise.
+ * valops (value_of_this): Likewise.
+ * symtab.c (lookup_transparent_type): Likewise.
+ (lookup_symbol_aux): Likewise. Accept new mangled_name argument.
+ (lookup_symbol): If we are given a mangled name, pass it down
+ to lookup_symbol_aux.
+ (lookup_block_symbol): If we are given a mangled name to check
+ against, only return symbols which match it.
+
+2002-03-22 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (child_create_inferior): Check for proper shell to use
+ here, in case the user changes it on the fly.
+ (_initialize_inftarg): Remove shell path considerations.
+
+2002-03-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use correct max size value
+ for gdbarch_max_register_raw_size and max_register_virtual_size.
+ Adjust copyright year.
+
+2002-03-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * dbxread.c (process_one_symbol): Extend the first N_SLINE
+ in a function to cover the entire beginning of the function
+ as well if it does not already.
+
+2002-03-21 Tom Rix <trix@redhat.com>
+
+ * rs6000-nat.c (rs6000_ptrace32): Renamed from ptrace32.
+ (rs6000_ptrace64): Renamed from ptrace64.
+
+2002-03-20 Martin M. Hunt <hunt@redhat.com>
+
+ * gdbserver/remote-utils.c (remote_open): Don't call
+ getprotobyname, we're all using TCP here so just use
+ IPPROTO_TCP.
+ * gdbserver/gdbreplay.c (remote_open): Ditto.
+
+2002-03-20 Martin M. Hunt <hunt@redhat.com>
+
+ * regcache.c (_initialize_regcache): No need to call
+ build_regcache() at this time; it gets called whenever
+ the gdbarch changes.
+
+2002-03-20 David O'Brien <obrien@FreeBSD.org>
+
+ * sparc-nat.c: Include sys/param.h where possible.
+
+2002-03-20 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/422.
+ * c-lang.c (c_create_fundamental_type): Handle FT_COMPLEX,
+ FT_DBL_PREC_COMPLEX, and FT_EXT_PREC_COMPLEX.
+ * dwarf2read.c (read_base_type): Set TYPE_TARGET_TYPE for
+ complex types.
+ * stabsread.c (rs6000_builtin_type): Likewise.
+ (read_sun_floating_type): Likewise.
+
+2002-03-19 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * stabsread.c (read_member_functions): Remove skip code for duplicate
+ constructor/destructor methods. Use standard parsing for these
+ methods and just do not chain them to the list of methods after
+ parsing.
+
+2002-03-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * coffread.c: Remove redundant static declarations. Replace
+ occurrences of `PTR' with `void *'.
+ * elfread.c, mdebugread.c, minsyms.c, mipsread.c: Likewise.
+ * top.h (quit_cover): Likewise.
+ * defs.h (catch_errors): Likewise.
+
+2002-03-18 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (XMALLOC): Define.
+ * gdb-events.sh (XMALLOC): Delete macro.
+ * gdb-events.c, gdb-events.h: Regenerate.
+ * gdbarch.sh (XMALLOC): Delete macro.
+ * gdbarch.c: Regenerate.
+ * serial.c (XMALLOC): Delete macro.
+ * ui-file.c (XMALLOC): Ditto.
+ * ser-unix.h (XMALLOC): Ditto.
+ * sh-tdep.c (XMALLOC): Ditto.
+ * ui-out.c (XMALLOC): Ditto.
+ * utils.c (XMALLOC): Ditto.
+ * i386-tdep.c (XMALLOC): Ditto.
+ * gdb-events.c (XMALLOC): Ditto.
+ * d10v-tdep.c (XMALLOC): Ditto.
+ * cli-out.c (XMALLOC): Ditto.
+
+ * cli-out.c, d10v-tdep.c, gdb-events.c: Update copyright.
+ * gdb-events.sh, i386-tdep.c, ser-unix.h, serial.c: Ditto.
+ * ui-file.c, ui-out.c: Ditto.
+
+2002-03-18 Andrew Cagney <ac131313@redhat.com>
+
+ * command.h (struct cmd_list_element): Add field context.
+ (set_cmd_context, get_cmd_context): Declare.
+ * cli/cli-decode.h: Ditto.
+ * cli/cli-decode.c (get_cmd_context): New function.
+ (set_cmd_context): New function.
+ (add_cmd): Initialize context.
+ Part of fixing PR gdb/145 and PR gdb/146.
+
+2002-03-17 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (cmd_type): New function.
+ * command.h (cmd_type): Declare.
+ * infrun.c (set_schedlock_func): Call function cmd_type.
+ * kod.c (kod_set_os): Call cmd_type.
+ * cris-tdep.c (cris_version_update): Use function cmd_type.
+ (cris_mode_update, cris_abi_update): Ditto.
+
+ * command.h: (execute_cmd_post_hook): Declare.
+ (execute_cmd_pre_hook): Declare.
+ * cli/cli-script.c (clear_hook_in_cleanup): New function.
+ (execute_cmd_post_hook, execute_cmd_pre_hook): New
+ functions. Execute pre/post hook while ensuring that afterwords
+ hook_in is cleared.
+ * top.c (execute_command): Use execute_cmd_post_hook, and
+ execute_cmd_pre_hook to execute pre/post commands.
+ * infrun.c (normal_stop): Pass stop_command and not pre_hook to
+ hook_stop_stub.
+ (hook_stop_stub): Call execute_cmd_pre_hook.
+
+2002-03-17 Andrew Cagney <ac131313@redhat.com>
+
+ * kod.c (kod_set_os): Revert previous change. Is called by ``info
+ set'' and this leads to a core dump. Move xstrdup of
+ operating_system to after check that it is not NULL.
+
+2002-03-17 Andrew Cagney <ac131313@redhat.com>
+
+ * kod.c (kod_set_os): Remove unnecessary check that
+ ``command->type'' is set_cmd.
+
+ * valprint.c (set_input_radix): Use input_radix.
+ (set_output_radix): Use output_radix.
+ (set_input_radix_1, set_output_radix_1): Add FIXME - bad radix
+ isn't reverted.
+
+2002-03-16 Andrew Cagney <ac131313@redhat.com>
+
+ * value.h (struct value): Delete field ``substring_addr''. Change
+ aligner fields to force_doublest_align, force_longest_align,
+ force_core_addr_align and force_pointer_aligh.
+
+ * value.h (struct value): Fix typo in above change.
+
+2002-03-16 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * ia64-tdep.c (ia64_gdbarch_init): Call set_gdbarch_frame_args_skip,
+ to fix internal_error from ``maintenance print architecture''.
+
+2002-03-16 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * cp-valprint.c (cp_is_vtbl_ptr_type): Handle vtbl field type
+ for gcc versions after gcc-2.8.1.
+
+2002-03-16 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * eval.c (evaluate_subexp_standard): Fix setup of ``this'' pointer
+ for method resolution. Restore adjustment of ``this'' pointer after
+ calling value_struct_elt, which was accidentally removed during the
+ HP merge.
+
+2002-03-15 Andrew Cagney <ac131313@redhat.com>
+
+ * eval.c (evaluate_subexp_standard): Pass ``selected_frame'' to
+ value_of_register.
+ * findvar.c (value_of_register): Add ``frame'' parameter. Pass to
+ get_saved_register.
+ * value.h (value_of_register): Update.
+
+2002-03-14 Richard Henderson <rth@redhat.com>
+
+ * configure.in: Detect declaration for canonicalize_file_name.
+ * utils.c (canonicalize_file_name): Declare, if needed.
+ (gdb_realpath): Prefer realpath if available and usable.
+ * config.in, configure: Rebuild.
+
+2002-03-14 Richard Henderson <rth@redhat.com>
+
+ * dwarf2read.c (read_array_type): Accept DW_FORM_data8 as
+ a constant array bound.
+
+ * MAINTAINERS: Add myself to write-after-approval.
+
+2002-03-14 Michael Snyder <msnyder@redhat.com>
+
+ * symfile.c (syms_from_objfile): Return immediately if no syms.
+ (symbol_file_add): Return immediately if no syms.
+ (find_sym_fns): Return immediately if no syms.
+
+2002-03-13 Michal Ludvig <mludvig@suse.cz>
+
+ * gdbserver/remote-util.c (remote_open): Print remote-side's
+ IP address when remote debugging over the network.
+
+2002-03-12 David O'Brien <obrien@FreeBSD.org>
+
+ * config/sparc/fbsd.mh: Fix copyright.
+ * config/sparc/fbsd.mt: Likewise.
+
+2002-03-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * MAINTAINERS: Fix typo in name of gdb warnings option.
+ (x86-64): Fix formating so that this can be parsed by awk.
+
+2002-03-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (defs_h): Add $(INCLUDE_DIR)/gdb/signals.h.
+ * defs.h: Include "gdb/signals.h".
+ (enum target_signal): Move to $(INCLUDE_DIR)/gdb/signals.h.
+
+2002-03-10 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.h (sys/reg.h, x86_64_regmap): Moved to x86-64-linux-nat.c
+ * x86-64-linux-nat.c (sys/reg.h, x86_64_regmap): Moved here
+ from x86-64-tdep.h
+
+2002-03-10 Daniel Jacobowitz <drow@mvista.com>
+ Don Howard <dhoward@redhat.com>
+
+ * mips-tdep.c (ST0_FR): Define.
+ (mips2_fp_compat): New function, temporarily disabled.
+ (mips_read_fp_register_single): New function.
+ (mips_read_fp_register_double): New function.
+ (mips_print_register): Use them.
+ (do_fp_register_row): Likewise.
+
+2002-03-09 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add Jim Ingham and Klee Dienes to ``write after
+ approval''.
+
+2002-03-08 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * stabsread.c (read_member_functions): Fix is_stub test for
+ static member functions, improve comment.
+
+2002-03-07 Richard Earnshaw <rearnsha@arm.com>
+
+ * remote-rdi.c (myprint): Replace 'PTR' with 'void *'.
+ (mywrite, mywritec, mypause, myreadc, mygets): Likewise.
+ (_initialize_remote_rdi): Use add_set_boolean_cmd to register
+ commands that set boolean values.
+ (arm_rdi_remove_breakpoint): Rewrite to avoid uninitialized warning.
+ (arm_rdi_resume): Always initialize PC.
+ (arm_rdi_open): Don't use rslt as a boolean.
+ (arm_rdi_create_inferior, arm_rdi_close, arm_rdi_resume)
+ (arm_rdi_fetch_registers, arm_rdi_store_registers)
+ (arm_rdi_xfer_memory, arm_rdi_files_info, arm_rdi_kill)
+ (arm_rdi_insert_breakpoint, arm_rdi_remove_breakpoint): Likewise.
+
+2002-03-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (gdb_cv_bigtoc): Check for -bbigtoc on AIX.
+ * configure: Rebuilt.
+
+2002-03-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * m68hc11-tdep.c (_initialize_m68hc11_tdep): Don't set tm_print_insn.
+ (m68hc11_gdbarch_init): But use set_gdbarch_print_insn instead.
+
+2002-03-06 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (set_cmd_completer): New function.
+ * command.h (set_cmd_completer): Declare.
+ * cli/cli-decode.h (set_cmd_completer): Ditto.
+
+ * breakpoint.c (_initialize_breakpoint): Use set_cmd_completer.
+ * cli/cli-cmds.c (init_cli_cmds): Ditto.
+ * win32-nat.c (_initialize_inftarg): Ditto.
+ * remote-rdi.c (_initialize_remote_rdi): Ditto.
+ * proc-api.c (_initialize_proc_api): Ditto.
+ * hppa-tdep.c (_initialize_hppa_tdep): Ditto.
+ * source.c (_initialize_source): Ditto.
+ * exec.c (_initialize_exec): Ditto.
+ * solib.c (_initialize_solib): Ditto.
+ * top.c (init_main): Ditto.
+ * tracepoint.c (_initialize_tracepoint): Ditto.
+ * symfile.c (_initialize_symfile): Ditto.
+ * printcmd.c (_initialize_printcmd): Ditto.
+ * infcmd.c (_initialize_infcmd): Ditto.
+ * corefile.c (_initialize_core): Ditto.
+
+2002-03-05 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Past Maintainers): Add Frank Ch. Eigler.
+
+2002-03-05 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Fix Mac OS X and Objective-C/C++.
+
+2002-03-05 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Update headings, 5.2 has branched.
+
+2002-03-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c (PTRACE_XFER_TYPE): Change to long.
+ (num_regs, regmap): Move inside HAVE_LINUX_USRREGS.
+ (register_addr, REGISTER_RAW_SIZE): Likewise.
+ (usr_store_inferior_registers): Use PTRACE_XFER_TYPE.
+ * gdbserver/linux-x86-64-low.c: Remove extra #endif.
+
+2002-03-03 Michal Ludvig <mludvig@suse.cz>
+
+ * MAINTAINERS (x86-64): Add myself.
+ * x86-64-tdep.c (x86_64_push_arguments): Fixed typo naregs->nregs,
+ changed value_ptr -> struct value *
+
+2002-03-01 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.host (sparc64-*-freebsd): Add.
+ * configure.tgt: Likewise.
+ * config/sparc/fbsd.mh: New file.
+ * config/sparc/fbsd.mt: Likewise.
+ * config/sparc/nm-fbsd.h: Likewise.
+ * config/sparc/tm-fbsd.h: Likewise.
+
+2002-03-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/djgpp/fnchange.lst: Add regformats/reg-i386-linux.dat and
+ regformats/reg-s390x.dat.
+
+2002-03-01 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c: Add FIXME explaining true/false problem.
+
+2002-02-28 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Past Maintainers): Add J.T. Conklin.
+
+2002-02-28 Michael Chastain <mec@shout.net>
+
+ * MAINTAINERS: Fix typo: gdb.satbs -> gdb.stabs .
+
+2002-02-28 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-s390-low.c: New file.
+ * regformats/reg-s390.dat: New file.
+ * regformats/reg-s390x.dat: New file.
+ * gdbserver/configure.srv: Add S/390.
+ * gdbserver/Makefile.in: Add S/390.
+ * configure.tgt: Enable gdbserver for S/390.
+
+2002-02-28 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (_initialize_go32_nat): Don't use periods in the
+ first line of the doc string for "info dos", except at the end of
+ the sentence, since the short help stops at the first period.
+
+2002-02-28 Jason Merrill <jason@redhat.com>
+
+ * dwarf2read.c (dwarf_cfi_name): Add new codes.
+
+2002-02-27 Fred Fish <fnf@redhat.com>
+
+ * blockframe.c (generic_fix_call_dummy): Fix obvious typo in
+ comment (dumy -> dummy).
+
+2002-02-27 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * symtab.c (gdb_mangle_name): Handle fully mangled v3 abi physnames.
+
+2002-02-27 Rodney Brown <rbrown64@csc.com.au>
+
+ * utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.
+
+2002-02-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/acconfig.h: New file.
+ * gdbserver/i387-fp.c: New file.
+ * gdbserver/i387-fp.h: New file.
+ * gdbserver/linux-x86-64.c: New file.
+ * regformats/reg-x86-64.dat: New file.
+ * configure.tgt: Add x86_64-*-linux* gdbserver support.
+ * gdbserver/configure.srv: Add x86_64-*-linux* and regset support.
+ * gdbserver/configure.in: Add support for regsets.
+ * gdbserver/config.in: Regenerate.
+ * gdbserver/configure: Regenerate.
+ * gdbserver/Makefile.in: Likewise. Add $(linux_low_h).
+ * gdbserver/linux-low.h: New file.
+ * gdbserver/linux-low.c: Include "linux-low.h". Add support
+ for regsets.
+ * gdbserver/linux-arm-low.c: Include "linux-low.h".
+ * gdbserver/linux-ia64-low.c: Include "linux-low.h".
+ * gdbserver/linux-m68k-low.c: Include "linux-low.h".
+ * gdbserver/linux-mips-low.c: Include "linux-low.h".
+ * gdbserver/linux-ppc-low.c: Include "linux-low.h".
+ * gdbserver/linux-sh-low.c: Include "linux-low.h".
+ * gdbserver/linux-i386-low.c: Include "linux-low.h". Include
+ "i387-fp.h". Add PTRACE_GETREGS and friends.
+ * gdbserver/regcache.c (supply_register): New function.
+ (supply_register_by_name): New function.
+ (collect_register): New function.
+ (collect_register_by_name): New function.
+
+2002-02-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/Makefile.in (INTERNAL_CFLAGS): Remove -DGDBSERVER.
+ (config.status): Add configure.srv dependency.
+ (server_h): Add config.h dependency.
+
+2002-02-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * regformats/reg-i386-linux.dat: New file, with $orig_eax.
+ * gdbserver/Makefile.in: Add rules for reg-i386-linux.o.
+ * gdbserver/configure.srv: Change i386-*-linux* to use
+ reg-i386-linux.o.
+
+2002-02-26 Andrew Cagney <ac131313@redhat.com>
+
+ * x86-64-tdep.c: Re-indent. Update copyright date.
+
+2002-02-26 Andrew Cagney <ac131313@redhat.com>
+
+ From Michal Ludvig <mludvig@suse.cz>:
+ * x86-64-tdep.c (value.h): Delete.
+ (gdb_assert.h): Include.
+ (x86_64_register_convert_to_virtual,
+ x86_64_register_convert_to_raw ): Add check which lets only
+ floating-point values to be converted.
+ (value_push): Delete.
+ (x86_64_push_arguments): Order of arguments pushed on stack fixed.
+ (i386_gdbarch_init): Number of register_bytes fixed.
+
+2002-02-26 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add x86-64 target.
+
+2002-02-26 Andrew Cagney <ac131313@redhat.com>
+
+ * memattr.c (mem_command): Eliminate ``true'' and ``false''.
+ * osfsolib.c (solib_map_sections): Ditto.
+ * irix5-nat.c (solib_map_sections): Ditto.
+ * corelow.c (gdb_check_format): Ditto.
+ * symfile.c (symfile_bfd_open): Ditto.
+ * solib.c (solib_map_sections): Ditto.
+ Fix PR gdb/354.
+
+2002-02-26 Andrew Cagney <ac131313@redhat.com>
+
+ * remote.c (_initialize_remote): By default, disable ``e'' and
+ ``E'' step out-of-range packets.
+
+2002-02-26 Andreas Schwab <schwab@suse.de>
+
+ * config/m68k/tm-linux.h (FRAME_SAVED_PC): Define as
+ m68k_linux_frame_saved_pc.
+ (IN_SIGTRAMP): Define as m68k_linux_in_sigtramp instead of
+ in_sigtramp.
+ (SIGCONTEXT_PC_OFFSET): Remove.
+ * m68klinux-nat.c (m68k_linux_frame_saved_pc,
+ m68k_linux_sigtramp_saved_pc): New functions.
+ (IS_SIGTRAMP, IS_RT_SIGTRAMP): Define.
+ (SIGCONTEXT_PC_OFFSET): Moved here from config/m68k/tm-linux.h.
+ (UCONTEXT_PC_OFFSET): Define.
+ (m68k_linux_in_sigtramp): Renamed from in_sigtramp, handle both
+ non-RT and RT signal trampolines.
+
+2002-02-26 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/tm-embed.h (TARGET_UPAGES): Delete.
+ (TARGET_NBPG, STACK_END_ADDR): Delete
+ (VARIABLES_INSIDE_BLOCK): Delete.
+
+2002-02-25 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (perror_with_name): Make string parameter constant.
+ (print_sys_errmsg): Ditto.
+ (query): Ditto.
+ * defs.h (perror_with_name): Update.
+ (print_sys_errmsg): Update.
+ (query): Update.
+
+2002-02-25 Daniel Jacobowitz <drow@mvista.com>
+
+ From Eliot Dresselhaus <eliot@ayrnetworks.com>:
+ * gdbserver/linux-mips-low.c (cannot_fetch_register): Fix typo.
+
+2002-02-25 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * rs6000-nat.c (set_host_arch): Do not switch to a new architecture
+ if it already matches the current architecture from the exec file.
+ Include arch-utils.h for gdbarch_info_init prototype.
+ * Makefile.in (rs6000-nat.o): Update dependencies.
+
+2002-02-25 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * config/djgpp/djconfig.sh: Set NM=nm and CFLAGS="-g -O2" in the
+ list of exported variables.
+
+2002-02-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/configure.srv: New file.
+ * gdbserver/configure.in: Use configure.srv instead
+ of the host/target makefile fragments. Set GDBSERVER_DEPFILES
+ from it.
+ * gdbserver/configure: Regenerated.
+ * gdbserver/terminal.h: New file.
+ * gdbserver/Makefile.in: Update for configure changes. Remove
+ more unneeded include paths.
+
+2002-02-24 Andrew Cagney <ac131313@redhat.com>
+
+ From wiz at danbala:
+ * config/sparc/tm-sp64.h: Fix grammar and typos.
+ Fix PR gdb/287.
+
+2002-02-24 Andrew Cagney <ac131313@redhat.com>
+
+ * lin-lwp.c, thread-db.c, defs.h, cris-tdep.c: Replace ``Linux''
+ with either ``GNU/Linux'' or ``Linux kernel''. Update copyright.
+ * m68klinux-nat.c, sparc-linux-nat.c, x86-64-linux-nat.c: Ditto.
+ * x86-64-linux-tdep.c, gregset.h, gdb_wait.h: Ditto.
+ * ia64-linux-nat.c, infrun.c, linux-proc.c: Ditto.
+ * proc-service.c, i386-linux-tdep.c, ppc-linux-tdep.c: Ditto.
+ * s390-tdep.c: Ditto.
+ * config/nm-linux.h, config/alpha/nm-linux.h: Ditto.
+ * config/alpha/tm-alpha.h, config/alpha/tm-alphalinux.h:
+ * config/alpha/xm-alphalinux.h, config/i386/nm-linux.h: Ditto.
+ * config/i386/nm-x86-64.h, config/i386/tm-linux.h: Ditto.
+ * config/m68k/tm-linux.h, config/mips/nm-linux.h: Ditto.
+ * config/mips/tm-linux.h, config/mips/xm-linux.h: Ditto.
+ * config/powerpc/tm-linux.h, config/s390/nm-linux.h: Ditto.
+ * config/s390/tm-linux.h, config/sh/tm-linux.h: Ditto.
+ * config/sparc/nm-linux.h, config/sparc/tm-linux.h: Ditto.
+ * config/sparc/tm-sp64linux.h, config/sparc/xm-linux.h: Ditto.
+ Fix PR gdb/378.
+
+2002-02-23 Andrew Cagney <ac131313@redhat.com>
+
+ * lin-thread.c: Delete file.
+ * configure.in (gdb_cv_struct_reg_r_gs): Update comment to refer
+ to gdb_proc_service.h.
+ * configure: Re-generate.
+
+ * ocd.c (ocd_open): Do not try to open the "ocd" device.
+ * serial.c (serial_open): Delete check for "ocd".
+ Fix PR gdb/349.
+
+ * Makefile.in (linux-thread.o): Delete target.
+ * linux-thread.c: Delete file.
+
+ * config/djgpp/fnchange.lst: Rename bfd/elf32-sh64.c. Tweak other
+ renamed SH files to be consistent.
+
+ * symtab.c (sort_search_symbols): Use xfree.
+
+2002-02-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-linux-tdep.c (arm_linux_init_abi): Register
+ IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE
+ * config/arm/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE): Replace old
+ definition with undef, since we don't want the sysvr4 definition.
+ (SKIP_TRAMPOLINE_CODE): Likewise.
+
+2002-02-23 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-02-22 Alfred M. Szmidt <ams@kemisten.nu>:
+
+ * configure.in: (AC_CHECK_FUNCS) Added test for
+ canonicalize_file_name Regenerated.
+ * config.in, configure: Regenerated.
+ * utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is
+ defined use canonicalize_file_name.
+
+2002-02-23 Michael Chastain <mec@shout.net>
+
+ * MAINTAINERS: Remove Michael Chastain from "paper trail" list.
+
+2002-02-23 Andrew Cagney <ac131313@redhat.com>
+
+ * README: Remove references to cygnus.com.
+ * MAINTAINERS: Change Past Maintainer addresses to ``foo at bar
+ dot com'' form. Remove references to cygnus.com and sourceware.
+
+2002-02-23 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-02-19 Paul Eggert <eggert@twinsun.com>:
+ * Makefile.in (VER): Change "head -1" to "sed q", since POSIX
+ 1003.1-2001 no longer allows "head -1".
+ * gdb/Makefile.in (version.c): Likewise.
+ * gdb/doc/Makefile.in (GDBvn.texi): Likewise.
+ * gdb/CONTRIBUTE: Change "diff -c3" to "diff -c", which is
+ equivalent. POSIX 1003.1-2001 no longer allows "diff -c3".
+
+2002-02-23 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (cmd_cfunc_eq): New function.
+ * command.h (cmd_cfunc_eq): Declare.
+ * cli/cli-decode.h (cmd_cfunc_eq): Ditto.
+
+ * cli/cli-cmds.h (is_complete_command): Change parameter to a
+ ``struct cmd_list_element *''.
+ * cli/cli-cmds.c (is_complete_command): Update. Use
+ cmd_cfunc_eq.
+ * top.c (execute_command): Pass the command to
+ is_complete_command.
+ * tracepoint.c: Replace function.cfunc with cmd_cfunc_eq.
+
+2002-02-23 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-02-20 Martin Schwidefsky <schwidefsky@de.ibm.com>:
+ * config/s390/tm-s390.h (GDB_TARGET_IS_ESAME): Use renamed
+ architecture defines.
+ * s390-tdep.c (s390_gdbarch_init): Likewise.
+
+2002-02-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-linux-tdep.c (arm_linux_extract_return_value): Make static.
+ (arm_linux_push_arguments): Likewise.
+ (arm_linux_init_abi): Register them. Also register linux-specific
+ call_dummy_words.
+ (find_minsym_and_objfile): Use strcmp, not STREQ.
+ * config/arm/tm-linux.h (CALL_DUMMY_WORDS): Delete.
+ (arm_linux_call_dummy_words): Delete declaration.
+ (EXTRACT_RETURN_VALUE, PUSH_ARGUMENTS): Delete.
+ (arm_linux_extract_return_value, arm_linux_push_arguments): Delete
+ declarations.
+ (LOWEST_PC): Delete.
+
+2002-02-23 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * maint.c (print_section_info): Do not prepend `0x' to filepos
+ output, it will be handled by local_hex_string_custom.
+
+2002-02-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-linux-nat.c (store_newfpe_single): Use regcache_collect.
+ (store_newfpe_double, store_newfpe_extended, store_fpregister)
+ (store_register, store_regs, fill_gregset, fill_fpregset): Likewise.
+
+2002-02-22 Jim Blandy <jimb@redhat.com>
+
+ Indicate that the bcache functions don't change the strings
+ they're passed.
+ * bcache.h (bcache, hash): Add `const' keywords to declarations.
+ * bcache.c (bcache, hash): Add `const' keywords to definitions.
+
+2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c (child_create_inferior): Fix create flags setting bug.
+
+2002-02-21 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (register_loaded_dll): Just use raw name when we can't
+ find the complete path to a loaded DLL.
+
+2002-02-21 Fred Fish <fnf@redhat.com>
+
+ * dbxread.c (process_one_symbol): When finding an N_FUN symbol
+ that marks the end of the range of a function, enter a line number
+ entry that has a line number of zero and a PC offset that matches
+ the end of the function. This starts a range of PC's for which no
+ line number information is known.
+ * symtab.c (find_pc_sect_line): If our best fit is in a range of
+ PC's for which no line number info is found (line number is zero)
+ then we didn't find any valid line information.
+ * symtab.h: Document use of zero line number entry.
+
+2002-02-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-linux-nat.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Define.
+ (have_ptrace_getvrregs): Define for run time checks.
+ (gdb_vrregset_t): New type for Altivec register handling.
+ (fetch_register, store_register): Fetch/store altivec register
+ when needed.
+ (fetch_altivec_register, store_altivec_register): New functions.
+ (supply_vrregset, fill_vrregset): New functions.
+ (fetch_altivec_registers, store_altivec_registers): New functions.
+ (fetch_ppc_registers, store_ppc_registers): Fetch/store altivec
+ registers as well.
+
+2002-02-21 Jiri Smid <smid@suse.cz>
+
+ * config/i386/x86-64linux.mh (NATDEPFILES): Remove x86-64-nat.o.
+
+2002-02-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * Makefile.in (armnbsd-nat.o): Update dependencies.
+ * armnbsd-nat.c (supply_gregset): New function. Common code to
+ supply the integer register set.
+ (supply_fparegset): New function. Similar for FPA registers.
+ (fetch_regs, fetch_fp_regs): Use them.
+ (fetch_core_registers): Likewise.
+ (fetch_elfcore_registers): New function.
+ (arm_netbsd_elfcore_fns): New core-file type specification.
+ (_initialize_arm_netbsd_nat): Register it.
+
+2002-02-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-nat.c: Include gdbcore.h.
+ (FETCH_INFERIOR_REGISTERS): Just error if this isn't defined.
+ (fetch_regs, fetch_fp_regs, store_regs, store_fp_regs): Add explicit
+ 'void' to declaration, to shut up ARI.
+ (fetch_core_registers): Make static. Rewrite using supply_register.
+ (arm_netbsd_core_fns): New core-file type specification.
+ (_initialize_arm_netbsd_nat): New function.
+
+2002-02-21 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (register_loaded_dll): Correctly check for invalid handle
+ value.
+
+2002-02-20 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (register_loaded_dll): Handle case where FindFirstFile
+ fails.
+
+2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * jv-exp.y (parse_number): Change type of implicit longs
+ to builtin_type_uint64.
+
+2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c (mywait): Change argument to waitpid
+ to be an integer instead of a `union wait'.
+
+2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-linux-nat.c: Call the operating system GNU/Linux.
+ * mips-linux-tdep.c: Likewise.
+ * mips-tdep.c: Likewise.
+
+2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/265.
+ * jv-exp.y (parse_number): Handle 64-bit integers.
+
+2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/configure.in: Remove AM_PROC_CC_STDC. Change
+ AC_STDC_HEADERS to AC_HEADER_STDC.
+ * gdbserver/configure: Regenerated.
+
+2002-02-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * arc-tdep.c (get_longjmp_target): Only compile this function if JB_PC
+ is defined.
+ * sparc-tdep.c (get_longjmp_target): Likewise.
+
+2002-02-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * News: Add news about ARM and Multi-arch. Mention the new target
+ arm*-*-netbsd*.
+
+2002-02-19 Jim Blandy <jimb@redhat.com>
+
+ * stabsread.c (error_type_complaint): Improve error message.
+
+2002-02-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/README: Update documentation.
+ * gdbserver/configure.in: Update configury to match documentation.
+ * gdbserver/Makefile.in: Likewise.
+ * gdbserver/configure: Regenerated.
+ * gdbserver/aclocal.m4: New file, generated by aclocal.
+ * gdbserver/config.in: New file, generated by autoheader.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/djgpp/fnchange.lst: Add change rules for armnbsd-tdep.c and
+ armnbsd-nat.c.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.h (enum arm_float_model): New enum.
+ (struct gdbarch_tdep): Add fp_model.
+ * arm-tdep.c (arm_gdbarch_init): Set fp_model in tdep. Defer setting
+ up floating-point conversions until we know the floating-point model
+ in use by the inferior. Don't complain about being unable to
+ determine the ABI of the inferior when we don't have one.
+ (arm_extract_return_value): Support different floating-point models.
+ (arm_store_return_value): Likewise.
+ * armnbsd-tdep.c (arm_netbsd_aout_init_abi): Set fp_model in tdep to
+ ARM_FLOAT_SOFT.
+ (arm_netbsd_elf_init_abi): Set fp_model to ARM_FLOAT_SOFT_VFP.
+
+2002-02-19 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use
+ of ``current_gdbarch''.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-nat.c : ANSIfy all function declarations.
+ (fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs): New.
+ (fetch_inferior_registers): Re-implement in terms of above.
+ (store_register, store_regs, store_fp_register, store_fp_regs): New.
+ (store_inferior_registers): Re-implement in terms of above.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-linux-nat.c: Linux -> GNU/Linux when not talking about the
+ kernel.
+ * arm-linux-tdep.c: Likewise.
+ * config/arm/tm-linux.h: Likewise.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * configure.tgt (arm*-*-netbsd*): This variant is now fully multi-arch.
+ * config/arm/nbsd.mt (TM_FILE): Delete.
+ * config/arm/tm-nbsd.h: Delete.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Initialize TARGET_CHAR_SIGNED.
+ Initialize CALL_DUMMY_LENGTH.
+
+2002-02-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-tdep.c (arm_netbsd_aout_in_solib_call_trampoline): New
+ function.
+ (arm_netbsd_aout_init_abi): Initialize IN_SOLIB_CALL_TRAMPOLINE.
+ * config/arm/tm-nbsd.h: Don't include config/tm-nbsd.h, it only
+ defines one thing and that is incorrect for this port.
+ (IN_SOLIB_CALL_TRAMPOLINE): Delete.
+
+2002-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * go32-nat.c: add i386-tdep.h include to import FP_REGNUM_P macro.
+
+2002-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c (display_selector): New function. Displays information
+ about the information returned by GetThreadSelectorEntry API function.
+ (display_selectors): New function. Displays the infomation of
+ the selector given as argument, or of CS, DS ans FS selectors
+ if no argument is given.
+ ( _initialize_inftarg): Add "w32" as info prefix command.
+ Add "info w32 selector" as command calling display_selectors.
+
+2002-02-19 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * i386-tdep.c (get_longjmp_target): Fix compilation failure
+ by setting dummy values to JB_PC and JB_ELEMENT_SIZE
+ if not defined.
+
+2002-02-18 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/nbsd.mt (TDEPFILES): Add solib-sunos.o.
+
+2002-02-18 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_set_call_dummy_breakpoint_offset): New function.
+ (arm_fix_call_dummy): Call it.
+ (arm_call_dummy_breakpoint_offset): Delete.
+ (arm_gdbarch_init): Initialize call_dummy_breakpoint_offset.
+ * config/arm/tm-arm.h (CALL_DUMMY_BREAKPOINT_OFFSET): Delete.
+
+2002-02-18 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_CHAIN_VALID): Only require at level 2.
+ Default to func_frame_chain_valid.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.h (FRAME_CHAIN_VALID): Delete definition.
+
+2002-02-18 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-linux-nat.c: Update copyright.
+ (fetch_register, store_register): Add tid parameter, don't compute
+ tid here.
+ (fetch_ppc_registers, store_ppc_registers): Add tid
+ parameter. Pass it along to callees.
+ (fetch_inferior_registers, store_inferior_registers): Compute tid
+ here, and pass it to calleed functions.
+ (fill_gregset, supply_fpregset): Clean up formatting.
+
+2002-02-18 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Initialize coerce_float_to_double.
+ * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Delete.
+
+2002-02-18 Richard Earnshaw <rearnsha@arm.com>
+
+ * gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
+ * gdbarch.c gdbarch.h: Regenerate.
+ * breakpoint.c (create_longjmp_breakpoint): Always compile this
+ function.
+ (breakpoint_reset): Test GET_LONGJMP_TARGET_P().
+ * infrun.c (GET_LONGJMP_TARGET): Delete default definition.
+ (handle_inferior_event): Test GET_LONGJMP_TARGET_P().
+
+ * arm-tdep.h (struct gdbarch_tdep): Add jb_pc and jb_elt_size fields.
+ * arm-tdep.c (arm_get_longjmp_target): New function.
+ (arm_gdbarch_init): Initialize jb_pc to -1. If ABI handler changes
+ this to a positive value register arm_get_longjmp_target as the
+ longjmp handler.
+ * arm-linux-tdep.c (arm_get_longjmp_target): Delete.
+ (arm_linux_init_abi): Set up longjmp description in tdep.
+ * armnbsd-nat.c (get_longjmp_target): Delete.
+ * armnbsd-tdep.c (arm_netbsd_init_abi_common): Set up longjmp
+ description in tdep.
+ * config/arm/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC): Delete.
+ (get_longjmp_target): Delete declaration.
+ (GET_LONGJMP_TARGET): Delete.
+ * config/arm/tm-linux.h (arm_get_longjmp_target): Delete declaration.
+ (GET_LONGJMP_TARGET): Delete.
+
+2002-02-17 Kevin Buettner <kevinb@redhat.com>
+
+ From Peter Schauer <pes@regent.e-technik.tu-muenchen.de>:
+ * ia64-tdep.c (ia64_gdbarch_init): Eliminate incorrect use
+ of ``current_gdbarch''.
+
+2002-02-17 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-cmds.c (compare_strings): New function.
+ (complete_command): Only print each unique item once.
+ * completer.h (complete_line): Declare.
+ * completer.c (complete_line): New function.
+ (line_completion_function): Use it.
+
+2002-02-16 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (TARGET_LONG_DOUBLE_BIT): Default to 64.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-02-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * valarith.c (value_x_unop): Fix decrement; support post-decrement.
+
+2002-02-16 Daniel Jacobowitz <drow@mvista.com>
+
+ From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>:
+ * valops.c (value_arg_coerce): Don't take the address of a reference
+ to convert an argument to a reference.
+
+2002-02-15 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (get_image_name): New function.
+ (handle_load_dll): Use get_image_name function.
+ (get_child_debug_event): Avoid registering debug events until possibly
+ execed process is started.
+ (child_create_inferior): Allow invocation via shell so that command
+ line redirection, etc. works ok.
+ (_initialize_inftarg): Add new command: "set shell" to control whether
+ a shell is used to start a process.
+
+2002-02-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-mips-low.c (cannot_fetch_register): Use find_regno
+ instead of find_register_by_number.
+ (cannot_store_register): Likewise.
+
+2002-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * dwarf2read.c: Replace fprintf (stderr, ...) by
+ fprintf_unfiltered (gdb_stderr, ...).
+
+2002-02-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/gdbserver.1: Document --attach.
+
+2002-02-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.h (struct gdbarch_tdep): Add fields for breakpoint
+ descriptions.
+ * arm-tdep.c (arm_default_arm_le_breakpoint)
+ (arm_default_arm_be_breakpoint, arm_default_thumb_le_breakpoint)
+ (arm_default_thumb_be_breakpoint): New. Initialize them from
+ traditional breakpoint defines.
+ (arm_breakpoint_from_pc): Use new gdbarch_tdep entries.
+ (arm_gdbarch_init): Initialize new breakpoint variables.
+ * arm-linux-tdep.c (arm_linux_arm_le_breakpoint): New.
+ (arm_linux_init_abi): Initialize linux-specific breakpoint.
+ * armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint): New.
+ (arm_netbsd_aout_init_abi, arm_netbsd_elf_init_abi): Split common
+ code out to ...
+ (arm_netbsd_init_abi_common): ... here; new function.
+ * config/arm/tm-arm.h (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT)
+ (THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Delete.
+ * config/arm/tm-linux.h (ARM_LE_BREAKPOINT): Delete.
+ * config/arm/tm-nbsd.h (ARM_LE_BREAKPOINT): Delete.
+
+2002-02-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.h (enum arm_abi): New enum.
+ (struct gdbarch_tdep): New structure.
+ (LOWEST_PC): Provide a default.
+ (arm_gdbarch_register_os_abi): Declare new function.
+ * arm-tdep.c (arm_abi_names): New array.
+ (process_note_abi_tag_sections): New function.
+ (get_elfosabi): New function.
+ (arm_gdbarch_register_os_abi): New function.
+ (arm_gdbarch_init): Try to determine the ABI of the inferior. If
+ support for that ABI has been built in, then call the appropriate
+ configuration routine. Use gdbarch_num_regs() to get the number
+ of registers.
+ (arm_dump_tdep): New function.
+ (arm_init_abi_eabi_v1, arm_init_abi_eabi_v2, arm_init_abi_apcs): New
+ place-holder functions.
+ (_initialize_arm_tdep): Register them.
+ * config/arm/tm-arm.h (LOWEST_PC): Delete.
+
+ * armnbsd-tdep.c: New file.
+ * Makefile.in (armnbsd-tdep.o): Add dependencies.
+ * config/arm/nbsd.mt (TDEPFILES): Add it.
+ * config/arm/tm-nbsd.h (LOWEST_PC): Delete.
+
+ * armnbsd-nat.c: Include regcache.h.
+ * Makefile.in (armnbsd-nat.o): Update dependency list.
+
+ * arm-tdep.c (arm_get_next_pc): Use printf_filtered for error message.
+
+2002-02-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/Makefile.in: Fix typos in target rules.
+
+2002-02-14 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix part of PR gdb/267.
+ * linespec.c (find_methods): Handle constructors specially for now.
+
+2002-02-14 Corinna Vinschen <vinschen@redhat.com>
+
+ * arm-tdep.c (arm_push_arguments): Eliminate special float type
+ handling.
+ * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Define to call
+ standard_coerce_float_to_double().
+
+2002-02-14 Christopher Faylor <cgf@redhat.com>
+
+ * config/i386/xm-cygwin.h: Revert inadvertent reinclusion of
+ GDBINIT_FILENAME.
+
+2002-02-14 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Don't call
+ find_variant_by_name, because it confuses the multiarch
+ framework. Return NULL if there isn't an architecture with the
+ user supplied name, instead of forcing a different one without
+ recording the change with the multiarch machinery.
+ (find_variant_by_name): Delete.
+
+2002-02-14 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * config/i386/i386sol2.mh (NATDEPFILES): Add i387-nat.o, needed by
+ i386v4-nat.o now. Add gcore.o, Solaris x86 supports gcore.
+
+2002-02-13 Martin M. Hunt <hunt@redhat.com>
+
+ * stack.c (print_frame_info_base): When calling
+ print_frame_info_listing_hook, set current_source_symtab.
+
+2002-02-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/Makefile.in: Add regformats directory to INCLUDE_CFLAGS,
+ and remove unused $(INCLUDE_DIR).
+ Add regcache.c to OBS.
+ Add generated register protocol files to clean target.
+ Update dependencies for new objects, obsolete old target code.
+
+ * gdbserver/linux-low.c: Remove all platform-specific code to
+ new files. Remove various dead code. Update to use regcache
+ functionality.
+ * gdbserver/remote-utils.c (fromhex): Add return statement
+ to quiet warning.
+ (putpkt): Dynamically allocate buf2 because PBUFSIZ is no longer
+ constant.
+ (input_interrupt): Add integer parameter to match prototype
+ of a signal handler.
+ (outreg): Use register_data ().
+ (prepare_resume_reply): Use gdbserver_expedite_regs.
+ * gdbserver/server.c (main): Dynamically allocate own_buf because
+ PBUFSIZ is no longer constant. Use registers_to_string () and
+ registers_from_string ().
+ * gdbserver/server.h: No longer include "defs.h". Add prototypes
+ for error (), fatal (), and warning (). Update definition of
+ PBUFSIZ to use regcache functionality. Add include guard.
+ * gdbserver/utils.c (fatal): Add missing ``const''.
+ (warning): New function.
+
+ * regformats/regdat.sh: Include "regcache.h" in generated files.
+ Provide init_registers () function.
+ * regformats/regdef.h: Add prototype for set_register_cache ().
+ Add include guard.
+
+ * gdbserver/linux-arm-low.c: New file.
+ * gdbserver/linux-i386-low.c: New file.
+ * gdbserver/linux-ia64-low.c: New file.
+ * gdbserver/linux-m68k-low.c: New file.
+ * gdbserver/linux-mips-low.c: New file.
+ * gdbserver/linux-ppc-low.c: New file.
+ * gdbserver/linux-sh-low.c: New file.
+
+ * gdbserver/regcache.c: New file.
+ * gdbserver/regcache.h: New file.
+
+ * gdbserver/low-linux.c: Removed obsolete file.
+
+2002-02-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/arm/linux.mt: Update GDBSERVER_DEPFILES.
+ * config/i386/linux.mt: Likewise.
+ * config/ia64/linux.mt: Likewise.
+ * config/m68k/linux.mh: Likewise.
+ * config/powerpc/linux.mh: Likewise.
+ * config/mips/linux.mt: Likewise.
+
+ * config/sh/linux.mt: Add GDBSERVER_DEPFILES.
+
+ * config/i386/i386lynx.mh: Mark gdbserver variables
+ as (currently) obsolete for this target.
+ * config/i386/nbsd.mt: Likewise.
+ * config/i386/nbsdelf.mt: Likewise.
+ * config/m32r/m32r.mt: Likewise.
+ * config/m68k/m68klynx.mh: Likewise.
+ * config/m68k/nbsd.mt: Likewise.
+ * config/m68k/sun3os4.mh: Likewise.
+ * config/mips/vr5000.mt: Likewise.
+ * config/ns32k/nbsd.mt: Likewise.
+ * config/pa/hppabsd.mh: Likewise.
+ * config/pa/hppaosf.mh: Likewise.
+ * config/powerpc/nbsd.mt: Likewise.
+ * config/rs6000/rs6000lynx.mh: Likewise.
+ * config/s390/s390.mt: Likewise.
+ * config/s390/s390x.mt: Likewise.
+ * config/sparc/sparclynx.mh: Likewise.
+ * config/sparc/sun4os4.mh: Likewise.
+ * config/i386/x86-64linux.mt: Likewise.
+ * config/sparc/linux.mh: Likewise.
+
+2002-02-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.tgt: Configure gdbserver only for known working
+ targets. Set ${build_gdbserver} instead of modifying ${configdirs}.
+ * configure.in: Check ${build_gdbserver}. Put gdbserver/ into
+ SUBDIRS if it is configured. Update comment for ${nativefile}.
+ * configure: Regenerated.
+
+2002-02-13 Michael Snyder <msnyder@redhat.com>
+
+ * config/i386/i386v42mp.mh: Add gcore.o to NATDEPFILES.
+
+ * gcore.c (gcore_command): Use gcore_default_target instead of NULL.
+ (default_gcore_mach): Just return 0, work around a problem in bfd.
+ (default_gcore_target): OK to return NULL if exec_bfd is null.
+ (make_mem_sec): Use a cast, avoid a warning.
+
+ * procfs.c (find_memory_regions_callback): Use a cast instead of
+ calling host_pointer_to_address (which complains if
+ sizeof (host pointer) != sizeof (target pointer)).
+ (procfs_make_note_section): Avoid overflow in psargs string.
+
+ * procfs.c (procfs_make_note_section): Make the default
+ implementation return an error.
+
+2002-02-13 Rodney Brown <rbrown64@csc.com.au>
+
+ * procfs.c (procfs_make_note_section): Provide a default definition
+ (for alpha-dec-osf4.0f). Fix typos.
+
+2002-02-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * linux-proc.c: Add include of regcache.h.
+ * Makefile.in (linux-proc.o): Add dependency on regcache.h.
+
+2002-02-13 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-01-18 Greg McGary <greg@mcgary.org>:
+ * memattr.c (create_mem_region): Disallow useless empty region.
+ Regions are half-open intervals, so allow [A..B) [B..C) as
+ non-overlapping.
+
+2002-02-13 Michael Chastain <mec@shout.net>
+
+ * defs.h: Kill CONST_PTR.
+ * c-lang.h (c_builtin_types): Change CONST_PTR to simple "const".
+ * c-lang.c (c_builtin_types): Likewise.
+ * ch-lang.c (ch_builtin_types): Likewise.
+ * f-lang.c (f_builtin_types): Likewise.
+ * language.c (unknown_builtin_types): Likewise.
+ * m2-lang.c (m2_builtin_types): Likewise.
+ * p-lang.c (pascal_builtin_types): Likewise.
+ * scm-lang.c (c_builtin_types): Likewise.
+
+2002-02-13 Keith Seitz <keiths@redhat.com>
+
+ * arm-tdep.h (arm_get_next_pc): Add declaration.
+
+2002-02-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_use_struct_convention): Make static. Move to be
+ with other related struct-returning functions.
+ (arm_extract_struct_value_address): New function.
+ (arm_gdbarch_init): Initialize the above in multi-arch vector. Also
+ initialize float_format, double_format and long_double_format as
+ appropriate to the endianness of the target.
+ * config/arm/tm-arm.h (TARGET_DOUBLE_FORMAT): Delete.
+ (arm_use_struct_convention): Delete declaration.
+ (USE_STRUCT_CONVENTION, EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
+
+2002-02-13 Keith Seitz <keiths@redhat.com>
+
+ * defs.h (core_addr_to_string_nz): New function.
+
+2002-02-13 Mark Kettenis <kettenis@gnu.org>
+
+ Apply missing bits of 2002-01-15 patch.
+ * i386v4-nat.c (supply_fpregset): Use i387_supply_fsave.
+ (fill_fpregset): Use i387_fill_fsave.
+
+2002-02-12 Keith Seitz <keiths@redhat.com>
+
+ * utils.c (core_addr_to_string): Use phex instead of phex_nz.
+ (core_addr_to_string_nz): New function.
+
+2002-02-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-linux-nat.c: Really include arm-tdep.h.
+ * config/arm/tm-linux.h (struct type, struct value): Declare.
+
+2002-02-11 Michael Snyder <msnyder@redhat.com>
+
+ * procfs.c: Include elf-bfd.h (for elfcore_write functions).
+ (gcore section): Ifdef for Solaris and Unixware only.
+ (procfs_do_thread_registers): Unixware needs one lwpstatus
+ per thread (not one prstatus or pstatus).
+ (procfs_make_note_section): Iterate only over kernel threads (lwps),
+ not over all gdb threads. For unixware, call elfcore_write_pstatus
+ once before iterating over threads.
+
+2002-02-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.h: New file.
+ * arm-tdep.c: Include arm-tdep.h.
+ (arm_addr_bits_remove, arm_smash_text_address, arm_saved_pc_after_call)
+ (arm_skip_prologue, arm_call_dummy_words, arm_fix_call_dummy)
+ (arm_print_float_info, arm_register_type, convert_to_extended)
+ (arm_elf_make_msymbols_special, arm_coff_make_msymbol_special)
+ (arm_extract_return_value, arm_register_name): Make static.
+ (arm_software_single_step): Similarly. Fix types in declaration.
+ (arm_register_byte, arm_register_raw_size, arm_register_virtual_size)
+ (arm_store_return_value, arm_store_struct_return): New functions.
+ (arm_gdbarch_init): Register the above functions. Also register
+ call_dummy_start_offset, sizeof_call_dummy_words,
+ function_start_offset, inner_than, decr_pc_after_break, fp_regnum,
+ sp_regnum, pc_regnum, register_bytes, num_regs, max_register_raw_size,
+ max_register_virtual_size, register_size. Set up
+ prologue_cache.saved_regs here, rather than ...
+ (_initialize_arm_tdep): ... here.
+ * config/arm/tm-arm.h (struct type, struct value): Delete forward
+ declarations.
+ (arm_addr_bits_remove, arm_smash_text_address, arm_saved_pc_after_call)
+ (arm_skip_prologue, arm_call_dummy_words, arm_fix_call_dummy)
+ (arm_print_float_info, arm_register_type, convert_to_extended)
+ (arm_elf_make_msymbols_special, arm_coff_make_msymbol_special)
+ (arm_extract_return_value, arm_register_name): Delete declarations.
+ (SMASH_TEXT_ADDRESS, ADDR_BITS_REMOVE, FUNCTION_START_OFFSET)
+ (SKIP_PROLOGUE, SAVED_PC_AFTER_CALL, INNER_THAN, BREAKPOINT_FROM_PC)
+ (DECR_PC_AFTER_BREAK, PRINT_FLOAT_INFO, REGISTER_SIZE, NUM_REGS)
+ (REGISTER_NAME, REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE)
+ (REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE)
+ (MAX_REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, STORE_STRUCT_RETURN)
+ (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE, CALL_DUMMY_WORDS)
+ (SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_START_OFFSET, FIX_CALL_DUMMY)
+ (SOFTWARE_SINGLE_STEP_P, SOFTWARE_SINGLE_STEP)
+ (ELF_MAKE_MSYMBOL_SPECIAL, COFF_MAKE_MSYMBOL_SPECIAL) Delete.
+ (arm_pc_is_thumb, arm_pc_is_thumb_dummy, thumb_get_next_pc)
+ (arm_get_next_pc): No-longer static -- these are needed by the RDI
+ interface.
+ * arm-linux-nat.c arm-linux-tdep.c armnbsd-nat.c: Include arm-tdep.h.
+ * remote-rdi.c remote-rdp.c: Likewise.
+ * Makefile.in (arm-linux-nat.o, arm-linux-tdep.o arm-tdep.o)
+ (armnbsd-nat.o, remote-rdi.o, remote_rdp.o): Update dependencies.
+ * config/arm/tm-nbsd.h (SOFTWARE_SINGLE_STEP_P): Delete bogus
+ definition.
+
+ * arm-tdep.h (ARM_A1_REGNUM, ARM_A4_REGNUM, ARM_AP_REGNUM)
+ (ARM_SP_REGNUM, ARM_LR_REGNUM, ARM_PC_REGNUM, ARM_F0_REGNUM)
+ (ARM_F3_REGNUM, ARM_F7_REGNUM, ARM_FPS_REGNUM, ARM_PS_REGNUM): Renamed
+ from non-ARM_ prefixed definitions.
+ * arm-tdep.c armnbsd-nat.c arm-linux-nat.c arm-linux-tdep.c: Update
+ all uses of above.
+ * remote-rdi.c remote-rdp.c: Likewise.
+ * arm-linux-nat.c (ARM_CPSR_REGNUM): Renamed from CPSR_REGNUM.
+
+2002-02-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_frameless_function_invocation)
+ (arm_frame_args_address, arm_frame_locals_address, arm_frame_num_args)
+ (arm_frame_chain, arm_init_extra_frame_info, arm_frame_saved_pc)
+ (arm_read_fp, arm_frame_init_saved_regs, arm_push_dummy_frame)
+ (arm_pop_frame, arm_get_next_pc): Make static.
+ (arm_gdbarch_init): Register above in gdbarch structure.
+ (arm_read_fp): Renamed from arm_target_read_fp.
+ (arm_pc_is_thumb, arm_pc_is_thumb_dummy): Make static.
+ * config/arm/tm-arm.h (arm_frameless_function_invocation)
+ (arm_frame_args_address, arm_frame_locals_address, arm_frame_num_args)
+ (arm_frame_chain, arm_init_extra_frame_info, arm_frame_saved_pc)
+ (arm_target_read_fp, arm_frame_init_saved_regs, arm_push_dummy_frame)
+ (arm_pop_frame, arm_get_next_pc, arm_pc_is_thumb)
+ (arm_pc_is_thumb_dummy): Delete declarations.
+ (INIT_EXTRA_FRAME_INFO, TARGET_READ_FP, FRAME_CHAIN)
+ (FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, FRAME_ARGS_ADDRESS)
+ (FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS, FRAME_ARGS_SKIP)
+ (FRAME_INIT_SAVED_REGS, PUSH_DUMMY_FRAME, POP_FRAME): Delete.
+
+2002-02-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.c (compare_search_syms): New function.
+ (sort_search_symbols): New function.
+ (search_symbols): Sort symbols after searching rather than
+ before.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Linux -> GNU/Linux.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh: For for level one methods, disallow a definition
+ when partially multi-arched. Add comments explaining rationale.
+ * gdbarch.h: Re-generate.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (EXTRA_STACK_ALIGNMENT_NEEDED): Don't require when
+ multi-arch partial.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh: Map LEVEL onto a symbolic GT_LEVEL. Exit on bad
+ field. Use diff -u.
+ * gdbarch.c: Re-generate.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * config/mips/tm-mips.h (CALL_DUMMY_LOCATION): Delete.
+ * gdbarch.sh (PUSH_RETURN_ADDRESS): Don't require when multi-arch
+ partial.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (REGISTER_CONVERTIBLE): Don't require when
+ multi-arch partial.
+ (PUSH_ARGUMENTS): Switch to using predefault.
+ * gdbarch.c: Regenerate.
+
+2002-02-10 Andrew Cagney <ac131313@redhat.com>
+
+ * valops.c (PUSH_ARGUMENTS): Delete definition.
+ * gdbarch.sh (PUSH_ARGUMENTS): Don't require when multi-arch
+ partial. Default to default_push_arguments.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-02-09 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (throw_exception): Rename return_to_top_level. Update
+ comments.
+ * utils.c (error_stream, internal_verror, quit): Ditto.
+ * top.c (throw_exception, catcher): Ditto.
+ * sparclet-rom.c (sparclet_load): Ditto.
+ * remote.c (interrupt_query, minitelnet): Ditto.
+ * remote-sds.c (interrupt_query): Ditto.
+ * remote-mips.c (mips_error, mips_kill): Ditto.
+ * ocd.c (interrupt_query): Ditto.
+ * monitor.c (monitor_interrupt_query): Ditto.
+ * m3-nat.c (suspend_all_threads, thread_resume_command): Ditto.
+ * target.h: Update comment.
+
+ * m3-nat.c, ocd.c, sparclet-rom.c: Update copyright.
+
+2002-02-09 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (TARGET_LONG_DOUBLE_FORMAT): Default to
+ default_double_format.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * findvar.c (floatformat_unknown): Delete variable definition.
+ * doublest.h (floatformat_unknown): Delete variable declaration.
+
+2002-02-09 Jim Blandy <jimb@redhat.com>
+
+ * stabsread.c (read_type): Add code to parse Sun's syntax for
+ prototyped function types.
+
+2002-02-09 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (SUBDIR_CLI_INITS): Set to SUBDIR_CLI_SRCS.
+ (SUBDIR_MI_INITS): Set to SUBDIR_MI_SRCS.
+
+2002-02-09 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * xcoffsolib.c (_initialize_xcoffsolib): Renamed from
+ _initialize_solib. Fixes name clash with solib.c:_initialize_solib,
+ now _initialize_xcoffsolib gets called again and overrides the
+ commands from solib.c in a native configuration.
+
+2002-02-09 Mark Kettenis <kettenis@gnu.org>
+
+ * doublest.c (store_typed_floating): Don't try to return a value.
+ Fixes PR gdb/290.
+
+2002-02-08 Jim Blandy <jimb@redhat.com>
+
+ * c-typeprint.c (c_type_print_varspec_suffix): If a function type
+ is prototyped and has no arguments, print its argument list as
+ `(void)'.
+
+2002-02-08 Chris Demetriou <cgd@broadcom.com>
+
+ * MAINTAINERS (write-after-approval): Add myself.
+ (paper-trail): I've escaped!
+
+2002-02-08 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (cygwin_pid_to_str): Revert 2002-02-08 change xasprintf
+ changes.
+ (_initialize_check_for_gdb_ini): Ditto.
+
+2002-02-08 Martin M. Hunt <hunt@redhat.com>
+
+ * win32-nat.c (cygwin_pid_to_str): Fix typo.
+ xaprintf -> xasprintf.
+
+2002-02-08 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c: Remove use of printf and sprintf functions.
+
+2002-02-08 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_frame_chain_valid): Make static.
+ (arm_push_arguments): Likewise.
+ (arm_gdbarch_init): New function.
+ (_initialize_arm_tdep): Call it.
+ * config/arm/tm-arm.h (GDB_MULTI_ARCH): Set to 1.
+ (TARGET_DOUBLE_FORMAT): Test TARGET_BYTE_ORDER, not target_byte_order.
+ (FRAME_CHAIN_VALID): Delete.
+ (arm_frame_chain_valid): Delete declaration.
+ (PUSH_ARGUMENTS): Delete.
+ (arm_push_arguments): Delete declaration.
+ (CALL_DUMMY_P): Delete.
+
+2002-02-08 Andrew Cagney <ac131313@redhat.com>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * gdbtypes.c (build_gdbtypes): Disable setting a specific float format
+ on builtin float types.
+
+2002-02-08 Daniel Jacobowitz <drow@mvista.com>
+
+ * utils.c: Include <curses.h> before "bfd.h".
+ * tui/tui-hooks.c: Likewise.
+ * tui/tui.c: Likewise.
+ * tui/tuiCommand.c: Likewise.
+ * tui/tuiData.c: Likewise.
+ * tui/tuiDataWin.c: Likewise.
+ * tui/tuiDisassem.c: Likewise.
+ * tui/tuiGeneralWin.c: Likewise.
+ * tui/tuiIO.c: Likewise.
+ * tui/tuiLayout.c: Likewise.
+ * tui/tuiRegs.c: Likewise.
+ * tui/tuiSource.c: Likewise.
+ * tui/tuiSourceWin.c: Likewise.
+ * tui/tuiStack.c: Likewise.
+ * tui/tuiWin.c: Likewise.
+
+2002-02-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_nofp_frame_init_saved_regs): Extend where[] array
+ to include space for pseudoregs as well. Update loops accordingly.
+ (sh_fp_frame_init_saved_regs): Ditto.
+ (sh_init_extra_frame_info, sh_pop_frame): Split long lines.
+
+2002-02-07 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Andreas Schwab is GNU/Linux m68k maintainer.
+ Add Richard Earnshaw to Arm maintainers.
+
+2002-02-07 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (warning_begin): Delete declaration.
+
+ * config/powerpc/tm-ppcle-eabi.h (TARGET_BYTE_ORDER_DEFAULT):
+ Delete macro.
+
+2002-02-07 Michael Snyder <msnyder@redhat.com>
+
+ * solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
+ Logic bug, remove misplaced else.
+
+2002-02-07 Klee Dienes <klee@apple.com>
+
+ * fork-inferior.c (fork_inferior): Add '!' to the list of
+ characters that need to be quoted when building a string for the
+ shell. Quote '!' specifically with a backslash, since CSH chokes
+ when trying to evaluate "str!str".
+
+2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * rdi-share/host.h: Only provide a typedef for bool if it is not
+ defined.
+
+2002-02-04 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.h (enum bptype): Add new overlay event bp type.
+ (enable_overlay_breakpoints, disable_overlay_breakpoints): Export.
+
+ * breakpoint.c (create_internal_breakpoint): New function.
+ (internal_breakpoint_number): Moved into create_internal_breakpoint.
+ (create_longjmp_breakpoint): Use create_internal_breakpoint.
+ (create_thread_event_breakpoint): Ditto.
+ (create_solib_event_breakpoint): Ditto.
+ (create_overlay_event_breakpoint): New function.
+ (enable_overlay_breakpoints, disable_overlay_breakpoints): New funcs.
+ (update_breakpoints_after_exec): Delete and re-initialize
+ overlay event breakpoints after an exec. Add FIXME comment
+ about longjmp breakpoint.
+ (print_it_typical): Ignore overlay event breakpoints.
+ (print_one_breakpoint): Ditto.
+ (mention): Ditto.
+ (bpstat_what): Do not stop for overlay event breakpoints.
+ (delete_breakpoint): Don't delete overlay event breakpoints.
+ (breakpoint_re_set_one): Delete the overlay event breakpoint.
+ (breakpoint_re_set): Re-create overlay event breakpoint.
+
+ * symfile.c (overlay_auto_command): Enable overlay breakpoints.
+ (overlay_manual_command): Disable overlay breakpoints.
+ (overlay_off_command): Disable overlay breakpoints.
+
+2002-02-06 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c: Include elf-bfd.h and coff/internal.h.
+ (MSYMBOL_SET_SPECIAL, MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Move defines
+ to here from config/tm-arm.h.
+ (coff_sym_is_thumb): Make static.
+ (arm_elf_make_msymbol_special): New function.
+ (arm_coff_make_msymbol_special): New function.
+ * config/arm/tm-arm.h (MSYMBOL_SET_SPECIAL): Delete definition.
+ (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Likewise.
+ (coff_sym_is_thumb): Delete declaration.
+ (arm_elf_make_msymbol_special): Declare.
+ (arm_coff_make_msymbol_special): Declare.
+ (ELF_MAKE_MSYMBOL_SPECIAL): Call arm_elf_make_msymbol_special.
+ (COFF_MAKE_MSYMBOL_SPECIAL): Call arm_coff_make_msymbol_special.
+
+2002-02-06 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_software_single_step): ANSIfy function declaration.
+
+2002-02-06 Richard Earnshaw <rearnsha@arm.com>
+
+ * gdbarch.sh (PRINT_FLOAT_INFO): Add rule.
+ * gdbarch.c gdbarch.h: Regenerate.
+ * arch-utils.c (default_print_float_info): New function.
+ * arch-utils.h (default_print_float_info): Prototype it.
+ * infcmd.c (float_info): Call PRINT_FLOAT_INFO.
+ * doc/gdbint.texinfo (FLOAT_INFO): Mark as deprecated.
+ (PRINT_FLOAT_INFO): Document it.
+
+ * arm-tdep.c (arm_print_float_info): Renamed from arm_float_info.
+ * config/arm/tm-arm.h (FLOAT_INFO): Delete.
+ (PRINT_FLOAT_INFO): Define.
+
+2002-02-06 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c (_initialize_check_for_gdb_ini):
+ Add typecast to sprintf argument to suppress a warning.
+
+2002-02-05 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c (last_sig): Changed type of variable to target_signal,
+ to allow easier handling of pass state.
+ (DEBUG_EXCEPTION_SIMPLE): New macro, used in handle_exception,
+ that gives exception name and address.
+ (handle_exception): Use DEBUG_EXCEPTION_SIMPLE macro
+ and set last_sig value to ourstatus->value.sig. Some missing
+ exceptions added.
+ (child_continue): Correctly report continue_status.
+ (get_child_debug_event,do_initial_child_stuff): Set last_sig to
+ TARGET_SIGNAL_0 (new default value).
+ (child_resume): consider sig argument passed to decide if
+ the exception should be passed to debuggee or not.
+
+2002-02-05 Michael Snyder <msnyder@redhat.com>
+
+ * regcache.c (fetch_register): Call target_fetch_register
+ only if we don't call FETCH_PSEUDO_REGISTER.
+ (store_register): Call target_store_register only if we
+ don't call STORE_PSEUDO_REGISTER.
+
+2002-02-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdbarch.sh: Add definitions for COFF_MAKEMSYMBOL_SPECIAL and
+ ELF_MAKE_MSYMBOL_SPECIAL.
+ * gdbarch.c, gdbarch.h: Regenerate.
+ * arch-utils.c (default_make_msymbol_special): New function.
+ * arch-utils.h (default_make_msymbol_special): Export.
+ * elfread.c (elf_symtab_read): Compile use of
+ ELF_MAKE_MSYMBOL_SPECIAL unconditionally because it is now
+ multiarched.
+ * coffread.c (coff_symtab_read): Ditto, for
+ COFF_MAKE_MSYMBOL_SPECIAL.
+
+2002-02-05 Jim Blandy <jimb@redhat.com>
+
+ * solib-svr4.c (svr4_truncate_ptr): New function.
+ (svr4_relocate_section_addresses): Do the address arithmetic with
+ the appropriate truncation for target addresses, even when
+ CORE_ADDR is larger than a target address.
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c (mywait): Cast second argument of waitpid
+ to (int *).
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c (kill_inferior): Remove commented out
+ code.
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c: Remove unused include files.
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c: Define PTRACE_ARG3_TYPE.
+ (read_inferior_memory): Use it.
+ (write_inferior_memory): Likewise.
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c (create_inferior): Call strerror instead of
+ grubbing through sys_errlist.
+
+2002-02-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c: New file, copied exactly from low-linux.c.
+
+2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
+ * win32-nat.c (handle_exception): Handle Ctrl-Break exception.
+
+2002-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (do_cfunc, set_cmd_cfunc): New functions.
+ (do_sfunc, set_cmd_sfunc): New functions.
+
+ * command.h (struct cmd_list_element): Add field func.
+ * cli/cli-decode.h (struct cmd_list_element): Ditto.
+ * command.h (set_cmd_sfunc, set_cmd_cfunc): Declare.
+ * cli/cli-decode.h: Ditto.
+
+ * cli/cli-decode.c (help_cmd): Test for func not cfunc/sfunc.
+ (help_all, help_cmd_list): Ditto.
+ (find_cmd, complete_on_cmdlist): Ditto.
+ * top.c (execute_command): Ditto.
+
+ * cli/cli-setshow.c (do_setshow_command): Call func instead of
+ function.sfunc.
+
+ * infcmd.c (notice_args_read): Fix function signature.
+
+ * cli/cli-cmds.c (init_cli_cmds): Use set_cmd_sfunc.
+ * cli/cli-decode.c (add_set_cmd): Ditto.
+ * utils.c (initialize_utils): Ditto.
+ * maint.c (_initialize_maint_cmds): Ditto.
+ * infrun.c (_initialize_infrun): Ditto.
+ * demangle.c (_initialize_demangler): Ditto.
+ * remote.c (add_packet_config_cmd): Ditto.
+ * mips-tdep.c (_initialize_mips_tdep): Ditto.
+ * cris-tdep.c (_initialize_cris_tdep): Ditto.
+ * proc-api.c (_initialize_proc_api): Ditto.
+ * kod.c (_initialize_kod): Ditto.
+ * valprint.c (_initialize_valprint): Ditto.
+ * top.c (init_main): Ditto.
+ * infcmd.c (_initialize_infcmd): Ditto.
+ * corefile.c (_initialize_core): Ditto.
+ * arm-tdep.c (_initialize_arm_tdep): Ditto.
+ * arch-utils.c (initialize_current_architecture): Ditto.
+ (_initialize_gdbarch_utils): Ditto.
+ * alpha-tdep.c (_initialize_alpha_tdep): Ditto.
+
+ * cli/cli-decode.c (add_cmd): Use set_cmd_cfunc.
+ * wince.c (_initialize_inftarg): Ditto.
+ * symfile.c (_initialize_symfile): Ditto.
+ * mips-tdep.c (_initialize_mips_tdep): Ditto.
+ * language.c (_initialize_language): Ditto.
+ * arc-tdep.c (_initialize_arc_tdep): Ditto.
+
+2002-02-04 Michael Snyder <msnyder@redhat.com>
+
+ * memattr.c (_initialize_mem): Elaborate the help for 'mem' command.
+
+2002-02-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/Makefile.in: Add regformats directory to INCLUDE_CFLAGS.
+ Add rules for building the register data files.
+
+2002-02-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * regformats/regdat.sh: Add braces to the definition of
+ expedite_regs_${arch}.
+
+2002-02-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * regformats/regdef.h (struct reg): Add comment describing the
+ requirements for offset and size fields.
+
+2002-02-04 Andreas Schwab <schwab@suse.de>
+
+ * config/ia64/linux.mh: Don't set NAT_CLIBS and REGEX.
+ * config/ia64/linux.mt: Don't set GDBSERVER_LIBS.
+
+2002-02-04 Richard Earnshaw <rearnsha@arm.com>
+
+ * gdbarch.sh (copyright): Update years in generated header.
+ (SMASH_TEXT_ADDRESS): Add rule.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * coffread.c: Multi-arch uses of SMASH_TEXT_ADDRESS.
+ * dbxread.c: Likewise.
+ * dwarfread.c: Likewise.
+ * elfread.c: Likewise.
+ * somread.c: Likewise.
+
+ * arm-tdep.c (arm_smash_text_address): New function.
+ * config/arm/tm-arm.h (SMASH_TEXT_ADDRESS): Define in terms of above.
+
+2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Add support for hardware watchpoints on win32 native.
+ * win32-nat.c (CONTEXT_DEBUG_DR macro): Add use of
+ CONTEXT_DEBUG_REGISTERS.
+ (dr variable): New variable. Static array containing a local copy
+ of debug registers.
+ (debug_registers_changed): New variable. Reflects when debug registers
+ are changed and need to be written to inferior.
+ (debug_registers_used): New variable. Reflects when any debug register
+ was set, used when new threads are created.
+ (cygwin_set_dr, cygwin_set_dr7, cygwin_get_dr6): New functions used by
+ i386-nat code.
+ (thread_rec): Set dr array if id is the thread of current_event .
+ (child_continue, child_resume): Change the debug registers for all
+ threads if debug_registers_changed.
+ (child_add_thread): Change the debug registers if debug_registers_used.
+ * config/i386/cygwin.mh: Add use of i386-nat.o file.
+ Link nm.h to new nm-cygwin.h file.
+ + config/i386/nm-cygwin.h: New file. Contains the macros used for use
+ of hardware registers.
+
+2002-02-03 Andrew Cagney <ac131313@redhat.com>
+
+ * valprint.c (print_floating): Allow non TYPE_CODE_FLT types.
+ Restore behavour broken by 2002-01-20 Andrew Cagney
+ <ac131313@redhat.com> IEEE_FLOAT removal.
+
+2002-02-03 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-valprint.c (c_val_print): Pass a proper valaddr to
+ cp_print_class_method.
+ * valops.c (search_struct_method): If there is only one method
+ and args is NULL, return that method.
+
+2002-02-03 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.c (init_simd_type): Use TYPE_TAG_NAME instead of
+ accessing tag_name directly.
+
+2002-02-03 Daniel Jacobowitz <drow@mvista.com>
+
+ * ax-gdb.c (find_field): Use TYPE_TAG_NAME instead
+ of accessing tag_name directly.
+
+2002-02-03 Daniel Jacobowitz <drow@mvista.com>
+
+ PR gdb/280
+ * gdbtypes.c (replace_type): New function.
+ * gdbtypes.h (replace_type): Add prototype.
+ * stabsread.c (read_type): Use replace_type.
+
+2002-02-03 Richard Earnshaw <rearnsha@arm.com>
+
+ * Makefile.in (memattr.o): Add missing dependencies rule.
+
+2002-02-03 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * breakpoint.c (break_at_finish_command): Really export.
+ (break_at_finish_at_depth_command): Ditto.
+ (tbreak_at_finish_command): Ditto.
+ * hppa-tdep.c: Include completer.h.
+ * Makefile.in (hppa-tdep.o): Add dependency on $(completer_h).
+ (COMMON_OBS): Remove duplicate ui-file.o, frame.o, doublest.o.
+
+2002-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (do_write): New function.
+ (error_stream): Rewrite combining the code from error_begin and
+ verror.
+ (verror): Rewrite using error_stream.
+ (error_begin): Delete function.
+
+2002-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (error_begin): Make static.
+ * defs.h (error_begin): Delete declaration.
+
+ * linespec.c (cplusplus_error): Replace cplusplus_hint.
+ (decode_line_1): Use cplusplus_error instead of error_begin,
+ cplusplus_hint and return_to_top_level.
+ * coffread.c (coff_symfile_read): Use error instead of error_begin
+ and return_to_top_level.
+ * infrun.c (default_skip_permanent_breakpoint): Ditto.
+
+2002-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * language.h (type_error, range_error): Make string parameter
+ constant.
+ * language.c (warning_pre_print): Delete extern declaration.
+ * dwarfread.c (warning_pre_print): Ditto.
+ * language.c (type_error, range_error): Rewrite to use verror and
+ vwarning instead of warning_begin.
+
+2002-02-01 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (breakpoint_re_set): Delete ancient #if 0 code.
+ (set_ignore_count): Move misplaced comment back where it belongs.
+
+2002-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * command.h (NO_FUNCTION): Delete macro.
+ * cli/cli-decode.h (NO_FUNCTION): Ditto.
+ * top.c (execute_command): Replace NO_FUNCTION with NULL.
+ * tracepoint.c (_initialize_tracepoint): Ditto.
+ * cli/cli-decode.c (add_set_cmd): Ditto.
+ * cli/cli-cmds.c (init_cli_cmds): Ditto.
+
+2002-02-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gnu-v3-abi.c (gnuv3_virtual_fn_field): Update comments.
+ Update ``this'' pointer when calling virtual functions.
+
+2002-02-01 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (create_temp_exception_breakpoint): Delete.
+ * hppa-tdep.c: Deprecate xbreak, txbreak and bx commands.
+
+2002-02-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * regformats/reg-arm.dat: New file.
+ * regformats/reg-i386.dat: New file.
+ * regformats/reg-ia64.dat: New file.
+ * regformats/reg-m68k.dat: New file.
+ * regformats/reg-mips.dat: New file.
+ * regformats/reg-ppc.dat: New file.
+ * regformats/reg-sh.dat: New file.
+ * regformats/regdef.h: New file.
+ * regformats/regdat.sh: New file.
+
+2002-02-01 Richard Earnshaw <reanrsha@arm.com>
+
+ * arm-tdep.c (arm_frameless_function_invocation): Add some comments.
+ (arm_frame_args_address, arm_frame_locals_address): New functions.
+ (arm_frame_num_args): New function.
+ * config/tm-arm.h (FRAME_ARGS_ADDRESS): Call arm_frame_args_address.
+ (FRAME_LOCALS_ADDRESS): Call arm_frame_locals_address.
+ (FRMA_NUM_ARGS): Call arm_frame_num_args.
+
+2002-01-31 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (break_at_finish_command): Export.
+ (break_at_finish_at_depth_command): Export.
+ (tbreak_at_finish_command): Export.
+ (_initialize_breakpoint): Delete "xbreak" and "txbreak" commands.
+ * hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and
+ "txbreak" commands, which are HPPA specific.
+
+ * printcmd.c (disassemble_command): Remove an ancient
+ artifact of an old merge.
+
+ * symfile.h (enum overlay_debugging_state):
+ Define enum constant values for overlay mode.
+ * symfile.c (overlay_debugging): Use enums instead of literals.
+ (overlay_is_mapped, overlay_auto_command,
+ overlay_manual_command): Ditto.
+
+ * breakpoint.c (insert_breakpoints, remove_breakpoint,
+ breakpoint_here_p, breakpoint_inserted_here_p,
+ breakpoint_thread_match, bpstat_stop_status,
+ describe_other_breakpoints, check_duplicates, clear_command):
+ Coding standard fixes.
+
+ * target.c (target_xfer_memory): Add spaces, coding standard.
+ (do_xfer_memory): Add missing line to trust-readonly
+ code: check bfd SEC_READONLY flag for section.
+
+2002-01-31 Andrew Cagney <ac131313@redhat.com>
+
+ * PROBLEMS: Fix typo, 5.1->5.1.1.
+
+2002-01-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.c (find_pc_sect_psymtab): Do not search psymtabs for
+ data symbols, since we search based on textlow and texthigh.
+ (find_pc_sect_symtab): Likewise.
+
+2002-01-30 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (vwarning): Declare.
+ * utils.c (vwarning): New function.
+ (warning): Call vwarning.
+ (warning_begin): Delete function.
+
+ * rs6000-nat.c (vmap_ldinfo): Use the function warning to print
+ the warning message.
+ * d10v-tdep.c (d10v_address_to_pointer) [0]: Delete call to
+ warning_begin.
+
+2002-01-30 Michael Snyder <msnyder@redhat.com>
+
+ * NEWS: Mention "set trust-readonly-sections" command.
+ Mention generate-core-file command.
+
+2002-01-15 Michael Snyder <msnyder@redhat.com>
+
+ * target.c: New command, "set trust-readonly-sections on".
+ (do_xfer_memory): Honor the suggestion to trust readonly sections
+ by reading them from the object file instead of from the target.
+ (initialize_targets): Register command "set trust-readonly-sections".
+
+2002-01-29 Andrew Cagney <ac131313@redhat.com>
+
+ * parse.c (target_map_name_to_register): Simplify, search regs and
+ pseudo-regs using a single loop.
+
+2002-01-30 Andrew Cagney <ac131313@redhat.com>
+
+ * PROBLEMS: Note that the i386 fix was missing from 5.1.1.
+
+2002-01-15 Rodney Brown <rbrown64@csc.com.au>
+
+ * config/i386/tm-i386v4.h: Define HAVE_I387_REGS.
+ * config/i386/i386v42mp.mh: Add i387-nat.o .
+ * i386v4-nat.c: Include i387-nat.h.
+ (supply_fpregset): Use i387_supply_fsave.
+ (fill_fpregset): Use i387_fill_fsave.
+
+2002-01-30 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_call_dummy_words): Define.
+ * arm-linux-tdep.c (arm_linux_call_dummy_words): Define.
+ * config/arm/tm-arm.h (CALL_DUMMY_P): Define.
+ (CALL_DUMMY_WORDS): Define.
+ (arm_call_dummy_words): Declare.
+ * config/arm/tm-linux.h (CALL_DUMMY_WORDS): Define.
+ (arm_linux_call_dummy_words): Declare.
+
+2002-01-30 Andreas Schwab <schwab@suse.de>
+
+ * m68klinux-nat.c: Fix last change to use regcache_collect
+ instead of referencing registers[] directly.
+
+2002-01-29 Andrew Cagney <ac131313@redhat.com>
+
+ * parse.c (target_map_name_to_register): Delete code wrapped in
+ #ifdef REGISTER_NAME_ALIAS_HOOK.
+
+2002-01-28 Michael Snyder <msnyder@redhat.com>
+
+ * regcache.c (legacy_read_register_gen): Need to be able to
+ read pseudo-register as well as real register.
+ (legacy_write_register_gen): Ditto.
+
+2002-01-28 Andrew Cagney <ac131313@redhat.com>
+
+ * config/mips/tm-wince.h (TARGET_BYTE_ORDER): Delete.
+ * config/sparc/tm-sparc.h (TARGET_BYTE_ORDER): Delete.
+ * config/ns32k/tm-umax.h (TARGET_BYTE_ORDER): Delete.
+ * config/ia64/tm-ia64.h (TARGET_BYTE_ORDER): Delete.
+ * config/m32r/tm-m32r.h (TARGET_BYTE_ORDER): Delete.
+ * config/m68k/tm-m68k.h (TARGET_BYTE_ORDER): Delete.
+ * config/m88k/tm-m88k.h (TARGET_BYTE_ORDER): Delete.
+ * config/mn10200/tm-mn10200.h (TARGET_BYTE_ORDER): Delete.
+ * config/pa/tm-hppa.h (TARGET_BYTE_ORDER): Delete.
+ * config/sh/tm-wince.h (TARGET_BYTE_ORDER): Delete.
+ * config/v850/tm-v850.h (TARGET_BYTE_ORDER): Delete.
+ * config/vax/tm-vax.h (TARGET_BYTE_ORDER): Delete.
+ * config/z8k/tm-z8k.h (TARGET_BYTE_ORDER): Delete.
+ * config/i960/tm-i960.h (TARGET_BYTE_ORDER): Delete.
+ * config/i386/tm-i386.h (TARGET_BYTE_ORDER): Delete.
+ * config/h8500/tm-h8500.h (TARGET_BYTE_ORDER): Delete.
+ * config/h8300/tm-h8300.h (TARGET_BYTE_ORDER): Delete.
+ * config/fr30/tm-fr30.h (TARGET_BYTE_ORDER): Delete.
+ * config/d30v/tm-d30v.h (TARGET_BYTE_ORDER): Delete.
+ * config/alpha/tm-alpha.h (TARGET_BYTE_ORDER): Delete.
+
+2002-01-28 Andrew Cagney <ac131313@redhat.com>
+
+ * arch-utils.c (TARGET_BYTE_ORDER_DEFAULT): Delete macro.
+ (target_byte_order): Initialize to BFD_ENDIAN_BIG.
+ (initialize_current_architecture): Update target_byte_order using
+ information from BFD.
+ * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_DEFAULT):
+ * config/arm/tm-arm.h (TARGET_BYTE_ORDER_DEFAULT): Delete.
+
+2002-01-28 Andrew Cagney <ac131313@redhat.com>
+
+ * config/vax/tm-vax.h (INVALID_FLOAT): Move macro from here...
+ * vax-tdep.c (INVALID_FLOAT): To here. Document why it is broken.
+
+ * rs6000-tdep.c (rs6000_do_registers_info): Delete code wrapped in
+ #ifdef INVALID_FLOAT.
+ * infcmd.c (do_registers_info): Ditto.
+ * values.c (unpack_double): Ditto. Add comment.
+
+ * config/ns32k/tm-umax.h (INVALID_FLOAT): Delete macro that was
+ already commented out.
+
+2002-01-26 Andreas Schwab <schwab@suse.de>
+
+ * config/m68k/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
+ * m68klinux-nat.c: Update ptrace interface for fetching/storing
+ registers and add support for PTRACE_GETREGS.
+
+2002-01-24 Andrew Cagney <ac131313@redhat.com>
+
+ GDB 5.1.1 released from 5.1 branch.
+ * NEWS: Add 5.1.1 news.
+ * README: Sync with 5.1 branch.
+
+2002-01-23 Fred Fish <fnf@redhat.com>
+
+ * mdebugread.c (parse_partial_symbols): Only copy stabstring1 to
+ stabstring on initial malloc. Reallocing will copy it for us,
+ if necessary.
+
+2002-01-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * Makefile.in (hpread_h): Delete.
+ (HFILES_NO_SRCDIR): Remove hpread.h.
+ (ALLDEPFILES): Remove hp-psymtab-read.c and hp-symtab-read.c.
+ (hpread.o): Update dependencies.
+ (hp-psymtab-read.o, hp-symtab-read.o): Remove.
+
+ * hp-psymtab-read.c: Remove file.
+ * hp-symtab-read.c: Remove file.
+ * hpread.h: Remove file.
+
+ * hpread.c: Merge all contents of hp-psymtab-read.c,
+ hp-symtab-read.c and hpread.h into this file, as it was prior to
+ January 1999.
+
+ * config/pa/hpux11w.mh, config/pa/hpux11.mh,
+ config/pa/hpux1020.mh, config/pa/hppaosf.mh,
+ config/pa/hppahpux.mh, config/pa/hppabsd.mh (NATDEPFILES):
+ Remove hp-psymtab-read.o and hp-symtab-read.o, add hpread.o.
+
+2002-01-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
+ fill_gregset): Call gdbarch_tdep() just once, assign result to
+ variable and use that, instead of calling the function several
+ times.
+
+2002-01-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.host: Accept sparcv9 as alias for sparc64.
+ * configure.tgt: Likewise.
+
+2002-01-22 Kevin Buettner <kevinb@redhat.com>
+
+ * solib-aix5.c (build_so_list_from_mapfile)
+ (aix5_relocate_main_executable): Fix xcalloc() calls so order of
+ arguments is not reversed.
+ * solib-sunos.c (sunos_relocate_main_executable): Likewise.
+ * solib-svr4.c (svr4_relocate_main_executable): Likewise.
+
+2002-01-22 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_pseudo_register_read): New function. Renamed and
+ modified version of obsolete sh_fetch_pseudo_register.
+ (sh_fetch_pseudo_register): Rename to sh_pseudo_register_read.
+ (sh4_register_read): New function.
+ (sh_pseudo_register_write): New function. Renamed and modified
+ version of obsolete sh_store_pseudo_register.
+ (sh_store_pseudo_register): Rename to sh_pseudo_register_write.
+ (sh4_register_write): New function.
+ (sh_gdbarch_init): Remove setting of gdbarch function
+ fetch_pseudo_register and store_pseudo_register. Remove setting of
+ register_convert_to_raw, register_convert_to_virtual,
+ register_convertible.
+ (sh_sh4_register_convertible): Delete. No longer needed. All is
+ taken care by architecture specific functions
+ register_read/register_write.
+ (sh_sh4_register_convert_to_virtual): Make static.
+ (sh_sh4_register_convert_to_raw): Ditto.
+
+2002-01-22 Andrew Cagney <ac131313@redhat.com>
+
+ * doublest.c (floatformat_is_negative): Assert FMT is non NULL.
+ (floatformat_is_nan, floatformat_mantissa): Ditto.
+
+ * gdbtypes.c (_initialize_gdbtypes): Initialize TYPE_FLOATFORMAT
+ for builtin_type_ieee_single_little, builtin_type_ieee_double_big,
+ builtin_type_ieee_double_little,
+ builtin_type_ieee_double_littlebyte_bigword,
+ builtin_type_m68881_ext, builtin_type_i960_ext,
+ builtin_type_m88110_ext, builtin_type_m88110_harris_ext,
+ builtin_type_arm_ext_big, builtin_type_arm_ext_littlebyte_bigword,
+ builtin_type_ia64_spill_big, builtin_type_ia64_spill_little and
+ builtin_type_ia64_quad_big, builtin_type_ia64_quad_little.
+
+2002-01-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * xstormy16-tdep.c (xstormy16_scan_prologue): Add frameless
+ parameter. Set frameless flag if it exists and depended of
+ whether the scanned function is frameless or not.
+ (xstormy16_skip_prologue): If function is frameless, return
+ result of xstormy16_scan_prologue().
+ (xstormy16_frame_init_saved_regs): Adjust xstormy16_scan_prologue()
+ call.
+
+2002-01-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_fp_frame_init_saved_regs, sh_push_arguments,
+ sh_generic_show_regs, sh3_show_regs, sh3e_show_regs,
+ sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs,
+ sh_sh4_register_byte, sh_sh4_register_raw_size,
+ sh_sh3e_register_virtual_type, sh_sh4_register_virtual_type,
+ sh_sh4_register_convertible, sh_sh4_register_convert_to_virtual,
+ sh_sh4_register_convert_to_raw, sh_fetch_pseudo_register,
+ sh_store_pseudo_register, sh_do_pseudo_register): Call
+ gdbarch_tdep() just once, assign result to variable and use that,
+ instead of calling the function several times.
+
+2002-01-20 Mark Kettenis <kettenis@gnu.org>
+
+ * go32-nat.c (fetch_register): Use FP_REGNUM_P and FPC_REGNUM_P
+ macros instead of LAST_FPU_CTRL_REGNUM.
+ (store_register): Likewise.
+
+2002-01-21 Jim Blandy <jimb@redhat.com>
+
+ * infcmd.c (run_command): Check that the `exec' target layer's BFD
+ is up-to-date before running the program, not just when a program
+ exits.
+
+2002-01-21 Fred Fish <fnf@redhat.com>
+
+ * arm-tdep.c (thumb_skip_prologue): Quit scanning prologue
+ when we have found all instructions we are looking for.
+
+2002-01-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_register_name): New function.
+ (arm_registers_names): Make static.
+ * config/arm/tm-arm.h (arm_register_names): Delete declaration.
+ (arm_register_name): Declare.
+ (REGISTER_NAME): Use it.
+
+2002-01-21 Richard Earnshaw <rearnsha@arm.com>
+ Kevin Buettner <kevinb@redhat.com>
+
+ Convert arm targets to new FRAME interface.
+ * arm-tdep.c (struct frame_extra_info): Remove fsr.
+ (arm_frame_find_save_regs): Delete.
+ (arm_frame_init_saved_regs): New.
+ (arm_init_extra_frame_info): Alloacte saved_regs as required.
+ Allocate extra_info as required. Convert all uses of fsr.regs
+ to use saved_regs, similarly all uses of EXTRA_FRAME_INFO fields
+ to use extra_info.
+ (thumb_scan_prologue, arm_scan_prologue, arm_find_callers_reg)
+ (arm_frame_chain, arm_frame_saved_pc, arm_pop_frame): Likewise.
+ (check_prologue_cache, save_prologue_cache): Likewise.
+ (_initialize_arm_tdep): Ensure prologue_cache is correctly set up.
+ * config/arm/tm-arm.h (EXTRA_FRAME_INFO): Delete.
+ (FRAME_FIND_SAVED_REGS): Delete.
+ (arm_frame_find_saved_regs): Delete prototype.
+ (arm_frame_init_saved_regs): New prototype.
+ (FRAME_INIT_SAVED_REGS): Define.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ * config/arc/tm-arc.h (IEEE_FLOAT): Delete.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ From Jeff Law <law@redhat.com>:
+ * infttrace.c: Include <sys/pstat.h>.
+ (child_pid_to_exec_file): Revamp. Use pstat call to get the
+ exec file if the ttrace equivalent fails.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ * rdi-share/devsw.c (openLogFile): Delete unused ``struct tm lt''.
+ (closeLogFile): Ditto.
+
+2002-01-20 Michael Chastain <mec@shout.net>
+
+ * top.c (print_gdb_version): Bump copyright year to 2002.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (Blanket Write Privs): Add Kevin Buettner, Elena
+ Zannoni and Eli Zaretskii.
+
+2002-01-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * buildsym.c: Update copyright years.
+ * c-typeprint.c: Likewise.
+ * dwarf2read.c: Likewise.
+ * f-typeprint.c: Likewise.
+ * gdbtypes.c: Likewise.
+ * gdbtypes.h: Likewise.
+ * hp-symtab-read.c: Likewise.
+ * hpread.c: Likewise.
+ * mdebugread.c: Likewise.
+ * p-typeprint.c: Likewise.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ * remote-sim.c (gdbsim_open): Simplify code testing the macro
+ TARGET_BYTE_ORDER_SELECTABLE_P. Assume the target is always
+ byte-order selectable.
+ * sparc-tdep.c (sparc_target_architecture_hook): Ditto.
+ * arch-utils.c: Ditto.
+ (set_endian): Ditto.
+ (set_endian_from_file): Ditto.
+ * gdbserver/low-sim.c (create_inferior): Ditto.
+ * gdbarch.sh: Ditto.
+ * gdbarch.h: Re-generate.
+ * config/powerpc/tm-ppc-eabi.h (TARGET_BYTE_ORDER_SELECTABLE_P):
+ * config/sparc/tm-sparclite.h (TARGET_BYTE_ORDER_SELECTABLE):
+ * config/sparc/tm-sparclet.h (TARGET_BYTE_ORDER_SELECTABLE):
+ * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_SELECTABLE_P):
+ * config/arm/tm-wince.h (TARGET_BYTE_ORDER_SELECTABLE_P):
+ * config/arm/tm-linux.h (TARGET_BYTE_ORDER_SELECTABLE_P):
+ * config/arc/tm-arc.h (TARGET_BYTE_ORDER_SELECTABLE):
+ * config/arm/tm-arm.h (TARGET_BYTE_ORDER_SELECTABLE_P): Delete
+ macro definition.
+ * config/mips/tm-wince.h: Remove #undef of macro
+ TARGET_BYTE_ORDER_SELECTABLE.
+ * config/sh/tm-wince.h: Ditto.
+
+2002-01-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct cplus_struct_type): Add is_artificial to
+ member function fields. Add accessor macro
+ TYPE_FN_FIELD_ARTIFICIAL.
+ * dwarf2read.c (dwarf2_add_member_fn): Check for artificial methods.
+ * c-typeprint.c (c_type_print_base): Skip artificial member
+ functions.
+
+2002-01-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * f-typeprint.c: Delete unused function f_type_print_args.
+ * p-typeprint.c: Delete unused function pascal_type_print_args.
+
+2002-01-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct type): Fix whitespace. Remove obsolete
+ comment. Add ``artificial'' to ``union field_location''.
+
+ * dwarf2read.c: Remove ad-hoc TYPE_FIELD_ARTIFICIAL.
+
+ * buildsym.c (finish_block): Initialize TYPE_FIELD_ARTIFICIAL to 0.
+ * mdebugread.c (parse_symbol): Likewise.
+ * stabsread.c (define_symbol): Likewise.
+ * hp-symtab-read.c (hpread_function_type): Likewise, instead of
+ initializing TYPE_FIELD_BITPOS to n (obsolete).
+ (hpread_doc_function_type): Likewise.
+ * hpread.c (hpread_function_type): Likewise.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.in (host_makefile_frag): Only require a host makefile
+ fragment when a native build.
+ * configure: Re-generate.
+
+2002-01-20 Andrew Cagney <ac131313@redhat.com>
+
+ * doublest.h (floatformat_from_type): Declare.
+ * doublest.c (floatformat_from_type): New function.
+ (convert_typed_floating): Use.
+
+ * valprint.c (print_floating): Replace checks for IEEE_FLOAT with
+ call to function floatformat_from_type.
+
+ * gdbarch.sh (IEEE_FLOAT): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * config/i960/tm-i960.h (IEEE_FLOAT): Delete macro.
+ * config/i386/tm-i386.h (IEEE_FLOAT): Ditto.
+ * config/z8k/tm-z8k.h (IEEE_FLOAT): Ditto.
+ * config/sparc/tm-sparc.h (IEEE_FLOAT): Ditto.
+ * config/pa/tm-hppa.h (IEEE_FLOAT): Ditto.
+ * config/m88k/tm-m88k.h (IEEE_FLOAT): Ditto.
+ * config/m68k/tm-m68k.h (IEEE_FLOAT): Ditto.
+ * config/h8500/tm-h8500.h (IEEE_FLOAT): Ditto.
+ * config/h8300/tm-h8300.h (IEEE_FLOAT): Ditto.
+ * config/fr30/tm-fr30.h (IEEE_FLOAT): Ditto.
+ * config/arm/tm-arm.h (IEEE_FLOAT): Ditto.
+ * config/alpha/tm-alpha.h (IEEE_FLOAT): Ditto.
+
+ * s390-tdep.c (s390_gdbarch_init): Do not set ieee_float.
+ * x86-64-tdep.c (i386_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+
+2002-01-20 Jiri Smid <smid@suse.cz>
+
+ * configure.host, configure.tgt: Support x86-64.
+ * NEWS: Note new target x86-64.
+
+ * config/i386/x86-64linux.mh (NATDEPFILES): x86-64-nat.o removed.
+ * x86-64-linux-nat.c (x86_64_register_u_addr): New function.
+ * config/i386/nm-x86-64.h (ATTACH_LWP): Removed.
+ * Makefile.in (x86-64-tdep.o, x86-64-linux-tdep.o,
+ x86-64-linux-nat.o): Fix dependencies.
+
+2002-01-19 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c: Remove #ifndef MALLOC_INCOMPATIBLE.
+ * config/sparc/xm-sun4os4.h (PTRACE_ARG3_TYPE): Move macro ....
+ * config/sparc/nm-sun4os4.h (PTRACE_ARG3_TYPE): ... to here.
+ * config/sparc/xm-sun4os4.h: Delete file.
+ * config/sparc/sun4os4.mh (XM_FILE): Delete makefile variable.
+
+2002-01-19 Andrew Cagney <ac131313@redhat.com>
+
+ * config/sparc/sparclynx.mh (XM_FILE): Delete.
+ * config/rs6000/rs6000lynx.mh (XM_FILE): Delete.
+ * config/m68k/m68klynx.mh (XM_FILE): Delete.
+ * config/i386/i386lynx.mh (XM_FILE): Delete.
+ * config/rs6000/xm-rs6000ly.h: Delete file.
+ * config/sparc/xm-sparclynx.h: Delete file.
+ * config/m68k/xm-m68klynx.h: Delete file.
+ * config/i386/xm-i386lynx.h: Delete file.
+ * config/xm-lynx.h: Delete file.
+ * config/djgpp/fnchange.lst: Update.
+
+2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_register_byte): New function.
+ (alpha_register_raw_size): Ditto.
+ (alpha_register_virtual_size): Ditto.
+ (alpha_skip_prologue_internal): Renamed from
+ alpha_skip_prologue.
+ (alpha_skip_prologue): New version that calls
+ alpha_skip_prologue_internal.
+ (alpha_in_lenient_prologue): Use alpha_skip_prologue_internal.
+ * config/alpha/tm-alpha.h (SKIP_PROLOGUE): Remove
+ second argument from alpha_skip_prologue.
+ (REGISTER_BYTE): Use alpha_register_byte.
+ (REGISTER_RAW_SIZE): Use alpha_register_raw_size.
+ (REGISTER_VIRTUAL_SIZE): Use alpha_register_virtual_size.
+ (FRAMELESS_FUNCTION_INVOCATION): Use
+ generic_frameless_function_invocation_not.
+ (FRAME_NUM_ARGS): Use frame_num_args_unknown.
+ (COERCE_FLOAT_TO_DOUBLE): Use standard_coerce_float_to_double.
+
+2002-01-19 Andrew Cagney <ac131313@redhat.com>
+
+ * config/mips/xm-news-mips.h: Delete file.
+ * config/mips/news-mips.mh (XM_FILE): Delete makefile variable.
+
+ * config/m88k/xm-m88k.h: Delete file.
+ * config/m88k/xm-dgux.h: Do not include xm-m88k.h.
+ * config/m88k/xm-delta88v4.h: Ditto.
+ * config/m88k/xm-delta88.h: Ditto.
+
+ * config/alpha/xm-fbsd.h: Delete file.
+ * config/alpha/fbsd.mh (XM_FILE): Delete makefile variable.
+
+ * config/sparc/xm-sparc.h: Delete file.
+ * Makefile.in (xm-sun4os4.h): Delete dependency.
+ * config/sparc/xm-sun4sol2.h: Do not include xm-sparc.h.
+ * config/sparc/xm-sun4os4.h: Ditto.
+ * config/sparc/xm-linux.h: Ditto.
+
+ * config/i386/xm-windows.h: Delete file.
+
+2002-01-19 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c: Include <sys/param.h> for MAXPATHLEN.
+ (gdb_realpath): Use MAXPATHLEN when PATH_MAX is not defined.
+
+2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_call_dummy_words): New.
+ * config/alpha/tm-alpha.h (CALL_DUMMY): Remove.
+ (CALL_DUMMY_P): Define.
+ (CALL_DUMMY_WORDS): Define.
+ (SIZEOF_CALL_DUMMY_WORDS): Define.
+
+2002-01-19 Per Bothner <per@bothner.com>
+
+ * gnu-v3-abi.c (gnuv3_rtti_type): Guard that vtable_symbol_name
+ isn't NULL, which can happen with some gcj-3.x-produced code.
+
+2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_register_virtual_type): New function.
+ (alpha_init_frame_pc_first): Ditto.
+ (alpha_fix_call_dummy): Ditto.
+ (alpha_store_struct_return): Ditto.
+ (alpha_extract_struct_value_address): Ditto.
+ * config/alpha/tm-alpha.h (REGISTER_VIRTUAL_TYPE): Use
+ alpha_register_virtual_type.
+ (STORE_STRUCT_RETURN): Use alpha_store_struct_return.
+ (EXTRACT_STRUCT_VALUE_ADDRESS): Use
+ alpha_extract_struct_value_address.
+ (FIX_CALL_DUMMY): Use alpha_fix_call_dummy.
+ (INIT_FRAME_PC): Use init_frame_pc_noop.
+ (INIT_FRAME_PC_FIRST): Use alpha_init_frame_pc_first.
+
+2002-01-19 Mark Kettenis <kettenis@gnu.org>
+
+ * i386gnu-nat.c: Include "i386-tdep.h".
+ (fetch_fpregs): Simplify code dealing with uninitialized floating
+ point states such that it doesn't require FP7_REGNUM.
+
+2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (frame_extra_info): New.
+ (alpha_find_saved_regs): Make static. Use
+ frame->extra_info.
+ (alpha_frame_init_saved_regs): New function.
+ (alpha_frame_saved_pc): Use frame->extra_info.
+ (temp_saved_regs): Don't declare as struct frame_saved_regs.
+ (heuristic_proc_desc): Adjust for temp_saved_regs changes.
+ (init_extra_frame_info): Rename to...
+ (alpha_init_extra_frame_info): ...this. Use frame->extra_info.
+ (alpha_print_extra_frame_info): New function.
+ (alpha_frame_locals_address): Ditto.
+ (alpha_frame_args_address): Ditto.
+ (alpha_pop_frame): Use frame->extra_info.
+ * config/alpha/tm-alpha.h (FRAME_ARGS_ADDRESS): Use
+ alpha_frame_args_address.
+ (FRAME_LOCALS_ADDRESS): Use alpha_frame_locals_address.
+ (alpha_find_saved_regs): Remove prototype.
+ (FRAME_INIT_SAVED_REGS): Use alpha_frame_init_saved_regs.
+ (EXTRA_FRAME_INFO): Remove.
+ (INIT_EXTRA_FRAME_INFO): Use alpha_init_extra_frame_info.
+ (PRINT_EXTRA_FRAME_INFO): Use alpha_print_extra_frame_info.
+
+2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_osf_in_sigtramp): New function.
+ (alpha_cannot_fetch_register): Ditto.
+ (alpha_cannot_store_register): Ditto.
+ (alpha_register_convertible): Ditto.
+ (alpha_use_struct_convention): Ditto.
+ * config/alpha/tm-alpha.h: Update copyright years.
+ (IN_SIGTRAMP): Use alpha_osf_in_sigtramp.
+ (INNER_THAN): Use core_addr_lessthan.
+ (CANNOT_FETCH_REGISTER): Use alpha_cannot_fetch_register.
+ (CANNOT_STORE_REGISTER): Use alpha_cannot_store_register.
+ (REGISTER_CONVERTIBLE): Use alpha_register_convertible.
+ (USE_STRUCT_CONVENTION): Use alpha_use_struct_convention.
+ (FRAME_CHAIN): Remove unnecessary cast.
+
+2002-01-18 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Document that testsuite/gdb.hp/gdb.threads-hp/ is
+ obsolete.
+
+2002-01-18 Andrew Cagney <ac131313@redhat.com>
+
+ * infptrace.c: Remove ATTRIBUTE_UNUSED. Update copyright.
+ * monitor.c, remote-array.c, remote-bug.c: Ditto.
+ * remote-e7000.c, remote-es.c, remote-mips.c: Ditto.
+ * remote-nindy.c, remote-os9k.c, remote-rdi.c: Ditto.
+ * remote-rdp.c, remote-sds.c, remote-sim.c: Ditto.
+ * remote-st.c, remote-vx.c, remote.c, win32-nat.c: Ditto.
+ * x86-64-linux-nat.c: Ditto.
+
+2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_register_name): New function.
+ * config/alpha/tm-alpha.h (REGISTER_NAMES): Remove.
+ (REGISTER_NAME): Define.
+
+2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/nm-nbsd.h (KERNEL_U_ADDR): Remove.
+
+2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c: Update copyright years.
+ (alpha_next_pc): New function.
+ (alpha_software_single_step): Ditto.
+ * config/alpha/tm-alpha.h: Add prototype for
+ alpha_software_single_step.
+
+2002-01-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alphabsd-nat.c: Update copyright years.
+ (fill_gregset): Use regcache_collect.
+ (fill_fpregset): Likewise.
+ (fetch_inferior_registers): Only fetch integer registers
+ if requested to do so.
+ (store_inferior_registers): Only store integer registers
+ if requested to do so.
+
+2002-01-17 Andrew Cagney <ac131313@redhat.com>
+
+ * config/alpha/alpha-osf3.mh (XDEPFILES): Delete.
+ * config/alpha/alpha-osf2.mh (XDEPFILES): Delete.
+ * config/alpha/alpha-osf1.mh (XDEPFILES): Delete.
+ * config/alpha/alpha-linux.mh (XDEPFILES): Delete.
+ * config/alpha/fbsd.mh (XDEPFILES): Delete.
+ * config/arm/linux.mh (XDEPFILES): Delete.
+ * config/arm/nbsd.mh (XDEPFILES): Delete.
+ * config/i386/i386dgux.mh (XDEPFILES): Delete.
+ * config/i386/i386sol2.mh (XDEPFILES): Delete.
+ * config/i386/i386m3.mh (XDEPFILES): Delete.
+ (NATDEPFILES): Move i387-tdep.o and core-aout.o to here.
+ * config/i386/i386gnu.mh (XDEPFILES): Delete.
+ * config/i386/fbsd.mh (XDEPFILES): Delete.
+ * config/i386/i386bsd.mh (XDEPFILES): Delete.
+ * config/i386/i386sco5.mh (XDEPFILES): Delete.
+ * config/i386/i386v4.mh (XDEPFILES): Delete.
+ * config/i386/i386v42mp.mh (XDEPFILES): Delete.
+ * config/i386/i386sco4.mh (XDEPFILES): Delete.
+ * config/i386/i386aix.mh (XDEPFILES): Delete.
+ * config/i386/go32.mh (XDEPFILES): Delete.
+ * config/i386/cygwin.mh (XDEPFILES): Delete.
+ * config/i386/i386lynx.mh (XDEPFILES): Delete.
+ * config/i386/i386mach.mh (XDEPFILES): Delete.
+ * config/i386/i386v32.mh (XDEPFILES): Delete.
+ * config/i386/linux.mh (XDEPFILES): Delete.
+ * config/i386/nbsdelf.mh (XDEPFILES): Delete.
+ * config/i386/ncr3000.mh (XDEPFILES): Delete.
+ * config/i386/i386mk.mh (NATDEPFILES): Rename XDEPFILES.
+ * config/i386/i386sco.mh (XDEPFILES): Delete.
+ * config/i386/i386v.mh (XDEPFILES): Delete.
+ * config/i386/nbsd.mh (XDEPFILES): Delete.
+ * config/i386/ptx.mh (NATDEPFILES): Rename XDEPFILES.
+ * config/i386/ptx4.mh (NATDEPFILES): Rename XDEPFILES.
+ * config/i386/symmetry.mh (XDEPFILES): Delete.
+ * config/i386/obsd.mh (XDEPFILES): Delete.
+ * config/i386/x86-64linux.mh (XDEPFILES): Delete.
+ * config/ia64/linux.mh (XDEPFILES): Delete.
+ * config/ia64/aix.mh (XDEPFILES): Delete.
+ * config/m68k/apollo68b.mh (XDEPFILES): Delete.
+ * config/m68k/dpx2.mh (XDEPFILES): Delete.
+ * config/m68k/3b1.mh (NATDEPFILES): Rename XDEPFILES.
+ * config/m68k/apollo68v.mh (XDEPFILES): Delete.
+ * config/m68k/hp300bsd.mh (XDEPFILES): Delete.
+ * config/m68k/linux.mh (XDEPFILES): Delete.
+ * config/m68k/m68klynx.mh (XDEPFILES): Delete.
+ * config/m68k/m68kv4.mh (XDEPFILES): Delete.
+ * config/m68k/nbsd.mh (XDEPFILES): Delete.
+ * config/m68k/sun2os3.mh (XDEPFILES): Delete.
+ * config/m68k/sun2os4.mh (XDEPFILES): Delete.
+ * config/m68k/sun3os3.mh (XDEPFILES): Delete.
+ * config/m68k/sun3os4.mh (XDEPFILES): Delete.
+ * config/m88k/delta88.mh (XDEPFILES): Delete.
+ * config/m88k/delta88v4.mh (XDEPFILES): Delete.
+ * config/m88k/m88k.mh (XDEPFILES): Delete.
+ * config/mips/littlemips.mh (NATDEPFILES): Rename XDEPFILES.
+ * config/mips/linux.mh (XDEPFILES): Delete.
+ * config/mips/irix6.mh (XDEPFILES): Delete.
+ * config/mips/irix5.mh (XDEPFILES): Delete.
+ * config/mips/irix4.mh (XDEPFILES): Delete.
+ * config/mips/irix3.mh (XDEPFILES): Delete.
+ * config/mips/decstation.mh (XDEPFILES): Delete.
+ * config/mips/mipsm3.mh (XDEPFILES): Delete.
+ (NATDEPFILES): Move core-aout.o to here.
+ * config/ns32k/nbsd.mh (XDEPFILES): Delete.
+ * config/pa/hpux1020.mh (XDEPFILES): Delete.
+ * config/pa/hppabsd.mh (XDEPFILES): Delete.
+ * config/pa/hppahpux.mh (XDEPFILES): Delete.
+ * config/pa/hpux11w.mh (XDEPFILES): Delete.
+ * config/pa/hppaosf.mh (XDEPFILES): Delete.
+ * config/pa/hpux11.mh (XDEPFILES): Delete.
+ * config/powerpc/aix.mh (XDEPFILES): Delete.
+ * config/powerpc/nbsd.mh (XDEPFILES): Delete.
+ * config/powerpc/linux.mh (XDEPFILES): Delete.
+ * config/romp/rtbsd.mh: Rename XDEPFILES.
+ * config/rs6000/rs6000lynx.mh (XDEPFILES): Delete.
+ * config/rs6000/aix4.mh (XDEPFILES): Delete.
+ * config/rs6000/rs6000.mh (XDEPFILES): Delete.
+ * config/s390/s390.mh (XDEPFILES): Delete.
+ * config/vax/vaxbsd.mh (NATDEPFILES): Rename XDEPFILES.
+ * config/sparc/sun4sol2.mh (XDEPFILES): Delete.
+ * config/sparc/sun4os4.mh (XDEPFILES): Delete.
+ * config/sparc/sparclynx.mh (XDEPFILES): Delete.
+ * config/sparc/nbsdelf.mh (XDEPFILES): Delete.
+ * config/sparc/nbsd.mh (XDEPFILES): Delete.
+ * config/sparc/linux.mh (XDEPFILES): Delete.
+ * config/vax/vaxult.mh (XDEPFILES): Delete.
+ * config/vax/vaxult2.mh (XDEPFILES): Delete.
+ * Makefile.in (DEPFILES): Remove XDEPFILES.
+
+2002-01-17 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (internal_verror): Fix comments, default is yes not no.
+ Update queries to match. Default to quit and dump core.
+
+2002-01-17 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.c: Update assuming #if UI_OUT is always true. Update
+ copyright.
+ * defs.h, event-top.c, gdbcmd.h: Ditto.
+ * infcmd.c, infrun.c, main.c, printcmd.c, remote.c: Ditto.
+ * source.c, stack.c, symfile.c, symtab.c, thread.c: Ditto.
+ * top.c, cli/cli-cmds.c, cli/cli-decode.c: Ditto.
+ * cli/cli-script.c, cli/cli-script.h, cli/cli-setshow.c: Ditto.
+ * mi/ChangeLog, mi/mi-cmd-break.c, mi/mi-cmd-stack.c: Ditto.
+ * mi/mi-main.c:Ditto.
+
+ * stack.c, symfile.c: Update copyright.
+
+2002-01-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/low-hppabsd.c, gdbserver/low-lynx.c,
+ gdbserver/low-nbsd.c, gdbserver/low-sim.c,
+ gdbserver/low-sparc.c, gdbserver/low-sun3.c,
+ gdbserver/low-linux.c, gdbserver/server.c: Correct copyright notices.
+
+2002-01-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/low-hppabsd.c (myattach): New function, returning -1.
+ * gdbserver/low-lynx.c (myattach): Likewise.
+ * gdbserver/low-nbsd.c (myattach): Likewise.
+ * gdbserver/low-sim.c (myattach): Likewise.
+ * gdbserver/low-sparc.c (myattach): Likewise.
+ * gdbserver/low-sun3.c (myattach): Likewise.
+
+ * gdbserver/low-linux.c (myattach): New function.
+
+ * gdbserver/server.c (attach_inferior): New function.
+ (main): Handle "--attach".
+
+2002-01-16 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (language support): Daniel Jacobwitz is C++
+ maintainer.
+
+2002-01-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-typeprint.c (is_type_conversion_operator): Add additional
+ check for non-conversion operators.
+
+2002-01-15 Michael Snyder <msnyder@redhat.com>
+
+ * linux-proc.c: Add "info proc" command, a la procfs.c.
+ (read_mapping): New function, abstract and re-use code.
+ (linux_find_memory_regions): Use new func read_mapping.
+ (linux_info_proc_cmd): New function, implement "info proc".
+ (_initialize_linux_proc): Add new command "info proc".
+
+2002-01-15 Michael Snyder <msnyder@redhat.com>
+
+ * symfile.c (generic_load): Use bfd_map_over_sections method
+ instead of manipulating bfd structure members directly.
+ (add_section_size_callback): New function, bfd sections callback
+ used by generic_load.
+ (load_sections_callback): New function, bfd sections callback
+ used by generic_load.
+
+2002-01-15 Elena Zannoni <ezannoni@redhat.com>
+
+ [Based on work by Jim Blandy]
+ * gdbtypes.h (builtin_type_v16qi, builtin_type_v8hi): Export.
+ (builtin_type_vec128): Export.
+ * gdbtypes.c (builtin_type_v16qi, builtin_type_v8hi): New SIMD
+ types.
+ (builtin_type_vec128): New builtin type for 128 bit vector
+ registers.
+ (build_gdbtypes): Initialize builtin_type_v16qi and
+ builtin_type_v8hi. Create the vec128 register builtin type
+ structure.
+ (build_builtin_type_vec128): New function.
+ (_initialize_gdbtypes): Register builtin_type_v16qi and
+ builtin_type_v8hi with gdbarch. Same for builtin_type_vec128.
+ * rs6000-tdep.c (rs6000_register_virtual_type): Change type of
+ AltiVec register to new builtin type.
+
+2001-01-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * stabsread.c (read_type): Pass dbx_lookup_type (typenums)
+ to make_cv_type.
+
+2002-01-14 Andrew Cagney <ac131313@redhat.com>
+
+ * config/pa/tm-hppa.h (DEPRECATED_CLEAN_UP_REGISTER_VALUE): Rename
+ CLEAN_UP_REGISTER_VALUE.
+ * regcache.c (supply_register): Update only call.
+
+2002-01-14 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.tgt: Mark a29k-*-aout*, a29k-*-coff*, a29k-*-elf*,
+ a29k-*-ebmon*, a29k-*-kern*, a29k-*-none*, a29k-*-udi* and
+ a29k-*-vxworks* targets as obsolete.
+
+2002-01-14 Michael Snyder <msnyder@redhat.com>
+
+ * linux-proc.c (linux_do_thread_registers): Ignore fpxregs
+ until we can resolve portability issues.
+ * gregset.h: Remove references to fpxregs.
+ * gcore.c (gcore_command): Initialize note_sec to NULL.
+
+2002-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ * signals.c (target_signal_to_name): Rewrite. Only use
+ signals[].name when in bounds and non-NULL.
+
+2002-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ From Petr Ledvina <ledvinap@kae.zcu.cz>:
+ * signals.c (target_signal_to_name): Verify that SIG is within the
+ bounds of the signals array.
+
+2002-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Remove arm-coff and arm-pe from target list.
+
+2002-01-13 Keith Seitz <keiths@redhat.com>
+
+ * stack.c (print_frame_info_base): Print the frame's pc
+ only if when print_frame_info_listing_hook is not defined.
+
+2002-01-13 Keith Seitz <keiths@redhat.com>
+
+ * varobj.c (varobj_set_value): Make sure that there were no
+ errors evaluating the object before attempting to set its
+ value.
+ value_cast now properly adjusts VALUE_ADDRESS for baseclasses,
+ so this offset adjustment is no longer necessary.
+ (create_child): Don't set the error flag if the child is
+ a CPLUS_FAKE_CHILD.
+ (value_of_child): If value_fetch_lazy fails, return NULL
+ so that callers will be notified that an error occurred.
+ (c_value_of_variable): Delay check of variable's validity
+ until later. We actually want all structs and unions to have
+ the value "{...}".
+ Do not return "???" for variables which could not be evaluated.
+ This error condition must be returned to the caller so that it
+ can get the error condition from gdb.
+ (cplus_name_of_child): Adjust index for vptr before figuring
+ out the name of the child.
+ (cplus_value_of_child): If a child's (real) parent is not valid,
+ don't even bother trying to give a value for it. Just return
+ an error. Change all instances in this function.
+ (cplus_type_of_child): If our parent is one of the "fake"
+ parents, we need to get at the type of the real parent, and
+ derive the child's true type using this information.
+
+2002-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-01-09 John Marshall <johnm@falch.net>:
+ * CONTRIBUTE, README, TODO: Change sourceware.cygnus.com to
+ sources.redhat.com, and tweak some related URLs which had
+ suffered from linkrot.
+
+2002-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ From Jeff law:
+ * hppa-tdep.c (hppa_push_arguments): Correct handling of 5-7 byte
+ structures passed in registers.
+
+2002-01-13 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (save_npx) [__DJGPP_MINOR__ < 3]: Remove extraneous
+ white space which prevented compilation. Reported by DSK
+ <dsk@student.unsw.edu.au>.
+
+2002-01-11 Michael Snyder <msnyder@redhat.com>
+
+ * symfile.c (build_section_addr_info_from_section_tab):
+ Use bfd access method instead of manipulating bfd directly.
+ (syms_from_objfile): Ditto.
+ (simple_overlay_update_1): Ditto.
+ (simple_overlay_update): Ditto.
+ (generic_load): Ditto.
+ (overlay_unmapped_address): FIXME comment, bfd access methods.
+ (sections_overlap): FIXME comment, bfd access methods.
+ (pc_in_mapped_range): FIXME comment, bfd access methods.
+ (pc_in_unmapped_range): FIXME comment, bfd access methods.
+ (section_is_mapped): FIXME comment, bfd access methods.
+ (section_is_overlay): FIXME comment, bfd access methods.
+
+ * symfile.c (generic_load): Whitespace and long line cleanups.
+ Remove duplicate variable, change several local variables to
+ more appropriate data types.
+ (print_transfer_performance): Use %lu instead of %ld for ulongs.
+
+2002-01-12 Andrew Cagney <ac131313@redhat.com>
+
+ From Peter Schauer:
+ * language.c (longest_local_hex_string_custom): Use phex_nz to
+ convert NUM to a hex string.
+
+2002-01-12 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_gdbarch_init): Move setting of long_bit earlier in
+ the function.
+ Update Copyright year.
+
+2002-01-12 Andrew Cagney <ac131313@redhat.com>
+
+ * language.c (longest_raw_hex_string): Delete unused function.
+
+2002-01-11 Petr Sorfa <petrs@caldera.com>
+
+ * MAINTAINERS (write-after-approval): Add myself.
+ * dwarf2read.c (read_tag_string_type): Handling of
+ DW_AT_byte_size.
+ (read_tag_string_type): FORTRAN fix to prevent propagation of
+ first string size.
+ (set_cu_language): Handling of DW_LANG_Fortran95
+
+2002-01-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-nat.c (fetch_inferior_registers): Change inferior_pid ->
+ GETPID(inferior_ptid).
+ (store_inferior_registers): Likewise.
+
+2002-01-10 Jason Merrill <jason@redhat.com>
+
+ * dwarf2read.c (decode_locdesc): Implement DW_OP_litn, DW_OP_dup.
+ Fix DW_OP_minus.
+
+2002-01-10 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Add renames for bfd/ChangeLog-0001
+ and bfd/elf32-sh-nbsd.c.
+
+2002-01-10 Michael Snyder <msnyder@redhat.com>
+
+ * NEWS: Mention --pid and corefile/proc-id behavior change.
+
+ * Makefile.in: Add rules for gcore.o and linux-proc.o.
+ * gcore.c: Include cli/cli-decode.h instead of command.h.
+
+ * main.c (captured_main): Add new command line option "--pid".
+ If the second command line argument (following the symbol-file)
+ begins with a digit, try to attach to it before trying to open
+ it as a corefile.
+ (print_gdb_help): Document the "--pid" argument.
+
+2002-01-10 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * completer.c (command_completer): New function.
+
+ * completer.h <command_completer>: Add prototype.
+
+ * cli/cli-cmds.c (init_cli_cmds): Make command_completer be the
+ completer for the "help" command.
+
+2002-01-09 Jason Merrill <jason@redhat.com>
+
+ * c-typeprint.c (is_type_conversion_operator): Fix thinko.
+
+2002-01-09 Michael Snyder <msnyder@redhat.com>
+
+ * i386-linux-nat.c (fill_fpxregset): Make global.
+ (store_fpxregset): Ditto.
+
+ * gregset.h (gdb_fpxregset_t): Define.
+ (supply_fpxregset): Prototype.
+ (fill_fpxregset): Prototype.
+
+ * exec.c (exec_make_note_section): Don't call elfcore_write_prpsinfo.
+
+2002-01-09 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/arm-tdep.h (arm_software_single_step): Remove PARAMS.
+ * config/arm/nm-nbsd.h (arm_register_u_addr): Likewise.
+ * config/arm/tm-nbsd.h (get_longjmp_target): Likewise.
+
+2002-01-09 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Update target maintainer rules so that any
+ Maintainer can approve a tested patch for a maintenance-only
+ target.
+
+2002-01-09 Richard Earnshaw <rearnsha@arm.com>
+
+ * MAINTAINERS (write-after-approval): Add myself.
+
+ * arm-tdep.c (arm_init_extra_frame_info): Cast NULL argument to
+ IN_SIGTRAMP.
+
+2002-01-08 Michael Snyder <msnyder@redhat.com>
+
+ * linux-proc.c (child_pid_to_exec_file): Use readlink to get the
+ real name of the executable, rather than the /proc name.
+
+2002-01-03 Michael Snyder <msnyder@redhat.com>
+
+ Implement a "generate-core-file" command in gdb, save target state.
+ * gcore.c: New file. Implement new command 'generate-core-file'.
+ Save a corefile image of the current state of the inferior.
+ * linux-proc.c: Add linux-specific code for saving corefiles.
+ * target.h (struct target_ops): Add new target vectors for saving
+ corefiles; to_find_memory_regions and to_make_corefile_notes.
+ (target_find_memory_regions): New macro.
+ (target_make_corefile_notes): New macro.
+ * target.c (update_current_target): Inherit new target methods.
+ (dummy_find_memory_regions): New place-holder method.
+ (dummy_make_corefile_notes): New place-holder method.
+ (init_dummy_target): Initialize new dummy target vectors.
+ * exec.c (exec_set_find_memory_regions): New function.
+ Allow the exec_ops vector for memory regions to be taken over.
+ (exec_make_note_section): New function, target vector method.
+ * defs.h (exec_set_find_memory_regions): Export prototype.
+ * procfs.c (proc_find_memory_regions): New function, corefile method.
+ (procfs_make_note_section): New function, corefile method.
+ (init_procfs_ops): Set new target vector pointers.
+ (find_memory_regions_callback): New function.
+ (procfs_do_thread_registers): New function.
+ (procfs_corefile_thread_callback): New function.
+ * sol-thread.c (sol_find_memory_regions): New function.
+ (sol_make_note_section): New function.
+ (init_sol_thread_ops): Initialize new target vectors.
+ * inftarg.c (inftarg_set_find_memory_regions): New function.
+ Allow to_find_memory_regions vector to be taken over.
+ (inftarg_set_make_corefile_notes): New function.
+ Allow to_make_corefile_notes vector to be taken over.
+ * thread-db.c (thread_db_new_objfile): Don't activate thread-db
+ interface layer if not target_has_execution (may be a corefile).
+ * config/i386/linux.mh: Add gcore.o to NATDEPFILES.
+ * config/sparc/sun4sol2.mh: Ditto.
+ * config/alpha/alpha-linux.mh: Ditto.
+ * config/arm/linux.mh: Ditto.
+ * config/i386/x86-64linux.mh: Ditto.
+ * config/ia64/linux.mh: Ditto.
+ * config/m68k/linux.mh: Ditto.
+ * config/mips/linux.mh: Ditto.
+ * config/powerpc/linux.mh: Ditto.
+ * config/sparc/linux.mh: Ditto.
+
+2002-01-07 Michael Snyder <msnyder@redhat.com>
+
+ * arm-linux-nat.c: Remove references to regcache.c internal data
+ (registers[] and register_valid[]).
+
+2002-01-07 Michael Snyder <msnyder@redhat.com>
+
+ * linux-proc.c: New file. Implement child_pid_to_exec_file,
+ so that attaching to a pid will automatically read the process's
+ symbol file and shlibs.
+ * Makefile.in: Add rule for linux-proc.o.
+ * config/nm-linux.h: Define CHILD_PID_TO_EXEC_FILE.
+ * config/alpha/alpha-linux.mh: Add linux-proc.o to NATDEPFILES.
+ * config/arm/linux.mh: Ditto.
+ * config/i386/linux.mh: Ditto.
+ * config/i386/x86-64linux.mh: Ditto.
+ * config/ia64/linux.mh: Ditto.
+ * config/m68k/linux.mh: Ditto.
+ * config/mips/linux.mh: Ditto.
+ * config/powerpc/linux.mh: Ditto.
+ * config/sparc/linux.mh: Ditto.
+
+2002-01-06 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c: Add i386-tdep.h dependency.
+
+2002-01-07 Michael Snyder <msnyder@redhat.com>
+
+ * solib.c (info_sharedlibrary_command): Use TARGET_PTR_BIT
+ instead of bfd_get_arch_size. Don't bail out just because
+ there's no exec_bfd.
+
+ * cp-valprint.c (cp_print_value): FIXME comment, alloca size.
+ * p-valprint.c (pascal_object_print_value): Ditto.
+ * somread.c (som_symtab_read): Ditto.
+ * symfile.c (simple_free_overlay_region_table): Ditto.
+ * valops.c (value_assign): Ditto.
+
+ * tracepoint.c (tracepoint_save_command): From Klee Dienes --
+ use tilde_expand and strerror for opening save-tracepoints file.
+
+ * thread-db.c (thread_db_new_objfile): Indendation fix.
+
+ * infptrace.c (GDB_MAX_ALLOCA): New define.
+ (child_xfer_memory): Use xmalloc/xfree instead of alloca if the
+ size of the buffer exceeds GDB_MAX_ALLOCA (default 1 megabyte,
+ can be overridden with whatever value is appropriate to the host).
+ * infttrace.c (child_xfer_memory): Add FIXME warning about use of
+ alloca to allocate potentially large buffer.
+ * rs6000-nat.c (child_xfer_memory): Ditto.
+ * symm-nat.c (child_xfer_memory): Ditto.
+ * x86-64-linux-nat.c (child_xfer_memory): Ditto.
+
+2002-01-07 Jackie Smith Cashion <jsmith@redhat.com>
+
+ From Nick Clifton <nickc@redhat.com>
+ * d10v-tdep.c: Set STACK_START to 0x200bffe.
+
+2002-01-07 Michael Snyder <msnyder@redhat.com>
+
+ * solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
+ Don't use exec_bfd if it's NULL.
+
+2002-01-06 Mark Kettenis <kettenis@gnu.org>
+
+ * valops.c (value_arg_coerce): Fix formatting.
+
+2002-01-06 Andrew Cagney <ac131313@redhat.com>
+
+ * hp-psymtab-read.c: Include "gdb_string.h" instead of <string.h>.
+ * gnu-nat.c: Ditto.
+
+2002-01-06 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Note that alpha-dec-osf4.0a, arc-elf, arm-coff,
+ arm-elf, arm-pe, d30v-elf, fr30-elf, h8300hms, h8500hms,
+ i960-coff, m32r-elf, m68k-elf, m88k, mcore-elf, mn10200-elf,
+ ns32k-netbsd, hppa1.1-hp-proelf, v850-elf, vax-dec-vms5.5 and
+ z8k-coff have not been multi-arched. Update z8k-coff build
+ status.
+
+2002-01-06 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mark a29k target as obsolete.
+ * Makefile.in (a29k-tdep.o, remote-adapt.o, remote-eb.o)
+ (remote-mm.o, remote-udi.o): Obsolete. Remove references in
+ comments.
+ * NEWS: Note that a29k targets are obsolete.
+ * a29k-tdep.c: Mark as obsolete.
+ * configure.tgt: Mark a29k-*-aout*, a29k-*-coff*, a29k-*-elf*,
+ a29k-*-ebmon*, a29k-*-kern*, a29k-*-none*, a29k-*-udi* and
+ a29k-*-vxworks* targets as obsolete.
+ * remote-adapt.c: Obsolete.
+ * remote-eb.c: Obsolete.
+ * remote-mm.c: Obsolete.
+ * remote-udi.c: Obsolete.
+ * config/a29k/a29k-udi.mt: Obsolete.
+ * config/a29k/a29k.mt: Obsolete.
+ * config/a29k/tm-a29k.h: Obsolete.
+ * config/a29k/tm-vx29k.h: Obsolete.
+ * config/a29k/vx29k.mt: Obsolete.
+
+2002-01-05 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_do_registers_info): Replace BIG_ENDIAN
+ with BFD_ENDIAN_BIG.
+
+2002-01-05 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.in (AC_CHECK_HEADERS): Do not check for <endian.h>.
+ * configure, config.in: Re-generate.
+ * config/vax/xm-vaxbsd.h: Do not include <machine/endian.h>.
+ * defs.h: Do not include <endian.h>.
+
+2002-01-05 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * acconfig.h (HAVE_PT_GETXMMREGS): New.
+ * config.in: Regenerate.
+ * configure.in: Update copyright years.
+ Add test for PT_GETXMMREGS supplied by <sys/ptrace.h>.
+ * configure: Regenerate.
+ * i386bsd-nat.c: Update copyright years.
+ (fill_gregset): Use regcache_collect.
+ (fetch_inferior_registers): Only fetch integer registers
+ if requested to do so. Add support for XMM registers
+ using PT_GETXMMREGS.
+ (store_inferior_registers): Only store integer registers
+ if requested to do so. Add support for XMM registers
+ using PT_SETXMMREGS.
+ * i386nbsd-nat.c (fetch_inferior_registers): Remove.
+ (store_inferior_registers): Remove.
+ (fetch_core_registers): Use supply_gregset and i387_supply_fsave.
+ (fetch_elfcore_registers): New function.
+ (i386nbsd_elfcore_fns): New.
+ (_initialize_i386nbsd_nat): Register i386nbsd_elfcore_fns.
+ * config/i386/nbsd.mh (NATDEPFILES): Add i387-nat.o and
+ i386bsd-nat.o.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
+ * config/i386/nbsd.mt (TDEPFILES): Add i386bsd-nat.o.
+ * config/i386/nbsdelf.mt (TDEPFILES): Likewise.
+ * config/i386/tm-nbsd.h: Update copyright years.
+ (HAVE_SSE_REGS): Define.
+ (IN_SIGTRAMP): Define as i386bsd_in_sigtramp.
+ (SIGTRAMP_START): Redefine as i386bsd_sigtramp_start.
+ (SIGTRAMP_END): Redefine as i386bsd_sigtramp_end.
+ (SIGCONTEXT_PC_OFFSET): Remove.
+ (FRAME_SAVED_PC): Define as i386bsd_frame_saved_pc.
+
+2002-01-05 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.tgt: Remove powerpc-*-macos* target.
+ * config/m68k/xm-mpw.h: Delete file.
+ * config/xm-mpw.h: Delete file.
+ * ser-mac.c: Delete file.
+ * mpw-make.sed: Delete file.
+ * mpw-config.in: Delete file.
+ * mac-xdep.c: Delete file.
+ * mac-gdb.r: Delete file.
+ * mac-defs.h: Delete file.
+ * mac-nat.c: Delete file.
+ * config/powerpc/macos.mh: Delete file.
+ * config/powerpc/macos.mt: Delete file.
+ * config/powerpc/nm-macos.h: Delete file.
+ * config/powerpc/tm-macos.h: Delete file.
+ * source.c (openp, open_source_file): Remove obsolete code.
+ * top.c (gdb_readline): Ditto.
+ * utils.c (query): Ditto.
+ * event-top.c (display_gdb_prompt): Ditto.
+ * Makefile.in (ser-mac.o): Delete obsolete target.
+ * NEWS: Update.
+
+2002-01-04 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (BIG_ENDIAN): Delete macro definition.
+ * a29k-tdep.c, arch-utils.c, arm-tdep.c, ax-gdb.c, ch-exp.c,
+ coffread.c, cris-tdep.c, d10v-tdep.c, d30v-tdep.c, defs.h,
+ findvar.c, infcmd.c, mem-break.c, mips-tdep.c, mn10300-tdep.c,
+ printcmd.c, remote-os9k.c, remote-rdi.c, remote-rdp.c,
+ remote-sim.c, remote.c, rs6000-tdep.c, sh-tdep.c, sparcl-tdep.c,
+ stabsread.c, valops.c, valprint.c, config/a29k/tm-a29k.h,
+ config/a29k/tm-vx29k.h, config/arm/tm-arm.h,
+ config/d30v/tm-d30v.h, config/fr30/tm-fr30.h,
+ config/h8300/tm-h8300.h, config/h8500/tm-h8500.h,
+ config/m32r/tm-m32r.h, config/m68k/tm-m68k.h,
+ config/m88k/tm-m88k.h, config/mips/tm-mips.h, config/pa/tm-hppa.h,
+ config/sparc/tm-sparc.h, config/z8k/tm-z8k.h, mi/mi-cmd-disas.c,
+ mi/mi-main.c: Replace BIG_ENDIAN with BFD_ENDIAN_BIG.
+ * gdbarch.sh: Replace BIG_ENDIAN with BFD_ENDIAN_BIG.
+ * gdbarch.c: Re-generate.
+
+2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * thread-db.c (thread_db_new_objfile): Do not enable thread_db
+ for core files.
+
+2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/arm/nbsd.mh (XDEPFILES): Remove ser-tcp.o.
+
+2002-01-04 Andrew Cagney <ac131313@redhat.com>
+
+ * value.h (value_ptr): Delete typedef.
+
+2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * i386nbsd-nat.c: Update copyright years.
+ Include i386-tdep.h.
+
+2002-01-04 Elena Zannoni <ezannoni@redhat.com>
+
+ * stabsread.c: Update copyright years.
+
+ From Debashis Mahata <debashis.mahata@wipro.com>:
+ (read_struct_fields): Deal with Sun C compiler erroneous stab
+ output for structs and unions.
+ Fix PR gdb/269.
+
+2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * p-valprint.c: Include "cp-abi.h" for baseclass_offset
+ prototype.
+
+2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * cp-abi.c: Fix whitespace.
+ (baseclass_offset): New wrapper function.
+ * cp-abi.h (baseclass_offset): Add prototype.
+ (struct cp_abi_ops): Add baseclass_offset pointer.
+
+ * valops.c (vb_match): Move to...
+ * gnu-v2-abi.c (vb_match): here.
+ * valops.c (baseclass_offset): Move to...
+ * gnu-v2-abi.c (gnuv2_baseclass_offset): here, and rename.
+
+ * gnu-v3-abi.c (gnuv3_baseclass_offset): New function.
+
+ * gnu-v2-abi.c (init_gnuv2_ops): Initialize baseclass_offset.
+ * gnu-v3-abi.c (init_gnuv3_ops): Likewise.
+ * hpacc-abi.c (init_hpacc_ops): Likewise.
+
+2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * valops.c (find_overload_match): Accept obj as a
+ reference parameter. Update it before returning.
+ * value.h (find_overload_match): Update prototype.
+ * eval.c (evaluate_subexp_standard): Pass object to
+ find_overload_match by reference.
+
+2002-01-03 Andrew Cagney <ac131313@redhat.com>
+
+ * valarith.c: Replace value_ptr with struct value pointer. Remove
+ register attribute from value declarations.
+ * valops.c: Ditto.
+ * value.h: Ditto.
+ * scm-lang.c (scm_lookup_name): Ditto.
+
+2002-01-03 Michael Snyder <msnyder@redhat.com>
+
+ Abstract the functionality of iterating over mapped memory
+ regions into a general purpose iterator function.
+ * procfs.c (iterate_over_mappings): New function, general purpose
+ iterator for memory sections.
+ (proc_iterate_over_mappings): Reimplement using iterate_over_mappings.
+ (solib_mappings_callback): New function, callback for above.
+ (info_proc_mappings): Reimpliment using iterate_over_mappings.
+ (info_mappings_callback): New function, callback for above.
+
+ * procfs.c (proc_set_watchpoint): Add cast to suppress warning.
+
+2002-01-01 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (struct gdbarch_tdep): Add `os_ident' member.
+ * i386-tdep.c: Include "elf-bfd.h".
+ (process_note_abi_tag_sections): New function.
+ (i386_gdbarch_init): Add code to recognize various OS/ABI
+ combinations.
+
+ * maint.c (_initialize_maint_cmds): Add missing \ in
+ string-literal.
+
+For older changes see ChangeLog-2001
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index f7eec1f0b29..88428aaee25 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -1,7 +1,7 @@
GDB Maintainers
- Blanket Write Privs
+ Global Maintainers
(alphabetic)
Jim Blandy jimb@redhat.com
@@ -24,7 +24,7 @@ Note individuals who maintain parts of the debugger need approval to
check in changes outside of the immediate domain that they maintain.
If there is no maintainer for a given domain then the responsibility
-falls to the head maintainer.
+falls to a global maintainer.
If there are several maintainers for a given domain then
responsibility falls to the first maintainer. The first maintainer is
@@ -60,11 +60,12 @@ maintainer works with the native maintainer when resolving API issues.
alpha --target=alpha-elf ,-Werror
Maintenance only
- arm --target=arm-elf ,
+ arc Deleted.
+
+ arm --target=arm-elf ,-Werror
Fernando Nasser fnasser@redhat.com
Scott Bambrough scottb@netwinder.org
Richard Earnshaw rearnsha@arm.com
- Not multi-arch
avr --target=avr ,-Werror
Theodore A. Roth troth@verinet.com
@@ -75,23 +76,25 @@ maintainer works with the native maintainer when resolving API issues.
d10v --target=d10v-elf ,-Werror
Maintenance only
+ d30v Deleted.
+
+ fr30 Deleted.
+
h8300 --target=h8300hms ,-Werror
Maintenance only
- h8500 (--target=h8500hms broken)
- Maintenance only
- Not multi-arch, work in progress
+ h8500 (--target=h8500hms OBSOLETE)
i386 --target=i386-elf ,-Werror
Mark Kettenis kettenis@gnu.org
+ i960 Deleted.
+
ia64 --target=ia64-linux-gnu ,-Werror
(--target=ia64-elf broken)
Kevin Buettner kevinb@redhat.com
- m32r (--target=m32r-elf broken)
- Michael Snyder msnyder@redhat.com
- OBSOLETE candidate, not multi-arch
+ m32r (--target=m32r-elf OBSOLETE)
m68hc11 --target=m68hc11-elf ,-Werror ,
Stephane Carrez stcarrez@nerim.fr
@@ -99,15 +102,15 @@ maintainer works with the native maintainer when resolving API issues.
m68k --target=m68k-elf ,-Werror
Maintenance only
+ m88k Deleted.
+
mcore --target=mcore-elf ,-Werror
Maintenance only
mips --target=mips-elf ,-Werror
Andrew Cagney cagney@redhat.com
- mn10200 --target=mn10200-elf ,-Werror
- Maintenance only
- OBSOLETE candidate, not multi-arch
+ mn10200 (--target=mn10200-elf OBSOLETE)
mn10300 --target=mn10300-elf ,-Werror
Maintenance only
@@ -147,10 +150,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 ,-Werror
- Known problem in 5.1
- Maintenance only
- OBSOLETE candidate, not multi-arch
+ z8k (--target=z8k-coff OBSOLETE)
All developers recognized by this file can make arbitrary changes to
OBSOLETE targets.
@@ -162,40 +162,8 @@ All recognized developers can make mechanical changes (by virtue of
the obvious fix rule) to ``maintenance only'' targets. The change
shall be sanity checked by compiling with one of the listed targets.
-The Bourne shell script:
-
-cat MAINTAINERS | tr -s '[\t]' '[ ]' | sed -n '
-/^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
-s/^.*--target=//
-s/).*$//
-h
-:loop
- g
- /^[^ ]*,/ !b end
- s/,[^ ]*//
- p
- g
- s/^[^,]*,//
- h
-b loop
-:end
-p
-'
-
-can be used to generate a list of buildable targets. The list
-containing values for the configure options --target=,
---enable-gdb-build-warnings= and optionally
---enable-sim-build-warnings vis:
-
- arc-elf ,-Werror
- ...
- m68hc11-elf ,-Werror ,
- ...
- hppa1.1-hp-proelf broken
- ...
-
-While the ``broken'' targets are included in the listing, the are not
-expected to build.
+The Bourne shell script gdb_mbuild.sh can be used to rebuild all the
+above targets.
Host/Native:
@@ -414,7 +382,7 @@ Stan Shebs shebs@apple.com
Aidan Skinner aidan@velvet.net
Jiri Smid smid@suse.cz
David Smith dsmith@redhat.com
-Stephen P. Smith ischis2@home.com
+Stephen P. Smith ischis2@cox.net
Jackie Smith Cashion jsmith@redhat.com
Michael Snyder msnyder@redhat.com
Petr Sorfa petrs@caldera.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c42791486a7..774b93b51d4 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1,5 +1,5 @@
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# This file is part of GDB.
@@ -64,10 +64,6 @@ DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@
MIG = @MIG@
-# Flags that describe where you can find the termcap library.
-# This can be overridden in the host Makefile fragment file.
-TERMCAP = @TERM_LIB@
-
# If you are compiling with GCC, make sure that either 1) You have the
# fixed include files where GCC can reach them, or 2) You use the
# -traditional flag. Otherwise the ioctl calls in inflow.c
@@ -113,9 +109,6 @@ LIBIBERTY = ../libiberty/libiberty.a
MMALLOC = @MMALLOC@
MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
-# Configured by the --with-uiout option to configure.
-UIOUT_CFLAGS = @UIOUT_CFLAGS@
-
# Where is the BFD library? Typically in ../bfd.
BFD_DIR = ../bfd
BFD = $(BFD_DIR)/libbfd.a
@@ -143,15 +136,21 @@ INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
# Where is the ICONV library? This can be empty if libc has iconv.
LIBICONV = @LIBICONV@
+# Did the user give us a --with-sysroot option?
+TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
+
#
# CLI sub directory definitons
#
SUBDIR_CLI_OBS = \
cli-dump.o \
- cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o
+ cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \
+ cli-interp.o
SUBDIR_CLI_SRCS = \
cli/cli-dump.c \
cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
+ cli/cli-interp.c \
cli/cli-utils.c
SUBDIR_CLI_DEPS =
SUBDIR_CLI_INITS = \
@@ -170,12 +169,14 @@ SUBDIR_MI_OBS = \
mi-out.o mi-console.o \
mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
mi-cmd-disas.o \
+ mi-interp.o \
mi-main.o mi-parse.o mi-getopt.o
SUBDIR_MI_SRCS = \
mi/mi-out.c mi/mi-console.c \
mi/mi-cmds.c mi/mi-cmd-env.c \
mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
mi/mi-cmd-disas.c \
+ mi/mi-interp.c \
mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
SUBDIR_MI_DEPS =
SUBDIR_MI_INITS = \
@@ -325,7 +326,8 @@ GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/l
# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS
# from the config directory.
GLOBAL_CFLAGS = $(MT_CFLAGS) $(MH_CFLAGS)
-#PROFILE_CFLAGS = -pg
+
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
# CFLAGS is specifically reserved for setting from the command line
# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
@@ -341,7 +343,7 @@ INTERNAL_WARN_CFLAGS = \
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
- $(INTL_CFLAGS) $(ENABLE_CFLAGS) $(UIOUT_CFLAGS) \
+ $(INTL_CFLAGS) $(ENABLE_CFLAGS) \
$(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
@@ -352,24 +354,23 @@ LDFLAGS = @LDFLAGS@
# Profiling options need to go here to work.
# I think it's perfectly reasonable for a user to set -pg in CFLAGS
# and have it work; that's why CFLAGS is here.
-INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) @HLDFLAGS@
-HLDENV = @HLDENV@
+# PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
+INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS)
# If your system is missing alloca(), or, more likely, it's there but
# it doesn't work, then refer to libiberty.
# Libraries and corresponding dependencies for compiling gdb.
# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
-# TERMCAP comes after readline, since readline depends on it.
# MMALLOC comes after anything else that might want an allocation function.
# LIBIBERTY appears twice on purpose.
# If you have the Cygnus libraries installed,
# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS='
INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \
- $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+ $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
-lmmalloc -lintl -liberty
CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \
- $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+ $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
$(LIBICONV) \
$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
@@ -482,26 +483,6 @@ CXX_FOR_TARGET = ` \
fi; \
fi`
-# OBSOLETE CHILLFLAGS = $(CFLAGS)
-# OBSOLETE CHILL = gcc
-# OBSOLETE CHILL_FOR_TARGET = ` \
-# OBSOLETE if [ -f $${rootme}/../gcc/Makefile ] ; then \
-# OBSOLETE echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../gcc/ch/runtime/; \
-# OBSOLETE else \
-# OBSOLETE if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
-# OBSOLETE echo $(CC); \
-# OBSOLETE else \
-# OBSOLETE t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
-# OBSOLETE fi; \
-# OBSOLETE fi`
-# OBSOLETE CHILL_LIB = ` \
-# OBSOLETE if [ -f $${rootme}/../gcc/ch/runtime/libchill.a ] ; then \
-# OBSOLETE echo $${rootme}/../gcc/ch/runtime/chillrt0.o \
-# OBSOLETE $${rootme}/../gcc/ch/runtime/libchill.a; \
-# OBSOLETE else \
-# OBSOLETE echo -lchill; \
-# OBSOLETE fi`
-
# The use of $$(x_FOR_TARGET) reduces the command line length by not
# duplicating the lengthy definition.
TARGET_FLAGS_TO_PASS = \
@@ -536,9 +517,11 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
disasm.c doublest.c dummy-frame.c dwarfread.c dwarf2read.c \
elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \
+ frame-unwind.c \
gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
hpacc-abi.c \
inf-loop.c infcmd.c inflow.c infrun.c \
+ interps.c \
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
kod.c kod-cisco.c \
language.c linespec.c \
@@ -550,7 +533,9 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
objfiles.c osabi.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
regcache.c reggroups.c remote.c \
- scm-exp.c scm-lang.c scm-valprint.c serial.c ser-unix.c source.c \
+ scm-exp.c scm-lang.c scm-valprint.c \
+ sentinel-frame.c \
+ serial.c ser-unix.c source.c \
stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \
target.c thread.c top.c tracepoint.c typeprint.c \
tui/tui.c tui/tui.h tui/tuiCommand.c tui/tuiCommand.h \
@@ -610,13 +595,12 @@ nm_h = @nm_h@
# gdb/ header files
#
-acconfig_h = acconfig.h
ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h)
-alpha_tdep_h = alpha-tdep.h $(osabi_h)
+alpha_tdep_h = alpha-tdep.h
alphabsd_tdep_h = alphabsd-tdep.h
annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
arch_utils_h = arch-utils.h
-arm_tdep_h = arm-tdep.h $(osabi_h)
+arm_tdep_h = arm-tdep.h
ax_gdb_h = ax-gdb.h
ax_h = ax.h $(doublest_h)
bcache_h = bcache.h
@@ -632,6 +616,7 @@ coff_solib_h = coff-solib.h
command_h = command.h
complaints_h = complaints.h
completer_h = completer.h
+config_h = config.h
cp_abi_h = cp-abi.h
cp_support_h = cp-support.h
dcache_h = dcache.h
@@ -650,6 +635,7 @@ event_top_h = event-top.h
expression_h = expression.h $(symtab_h) $(doublest_h)
f_lang_h = f-lang.h
frame_h = frame.h
+frame_unwind_h = frame-unwind.h
gdb_events_h = gdb-events.h
gdb_stabs_h = gdb-stabs.h
gdb_h = gdb.h
@@ -664,7 +650,7 @@ gdb_string_h = gdb_string.h
gdb_thread_db_h = gdb_thread_db.h
gdb_vfork_h = gdb_vfork.h
gdb_wait_h = gdb_wait.h
-gdbarch_h = gdbarch.h $(dis_asm_h) $(value_h) $(inferior_h)
+gdbarch_h = gdbarch.h $(dis_asm_h) $(inferior_h)
gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
gdbcore_h = gdbcore.h $(bfd_h)
gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
@@ -672,10 +658,12 @@ gdbtypes_h = gdbtypes.h
gnu_nat_h = gnu-nat.h
gregset_h = gregset.h
i386_linux_tdep_h = i386-linux-tdep.h
-i386_tdep_h = i386-tdep.h $(osabi_h)
+i386_tdep_h = i386-tdep.h
i387_tdep_h = i387-tdep.h
inf_loop_h = inf-loop.h
inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h)
+inflow_h = inflow.h $(terminal_h)
+interps_h = interps.h
jv_lang_h = jv-lang.h
kod_h = kod.h
language_h = language.h
@@ -692,7 +680,7 @@ mips_tdep_h = mips-tdep.h
mipsnbsd_tdep_h = mipsnbsd-tdep.h
monitor_h = monitor.h
nbsd_tdep_h = nbsd-tdep.h
-ns32k_tdep_h = ns32k-tdep.h $(osabi_h)
+ns32k_tdep_h = ns32k-tdep.h
objc_lang_h = objc-lang.h
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
ocd_h = ocd.h
@@ -700,7 +688,7 @@ osabi_h = osabi.h
p_lang_h = p-lang.h
pa64solib_h = pa64solib.h
parser_defs_h = parser-defs.h $(doublest_h)
-ppc_tdep_h = ppc-tdep.h $(osabi_h)
+ppc_tdep_h = ppc-tdep.h
ppcnbsd_tdep_h = ppcnbsd-tdep.h
proc_utils_h = proc-utils.h
regcache_h = regcache.h
@@ -709,9 +697,10 @@ remote_utils_h = remote-utils.h $(target_h)
remote_h = remote.h
scm_lang_h = scm-lang.h $(scm_tags_h)
scm_tags_h = scm-tags.h
+sentinel_frame_h = sentinel-frame.h
ser_unix_h = ser-unix.h
serial_h = serial.h
-sh_tdep_h = sh-tdep.h $(osabi_h)
+sh_tdep_h = sh-tdep.h
shnbsd_tdep_h = shnbsd-tdep.h
sim_regno_h = sim-regno.h
solib_svr4_h = solib-svr4.h
@@ -734,7 +723,7 @@ ui_out_h = ui-out.h
valprint_h = valprint.h
value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
-vax_tdep_h = vax-tdep.h $(osabi_h)
+vax_tdep_h = vax-tdep.h
version_h = version.h
wince_stub_h = wince-stub.h
wrapper_h = wrapper.h $(gdb_h)
@@ -747,7 +736,7 @@ xmodem_h = xmodem.h
#
cli_cmds_h = $(srcdir)/cli/cli-cmds.h
-cli_decode_h = $(srcdir)/cli/cli-decode.h $(gdb_regex_h) $(command_h)
+cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h)
cli_dump_h = $(srcdir)/cli/cli-dump.h
cli_script_h = $(srcdir)/cli/cli-script.h
cli_setshow_h = $(srcdir)/cli/cli-setshow.h
@@ -760,6 +749,7 @@ cli_utils_h = $(srcdir)/cli/cli-utils.h
mi_cmds_h = $(srcdir)/mi/mi-cmds.h
mi_console_h = $(srcdir)/mi/mi-console.h
mi_getopt_h = $(srcdir)/mi/mi-getopt.h
+mi_main_h = $(srcdir)/mi/mi-main.h
mi_out_h = $(srcdir)/mi/mi-out.h
mi_parse_h = $(srcdir)/mi/mi-parse.h
@@ -800,9 +790,6 @@ HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
jv-lang.h \
m2-lang.h p-lang.h \
complaints.h valprint.h \
- nindy-share/b.out.h \
- nindy-share/block_io.h nindy-share/coff.h \
- nindy-share/env.h nindy-share/stop.h \
vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \
vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \
vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \
@@ -839,6 +826,7 @@ COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o linespec.o infcmd.o infrun.o \
expprint.o environ.o stack.o thread.o \
+ interps.o \
macrotab.o macrocmd.o macroexp.o macroscope.o \
event-loop.o event-top.o inf-loop.o completer.o \
gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o $(DEPFILES) \
@@ -855,12 +843,14 @@ COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
varobj.o wrapper.o \
jv-lang.o jv-valprint.o jv-typeprint.o \
m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
- scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
+ scm-exp.o scm-lang.o scm-valprint.o \
+ sentinel-frame.o \
+ complaints.o typeprint.o \
c-typeprint.o f-typeprint.o m2-typeprint.o \
c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
nlmread.o serial.o mdebugread.o top.o utils.o \
ui-file.o \
- frame.o doublest.o \
+ frame.o frame-unwind.o doublest.o \
gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
reggroups.o
@@ -868,7 +858,7 @@ OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
TSOBS = inflow.o
-SUBDIRS = @SUBDIRS@
+SUBDIRS = @subdirs@
# For now, shortcut the "configure GDB for fewer languages" stuff.
YYFILES = c-exp.tab.c \
@@ -978,10 +968,8 @@ init.c: $(INIT_FILES)
@rm -f init.c-tmp init.l-tmp
@-echo $(INIT_FILES) | \
tr ' ' '\012' | \
- sed -e '/^Onindy.o/d' \
+ sed \
-e '/^init.o/d' \
- -e '/^nindy.o/d' \
- -e '/ttyflush.o/d' \
-e '/xdr_ld.o/d' \
-e '/xdr_ptrace.o/d' \
-e '/xdr_rdb.o/d' \
@@ -1017,7 +1005,7 @@ init.o: init.c $(defs_h) $(call_cmds_h)
# Removing the old gdb first works better if it is running, at least on SunOS.
gdb$(EXEEXT): gdb.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
rm -f gdb$(EXEEXT)
- $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+ $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
-o gdb$(EXEEXT) gdb.o main.o $(CONFIG_OBS) libgdb.a \
$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
@@ -1034,31 +1022,6 @@ libgdb.a: $(LIBGDB_OBS)
$(AR) q libgdb.a $(LIBGDB_OBS)
$(RANLIB) libgdb.a
-saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
- #setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
- #load ./init.c $(SFILES)
- #unload $(srcdir)/c-exp.y
- #unload $(srcdir)/jv-exp.y
- #unload $(srcdir)/m2-exp.y
- #unload $(srcdir)/p-exp.y
- #unload vx-share/*.h
- #unload nindy-share/[A-Z]*
- #load c-exp.tab.c
- #load jv-exp.tab.c
- #load m2-exp.tab.c
- #load p-exp.tab.c
- #load copying.c version.c
- #load ../opcodes/libopcodes.a
- #load ../libiberty/libiberty.a
- #load ../bfd/libbfd.a
- #load ../readline/libreadline.a
- #load ../mmalloc/libmmalloc.a
- #load ../intl/libintl.a
- #load -ltermcap
- #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
- echo "Load .c corresponding to:" $(DEPFILES)
-
-
# A Mach 3.0 program to force gdb back to command level
stop-gdb: stop-gdb.o
@@ -1362,12 +1325,7 @@ force_update:
# will remove them.
MAKEOVERRIDES=
-## This is ugly, but I don't want GNU make to put these variables in
-## the environment. Older makes will see this as a set of targets
-## with no dependencies and no actions.
-# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
-
-ALLDEPFILES = a68v-nat.c \
+ALLDEPFILES = \
aix-thread.c \
alpha-nat.c alphabsd-nat.c \
alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \
@@ -1379,7 +1337,7 @@ ALLDEPFILES = a68v-nat.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 \
- hp300ux-nat.c hppa-tdep.c hppa-hpux-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 \
@@ -1399,15 +1357,13 @@ ALLDEPFILES = a68v-nat.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c \
mipsnbsd-nat.c mipsnbsd-tdep.c \
nbsd-tdep.c \
- nindy-share/Onindy.c nindy-share/nindy.c \
- nindy-share/ttyflush.c nindy-tdep.c \
ns32k-tdep.c solib-osf.c \
somread.c somsolib.c $(HPREAD_SOURCE) \
ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
ppcnbsd-nat.o ppcnbsd-tdep.o \
procfs.c \
remote-array.c remote-e7000.c \
- remote-es.c remote-hms.c remote-mips.c \
+ remote-hms.c remote-mips.c \
remote-rdp.c remote-sim.c \
remote-st.c remote-utils.c dcache.c \
remote-vx.c \
@@ -1439,6 +1395,11 @@ hpux-thread.o: $(srcdir)/hpux-thread.c
-I$(srcdir)/osf-share/HP800 -I/usr/include/dce \
$(srcdir)/hpux-thread.c
+# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR.
+main.o: main.c
+ $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \
+ -DBINDIR=\"$(bindir)\" $(srcdir)/main.c
+
# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't
# match output format strings.
procfs.o: $(srcdir)/procfs.c
@@ -1501,7 +1462,6 @@ ada-exp.tab.o: ada-exp.tab.c ada-lex.c ada-lang.h \
# The dependencies. In aphabetic order.
#
-a68v-nat.o: a68v-nat.c $(defs_h) $(inferior_h) $(regcache_h)
abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \
@@ -1523,26 +1483,27 @@ aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \
$(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \
$(ppc_tdep_h)
alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(alpha_tdep_h)
+ $(value_h) $(alpha_tdep_h) $(osabi_h)
alpha-nat.o: alpha-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(alpha_tdep_h) $(gregset_h) $(gdb_string_h)
alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(alpha_tdep_h)
+ $(value_h) $(alpha_tdep_h) $(osabi_h)
alpha-tdep.o: alpha-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
$(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
$(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
- $(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h) $(block_h)
+ $(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h) $(block_h) \
+ $(osabi_h)
alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
$(alphabsd_tdep_h)
-alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h)
+alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h) \
+ $(osabi_h)
alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
$(regcache_h) $(value_h) $(solib_svr4_h) $(alpha_tdep_h) \
- $(alphabsd_tdep_h) $(nbsd_tdep_h)
+ $(alphabsd_tdep_h) $(nbsd_tdep_h) $(osabi_h)
annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
$(gdbtypes_h) $(breakpoint_h)
-# OBSOLETE arc-tdep.o: arc-tdep.c
arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) \
$(inferior_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(annotate_h) \
@@ -1552,16 +1513,17 @@ arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(gdb_string_h) $(regcache_h) $(arm_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) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h)
+ $(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
+ $(osabi_h)
arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
$(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
$(doublest_h) $(value_h) $(arch_utils_h) $(solib_svr4_h) \
$(arm_tdep_h) $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) \
- $(elf_arm_h) $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h)
+ $(elf_arm_h) $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) $(osabi_h)
armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
$(regcache_h) $(gdbcore_h)
armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(arm_tdep_h) $(nbsd_tdep_h) \
- $(solib_svr4_h)
+ $(solib_svr4_h) $(osabi_h)
avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
@@ -1573,7 +1535,7 @@ block.o: block.c $(defs_h) $(block_h) $(gdb_obstack_h) $(cp_support_h)
blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(frame_h) $(gdbcore_h) $(value_h) $(target_h) \
$(inferior_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
- $(dummy_frame_h) $(block_h)
+ $(dummy_frame_h) $(block_h) $(command_h) $(gdbcmd_h)
breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
$(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
$(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
@@ -1598,11 +1560,8 @@ c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_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)
-# OBSOLETE ch-exp.o: ch-exp.c
-# OBSOLETE ch-lang.o: ch-lang.c
-# OBSOLETE ch-typeprint.o: ch-typeprint.c
-# OBSOLETE ch-valprint.o: ch-valprint.c
-charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) gdb_assert.h
+charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \
+ $(gdb_string_h)
cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \
$(gdb_assert_h)
coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
@@ -1644,13 +1603,11 @@ cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(inferior_h) \
$(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(value_h) \
$(opcode_cris_h) $(arch_utils_h) $(regcache_h) $(symfile_h) \
$(solib_h) $(solib_svr4_h) $(gdb_string_h)
-# OBSOLETE cxux-nat.o: cxux-nat.c
d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
- $(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) \
- $(arch_utils_h) $(regcache_h) $(floatformat_h) $(gdb_sim_d10v_h) \
- $(sim_regno_h)
-# OBSOLETE d30v-tdep.o: d30v-tdep.c
+ $(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) $(arch_utils_h) \
+ $(regcache_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \
+ $(gdb_assert_h)
dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
@@ -1673,9 +1630,8 @@ doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \
$(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h)
dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h)
-# OBSOLETE dstread.o: dstread.c
dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
- $(frame_h) $(inferior_h) $(gdb_assert_h)
+ $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h)
dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h)
dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(gdbcore_h) $(symtab_h) $(symfile_h) \
@@ -1699,7 +1655,8 @@ eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_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) \
- $(terminal_h) $(event_loop_h) $(event_top_h) $(gdbcmd_h) $(readline_h)
+ $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_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) \
@@ -1725,11 +1682,13 @@ findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \
fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \
$(terminal_h) $(gdbthread_h) $(command_h)
-# OBSOLETE fr30-tdep.o: fr30-tdep.c
frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
$(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(builtin_regs_h) \
$(gdb_obstack_h) $(dummy_frame_h) $(gdbcore_h) $(annotate_h) \
- $(language_h)
+ $(language_h) $(frame_unwind_h) $(command_h) $(gdbcmd_h) \
+ $(sentinel_frame_h)
+frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \
+ $(gdb_assert_h) $(dummy_frame_h) $(legacy_frame_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h)
gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
@@ -1740,7 +1699,8 @@ gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
$(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
- $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h)
+ $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h) \
+ $(osabi_h)
gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
$(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
@@ -1763,15 +1723,14 @@ h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
$(regcache_h)
h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(value_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
-hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
- $(regcache_h)
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
$(value_h) $(regcache_h) $(completer_h) $(symtab_h) $(a_out_encap_h) \
$(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \
$(symfile_h) $(objfiles_h) $(language_h) $(osabi_h)
-hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h)
+hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
+ $(osabi_h)
hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(gdb_wait_h) $(regcache_h)
@@ -1782,42 +1741,42 @@ hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
$(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
$(gdb_string_h)
hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
- $(inferior_h) $(regcache_h) $(gdbcore_h)
+ $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h)
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gregset_h) \
$(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h)
i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
$(value_h) $(regcache_h) $(inferior_h) $(symtab_h) $(symfile_h) \
- $(objfiles_h) $(solib_svr4_h) $(i386_tdep_h) $(i386_linux_tdep_h)
+ $(objfiles_h) $(solib_svr4_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
+ $(osabi_h)
i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
-i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h)
+i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h) \
+ $(osabi_h)
i386-stub.o: i386-stub.c
i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(gdbcore_h) $(objfiles_h) $(target_h) $(floatformat_h) $(symfile_h) \
$(symtab_h) $(gdbcmd_h) $(command_h) $(arch_utils_h) $(regcache_h) \
$(doublest_h) $(value_h) $(gdb_assert_h) $(i386_tdep_h) \
- $(i387_tdep_h)
-# OBSOLETE i386aix-nat.o: i386aix-nat.c
+ $(i387_tdep_h) $(osabi_h)
i386b-nat.o: i386b-nat.c $(defs_h)
i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h)
+ $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) \
+ $(osabi_h)
i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(gdbcore_h) $(regcache_h) $(gdb_string_h) $(i386_tdep_h)
i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_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)
-i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h)
+i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h) $(osabi_h)
i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(target_h) $(i386_tdep_h)
-# OBSOLETE i386m3-nat.o: i386m3-nat.c
-# OBSOLETE i386mach-nat.o: i386mach-nat.c
+ $(regcache_h) $(target_h) $(i386_tdep_h) $(osabi_h)
i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
$(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
- $(nbsd_tdep_h) $(solib_svr4_h)
+ $(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
i386obsd-nat.o: i386obsd-nat.c $(defs_h)
i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(regcache_h) $(i386_tdep_h) $(i387_tdep_h)
+ $(regcache_h) $(i386_tdep_h) $(i387_tdep_h) $(osabi_h)
i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
$(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) $(i386_tdep_h)
i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
@@ -1825,13 +1784,12 @@ i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
i387-tdep.o: i387-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
$(value_h) $(gdbcore_h) $(floatformat_h) $(regcache_h) \
$(gdb_assert_h) $(gdb_string_h) $(doublest_h) $(i386_tdep_h)
-# OBSOLETE i960-tdep.o: i960-tdep.c
ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdb_stat_h)
ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h)
-ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(inferior_h) $(target_h) \
- $(gdbcore_h) $(regcache_h) $(gregset_h) $(gdb_string_h)
+ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
+ $(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h)
ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(arch_utils_h)
ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(doublest_h) \
@@ -1844,7 +1802,8 @@ infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \
$(parser_defs_h) $(regcache_h) $(block_h)
inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \
- $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h)
+ $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \
+ $(inflow_h)
infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \
$(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h)
@@ -1853,9 +1812,12 @@ infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
$(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \
$(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h)
inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h)
+ $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h)
infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbcore_h)
+interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
+ $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \
+ $(gdb_events_h) $(gdb_assert_h) $(top_h)
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) \
@@ -1920,8 +1882,6 @@ m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(regcache_h)
m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
-# OBSOLETE m88k-nat.o: m88k-nat.c
-# OBSOLETE m88k-tdep.o: m88k-tdep.c
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) \
@@ -1933,7 +1893,7 @@ macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \
$(bcache_h) $(complaints_h)
main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \
$(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \
- $(event_loop_h) $(ui_out_h) $(main_h)
+ $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h)
maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \
$(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \
$(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h)
@@ -1958,7 +1918,8 @@ minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h)
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) $(gdb_string_h)
+ $(solib_svr4_h) $(osabi_h) $(gdb_string_h) $(mips_tdep_h) \
+ $(gdb_assert_h)
mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(value_h) $(gdbcmd_h) $(language_h) $(gdbcore_h) \
@@ -1983,22 +1944,19 @@ mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
$(symfile_h) $(regcache_h) $(arch_utils_h)
-mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
- $(serial_h) $(srec_h) $(xmodem_h) $(symtab_h) $(symfile_h) \
- $(inferior_h) $(gdb_string_h)
monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
$(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_regex_h) $(srec_h) $(regcache_h)
nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
-nindy-tdep.o: nindy-tdep.c $(defs_h) $(symtab_h) $(frame_h) $(gdbcore_h)
nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h)
ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \
$(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) \
- $(ns32k_tdep_h) $(gdb_string_h)
+ $(ns32k_tdep_h) $(gdb_string_h) $(osabi_h)
ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h)
-ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(ns32k_tdep_h) $(gdb_string_h)
+ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(ns32k_tdep_h) $(gdb_string_h) \
+ $(osabi_h)
objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \
$(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \
@@ -2013,8 +1971,8 @@ ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
op50-rom.o: op50-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h)
-# OBSOLETE os9kread.o: os9kread.c
-osabi.o: osabi.c $(defs_h) $(gdb_string_h) $(osabi_h) $(elf_bfd_h)
+osabi.o: osabi.c $(defs_h) $(gdb_string_h) $(osabi_h) $(elf_bfd_h) \
+ $(gdbcmd_h) $(command_h) $(arch_utils_h)
p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \
$(valprint_h)
@@ -2037,11 +1995,13 @@ ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
$(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \
$(regcache_h)
-ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) $(gregset_h) $(ppc_tdep_h) $(gdb_string_h)
+ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \
+ $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \
+ $(ppc_tdep_h)
ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
- $(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
+ $(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h) \
+ $(osabi_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)
ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
@@ -2050,22 +2010,22 @@ ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
$(ppcnbsd_tdep_h)
ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_h) \
- $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+ $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) $(osabi_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) \
$(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \
$(gdb_assert_h) $(dictionary_h) $(block_h)
-proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(proc_utils_h)
+proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \
+ $(proc_utils_h)
proc-events.o: proc-events.c $(defs_h)
proc-flags.o: proc-flags.c $(defs_h)
proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gregset_h)
proc-why.o: proc-why.c $(defs_h) $(proc_utils_h)
procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_dirent_h) $(X_OK) \
- $(gdb_stat_h) $(proc_utils_h) $(gregset_h)
-ptx4-nat.o: ptx4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
+ $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) $(gdb_assert_h) \
+ $(inflow_h) $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) \
$(gregset_h)
regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
$(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \
@@ -2075,13 +2035,9 @@ reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \
remote-array.o: remote-array.c $(defs_h) $(gdbcore_h) $(target_h) \
$(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) \
$(remote_utils_h) $(inferior_h) $(version_h) $(regcache_h)
-# OBSOLETE remote-bug.o: remote-bug.c
remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \
$(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \
$(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h)
-remote-es.o: remote-es.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
- $(target_h) $(command_h) $(symfile_h) $(remote_utils_h) $(gdbcore_h) \
- $(serial_h) $(regcache_h) $(value_h)
remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
@@ -2089,9 +2045,6 @@ remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_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)
-# OBSOLETE remote-nindy.o: remote-nindy.c
-# OBSOLETE remote-nrom.o: remote-nrom.c
-# OBSOLETE remote-os9k.o: remote-os9k.c
remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
$(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \
@@ -2123,7 +2076,6 @@ remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \
$(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \
$(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \
$(vx_share_dbgRpcLib_h)
-# OBSOLETE remote-vx960.o: remote-vx960.c
remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \
$(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \
$(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \
@@ -2150,7 +2102,7 @@ rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
$(arch_utils_h) $(regcache_h) $(doublest_h) $(value_h) \
$(parser_defs_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
$(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
- $(ppc_tdep_h)
+ $(ppc_tdep_h) $(osabi_h)
s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h)
s390-tdep.o: s390-tdep.c $(arch_utils_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
@@ -2165,6 +2117,8 @@ scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h) $(parser_defs_h) $(language_h) $(value_h) \
$(scm_lang_h) $(valprint_h) $(gdbcore_h)
+sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \
+ $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h)
ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h)
ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h)
ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \
@@ -2178,15 +2132,15 @@ 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) $(sh_tdep_h) $(elf_bfd_h) \
- $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h)
+ $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h) $(osabi_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)
shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(shnbsd_tdep_h)
shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \
- $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) $(shnbsd_tdep_h)
-sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
- $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) $(symfile_h) \
+ $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) $(shnbsd_tdep_h) $(osabi_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)
solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
$(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \
@@ -2221,7 +2175,7 @@ source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
$(filenames_h) $(completer_h) $(ui_out_h) $(readline_h)
sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(gregset_h)
sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(regcache_h)
+ $(regcache_h) $(gdb_wait_h)
sparc-stub.o: sparc-stub.c
sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(inferior_h) $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) \
@@ -2260,9 +2214,10 @@ symfile.o: symfile.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(gdbcmd_h) $(breakpoint_h) $(language_h) $(complaints_h) \
$(demangle_h) $(inferior_h) $(gdb_stabs_h) $(gdb_obstack_h) \
$(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h) $(source_h) \
- $(readline_h) $(block_h)
+ $(gdb_assert_h) $(readline_h) $(block_h) $(filenames_h)
symm-nat.o: symm-nat.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
- $(target_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) $(gdbcore_h)
+ $(target_h) $(regcache_h) $(gdb_wait_h) $(gdb_stat_h) $(gdbcore_h) \
+ $(gdbcore_h)
symm-tdep.o: symm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
$(gdb_stat_h) $(gdbcore_h)
symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
@@ -2333,7 +2288,7 @@ varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \
$(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \
$(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \
- $(gdb_string_h) $(vax_tdep_h)
+ $(gdb_string_h) $(vax_tdep_h) $(osabi_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) \
@@ -2348,8 +2303,9 @@ wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h)
x86-64-linux-nat.o: x86-64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(regcache_h) $(gdb_assert_h) $(x86_64_tdep_h)
-x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h)
+x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
+ $(gdb_string_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h) \
+ $(osabi_h)
x86-64-tdep.o: x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) $(objfiles_h) \
$(x86_64_tdep_h) $(dwarf2cfi_h) $(gdb_assert_h) $(block_h)
@@ -2387,6 +2343,9 @@ cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
$(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
$(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
+cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \
+ $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c
cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \
$(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \
$(cli_script_h)
@@ -2431,7 +2390,7 @@ install-gdbtk:
$(DESTDIR)$(GDBTK_LIBRARY)/help/images \
$(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
cd $(srcdir)/gdbtk/library ; \
- for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif; \
+ for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \
do \
$(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
done ;
@@ -2454,7 +2413,7 @@ clean-gdbtk:
insight$(EXEEXT): gdbtk-main.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) \
$(CDEPS) $(TDEPLIBS)
rm -f insight$(EXEEXT)
- $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+ $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
-o insight$(EXEEXT) gdbtk-main.o main.o $(CONFIG_OBS) libgdb.a \
$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
@@ -2552,9 +2511,9 @@ mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
$(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h) $(disasm_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
-mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
- $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(inferior.h) \
- $(mi_getopt_h) $(environ_h) $(gdbcmd_h) $(top_h)
+mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
+ $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \
+ $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
$(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(dictionary_h) \
@@ -2572,9 +2531,13 @@ mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \
mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \
$(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c
+mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \
+ $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \
+ $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c
mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \
$(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \
- $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \
+ $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \
$(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \
$(gdb_h) $(frame_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
@@ -2585,23 +2548,6 @@ mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
#
-# nindy-share sub-directory
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
-
-Onindy.o: nindy-share/Onindy.c $(gdb_wait_h) nindy-share/block_io.h \
- nindy-share/env.h
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/Onindy.c
-
-nindy.o: nindy-share/nindy.c $(gdb_wait_h) nindy-share/block_io.h \
- nindy-share/env.h
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/nindy.c
-
-ttyflush.o: nindy-share/ttyflush.c $(srcdir)/nindy-share/ttyflush.c
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/ttyflush.c
-
-#
# rdi-share sub-directory
#
# Need to explicitly specify the compile rule as make will do nothing
diff --git a/gdb/NEWS b/gdb/NEWS
index f9feaf095ba..eaefeff70e7 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,11 +3,24 @@
*** Changes since GDB 5.3:
+* d10v `regs' command deprecated
+
+The `info registers' command has been updated so that it displays the
+registers using a format identical to the old `regs' command.
+
+* Profiling support
+
+A new command, "maint set profile on/off", has been added. This command can
+be used to enable or disable profiling while running GDB, to profile a
+session or a set of commands. In addition there is a new configure switch,
+"--enable-profiling", which will cause GDB to be compiled with profiling
+data, for more informative profiling results.
+
* Default MI syntax changed to "mi2".
The default MI (machine interface) syntax, enabled by the command line
option "-i=mi", has been changed to "mi2". The previous MI syntax,
-"mi1", can be enabled by sepcifying the option "-i=mi1".
+"mi1", can be enabled by specifying the option "-i=mi1".
Support for the original "mi0" syntax (included in GDB 5.0) has been
removed.
@@ -17,9 +30,34 @@ Fix for gdb/672: update changelist is now output in mi list format.
Fix for gdb/702: a -var-assign that updates the value now shows up
in a subsequent -var-update.
+* OBSOLETE configurations and files
+
+Configurations that have been declared obsolete in this release have
+been commented out. Unless there is activity to revive these
+configurations, the next release of GDB will have their sources
+permanently REMOVED.
+
+Mitsubishi M32R/D w/simulator m32r-*-elf*
+Z8000 simulator z8k-zilog-none or z8ksim
+Matsushita MN10200 w/simulator mn10200-*-*
+H8/500 simulator h8500-hitachi-hms or h8500hms
+
* REMOVED configurations and files
V850EA ISA
+Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
+IBM AIX PS/2 i[3456]86-*-aix
+i386 running Mach 3.0 i[3456]86-*-mach3*
+i386 running Mach i[3456]86-*-mach*
+i386 running OSF/1 i[3456]86-*osf1mk*
+HP/Apollo 68k Family m68*-apollo*-sysv*,
+ m68*-apollo*-bsd*,
+ m68*-hp-bsd*, m68*-hp-hpux*
+Argonaut Risc Chip (ARC) arc-*-*
+Mitsubishi D30V d30v-*-*
+Fujitsu FR30 fr30-*-elf*
+OS/9000 i[34]86-*-os9k
+I960 with MON960 i960-*-coff
* MIPS $fp behavior changed
diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS
index b2f45d8bff2..a26f3e0b2fc 100644
--- a/gdb/PROBLEMS
+++ b/gdb/PROBLEMS
@@ -65,3 +65,12 @@ building GDB vis:
$ make CFLAGS='-O2 -D__digital__'
+
+i[3456]86-*-linux*
+------------------
+
+gdb/1030: GNU binutils 2.12.1 and earlier versions do not work properly
+with gdb. If you use GNU binutils, upgrade to version 2.13 or later.
+You can check the version of binutils with the command:
+
+ $ ld --version
diff --git a/gdb/README b/gdb/README
index e8759c1d55e..a8b4b82f3ef 100644
--- a/gdb/README
+++ b/gdb/README
@@ -69,7 +69,20 @@ different; see the file gdb-5.3/gdb/config/djgpp/README for details.)
`configure' can't determine your system type, specify one as its
argument, e.g., `./configure sun4' or `./configure decstation'.
- If you get compiler errors during this stage, see the `Reporting
+ Make sure that your 'configure' line ends in 'gdb-5.3/configure':
+
+ /berman/migchain/source/gdb-5.3/configure # RIGHT
+ /berman/migchain/source/gdb-5.3/gdb/configure # WRONG
+
+ The gdb package contains several subdirectories, such as 'gdb',
+'bfd', and 'readline'. If your 'configure' line ends in
+'gdb-5.3/gdb/configure', then you are configuring only the gdb
+subdirectory, not the whole gdb package. This leads to build errors
+such as:
+
+ make: *** No rule to make target `../bfd/bfd.h', needed by `gdb.o'. Stop.
+
+ If you get other compiler errors during this stage, see the `Reporting
Bugs' section below; there are a few known problems.
GDB requires an ISO C (ANSI C) compiler. If you do not have an ISO
@@ -449,24 +462,16 @@ Linux.
There are a number of remote interfaces for talking to existing ROM
monitors and other hardware:
- remote-adapt.c AMD 29000 "Adapt"
remote-array.c Array Tech RAID controller
remote-e7000.c Hitachi E7000 ICE
- remote-eb.c AMD 29000 "EBMON"
- remote-es.c Ericsson 1800 monitor
remote-est.c EST emulator
remote-hms.c Hitachi Micro Systems H8/300 monitor
remote-mips.c MIPS remote debugging protocol
- remote-mm.c AMD 29000 "minimon"
- remote-nindy.c Intel 960 "Nindy"
- remote-nrom.c NetROM ROM emulator
- remote-os9k.c PC running OS/9000
remote-rdi.c ARM with Angel monitor
remote-rdp.c ARM with Demon monitor
remote-sds.c PowerPC SDS monitor
remote-sim.c Generalized simulator protocol
remote-st.c Tandem ST-2000 monitor
- remote-udi.c AMD 29000 using the AMD "Universal Debug Interface"
remote-vx.c VxWorks realtime kernel
Remote-vx.c and the vx-share subdirectory contain a remote
@@ -474,14 +479,6 @@ interface for the VxWorks realtime kernel, which communicates over TCP
using the Sun RPC library. This would be a useful starting point for
other remote- via-ethernet back ends.
- Remote-udi.c and the 29k-share subdirectory contain a remote
-interface for AMD 29000 programs, which uses the AMD "Universal Debug
-Interface". This allows GDB to talk to software simulators,
-emulators, and/or bare hardware boards, via network or serial
-interfaces. Note that GDB only provides an interface that speaks UDI,
-not a complete solution. You will need something on the other end
-that also speaks UDI.
-
Reporting Bugs in GDB
=====================
@@ -512,7 +509,7 @@ Graphical interface to GDB -- X Windows, MS Windows
Several graphical interfaces to GDB are available. You should
check:
- http://www.gnu.org/software/gdb/gui/
+ http://www.gnu.org/software/gdb/links/
for an up-to-date list.
diff --git a/gdb/TODO b/gdb/TODO
index f743ae7999f..2a9c665e223 100644
--- a/gdb/TODO
+++ b/gdb/TODO
@@ -114,12 +114,6 @@ The following cleanups have been identified as part of GDB 5.2.
--
-Remove old code that does not use ui_out functions and all the related
-"ifdef"s. This also allows the elimination of -DUI_OUT from
-Makefile.in and configure.in.
-
---
-
Compiler warnings.
Eliminate warnings for all targets on at least one host for one of the
@@ -181,10 +175,6 @@ Deprecate, if not delete, the following:
The size of the cache can be computed
on the fly.
- IS_TRAPPED_INTERNALVAR
- The pseudo registers should eventually make
- this redundant.
-
--
Obsolete the targets:
diff --git a/gdb/a68v-nat.c b/gdb/a68v-nat.c
deleted file mode 100644
index 0bfe8e2e608..00000000000
--- a/gdb/a68v-nat.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Host-dependent code for Apollo-68ks for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#ifndef _ISP__M68K
-#define _ISP__M68K 1
-#endif
-
-#include <ptrace.h>
-
-extern int errno;
-
-void
-fetch_inferior_registers (int ignored)
-{
- struct ptrace_$data_regs_m68k inferior_registers;
- struct ptrace_$floating_regs_m68k inferior_fp_registers;
- struct ptrace_$control_regs_m68k inferior_control_registers;
-
- ptrace_$init_control (&inferior_control_registers);
- inferior_fp_registers.size = sizeof (inferior_fp_registers);
-
- deprecated_registers_fetched ();
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set,
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k);
-
- bcopy (&inferior_registers, &deprecated_registers[0], 16 * 4);
- bcopy (&inferior_fp_registers,
- &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
- sizeof inferior_fp_registers.regs);
- *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
- = inferior_control_registers.sr;
- *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
- = inferior_control_registers.pc;
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- struct ptrace_$data_regs_m68k inferior_registers;
- struct ptrace_$floating_regs_m68k inferior_fp_registers;
- struct ptrace_$control_regs_m68k inferior_control_registers;
-
- ptrace_$init_control (&inferior_control_registers);
- inferior_fp_registers.size = sizeof (inferior_fp_registers);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k);
-
- bcopy (&deprecated_registers[0], &inferior_registers,
- sizeof (inferior_registers));
-
- bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
- inferior_fp_registers.regs, sizeof inferior_fp_registers.regs);
-
- inferior_control_registers.sr
- = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_control_registers.pc
- = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set_m68k);
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k);
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k);
-}
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index 88c15e1263a..a9bf0a48048 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -1,5 +1,7 @@
-/* Define if compiling on Solaris 7. */
-#undef _MSE_INT_H
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
/* Define if your struct reg has r_fs. */
#undef HAVE_STRUCT_REG_R_FS
@@ -49,9 +51,6 @@
/* Define if <sys/procfs.h> has pr_siginfo64_t */
#undef HAVE_PR_SIGINFO64_T
-/* Define if the pread64 function is available. */
-#undef HAVE_PREAD64
-
/* Define if <link.h> exists and defines struct link_map which has
members with an ``l_'' prefix. (For Solaris, SVR4, and
SVR4-like systems.) */
@@ -134,10 +133,6 @@
size_t, and assorted other type changes. */
#undef PROC_SERVICE_IS_OLD
-/* If you want to specify a default CPU variant, define this to be its
- name, as a C string. */
-#undef TARGET_CPU_DEFAULT
-
/* Define if the simulator is being linked in. */
#undef WITH_SIM
@@ -159,15 +154,6 @@
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
#undef HAVE_PT_GETXMMREGS
-/* Define if gnu-regex.c included with GDB should be used. */
-#undef USE_INCLUDED_REGEX
-
-/* BFD's default architecture. */
-#undef DEFAULT_BFD_ARCH
-
-/* BFD's default target vector. */
-#undef DEFAULT_BFD_VEC
-
/* Multi-arch enabled. */
#undef GDB_MULTI_ARCH
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index ef6876d17cd..e8951df7704 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -918,3 +918,27 @@ size_t iconv();
fi
AC_SUBST(LIBICONV)
])
+
+# AC_GNU_SOURCE
+# -------------
+# FIXME: Remove thise once we start using Autoconf 2.5x (x>=4).
+AC_DEFUN([AC_GNU_SOURCE],
+[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
+AC_BEFORE([$0], [AC_TRY_RUN])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
+dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
+dnl Version 1.3 (2001/03/02)
+dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo [$]$2`
+ ac_define_dir=`eval echo [$]ac_define_dir`
+ ifelse($3, ,
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
+])
+
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index 4ac265139e2..d925c3345df 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -753,74 +753,6 @@ ifelse(yes,no,[
AC_DEFUN([CY_GNU_GETTEXT],)
])
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV],
-[
- dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
- dnl those with the standalone portable GNU libiconv installed).
-
- AC_ARG_WITH([libiconv-prefix],
-[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
- for dir in `echo "$withval" | tr : ' '`; do
- if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
- if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
- done
- ])
-
- AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
- am_cv_func_iconv="no, consider installing GNU libiconv"
- am_cv_lib_iconv=no
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_func_iconv=yes)
- if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
- LIBS="$LIBS -liconv"
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_lib_iconv=yes
- am_cv_func_iconv=yes)
- LIBS="$am_save_LIBS"
- fi
- ])
- if test "$am_cv_func_iconv" = yes; then
- AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
- AC_MSG_CHECKING([for iconv declaration])
- AC_CACHE_VAL(am_cv_proto_iconv, [
- AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
- am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
- am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- AC_MSG_RESULT([$]{ac_t:-
- }[$]am_cv_proto_iconv)
- AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
- [Define as const if the declaration of iconv() needs const.])
- fi
- LIBICONV=
- if test "$am_cv_lib_iconv" = yes; then
- LIBICONV="-liconv"
- fi
- AC_SUBST(LIBICONV)
-])
-
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
@@ -927,6 +859,98 @@ case "x$am_cv_prog_cc_stdc" in
esac
])
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ AC_ARG_WITH([libiconv-prefix],
+[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
+ for dir in `echo "$withval" | tr : ' '`; do
+ if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+ if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+ done
+ ])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+ LIBICONV=
+ if test "$am_cv_lib_iconv" = yes; then
+ LIBICONV="-liconv"
+ fi
+ AC_SUBST(LIBICONV)
+])
+
+# AC_GNU_SOURCE
+# -------------
+# FIXME: Remove thise once we start using Autoconf 2.5x (x>=4).
+AC_DEFUN([AC_GNU_SOURCE],
+[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
+AC_BEFORE([$0], [AC_TRY_RUN])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
+dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
+dnl Version 1.3 (2001/03/02)
+dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo [$]$2`
+ ac_define_dir=`eval echo [$]ac_define_dir`
+ ifelse($3, ,
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
+])
+
+
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 1af40286e02..8a76c39681b 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -38,9 +38,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "gdbcore.h"
#include "ada-lang.h"
#include "dictionary.h"
-#ifdef UI_OUT
#include "ui-out.h"
-#endif
struct cleanup *unresolved_names;
@@ -4999,7 +4997,6 @@ find_printable_frame (struct frame_info *fi, int level)
void
ada_report_exception_break (struct breakpoint *b)
{
-#ifdef UI_OUT
/* FIXME: break_on_exception should be defined in breakpoint.h */
/* if (b->break_on_exception == 1)
{
@@ -5037,7 +5034,6 @@ ada_report_exception_break (struct breakpoint *b)
else if (b->break_on_exception == 3)
fputs_filtered ("on assert failure", gdb_stdout);
*/
-#endif
}
int
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 0a0c99add1e..8633f2c7893 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -66,7 +66,7 @@ static void val_print_packed_array_elements (struct type *, char *valaddr,
static void adjust_type_signedness (struct type *);
-static int ada_val_print_stub (PTR args0);
+static int ada_val_print_stub (void *args0);
static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
struct ui_file *, int, int, int,
@@ -512,7 +512,7 @@ ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
/* Helper for ada_val_print; used as argument to catch_errors to
unmarshal the arguments to ada_val_print_1, which does the work. */
static int
-ada_val_print_stub (PTR args0)
+ada_val_print_stub (void * args0)
{
struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
return ada_val_print_1 (argsp->type, argsp->valaddr0,
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 26f4db433f1..c5d7481fbf9 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for GNU/Linux on Alpha.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,6 +22,7 @@
#include "frame.h"
#include "gdbcore.h"
#include "value.h"
+#include "osabi.h"
#include "alpha-tdep.h"
@@ -95,7 +96,7 @@ alpha_linux_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
static CORE_ADDR
alpha_linux_sigcontext_addr (struct frame_info *frame)
{
- return (frame->frame - 0x298); /* sizeof(struct sigcontext) */
+ return (get_frame_base (frame) - 0x298); /* sizeof(struct sigcontext) */
}
static void
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index f315508ddb0..548869b2fa8 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -1,5 +1,5 @@
/* Low level Alpha interface, for GDB when running native.
- Copyright 1993, 1995, 1996, 1998, 1999, 2000, 2001
+ Copyright 1993, 1995, 1996, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -149,25 +149,36 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
memset (&deprecated_registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
memset (&deprecated_register_valid[ALPHA_V0_REGNUM], 1, 32);
deprecated_register_valid[PC_REGNUM] = 1;
+
+ if (core_reg_size >= 33 * 8)
+ {
+ memcpy (&deprecated_registers[REGISTER_BYTE (ALPHA_UNIQUE_REGNUM)],
+ core_reg_sect + 32 * 8, 8);
+ deprecated_register_valid[ALPHA_UNIQUE_REGNUM] = 1;
+ }
}
}
/* Map gdb internal register number to a ptrace ``address''.
- These ``addresses'' are defined in <sys/ptrace.h> */
+ These ``addresses'' are defined in <sys/ptrace.h>, with
+ the exception of ALPHA_UNIQUE_PTRACE_ADDR. */
-#define REGISTER_PTRACE_ADDR(regno) \
- (regno < FP0_REGNUM ? GPR_BASE + (regno) \
- : regno == PC_REGNUM ? PC \
- : regno >= FP0_REGNUM ? FPR_BASE + ((regno) - FP0_REGNUM) \
- : 0)
-
-/* Return the ptrace ``address'' of register REGNO. */
+#ifndef ALPHA_UNIQUE_PTRACE_ADDR
+#define ALPHA_UNIQUE_PTRACE_ADDR 0
+#endif
CORE_ADDR
register_addr (int regno, CORE_ADDR blockend)
{
- return REGISTER_PTRACE_ADDR (regno);
+ if (regno == PC_REGNUM)
+ return PC;
+ if (regno == ALPHA_UNIQUE_REGNUM)
+ return ALPHA_UNIQUE_PTRACE_ADDR;
+ if (regno < FP0_REGNUM)
+ return GPR_BASE + regno;
+ else
+ return FPR_BASE + regno - FP0_REGNUM;
}
int
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index c170a37c6ea..fa5bc5e41d0 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for OSF/1 on Alpha.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,6 +22,7 @@
#include "frame.h"
#include "gdbcore.h"
#include "value.h"
+#include "osabi.h"
#include "alpha-tdep.h"
@@ -41,7 +42,7 @@ alpha_osf1_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
static int
alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (func_name != NULL && STREQ ("__sigtramp", func_name));
+ return (func_name != NULL && strcmp ("__sigtramp", func_name) == 0);
}
static CORE_ADDR
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index ed4be145d40..416c1d3399a 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for the ALPHA architecture, for GDB, the GNU Debugger.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -35,6 +35,7 @@
#include "regcache.h"
#include "doublest.h"
#include "arch-utils.h"
+#include "osabi.h"
#include "elf-bfd.h"
@@ -288,7 +289,7 @@ alpha_register_name (int regno)
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr",
- "pc", "vfp",
+ "pc", "vfp", "unique",
};
if (regno < 0)
@@ -390,18 +391,18 @@ alpha_find_saved_regs (struct frame_info *frame)
for (ireg = 0; ireg < 32; ireg++)
{
reg_position = sigcontext_addr + SIGFRAME_REGSAVE_OFF + ireg * 8;
- frame->saved_regs[ireg] = reg_position;
+ get_frame_saved_regs (frame)[ireg] = reg_position;
}
for (ireg = 0; ireg < 32; ireg++)
{
reg_position = sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + ireg * 8;
- frame->saved_regs[FP0_REGNUM + ireg] = reg_position;
+ get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
}
- frame->saved_regs[PC_REGNUM] = sigcontext_addr + SIGFRAME_PC_OFF;
+ get_frame_saved_regs (frame)[PC_REGNUM] = sigcontext_addr + SIGFRAME_PC_OFF;
return;
}
- proc_desc = frame->extra_info->proc_desc;
+ proc_desc = get_frame_extra_info (frame)->proc_desc;
if (proc_desc == NULL)
/* I'm not sure how/whether this can happen. Normally when we can't
find a proc_desc, we "synthesize" one using heuristic_proc_desc
@@ -411,7 +412,7 @@ alpha_find_saved_regs (struct frame_info *frame)
/* Fill in the offsets for the registers which gen_mask says
were saved. */
- reg_position = frame->frame + PROC_REG_OFFSET (proc_desc);
+ reg_position = get_frame_base (frame) + PROC_REG_OFFSET (proc_desc);
mask = PROC_REG_MASK (proc_desc);
returnreg = PROC_PC_REG (proc_desc);
@@ -420,7 +421,7 @@ alpha_find_saved_regs (struct frame_info *frame)
register number. */
if (mask & (1 << returnreg))
{
- frame->saved_regs[returnreg] = reg_position;
+ get_frame_saved_regs (frame)[returnreg] = reg_position;
reg_position += 8;
mask &= ~(1 << returnreg); /* Clear bit for RA so we
don't save again later. */
@@ -429,57 +430,57 @@ alpha_find_saved_regs (struct frame_info *frame)
for (ireg = 0; ireg <= 31; ++ireg)
if (mask & (1 << ireg))
{
- frame->saved_regs[ireg] = reg_position;
+ get_frame_saved_regs (frame)[ireg] = reg_position;
reg_position += 8;
}
/* Fill in the offsets for the registers which float_mask says
were saved. */
- reg_position = frame->frame + PROC_FREG_OFFSET (proc_desc);
+ reg_position = get_frame_base (frame) + PROC_FREG_OFFSET (proc_desc);
mask = PROC_FREG_MASK (proc_desc);
for (ireg = 0; ireg <= 31; ++ireg)
if (mask & (1 << ireg))
{
- frame->saved_regs[FP0_REGNUM + ireg] = reg_position;
+ get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
reg_position += 8;
}
- frame->saved_regs[PC_REGNUM] = frame->saved_regs[returnreg];
+ get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_saved_regs (frame)[returnreg];
}
static void
alpha_frame_init_saved_regs (struct frame_info *fi)
{
- if (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
alpha_find_saved_regs (fi);
- fi->saved_regs[SP_REGNUM] = fi->frame;
+ get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi);
}
static CORE_ADDR
alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev)
{
return (fromleaf ? SAVED_PC_AFTER_CALL (get_next_frame (prev))
- : get_next_frame (prev) ? FRAME_SAVED_PC (prev->next)
+ : get_next_frame (prev) ? FRAME_SAVED_PC (get_next_frame (prev))
: read_pc ());
}
static CORE_ADDR
read_next_frame_reg (struct frame_info *fi, int regno)
{
- for (; fi; fi = fi->next)
+ for (; fi; fi = get_next_frame (fi))
{
/* We have to get the saved sp from the sigcontext
if it is a signal handler frame. */
if (regno == SP_REGNUM && !(get_frame_type (fi) == SIGTRAMP_FRAME))
- return fi->frame;
+ return get_frame_base (fi);
else
{
- if (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
alpha_find_saved_regs (fi);
- if (fi->saved_regs[regno])
- return read_memory_integer (fi->saved_regs[regno], 8);
+ if (get_frame_saved_regs (fi)[regno])
+ return read_memory_integer (get_frame_saved_regs (fi)[regno], 8);
}
}
return read_register (regno);
@@ -488,14 +489,15 @@ read_next_frame_reg (struct frame_info *fi, int regno)
static CORE_ADDR
alpha_frame_saved_pc (struct frame_info *frame)
{
- alpha_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
+ alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
/* We have to get the saved pc from the sigcontext
if it is a signal handler frame. */
- int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM
- : frame->extra_info->pc_reg;
+ int pcreg = ((get_frame_type (frame) == SIGTRAMP_FRAME)
+ ? PC_REGNUM
+ : get_frame_extra_info (frame)->pc_reg);
if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
- return read_memory_integer (frame->frame - 8, 8);
+ return read_memory_integer (get_frame_base (frame) - 8, 8);
return read_next_frame_reg (frame, pcreg);
}
@@ -503,7 +505,7 @@ alpha_frame_saved_pc (struct frame_info *frame)
static CORE_ADDR
alpha_saved_pc_after_call (struct frame_info *frame)
{
- CORE_ADDR pc = frame->pc;
+ CORE_ADDR pc = get_frame_pc (frame);
CORE_ADDR tmp;
alpha_extra_func_info_t proc_desc;
int pcreg;
@@ -513,7 +515,7 @@ alpha_saved_pc_after_call (struct frame_info *frame)
if (tmp != 0)
pc = tmp;
- proc_desc = find_proc_desc (pc, frame->next);
+ proc_desc = find_proc_desc (pc, get_next_frame (frame));
pcreg = proc_desc ? PROC_PC_REG (proc_desc) : ALPHA_RA_REGNUM;
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
@@ -968,12 +970,12 @@ void
alpha_print_extra_frame_info (struct frame_info *fi)
{
if (fi
- && fi->extra_info
- && fi->extra_info->proc_desc
- && fi->extra_info->proc_desc->pdr.framereg < NUM_REGS)
+ && 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 (fi->extra_info->proc_desc->pdr.framereg),
- paddr_d (fi->extra_info->proc_desc->pdr.frameoffset));
+ REGISTER_NAME (get_frame_extra_info (fi)->proc_desc->pdr.framereg),
+ paddr_d (get_frame_extra_info (fi)->proc_desc->pdr.frameoffset));
}
static void
@@ -981,39 +983,42 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
/* Use proc_desc calculated in frame_chain */
alpha_extra_func_info_t proc_desc =
- frame->next ? cached_proc_desc : find_proc_desc (frame->pc, frame->next);
-
- frame->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
-
- frame->saved_regs = NULL;
- frame->extra_info->localoff = 0;
- frame->extra_info->pc_reg = ALPHA_RA_REGNUM;
- frame->extra_info->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc;
+ get_next_frame (frame)
+ ? cached_proc_desc
+ : find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
+
+ frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
+
+ /* NOTE: cagney/2003-01-03: No need to set saved_regs to NULL,
+ always NULL by default. */
+ /* frame->saved_regs = NULL; */
+ get_frame_extra_info (frame)->localoff = 0;
+ get_frame_extra_info (frame)->pc_reg = ALPHA_RA_REGNUM;
+ get_frame_extra_info (frame)->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc;
if (proc_desc)
{
/* Get the locals offset and the saved pc register from the
procedure descriptor, they are valid even if we are in the
middle of the prologue. */
- frame->extra_info->localoff = PROC_LOCALOFF (proc_desc);
- frame->extra_info->pc_reg = PROC_PC_REG (proc_desc);
+ get_frame_extra_info (frame)->localoff = PROC_LOCALOFF (proc_desc);
+ get_frame_extra_info (frame)->pc_reg = PROC_PC_REG (proc_desc);
/* Fixup frame-pointer - only needed for top frame */
/* Fetch the frame pointer for a dummy frame from the procedure
descriptor. */
if (PROC_DESC_IS_DUMMY (proc_desc))
- frame->frame = (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc);
+ deprecated_update_frame_base_hack (frame, (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc));
/* This may not be quite right, if proc has a real frame register.
Get the value of the frame relative sp, procedure might have been
interrupted by a signal at it's very start. */
- else if (frame->pc == PROC_LOW_ADDR (proc_desc)
+ else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc)
&& !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
- frame->frame = read_next_frame_reg (frame->next, SP_REGNUM);
+ deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), SP_REGNUM));
else
- frame->frame = read_next_frame_reg (frame->next, PROC_FRAME_REG (proc_desc))
- + PROC_FRAME_OFFSET (proc_desc);
+ deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), PROC_FRAME_REG (proc_desc))
+ + PROC_FRAME_OFFSET (proc_desc));
if (proc_desc == &temp_proc_desc)
{
@@ -1026,16 +1031,15 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
/* FIXME: cagney/2002-11-18: This problem will go away once
frame.c:get_prev_frame() is modified to set the frame's
type before calling functions like this. */
- find_pc_partial_function (frame->pc, &name,
+ find_pc_partial_function (get_frame_pc (frame), &name,
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (!PC_IN_SIGTRAMP (frame->pc, name))
+ if (!PC_IN_SIGTRAMP (get_frame_pc (frame), name))
{
- frame->saved_regs = (CORE_ADDR *)
- frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
- memcpy (frame->saved_regs, temp_saved_regs,
+ frame_saved_regs_zalloc (frame);
+ memcpy (get_frame_saved_regs (frame), temp_saved_regs,
SIZEOF_FRAME_SAVED_REGS);
- frame->saved_regs[PC_REGNUM]
- = frame->saved_regs[ALPHA_RA_REGNUM];
+ get_frame_saved_regs (frame)[PC_REGNUM]
+ = get_frame_saved_regs (frame)[ALPHA_RA_REGNUM];
}
}
}
@@ -1044,13 +1048,13 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
static CORE_ADDR
alpha_frame_locals_address (struct frame_info *fi)
{
- return (fi->frame - fi->extra_info->localoff);
+ return (get_frame_base (fi) - get_frame_extra_info (fi)->localoff);
}
static CORE_ADDR
alpha_frame_args_address (struct frame_info *fi)
{
- return (fi->frame - (ALPHA_NUM_ARG_REGS * 8));
+ return (get_frame_base (fi) - (ALPHA_NUM_ARG_REGS * 8));
}
/* ALPHA stack frames are almost impenetrable. When execution stops,
@@ -1290,33 +1294,33 @@ alpha_pop_frame (void)
{
register int regnum;
struct frame_info *frame = get_current_frame ();
- CORE_ADDR new_sp = frame->frame;
+ CORE_ADDR new_sp = get_frame_base (frame);
- alpha_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
+ alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
/* we need proc_desc to know how to restore the registers;
if it is NULL, construct (a temporary) one */
if (proc_desc == NULL)
- proc_desc = find_proc_desc (frame->pc, frame->next);
+ proc_desc = find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
/* Question: should we copy this proc_desc and save it in
frame->proc_desc? If we do, who will free it?
For now, we don't save a copy... */
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
- if (frame->saved_regs == NULL)
+ if (get_frame_saved_regs (frame) == NULL)
alpha_find_saved_regs (frame);
if (proc_desc)
{
for (regnum = 32; --regnum >= 0;)
if (PROC_REG_MASK (proc_desc) & (1 << regnum))
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum],
+ read_memory_integer (get_frame_saved_regs (frame)[regnum],
8));
for (regnum = 32; --regnum >= 0;)
if (PROC_FREG_MASK (proc_desc) & (1 << regnum))
write_register (regnum + FP0_REGNUM,
- read_memory_integer (frame->saved_regs[regnum + FP0_REGNUM], 8));
+ read_memory_integer (get_frame_saved_regs (frame)[regnum + FP0_REGNUM], 8));
}
write_register (SP_REGNUM, new_sp);
flush_cached_frames ();
@@ -1770,37 +1774,23 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
/* Try to determine the ABI of the object we are loading. */
-
- if (info.abfd != NULL)
+ if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
{
- osabi = gdbarch_lookup_osabi (info.abfd);
- if (osabi == GDB_OSABI_UNKNOWN)
- {
- /* If it's an ECOFF file, assume it's OSF/1. */
- if (bfd_get_flavour (info.abfd) == bfd_target_ecoff_flavour)
- osabi = GDB_OSABI_OSF1;
- }
+ /* If it's an ECOFF file, assume it's OSF/1. */
+ if (bfd_get_flavour (info.abfd) == bfd_target_ecoff_flavour)
+ info.osabi = GDB_OSABI_OSF1;
}
/* Find a candidate among extant architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- return arches->gdbarch;
- }
+ 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->osabi = osabi;
-
/* Lowest text address. This is used by heuristic_proc_start() to
decide when to stop looking. */
tdep->vm_min_address = (CORE_ADDR) 0x120000000;
@@ -1856,7 +1846,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, alpha_saved_pc_after_call);
set_gdbarch_frame_chain (gdbarch, alpha_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
@@ -1903,10 +1892,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- /* Floats are always passed as doubles. */
- set_gdbarch_coerce_float_to_double (gdbarch,
- standard_coerce_float_to_double);
-
set_gdbarch_breakpoint_from_pc (gdbarch, alpha_breakpoint_from_pc);
set_gdbarch_decr_pc_after_break (gdbarch, 4);
@@ -1914,7 +1899,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
/* Now that we have tuned the configuration, set a few final things
based on what the OS ABI has told us. */
@@ -1933,9 +1918,6 @@ alpha_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "alpha_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
-
fprintf_unfiltered (file,
"alpha_dump_tdep: vm_min_address = 0x%lx\n",
(long) tdep->vm_min_address);
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index cea232b502c..76f91f32bf4 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -1,5 +1,5 @@
/* Common target dependent code for GDB on Alpha systems.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002 Free
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003 Free
Software Foundation, Inc.
This file is part of GDB.
@@ -22,15 +22,13 @@
#ifndef ALPHA_TDEP_H
#define ALPHA_TDEP_H
-#include "osabi.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. */
#define ALPHA_REGISTER_SIZE 8
/* Number of machine registers. */
-#define ALPHA_NUM_REGS 66
+#define ALPHA_NUM_REGS 67
/* Total amount of space needed to store our copies of the machine's
register state. */
@@ -63,6 +61,7 @@
#define ALPHA_FPCR_REGNUM 63 /* Floating point control register */
#define ALPHA_PC_REGNUM 64 /* Contains program counter */
#define ALPHA_FP_REGNUM 65 /* Virtual frame pointer */
+#define ALPHA_UNIQUE_REGNUM 66 /* PAL_rduniq value */
/* The alpha has two different virtual pointers for arguments and locals.
@@ -81,8 +80,6 @@
/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
- enum gdb_osabi osabi; /* OS/ABI of inferior. */
-
CORE_ADDR vm_min_address; /* used by heuristic_proc_start */
/* If PC is inside a dynamically-generated signal trampoline function
diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c
index 6af3b4df84f..6b1b068d9cf 100644
--- a/gdb/alphafbsd-tdep.c
+++ b/gdb/alphafbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for FreeBSD/Alpha.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,6 +20,7 @@
#include "defs.h"
#include "value.h"
+#include "osabi.h"
#include "alpha-tdep.h"
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index e09b945bd97..6137c5e98de 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for NetBSD/Alpha.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -24,6 +24,7 @@
#include "frame.h"
#include "regcache.h"
#include "value.h"
+#include "osabi.h"
#include "solib-svr4.h"
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index de3d284a8c8..1202df980ce 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1,6 +1,6 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
This file is part of GDB.
@@ -911,6 +911,7 @@ gdbarch_info_init (struct gdbarch_info *info)
{
memset (info, 0, sizeof (struct gdbarch_info));
info->byte_order = BFD_ENDIAN_UNKNOWN;
+ info->osabi = GDB_OSABI_UNINITIALIZED;
}
/* */
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 627ed8dda47..e0d8a93fb13 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1,5 +1,5 @@
/* GNU/Linux on ARM target support.
- 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.
@@ -27,6 +27,7 @@
#include "frame.h"
#include "regcache.h"
#include "doublest.h"
+#include "osabi.h"
#include "arm-tdep.h"
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 3543cc1f0cc..93ed5bd500e 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1,6 +1,6 @@
/* Common target dependent code for GDB on ARM systems.
Copyright 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1998, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,6 +34,7 @@
#include "value.h"
#include "arch-utils.h"
#include "solib-svr4.h"
+#include "osabi.h"
#include "arm-tdep.h"
#include "gdb/sim-arm.h"
@@ -158,7 +159,7 @@ struct frame_extra_info
static int
arm_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
{
- return (chain != 0 && (FRAME_SAVED_PC (thisframe) >= LOWEST_PC));
+ return (FRAME_SAVED_PC (thisframe) >= LOWEST_PC);
}
/* Set to true if the 32-bit mode is in use. */
@@ -275,7 +276,7 @@ arm_frameless_function_invocation (struct frame_info *fi)
stmdb sp!, {}
sub sp, ip, #4. */
- func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
+ func_start = (get_pc_function_start (get_frame_pc (fi)) + FUNCTION_START_OFFSET);
after_prologue = SKIP_PROLOGUE (func_start);
/* There are some frameless functions whose first two instructions
@@ -290,14 +291,14 @@ arm_frameless_function_invocation (struct frame_info *fi)
static CORE_ADDR
arm_frame_args_address (struct frame_info *fi)
{
- return fi->frame;
+ return get_frame_base (fi);
}
/* The address of the local variables in the frame. */
static CORE_ADDR
arm_frame_locals_address (struct frame_info *fi)
{
- return fi->frame;
+ return get_frame_base (fi);
}
/* The number of arguments being passed in the frame. */
@@ -539,15 +540,15 @@ thumb_scan_prologue (struct frame_info *fi)
/* Don't try to scan dummy frames. */
if (fi != NULL
- && DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
return;
- if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
+ if (find_pc_partial_function (get_frame_pc (fi), NULL, &prologue_start, &prologue_end))
{
struct symtab_and_line sal = find_pc_line (prologue_start, 0);
if (sal.line == 0) /* no line info, use current PC */
- prologue_end = fi->pc;
+ prologue_end = get_frame_pc (fi);
else if (sal.end < prologue_end) /* next line begins after fn end */
prologue_end = sal.end; /* (probably means no prologue) */
}
@@ -556,7 +557,7 @@ thumb_scan_prologue (struct frame_info *fi)
16 pushes, an add, and "mv fp,sp". */
prologue_end = prologue_start + 40;
- prologue_end = min (prologue_end, fi->pc);
+ prologue_end = min (prologue_end, get_frame_pc (fi));
/* Initialize the saved register map. When register H is copied to
register L, we will put H in saved_reg[L]. */
@@ -567,7 +568,7 @@ thumb_scan_prologue (struct frame_info *fi)
frame pointer, adjust the stack pointer, and save registers.
Do this until all basic prolog instructions are found. */
- fi->extra_info->framesize = 0;
+ get_frame_extra_info (fi)->framesize = 0;
for (current_pc = prologue_start;
(current_pc < prologue_end) && ((findmask & 7) != 7);
current_pc += 2)
@@ -590,9 +591,9 @@ thumb_scan_prologue (struct frame_info *fi)
for (regno = ARM_LR_REGNUM; regno >= 0; regno--)
if (mask & (1 << regno))
{
- fi->extra_info->framesize += 4;
- fi->saved_regs[saved_reg[regno]] =
- -(fi->extra_info->framesize);
+ get_frame_extra_info (fi)->framesize += 4;
+ get_frame_saved_regs (fi)[saved_reg[regno]] =
+ -(get_frame_extra_info (fi)->framesize);
/* Reset saved register map. */
saved_reg[regno] = regno;
}
@@ -608,23 +609,23 @@ thumb_scan_prologue (struct frame_info *fi)
offset = (insn & 0x7f) << 2; /* get scaled offset */
if (insn & 0x80) /* is it signed? (==subtracting) */
{
- fi->extra_info->frameoffset += offset;
+ get_frame_extra_info (fi)->frameoffset += offset;
offset = -offset;
}
- fi->extra_info->framesize -= offset;
+ get_frame_extra_info (fi)->framesize -= offset;
}
else if ((insn & 0xff00) == 0xaf00) /* add r7, sp, #imm */
{
findmask |= 2; /* setting of r7 found */
- fi->extra_info->framereg = THUMB_FP_REGNUM;
+ get_frame_extra_info (fi)->framereg = THUMB_FP_REGNUM;
/* get scaled offset */
- fi->extra_info->frameoffset = (insn & 0xff) << 2;
+ get_frame_extra_info (fi)->frameoffset = (insn & 0xff) << 2;
}
else if (insn == 0x466f) /* mov r7, sp */
{
findmask |= 2; /* setting of r7 found */
- fi->extra_info->framereg = THUMB_FP_REGNUM;
- fi->extra_info->frameoffset = 0;
+ get_frame_extra_info (fi)->framereg = THUMB_FP_REGNUM;
+ get_frame_extra_info (fi)->frameoffset = 0;
saved_reg[THUMB_FP_REGNUM] = ARM_SP_REGNUM;
}
else if ((insn & 0xffc0) == 0x4640) /* mov r0-r7, r8-r15 */
@@ -657,20 +658,20 @@ thumb_scan_prologue (struct frame_info *fi)
in a row (once to get the frame chain, and once to fill in the
extra frame information). */
-static struct frame_info prologue_cache;
+static struct frame_info *prologue_cache;
static int
check_prologue_cache (struct frame_info *fi)
{
int i;
- if (fi->pc == prologue_cache.pc)
+ if (get_frame_pc (fi) == get_frame_pc (prologue_cache))
{
- fi->extra_info->framereg = prologue_cache.extra_info->framereg;
- fi->extra_info->framesize = prologue_cache.extra_info->framesize;
- fi->extra_info->frameoffset = prologue_cache.extra_info->frameoffset;
+ get_frame_extra_info (fi)->framereg = get_frame_extra_info (prologue_cache)->framereg;
+ get_frame_extra_info (fi)->framesize = get_frame_extra_info (prologue_cache)->framesize;
+ get_frame_extra_info (fi)->frameoffset = get_frame_extra_info (prologue_cache)->frameoffset;
for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
- fi->saved_regs[i] = prologue_cache.saved_regs[i];
+ get_frame_saved_regs (fi)[i] = get_frame_saved_regs (prologue_cache)[i];
return 1;
}
else
@@ -685,13 +686,13 @@ save_prologue_cache (struct frame_info *fi)
{
int i;
- prologue_cache.pc = fi->pc;
- prologue_cache.extra_info->framereg = fi->extra_info->framereg;
- prologue_cache.extra_info->framesize = fi->extra_info->framesize;
- prologue_cache.extra_info->frameoffset = fi->extra_info->frameoffset;
+ deprecated_update_frame_pc_hack (prologue_cache, get_frame_pc (fi));
+ get_frame_extra_info (prologue_cache)->framereg = get_frame_extra_info (fi)->framereg;
+ get_frame_extra_info (prologue_cache)->framesize = get_frame_extra_info (fi)->framesize;
+ get_frame_extra_info (prologue_cache)->frameoffset = get_frame_extra_info (fi)->frameoffset;
for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
- prologue_cache.saved_regs[i] = fi->saved_regs[i];
+ get_frame_saved_regs (prologue_cache)[i] = get_frame_saved_regs (fi)[i];
}
@@ -774,12 +775,12 @@ arm_scan_prologue (struct frame_info *fi)
return;
/* Assume there is no frame until proven otherwise. */
- fi->extra_info->framereg = ARM_SP_REGNUM;
- fi->extra_info->framesize = 0;
- fi->extra_info->frameoffset = 0;
+ get_frame_extra_info (fi)->framereg = ARM_SP_REGNUM;
+ get_frame_extra_info (fi)->framesize = 0;
+ get_frame_extra_info (fi)->frameoffset = 0;
/* Check for Thumb prologue. */
- if (arm_pc_is_thumb (fi->pc))
+ if (arm_pc_is_thumb (get_frame_pc (fi)))
{
thumb_scan_prologue (fi);
save_prologue_cache (fi);
@@ -788,7 +789,7 @@ arm_scan_prologue (struct frame_info *fi)
/* Find the function prologue. If we can't find the function in
the symbol table, peek in the stack frame to find the PC. */
- if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
+ if (find_pc_partial_function (get_frame_pc (fi), NULL, &prologue_start, &prologue_end))
{
/* One way to find the end of the prologue (which works well
for unoptimized code) is to do the following:
@@ -796,7 +797,7 @@ arm_scan_prologue (struct frame_info *fi)
struct symtab_and_line sal = find_pc_line (prologue_start, 0);
if (sal.line == 0)
- prologue_end = fi->pc;
+ prologue_end = get_frame_pc (fi);
else if (sal.end < prologue_end)
prologue_end = sal.end;
@@ -831,7 +832,7 @@ arm_scan_prologue (struct frame_info *fi)
{
/* Get address of the stmfd in the prologue of the callee;
the saved PC is the address of the stmfd + 8. */
- if (!safe_read_memory_integer (fi->frame, 4, &return_value))
+ if (!safe_read_memory_integer (get_frame_base (fi), 4, &return_value))
return;
else
{
@@ -890,7 +891,7 @@ arm_scan_prologue (struct frame_info *fi)
if (mask & (1 << regno))
{
sp_offset -= 4;
- fi->saved_regs[regno] = sp_offset;
+ get_frame_saved_regs (fi)[regno] = sp_offset;
}
}
else if ((insn & 0xffffc000) == 0xe54b0000 || /* strb rx,[r11,#-n] */
@@ -913,7 +914,7 @@ arm_scan_prologue (struct frame_info *fi)
unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
imm = (imm >> rot) | (imm << (32 - rot));
fp_offset = -imm;
- fi->extra_info->framereg = ARM_FP_REGNUM;
+ get_frame_extra_info (fi)->framereg = ARM_FP_REGNUM;
}
else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */
{
@@ -926,7 +927,7 @@ arm_scan_prologue (struct frame_info *fi)
{
sp_offset -= 12;
regno = ARM_F0_REGNUM + ((insn >> 12) & 0x07);
- fi->saved_regs[regno] = sp_offset;
+ get_frame_saved_regs (fi)[regno] = sp_offset;
}
else if ((insn & 0xffbf0fff) == 0xec2d0200) /* sfmfd f0, 4, [sp!] */
{
@@ -953,7 +954,7 @@ arm_scan_prologue (struct frame_info *fi)
for (; fp_start_reg < fp_bound_reg; fp_start_reg++)
{
sp_offset -= 12;
- fi->saved_regs[fp_start_reg++] = sp_offset;
+ get_frame_saved_regs (fi)[fp_start_reg++] = sp_offset;
}
}
else if ((insn & 0xf0000000) != 0xe0000000)
@@ -969,11 +970,11 @@ arm_scan_prologue (struct frame_info *fi)
/* The frame size is just the negative of the offset (from the
original SP) of the last thing thing we pushed on the stack.
The frame offset is [new FP] - [new SP]. */
- fi->extra_info->framesize = -sp_offset;
- if (fi->extra_info->framereg == ARM_FP_REGNUM)
- fi->extra_info->frameoffset = fp_offset - sp_offset;
+ get_frame_extra_info (fi)->framesize = -sp_offset;
+ if (get_frame_extra_info (fi)->framereg == ARM_FP_REGNUM)
+ get_frame_extra_info (fi)->frameoffset = fp_offset - sp_offset;
else
- fi->extra_info->frameoffset = 0;
+ get_frame_extra_info (fi)->frameoffset = 0;
save_prologue_cache (fi);
}
@@ -991,20 +992,21 @@ arm_find_callers_reg (struct frame_info *fi, int regnum)
/* NOTE: cagney/2002-05-03: This function really shouldn't be
needed. Instead the (still being written) register unwind
function could be called directly. */
- for (; fi; fi = fi->next)
+ for (; fi; fi = get_next_frame (fi))
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
{
- return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), regnum);
}
- else if (fi->saved_regs[regnum] != 0)
+ else if (get_frame_saved_regs (fi)[regnum] != 0)
{
/* NOTE: cagney/2002-05-03: This would normally need to
handle ARM_SP_REGNUM as a special case as, according to
the frame.h comments, saved_regs[SP_REGNUM] contains the
SP value not its address. It appears that the ARM isn't
doing this though. */
- return read_memory_integer (fi->saved_regs[regnum],
+ return read_memory_integer (get_frame_saved_regs (fi)[regnum],
REGISTER_RAW_SIZE (regnum));
}
}
@@ -1020,13 +1022,13 @@ static CORE_ADDR
arm_frame_chain (struct frame_info *fi)
{
CORE_ADDR caller_pc;
- int framereg = fi->extra_info->framereg;
+ int framereg = get_frame_extra_info (fi)->framereg;
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
/* A generic call dummy's frame is the same as caller's. */
- return fi->frame;
+ return get_frame_base (fi);
- if (fi->pc < LOWEST_PC)
+ if (get_frame_pc (fi) < LOWEST_PC)
return 0;
/* If the caller is the startup code, we're at the end of the chain. */
@@ -1038,25 +1040,17 @@ arm_frame_chain (struct frame_info *fi)
frame register number. */
/* XXX Fixme, we should try to do this without creating a temporary
caller_fi. */
- if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (fi->pc))
+ if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (get_frame_pc (fi)))
{
- struct frame_info caller_fi;
- struct cleanup *old_chain;
-
- /* Create a temporary frame suitable for scanning the caller's
- prologue. (Ugh.) */
- memset (&caller_fi, 0, sizeof (caller_fi));
- caller_fi.extra_info = (struct frame_extra_info *)
- xcalloc (1, sizeof (struct frame_extra_info));
- old_chain = make_cleanup (xfree, caller_fi.extra_info);
- caller_fi.saved_regs = (CORE_ADDR *)
- xcalloc (1, SIZEOF_FRAME_SAVED_REGS);
- make_cleanup (xfree, caller_fi.saved_regs);
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+ struct frame_info *caller_fi =
+ deprecated_frame_xmalloc_with_cleanup (SIZEOF_FRAME_SAVED_REGS,
+ sizeof (struct frame_extra_info));
/* Now, scan the prologue and obtain the frame register. */
- caller_fi.pc = caller_pc;
- arm_scan_prologue (&caller_fi);
- framereg = caller_fi.extra_info->framereg;
+ deprecated_update_frame_pc_hack (caller_fi, caller_pc);
+ arm_scan_prologue (caller_fi);
+ framereg = get_frame_extra_info (caller_fi)->framereg;
/* Deallocate the storage associated with the temporary frame
created above. */
@@ -1068,7 +1062,7 @@ arm_frame_chain (struct frame_info *fi)
if (framereg == ARM_FP_REGNUM || framereg == THUMB_FP_REGNUM)
return arm_find_callers_reg (fi, framereg);
else
- return fi->frame + fi->extra_info->framesize;
+ return get_frame_base (fi) + get_frame_extra_info (fi)->framesize;
}
/* This function actually figures out the frame address for a given pc
@@ -1086,33 +1080,34 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
int reg;
CORE_ADDR sp;
- if (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- fi->extra_info->framesize = 0;
- fi->extra_info->frameoffset = 0;
- fi->extra_info->framereg = 0;
+ get_frame_extra_info (fi)->framesize = 0;
+ get_frame_extra_info (fi)->frameoffset = 0;
+ get_frame_extra_info (fi)->framereg = 0;
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
- memset (fi->saved_regs, '\000', sizeof fi->saved_regs);
+ memset (get_frame_saved_regs (fi), '\000', sizeof get_frame_saved_regs (fi));
/* Compute stack pointer for this frame. We use this value for both
the sigtramp and call dummy cases. */
- if (!fi->next)
+ if (!get_next_frame (fi))
sp = read_sp();
- else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0))
/* For generic dummy frames, pull the value direct from the frame.
Having an unwind function to do this would be nice. */
- sp = deprecated_read_register_dummy (fi->next->pc, fi->next->frame,
+ sp = deprecated_read_register_dummy (get_frame_pc (get_next_frame (fi)),
+ get_frame_base (get_next_frame (fi)),
ARM_SP_REGNUM);
else
- sp = (fi->next->frame - fi->next->extra_info->frameoffset
- + fi->next->extra_info->framesize);
+ sp = (get_frame_base (get_next_frame (fi))
+ - get_frame_extra_info (get_next_frame (fi))->frameoffset
+ + get_frame_extra_info (get_next_frame (fi))->framesize);
/* Determine whether or not we're in a sigtramp frame.
Unfortunately, it isn't sufficient to test (get_frame_type (fi)
@@ -1132,52 +1127,50 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
before calling functions like this. */
if (SIGCONTEXT_REGISTER_ADDRESS_P ()
- && ((get_frame_type (fi) == SIGTRAMP_FRAME) || PC_IN_SIGTRAMP (fi->pc, (char *)0)))
+ && ((get_frame_type (fi) == SIGTRAMP_FRAME) || PC_IN_SIGTRAMP (get_frame_pc (fi), (char *)0)))
{
for (reg = 0; reg < NUM_REGS; reg++)
- fi->saved_regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, fi->pc, reg);
+ get_frame_saved_regs (fi)[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, get_frame_pc (fi), reg);
/* FIXME: What about thumb mode? */
- fi->extra_info->framereg = ARM_SP_REGNUM;
- fi->frame =
- read_memory_integer (fi->saved_regs[fi->extra_info->framereg],
- REGISTER_RAW_SIZE (fi->extra_info->framereg));
- fi->extra_info->framesize = 0;
- fi->extra_info->frameoffset = 0;
+ get_frame_extra_info (fi)->framereg = ARM_SP_REGNUM;
+ deprecated_update_frame_base_hack (fi, read_memory_integer (get_frame_saved_regs (fi)[get_frame_extra_info (fi)->framereg], REGISTER_RAW_SIZE (get_frame_extra_info (fi)->framereg)));
+ get_frame_extra_info (fi)->framesize = 0;
+ get_frame_extra_info (fi)->frameoffset = 0;
}
else
{
arm_scan_prologue (fi);
- if (!fi->next)
+ if (!get_next_frame (fi))
/* This is the innermost frame? */
- fi->frame = read_register (fi->extra_info->framereg);
- else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
+ deprecated_update_frame_base_hack (fi, read_register (get_frame_extra_info (fi)->framereg));
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0))
/* Next inner most frame is a dummy, just grab its frame.
Dummy frames always have the same FP as their caller. */
- fi->frame = fi->next->frame;
- else if (fi->extra_info->framereg == ARM_FP_REGNUM
- || fi->extra_info->framereg == THUMB_FP_REGNUM)
+ deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
+ else if (get_frame_extra_info (fi)->framereg == ARM_FP_REGNUM
+ || get_frame_extra_info (fi)->framereg == THUMB_FP_REGNUM)
{
/* not the innermost frame */
/* If we have an FP, the callee saved it. */
- if (fi->next->saved_regs[fi->extra_info->framereg] != 0)
- fi->frame =
- read_memory_integer (fi->next
- ->saved_regs[fi->extra_info->framereg], 4);
+ if (get_frame_saved_regs (get_next_frame (fi))[get_frame_extra_info (fi)->framereg] != 0)
+ deprecated_update_frame_base_hack (fi, read_memory_integer (get_frame_saved_regs (get_next_frame (fi))[get_frame_extra_info (fi)->framereg], 4));
else if (fromleaf)
/* If we were called by a frameless fn. then our frame is
still in the frame pointer register on the board... */
- fi->frame = read_fp ();
+ deprecated_update_frame_base_hack (fi, read_fp ());
}
/* Calculate actual addresses of saved registers using offsets
determined by arm_scan_prologue. */
for (reg = 0; reg < NUM_REGS; reg++)
- if (fi->saved_regs[reg] != 0)
- fi->saved_regs[reg] += (fi->frame + fi->extra_info->framesize
- - fi->extra_info->frameoffset);
+ if (get_frame_saved_regs (fi)[reg] != 0)
+ get_frame_saved_regs (fi)[reg]
+ += (get_frame_base (fi)
+ + get_frame_extra_info (fi)->framesize
+ - get_frame_extra_info (fi)->frameoffset);
}
}
@@ -1194,13 +1187,16 @@ static CORE_ADDR
arm_frame_saved_pc (struct frame_info *fi)
{
/* If a dummy frame, pull the PC out of the frame's register buffer. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
- return deprecated_read_register_dummy (fi->pc, fi->frame, ARM_PC_REGNUM);
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame - fi->extra_info->frameoffset,
- fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), ARM_PC_REGNUM);
+
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
+ (get_frame_base (fi)
+ - get_frame_extra_info (fi)->frameoffset),
+ get_frame_base (fi)))
{
- return read_memory_integer (fi->saved_regs[ARM_PC_REGNUM],
+ return read_memory_integer (get_frame_saved_regs (fi)[ARM_PC_REGNUM],
REGISTER_RAW_SIZE (ARM_PC_REGNUM));
}
else
@@ -1232,7 +1228,7 @@ static void
arm_frame_init_saved_regs (struct frame_info *fip)
{
- if (fip->saved_regs)
+ if (get_frame_saved_regs (fip))
return;
arm_init_extra_frame_info (0, fip);
@@ -1507,7 +1503,7 @@ arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
}
- /* Return the botom of the argument list (pointed to by fp). */
+ /* Return the bottom of the argument list (pointed to by fp). */
return fp;
}
@@ -1520,10 +1516,13 @@ arm_pop_frame (void)
{
int regnum;
struct frame_info *frame = get_current_frame ();
- CORE_ADDR old_SP = (frame->frame - frame->extra_info->frameoffset
- + frame->extra_info->framesize);
+ CORE_ADDR old_SP = (get_frame_base (frame)
+ - get_frame_extra_info (frame)->frameoffset
+ + get_frame_extra_info (frame)->framesize);
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
{
generic_pop_dummy_frame ();
flush_cached_frames ();
@@ -1531,9 +1530,9 @@ arm_pop_frame (void)
}
for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->saved_regs[regnum] != 0)
+ if (get_frame_saved_regs (frame)[regnum] != 0)
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum],
+ read_memory_integer (get_frame_saved_regs (frame)[regnum],
REGISTER_RAW_SIZE (regnum)));
write_register (ARM_PC_REGNUM, FRAME_SAVED_PC (frame));
@@ -2815,44 +2814,33 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
/* Try to deterimine the ABI of the object we are loading. */
- if (info.abfd != NULL)
+ if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
{
- osabi = gdbarch_lookup_osabi (info.abfd);
- if (osabi == GDB_OSABI_UNKNOWN)
+ switch (bfd_get_flavour (info.abfd))
{
- switch (bfd_get_flavour (info.abfd))
- {
- case bfd_target_aout_flavour:
- /* Assume it's an old APCS-style ABI. */
- osabi = GDB_OSABI_ARM_APCS;
- break;
+ case bfd_target_aout_flavour:
+ /* Assume it's an old APCS-style ABI. */
+ info.osabi = GDB_OSABI_ARM_APCS;
+ break;
- case bfd_target_coff_flavour:
- /* Assume it's an old APCS-style ABI. */
- /* XXX WinCE? */
- osabi = GDB_OSABI_ARM_APCS;
- break;
+ case bfd_target_coff_flavour:
+ /* Assume it's an old APCS-style ABI. */
+ /* XXX WinCE? */
+ info.osabi = GDB_OSABI_ARM_APCS;
+ break;
- default:
- /* Leave it as "unknown". */
- }
+ default:
+ /* Leave it as "unknown". */
}
}
- /* Find a candidate among extant architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- 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);
@@ -2861,8 +2849,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
ready to unwind the PC first (see frame.c:get_prev_frame()). */
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
- tdep->osabi = osabi;
-
/* This is the way it has always defaulted. */
tdep->fp_model = ARM_FLOAT_FPA;
@@ -2914,8 +2900,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
set_gdbarch_push_arguments (gdbarch, arm_push_arguments);
- set_gdbarch_coerce_float_to_double (gdbarch,
- standard_coerce_float_to_double);
/* Frame handling. */
set_gdbarch_frame_chain_valid (gdbarch, arm_frame_chain_valid);
@@ -2995,7 +2979,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
arm_coff_make_msymbol_special);
/* Hook in the ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
/* Now we have tuned the configuration, set a few final things,
based on what the OS ABI has told us. */
@@ -3039,16 +3023,18 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* We can't use SIZEOF_FRAME_SAVED_REGS here, since that still
references the old architecture vector, not the one we are
building here. */
- if (prologue_cache.saved_regs != NULL)
- xfree (prologue_cache.saved_regs);
+ if (get_frame_saved_regs (prologue_cache) != NULL)
+ xfree (get_frame_saved_regs (prologue_cache));
/* We can't use NUM_REGS nor NUM_PSEUDO_REGS here, since that still
references the old architecture vector, not the one we are
building here. */
- prologue_cache.saved_regs = (CORE_ADDR *)
- xcalloc (1, (sizeof (CORE_ADDR)
- * (gdbarch_num_regs (gdbarch)
- + gdbarch_num_pseudo_regs (gdbarch))));
+ {
+ CORE_ADDR *saved_regs = xcalloc (1, (sizeof (CORE_ADDR)
+ * (gdbarch_num_regs (gdbarch)
+ + gdbarch_num_pseudo_regs (gdbarch))));
+ deprecated_set_frame_saved_regs_hack (prologue_cache, saved_regs);
+ }
return gdbarch;
}
@@ -3061,9 +3047,6 @@ arm_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "arm_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
-
fprintf_unfiltered (file, "arm_dump_tdep: Lowest pc = 0x%lx",
(unsigned long) tdep->lowest_pc);
}
@@ -3176,10 +3159,9 @@ The valid values are:\n");
add_com ("othernames", class_obscure, arm_othernames,
"Switch to the next set of register names.");
- /* Fill in the prologue_cache fields. */
- prologue_cache.saved_regs = NULL;
- prologue_cache.extra_info = (struct frame_extra_info *)
- xcalloc (1, sizeof (struct frame_extra_info));
+ /* Allocate the prologue_cache. */
+ prologue_cache = deprecated_frame_xmalloc ();
+ deprecated_set_frame_extra_info_hack (prologue_cache, xcalloc (1, sizeof (struct frame_extra_info)));
/* Debugging flag. */
add_show_from_set (add_set_cmd ("arm", class_maintenance, var_zinteger,
diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h
index a8f15148364..b8c4711838e 100644
--- a/gdb/arm-tdep.h
+++ b/gdb/arm-tdep.h
@@ -1,5 +1,5 @@
/* Common target dependent code for GDB on ARM systems.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,8 +18,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "osabi.h"
-
/* Register numbers of various important registers. Note that some of
these values are "real" register numbers, and correspond to the
general registers of the machine, and some are "phony" register
@@ -124,8 +122,6 @@ enum arm_float_model
/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
- enum gdb_osabi osabi; /* OS/ABI of inferior. */
-
enum arm_float_model fp_model; /* Floating point calling conventions. */
CORE_ADDR lowest_pc; /* Lowest address at which instructions
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index 80113f519c6..d12fda044ac 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-specific functions for ARM running under NetBSD.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "osabi.h"
#include "arm-tdep.h"
#include "nbsd-tdep.h"
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 1c93860c347..a4893babb25 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Atmel AVR, for GDB.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -322,7 +322,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
}
static CORE_ADDR
-avr_pointer_to_address (struct type *type, void *buf)
+avr_pointer_to_address (struct type *type, const void *buf)
{
CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
@@ -469,15 +469,15 @@ avr_scan_prologue (struct frame_info *fi)
unsigned char prologue[AVR_MAX_PROLOGUE_SIZE];
int vpc = 0;
- fi->extra_info->framereg = AVR_SP_REGNUM;
+ get_frame_extra_info (fi)->framereg = AVR_SP_REGNUM;
if (find_pc_partial_function
- (fi->pc, &name, &prologue_start, &prologue_end))
+ (get_frame_pc (fi), &name, &prologue_start, &prologue_end))
{
struct symtab_and_line sal = find_pc_line (prologue_start, 0);
if (sal.line == 0) /* no line info, use current PC */
- prologue_end = fi->pc;
+ prologue_end = get_frame_pc (fi);
else if (sal.end < prologue_end) /* next line begins after fn end */
prologue_end = sal.end; /* (probably means no prologue) */
}
@@ -486,12 +486,12 @@ avr_scan_prologue (struct frame_info *fi)
/* 19 pushes, an add, and "mv fp,sp" */
prologue_end = prologue_start + AVR_MAX_PROLOGUE_SIZE;
- prologue_end = min (prologue_end, fi->pc);
+ prologue_end = min (prologue_end, get_frame_pc (fi));
/* Search the prologue looking for instructions that set up the
frame pointer, adjust the stack pointer, and save registers. */
- fi->extra_info->framesize = 0;
+ get_frame_extra_info (fi)->framesize = 0;
prologue_len = prologue_end - prologue_start;
read_memory (prologue_start, prologue, prologue_len);
@@ -509,7 +509,7 @@ avr_scan_prologue (struct frame_info *fi)
0xcd, 0xbf /* out __SP_L__,r28 */
};
- fi->extra_info->framereg = AVR_FP_REGNUM;
+ get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
insn = EXTRACT_INSN (&prologue[vpc]);
/* ldi r28,lo8(<RAM_ADDR> - <LOCALS_SIZE>) */
if ((insn & 0xf0f0) == 0xe0c0)
@@ -522,9 +522,9 @@ avr_scan_prologue (struct frame_info *fi)
locals |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
if (memcmp (prologue + vpc + 4, img, sizeof (img)) == 0)
{
- fi->frame = locals;
+ deprecated_update_frame_base_hack (fi, locals);
- fi->extra_info->is_main = 1;
+ get_frame_extra_info (fi)->is_main = 1;
return;
}
}
@@ -593,17 +593,17 @@ avr_scan_prologue (struct frame_info *fi)
if (num_pushes)
{
int from;
- fi->saved_regs[AVR_FP_REGNUM + 1] = num_pushes;
+ get_frame_saved_regs (fi)[AVR_FP_REGNUM + 1] = num_pushes;
if (num_pushes >= 2)
- fi->saved_regs[AVR_FP_REGNUM] = num_pushes - 1;
+ get_frame_saved_regs (fi)[AVR_FP_REGNUM] = num_pushes - 1;
i = 0;
for (from = AVR_LAST_PUSHED_REGNUM + 1 - (num_pushes - 2);
from <= AVR_LAST_PUSHED_REGNUM; ++from)
- fi->saved_regs[from] = ++i;
+ get_frame_saved_regs (fi)[from] = ++i;
}
- fi->extra_info->locals_size = loc_size;
- fi->extra_info->framesize = loc_size + num_pushes;
- fi->extra_info->framereg = AVR_FP_REGNUM;
+ get_frame_extra_info (fi)->locals_size = loc_size;
+ get_frame_extra_info (fi)->framesize = loc_size + num_pushes;
+ get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
return;
}
@@ -622,16 +622,16 @@ avr_scan_prologue (struct frame_info *fi)
if (memcmp (prologue, img, sizeof (img)) == 0)
{
vpc += sizeof (img);
- fi->saved_regs[0] = 2;
- fi->saved_regs[1] = 1;
- fi->extra_info->framesize += 3;
+ get_frame_saved_regs (fi)[0] = 2;
+ get_frame_saved_regs (fi)[1] = 1;
+ get_frame_extra_info (fi)->framesize += 3;
}
else if (memcmp (img + 1, prologue, sizeof (img) - 1) == 0)
{
vpc += sizeof (img) - 1;
- fi->saved_regs[0] = 2;
- fi->saved_regs[1] = 1;
- fi->extra_info->framesize += 3;
+ get_frame_saved_regs (fi)[0] = 2;
+ get_frame_saved_regs (fi)[1] = 1;
+ get_frame_extra_info (fi)->framesize += 3;
}
}
@@ -645,8 +645,8 @@ avr_scan_prologue (struct frame_info *fi)
{
/* Bits 4-9 contain a mask for registers R0-R32. */
regno = (insn & 0x1f0) >> 4;
- ++fi->extra_info->framesize;
- fi->saved_regs[regno] = fi->extra_info->framesize;
+ ++get_frame_extra_info (fi)->framesize;
+ get_frame_saved_regs (fi)[regno] = get_frame_extra_info (fi)->framesize;
scan_stage = 1;
}
else
@@ -669,7 +669,7 @@ avr_scan_prologue (struct frame_info *fi)
if (memcmp (prologue + vpc, img, sizeof (img)) == 0)
{
vpc += 4;
- fi->extra_info->framereg = AVR_FP_REGNUM;
+ get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
scan_stage = 2;
}
}
@@ -718,8 +718,8 @@ avr_scan_prologue (struct frame_info *fi)
}
else
return;
- fi->extra_info->locals_size = locals_size;
- fi->extra_info->framesize += locals_size;
+ get_frame_extra_info (fi)->locals_size = locals_size;
+ get_frame_extra_info (fi)->framesize += locals_size;
}
}
@@ -734,38 +734,41 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
int reg;
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
frame_saved_regs_zalloc (fi);
- fi->extra_info->return_pc = 0;
- fi->extra_info->args_pointer = 0;
- fi->extra_info->locals_size = 0;
- fi->extra_info->framereg = 0;
- fi->extra_info->framesize = 0;
- fi->extra_info->is_main = 0;
+ get_frame_extra_info (fi)->return_pc = 0;
+ get_frame_extra_info (fi)->args_pointer = 0;
+ get_frame_extra_info (fi)->locals_size = 0;
+ get_frame_extra_info (fi)->framereg = 0;
+ get_frame_extra_info (fi)->framesize = 0;
+ get_frame_extra_info (fi)->is_main = 0;
avr_scan_prologue (fi);
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
- AVR_PC_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi),
+ AVR_PC_REGNUM));
}
- else if (!fi->next) /* this is the innermost frame? */
- fi->frame = read_register (fi->extra_info->framereg);
- else if (fi->extra_info->is_main != 1) /* not the innermost frame, not `main' */
+ else if (!get_next_frame (fi))
+ /* this is the innermost frame? */
+ deprecated_update_frame_base_hack (fi, read_register (get_frame_extra_info (fi)->framereg));
+ else if (get_frame_extra_info (fi)->is_main != 1)
+ /* not the innermost frame, not `main' */
/* If we have an next frame, the callee saved it. */
{
- struct frame_info *next_fi = fi->next;
- if (fi->extra_info->framereg == AVR_SP_REGNUM)
- fi->frame =
- next_fi->frame + 2 /* ret addr */ + next_fi->extra_info->framesize;
+ struct frame_info *next_fi = get_next_frame (fi);
+ if (get_frame_extra_info (fi)->framereg == AVR_SP_REGNUM)
+ deprecated_update_frame_base_hack (fi, (get_frame_base (next_fi)
+ + 2 /* ret addr */
+ + get_frame_extra_info (next_fi)->framesize));
/* FIXME: I don't analyse va_args functions */
else
{
@@ -774,50 +777,51 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
unsigned int fp_low, fp_high;
/* Scan all frames */
- for (; next_fi; next_fi = next_fi->next)
+ for (; next_fi; next_fi = get_next_frame (next_fi))
{
/* look for saved AVR_FP_REGNUM */
- if (next_fi->saved_regs[AVR_FP_REGNUM] && !fp)
- fp = next_fi->saved_regs[AVR_FP_REGNUM];
+ if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM] && !fp)
+ fp = get_frame_saved_regs (next_fi)[AVR_FP_REGNUM];
/* look for saved AVR_FP_REGNUM + 1 */
- if (next_fi->saved_regs[AVR_FP_REGNUM + 1] && !fp1)
- fp1 = next_fi->saved_regs[AVR_FP_REGNUM + 1];
+ if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM + 1] && !fp1)
+ fp1 = get_frame_saved_regs (next_fi)[AVR_FP_REGNUM + 1];
}
fp_low = (fp ? read_memory_unsigned_integer (avr_make_saddr (fp), 1)
: read_register (AVR_FP_REGNUM)) & 0xff;
fp_high =
(fp1 ? read_memory_unsigned_integer (avr_make_saddr (fp1), 1) :
read_register (AVR_FP_REGNUM + 1)) & 0xff;
- fi->frame = fp_low | (fp_high << 8);
+ deprecated_update_frame_base_hack (fi, fp_low | (fp_high << 8));
}
}
/* TRoth: Do we want to do this if we are in main? I don't think we should
since return_pc makes no sense when we are in main. */
- if ((fi->pc) && (fi->extra_info->is_main == 0)) /* We are not in CALL_DUMMY */
+ if ((get_frame_pc (fi)) && (get_frame_extra_info (fi)->is_main == 0))
+ /* We are not in CALL_DUMMY */
{
CORE_ADDR addr;
int i;
- addr = fi->frame + fi->extra_info->framesize + 1;
+ addr = get_frame_base (fi) + get_frame_extra_info (fi)->framesize + 1;
/* Return address in stack in different endianness */
- fi->extra_info->return_pc =
+ get_frame_extra_info (fi)->return_pc =
read_memory_unsigned_integer (avr_make_saddr (addr), 1) << 8;
- fi->extra_info->return_pc |=
+ get_frame_extra_info (fi)->return_pc |=
read_memory_unsigned_integer (avr_make_saddr (addr + 1), 1);
/* This return address in words,
must be converted to the bytes address */
- fi->extra_info->return_pc *= 2;
+ get_frame_extra_info (fi)->return_pc *= 2;
/* Resolve a pushed registers addresses */
for (i = 0; i < NUM_REGS; i++)
{
- if (fi->saved_regs[i])
- fi->saved_regs[i] = addr - fi->saved_regs[i];
+ if (get_frame_saved_regs (fi)[i])
+ get_frame_saved_regs (fi)[i] = addr - get_frame_saved_regs (fi)[i];
}
}
}
@@ -833,7 +837,9 @@ avr_pop_frame (void)
CORE_ADDR saddr;
struct frame_info *frame = get_current_frame ();
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
{
generic_pop_dummy_frame ();
}
@@ -845,18 +851,18 @@ avr_pop_frame (void)
{
/* Don't forget AVR_SP_REGNUM in a frame_saved_regs struct is the
actual value we want, not the address of the value we want. */
- if (frame->saved_regs[regnum] && regnum != AVR_SP_REGNUM)
+ if (get_frame_saved_regs (frame)[regnum] && regnum != AVR_SP_REGNUM)
{
- saddr = avr_make_saddr (frame->saved_regs[regnum]);
+ saddr = avr_make_saddr (get_frame_saved_regs (frame)[regnum]);
write_register (regnum,
read_memory_unsigned_integer (saddr, 1));
}
- else if (frame->saved_regs[regnum] && regnum == AVR_SP_REGNUM)
- write_register (regnum, frame->frame + 2);
+ else if (get_frame_saved_regs (frame)[regnum] && regnum == AVR_SP_REGNUM)
+ write_register (regnum, get_frame_base (frame) + 2);
}
/* Don't forget the update the PC too! */
- write_pc (frame->extra_info->return_pc);
+ write_pc (get_frame_extra_info (frame)->return_pc);
}
flush_cached_frames ();
}
@@ -866,11 +872,14 @@ avr_pop_frame (void)
static CORE_ADDR
avr_frame_saved_pc (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return deprecated_read_register_dummy (frame->pc, frame->frame,
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
+ return deprecated_read_register_dummy (get_frame_pc (frame),
+ get_frame_base (frame),
AVR_PC_REGNUM);
else
- return frame->extra_info->return_pc;
+ return get_frame_extra_info (frame)->return_pc;
}
static CORE_ADDR
@@ -1017,7 +1026,7 @@ avr_skip_prologue (CORE_ADDR pc)
static CORE_ADDR
avr_frame_address (struct frame_info *fi)
{
- return avr_make_saddr (fi->frame);
+ return avr_make_saddr (get_frame_base (fi));
}
/* Given a GDB frame, determine the address of the calling function's
@@ -1031,16 +1040,19 @@ avr_frame_address (struct frame_info *fi)
static CORE_ADDR
avr_frame_chain (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
{
/* initialize the return_pc now */
- frame->extra_info->return_pc
- = deprecated_read_register_dummy (frame->pc, frame->frame,
+ get_frame_extra_info (frame)->return_pc
+ = deprecated_read_register_dummy (get_frame_pc (frame),
+ get_frame_base (frame),
AVR_PC_REGNUM);
- return frame->frame;
+ return get_frame_base (frame);
}
- return (frame->extra_info->is_main ? 0
- : frame->frame + frame->extra_info->framesize + 2 /* ret addr */ );
+ return (get_frame_extra_info (frame)->is_main ? 0
+ : get_frame_base (frame) + get_frame_extra_info (frame)->framesize + 2 /* ret addr */ );
}
/* Store the address of the place in which to copy the structure the
@@ -1263,7 +1275,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); /* ??? */
set_gdbarch_frame_chain (gdbarch, avr_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, avr_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, avr_frame_address);
set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 2bf12a894bf..62063f08d24 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -1,5 +1,7 @@
-/* GDB-specific functions for operating on agent expressions
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* GDB-specific functions for operating on agent expressions.
+
+ Copyright 1998, 1999, 2000, 2001, 2003 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -1158,7 +1160,7 @@ find_field (struct type *type, char *name)
{
char *this_name = TYPE_FIELD_NAME (type, i);
- if (this_name && STREQ (name, this_name))
+ if (this_name && strcmp (name, this_name) == 0)
return i;
if (this_name[0] == '\0')
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 7b9641fc771..2d48e87acae 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -2,7 +2,7 @@
functions and pc values.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -37,42 +37,13 @@
#include "regcache.h"
#include "gdb_assert.h"
#include "dummy-frame.h"
+#include "command.h"
+#include "gdbcmd.h"
/* Prototypes for exported functions. */
void _initialize_blockframe (void);
-/* A default FRAME_CHAIN_VALID, in the form that is suitable for most
- targets. If FRAME_CHAIN_VALID returns zero it means that the given
- frame is the outermost one and has no caller. */
-
-int
-file_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- return ((chain) != 0
- && !inside_entry_file (frame_pc_unwind (thisframe)));
-}
-
-/* Use the alternate method of avoiding running up off the end of the
- frame chain or following frames back into the startup code. See
- the comments in objfiles.h. */
-
-int
-func_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- return ((chain) != 0
- && !inside_main_func (get_frame_pc (thisframe))
- && !inside_entry_func (get_frame_pc (thisframe)));
-}
-
-/* A very simple method of determining a valid frame */
-
-int
-nonnull_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- return ((chain) != 0);
-}
-
/* Is ADDR inside the startup file? Note that if your machine
has a way to detect the bottom of the stack, there is no need
to call this function from FRAME_CHAIN_VALID; the reason for
@@ -637,24 +608,6 @@ block_innermost_frame (const struct block *block)
below is for infrun.c, which may give the macro a pc without that
subtracted out. */
-extern CORE_ADDR text_end;
-
-int
-deprecated_pc_in_call_dummy_before_text_end (CORE_ADDR pc, CORE_ADDR sp,
- CORE_ADDR frame_address)
-{
- return ((pc) >= text_end - CALL_DUMMY_LENGTH
- && (pc) <= text_end + DECR_PC_AFTER_BREAK);
-}
-
-int
-deprecated_pc_in_call_dummy_after_text_end (CORE_ADDR pc, CORE_ADDR sp,
- CORE_ADDR frame_address)
-{
- return ((pc) >= text_end
- && (pc) <= text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK);
-}
-
/* Is the PC in a call dummy? SP and FRAME_ADDRESS are the bottom and
top of the stack frame which we are checking, where "bottom" and
"top" refer to some section of memory which contains the code for
@@ -690,34 +643,42 @@ deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
}
-
/* Function: frame_chain_valid
Returns true for a user frame or a call_function_by_hand dummy frame,
- and false for the CRT0 start-up frame. Purpose is to terminate backtrace */
+ and false for the CRT0 start-up frame. Purpose is to terminate backtrace. */
int
-generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame_pc_unwind (fi), fp, fp))
- return 1; /* don't prune CALL_DUMMY frames */
- else /* fall back to default algorithm (see frame.h) */
- return (fp != 0
- && (INNER_THAN (get_frame_base (fi), fp)
- || get_frame_base (fi) == fp)
- && !inside_entry_file (frame_pc_unwind (fi)));
-}
-
-int
-generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
+frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
{
+ /* Don't prune CALL_DUMMY frames. */
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
- return 1; /* don't prune CALL_DUMMY frames */
- else /* fall back to default algorithm (see frame.h) */
- return (fp != 0
- && (INNER_THAN (get_frame_base (fi), fp)
- || get_frame_base (fi) == fp)
- && !inside_main_func (get_frame_pc (fi))
- && !inside_entry_func (get_frame_pc (fi)));
-}
+ return 1;
+
+ /* If the new frame pointer is zero, then it isn't valid. */
+ if (fp == 0)
+ return 0;
+
+ /* If the new frame would be inside (younger than) the previous frame,
+ then it isn't valid. */
+ if (INNER_THAN (fp, get_frame_base (fi)))
+ return 0;
+
+ /* If we're already inside the entry function for the main objfile, then it
+ isn't valid. */
+ if (inside_entry_func (get_frame_pc (fi)))
+ return 0;
+ /* If we're inside the entry file, it isn't valid. */
+ /* NOTE/drow 2002-12-25: should there be a way to disable this check? It
+ assumes a single small entry file, and the way some debug readers (e.g.
+ dbxread) figure out which object is the entry file is somewhat hokey. */
+ if (inside_entry_file (frame_pc_unwind (fi)))
+ return 0;
+
+ /* If the architecture has a custom FRAME_CHAIN_VALID, call it now. */
+ if (FRAME_CHAIN_VALID_P ())
+ return FRAME_CHAIN_VALID (fp, fi);
+
+ return 1;
+}
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index e3083e6ebc1..298cbca860b 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1,7 +1,7 @@
/* Everything about breakpoints, for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -75,7 +75,7 @@ static void map_breakpoint_numbers (char *, void (*)(struct breakpoint *));
static void ignore_command (char *, int);
-static int breakpoint_re_set_one (PTR);
+static int breakpoint_re_set_one (void *);
static void clear_command (char *, int);
@@ -110,9 +110,9 @@ static void breakpoint_1 (int, int);
static bpstat bpstat_alloc (struct breakpoint *, bpstat);
-static int breakpoint_cond_eval (PTR);
+static int breakpoint_cond_eval (void *);
-static void cleanup_executing_breakpoints (PTR);
+static void cleanup_executing_breakpoints (void *);
static void commands_command (char *, int);
@@ -142,9 +142,9 @@ typedef struct
}
args_for_catchpoint_enable;
-static int watchpoint_check (PTR);
+static int watchpoint_check (void *);
-static int cover_target_enable_exception_callback (PTR);
+static int cover_target_enable_exception_callback (void *);
static void maintenance_info_breakpoints (char *, int);
@@ -737,9 +737,11 @@ insert_breakpoints (void)
ALL_BREAKPOINTS_SAFE (b, temp)
{
- if (b->enable_state == bp_permanent)
- /* Permanent breakpoints cannot be inserted or removed. */
+ /* Permanent breakpoints cannot be inserted or removed. Disabled
+ breakpoints should not be inserted. */
+ if (b->enable_state != bp_enabled)
continue;
+
if ((b->type == bp_watchpoint
|| b->type == bp_hardware_watchpoint
|| b->type == bp_read_watchpoint
@@ -761,9 +763,6 @@ insert_breakpoints (void)
&& b->type != bp_catch_exec
&& b->type != bp_catch_throw
&& b->type != bp_catch_catch
- && b->enable_state != bp_disabled
- && b->enable_state != bp_shlib_disabled
- && b->enable_state != bp_call_disabled
&& !b->inserted
&& !b->duplicate)
{
@@ -882,9 +881,6 @@ insert_breakpoints (void)
return_val = val; /* remember failure */
}
else if (ep_is_exception_catchpoint (b)
- && b->enable_state != bp_disabled
- && b->enable_state != bp_shlib_disabled
- && b->enable_state != bp_call_disabled
&& !b->inserted
&& !b->duplicate)
@@ -942,7 +938,6 @@ insert_breakpoints (void)
else if ((b->type == bp_hardware_watchpoint ||
b->type == bp_read_watchpoint ||
b->type == bp_access_watchpoint)
- && b->enable_state == bp_enabled
&& b->disposition != disp_del_at_next_stop
&& !b->inserted
&& !b->duplicate)
@@ -1061,7 +1056,6 @@ insert_breakpoints (void)
else if ((b->type == bp_catch_fork
|| b->type == bp_catch_vfork
|| b->type == bp_catch_exec)
- && b->enable_state == bp_enabled
&& !b->inserted
&& !b->duplicate)
{
@@ -1246,8 +1240,8 @@ 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 mn10200 and
- mn10300 simulators). We shouldn't assign any special
+ 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
@@ -1924,7 +1918,7 @@ 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 (PTR ignore)
+cleanup_executing_breakpoints (void *ignore)
{
executing_breakpoint_commands = 0;
}
@@ -2010,7 +2004,7 @@ top:
static enum print_stop_action
print_it_typical (bpstat bs)
{
- struct cleanup *old_chain;
+ struct cleanup *old_chain, *ui_out_chain;
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
old_chain = make_cleanup_ui_out_stream_delete (stb);
@@ -2171,14 +2165,14 @@ print_it_typical (bpstat bs)
if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "watchpoint-trigger");
mention (bs->breakpoint_at);
- ui_out_tuple_begin (uiout, "value");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
ui_out_text (uiout, "\nOld value = ");
value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "old", stb);
ui_out_text (uiout, "\nNew value = ");
value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "new", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
ui_out_text (uiout, "\n");
value_free (bs->old_val);
bs->old_val = NULL;
@@ -2191,11 +2185,11 @@ print_it_typical (bpstat bs)
if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "read-watchpoint-trigger");
mention (bs->breakpoint_at);
- ui_out_tuple_begin (uiout, "value");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
ui_out_text (uiout, "\nValue = ");
value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "value", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
ui_out_text (uiout, "\n");
return PRINT_UNKNOWN;
break;
@@ -2207,7 +2201,7 @@ print_it_typical (bpstat bs)
if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
mention (bs->breakpoint_at);
- ui_out_tuple_begin (uiout, "value");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
ui_out_text (uiout, "\nOld value = ");
value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "old", stb);
@@ -2220,12 +2214,12 @@ print_it_typical (bpstat bs)
mention (bs->breakpoint_at);
if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
- ui_out_tuple_begin (uiout, "value");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
ui_out_text (uiout, "\nValue = ");
}
value_print (bs->breakpoint_at->val, stb->stream, 0,Val_pretty_default);
ui_out_field_stream (uiout, "new", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
ui_out_text (uiout, "\n");
return PRINT_UNKNOWN;
break;
@@ -2339,7 +2333,7 @@ bpstat_print (bpstat bs)
make it pass through catch_errors. */
static int
-breakpoint_cond_eval (PTR exp)
+breakpoint_cond_eval (void *exp)
{
struct value *mark = value_mark ();
int i = !value_true (evaluate_expression ((struct expression *) exp));
@@ -2379,7 +2373,7 @@ bpstat_alloc (struct breakpoint *b, bpstat cbs /* Current "bs" value */ )
/* Check watchpoint condition. */
static int
-watchpoint_check (PTR p)
+watchpoint_check (void *p)
{
bpstat bs = (bpstat) p;
struct breakpoint *b;
@@ -3237,9 +3231,10 @@ print_one_breakpoint (struct breakpoint *b,
char wrap_indent[80];
struct ui_stream *stb = ui_out_stream_new (uiout);
struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb);
+ struct cleanup *bkpt_chain;
annotate_record ();
- ui_out_tuple_begin (uiout, "bkpt");
+ bkpt_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "bkpt");
/* 1 */
annotate_field (0);
@@ -3477,12 +3472,14 @@ print_one_breakpoint (struct breakpoint *b,
if ((l = b->commands))
{
+ struct cleanup *script_chain;
+
annotate_field (9);
- ui_out_tuple_begin (uiout, "script");
+ script_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "script");
print_command_lines (uiout, l, 4);
- ui_out_tuple_end (uiout);
+ do_cleanups (script_chain);
}
- ui_out_tuple_end (uiout);
+ do_cleanups (bkpt_chain);
do_cleanups (old_chain);
}
@@ -3550,6 +3547,7 @@ breakpoint_1 (int bnum, int allflag)
register struct breakpoint *b;
CORE_ADDR last_addr = (CORE_ADDR) -1;
int nr_printable_breakpoints;
+ struct cleanup *bkpttbl_chain;
/* Compute the number of rows in the table. */
nr_printable_breakpoints = 0;
@@ -3562,9 +3560,13 @@ breakpoint_1 (int bnum, int allflag)
}
if (addressprint)
- ui_out_table_begin (uiout, 6, nr_printable_breakpoints, "BreakpointTable");
+ bkpttbl_chain
+ = make_cleanup_ui_out_table_begin_end (uiout, 6, nr_printable_breakpoints,
+ "BreakpointTable");
else
- ui_out_table_begin (uiout, 5, nr_printable_breakpoints, "BreakpointTable");
+ bkpttbl_chain
+ = make_cleanup_ui_out_table_begin_end (uiout, 5, nr_printable_breakpoints,
+ "BreakpointTable");
if (nr_printable_breakpoints > 0)
annotate_breakpoints_headers ();
@@ -3606,7 +3608,7 @@ breakpoint_1 (int bnum, int allflag)
print_one_breakpoint (b, &last_addr);
}
- ui_out_table_end (uiout);
+ do_cleanups (bkpttbl_chain);
if (nr_printable_breakpoints == 0)
{
@@ -4398,7 +4400,7 @@ static void
mention (struct breakpoint *b)
{
int say_where = 0;
- struct cleanup *old_chain;
+ struct cleanup *old_chain, *ui_out_chain;
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
@@ -4420,39 +4422,39 @@ mention (struct breakpoint *b)
break;
case bp_watchpoint:
ui_out_text (uiout, "Watchpoint ");
- ui_out_tuple_begin (uiout, "wpt");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
break;
case bp_hardware_watchpoint:
ui_out_text (uiout, "Hardware watchpoint ");
- ui_out_tuple_begin (uiout, "wpt");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "wpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
break;
case bp_read_watchpoint:
ui_out_text (uiout, "Hardware read watchpoint ");
- ui_out_tuple_begin (uiout, "hw-rwpt");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-rwpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
break;
case bp_access_watchpoint:
ui_out_text (uiout, "Hardware access (read/write) watchpoint ");
- ui_out_tuple_begin (uiout, "hw-awpt");
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "hw-awpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
break;
case bp_breakpoint:
if (ui_out_is_mi_like_p (uiout))
@@ -5584,7 +5586,7 @@ until_break_command_continuation (struct continuation_arg *arg)
/* ARGSUSED */
void
-until_break_command (char *arg, int from_tty)
+until_break_command (char *arg, int from_tty, int anywhere)
{
struct symtabs_and_lines sals;
struct symtab_and_line sal;
@@ -5617,9 +5619,16 @@ until_break_command (char *arg, int from_tty)
resolve_sal_pc (&sal);
- breakpoint =
- set_momentary_breakpoint (sal,get_frame_id (deprecated_selected_frame),
- bp_until);
+ if (anywhere)
+ /* If the user told us to continue until a specified location,
+ we don't specify a frame at which we need to stop. */
+ breakpoint = set_momentary_breakpoint (sal, null_frame_id, bp_until);
+ else
+ /* Otherwise, specify the current frame, because we want to stop only
+ at the very same frame. */
+ breakpoint = set_momentary_breakpoint (sal,
+ get_frame_id (deprecated_selected_frame),
+ bp_until);
if (!event_loop_p || !target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
@@ -5647,8 +5656,8 @@ until_break_command (char *arg, int from_tty)
add_continuation (until_break_command_continuation, arg1);
}
- /* Keep within the current frame */
-
+ /* Keep within the current frame, or in frames called by the current
+ one. */
if (prev_frame)
{
sal = find_pc_line (get_frame_pc (prev_frame), 0);
@@ -5667,7 +5676,7 @@ until_break_command (char *arg, int from_tty)
if (!event_loop_p || !target_can_async_p ())
do_cleanups (old_chain);
}
-
+
#if 0
/* These aren't used; I don't konw what they were for. */
/* Set a breakpoint at the catch clause for NAME. */
@@ -6233,7 +6242,7 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg,
inside a catch_errors */
static int
-cover_target_enable_exception_callback (PTR arg)
+cover_target_enable_exception_callback (void *arg)
{
args_for_catchpoint_enable *args = arg;
struct symtab_and_line *sal;
@@ -6910,7 +6919,7 @@ delete_command (char *arg, int from_tty)
Unused in this case. */
static int
-breakpoint_re_set_one (PTR bint)
+breakpoint_re_set_one (void *bint)
{
/* get past catch_errs */
struct breakpoint *b = (struct breakpoint *) bint;
@@ -7051,7 +7060,7 @@ breakpoint_re_set_one (PTR bint)
value_free (b->val);
b->val = evaluate_expression (b->exp);
release_value (b->val);
- if (VALUE_LAZY (b->val))
+ if (VALUE_LAZY (b->val) && b->enable_state == bp_enabled)
value_fetch_lazy (b->val);
if (b->cond_string != NULL)
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 7b359cb2206..d5d6171a0a6 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -203,10 +203,10 @@ 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 mn10200 and mn10300 simulators).
- NULL is not a special value for this field. */
+ /* 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;
/* Line number of this address. */
@@ -534,7 +534,7 @@ extern int deprecated_frame_in_dummy (struct frame_info *);
extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
-extern void until_break_command (char *, int);
+extern void until_break_command (char *, int, int);
extern void breakpoint_re_set (void);
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 065e078f892..bff208d5b48 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1,6 +1,7 @@
/* Support routines for building symbol tables in GDB's internal format.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -252,7 +253,7 @@ add_using_directive (const char *name, unsigned int outer_length,
/* ARGSUSED */
void
-really_free_pendings (PTR dummy)
+really_free_pendings (void *dummy)
{
struct pending *next, *next1;
@@ -588,10 +589,6 @@ record_pending_block (struct objfile *objfile, struct block *block,
}
}
-/* OBSOLETE Note that this is only used in this file and in dstread.c, which */
-/* OBSOLETE should be fixed to not need direct access to this function. When */
-/* OBSOLETE that is done, it can be made static again. */
-
static struct blockvector *
make_blockvector (struct objfile *objfile)
{
@@ -721,15 +718,17 @@ start_subfile (char *name, char *dirname)
later via a call to record_debugformat. */
subfile->debugformat = NULL;
- /* cfront output is a C program, so in most ways it looks like a C
- program. But to demangle we need to set the language to C++. We
- can distinguish cfront code by the fact that it has #line
- directives which specify a file name ending in .C.
-
- So if the filename of this subfile ends in .C, then change the
+#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
- (in particular, some people use .cxx with cfront). */
+ 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/buildsym.h b/gdb/buildsym.h
index 41c85fd8452..555dbdfd214 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -1,6 +1,6 @@
/* Build symbol tables in GDB's internal format.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1996,
- 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -83,16 +83,6 @@ EXTERN unsigned char processing_gcc_compilation;
EXTERN unsigned char processing_acc_compilation;
-/* elz: added this flag to know when a block is compiled with HP
- compilers (cc, aCC). This is necessary because of the macro
- COERCE_FLOAT_TO_DOUBLE defined in tm_hppa.h, which causes a
- coercion of float to double to always occur in parameter passing
- for a function called by gdb (see the function value_arg_coerce in
- valops.c). This is necessary only if the target was compiled with
- gcc, not with HP compilers or with g++ */
-
-EXTERN unsigned char processing_hp_compilation;
-
/* When set, the file that we're processing seems to have debugging
info for C++ namespaces, so buildsym.c shouldn't try to guess
namespace info itself. */
@@ -260,7 +250,7 @@ extern void finish_block (struct symbol *symbol,
CORE_ADDR start, CORE_ADDR end,
struct objfile *objfile);
-extern void really_free_pendings (PTR dummy);
+extern void really_free_pendings (void *dummy);
extern void start_subfile (char *name, char *dirname);
@@ -293,12 +283,6 @@ extern int hashname (char *name);
extern void free_pending_blocks (void);
-/* OBSOLETE FIXME: Note that this is used only in buildsym.c and dstread.c, */
-/* OBSOLETE which should be fixed to not need direct access to */
-/* OBSOLETE make_blockvector. */
-
-/* OBSOLETE extern struct blockvector *make_blockvector (struct objfile *objfile); */
-
/* FIXME: Note that this is used only in buildsym.c and dstread.c,
which should be fixed to not need direct access to
record_pending_block. */
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 1faea77e8e6..30f6e8330f2 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -789,7 +789,7 @@ array_mod: '[' ']'
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
/* We used to try to recognize more pointer to member types here, but
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index fa26abc12b4..8642a30f1e0 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -1,6 +1,6 @@
/* Support for printing C and C++ types for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001, 2002
+ 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -217,7 +217,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
switch (TYPE_CODE (type))
{
case TYPE_CODE_PTR:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 1);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 1, 1);
fprintf_filtered (stream, "*");
c_type_print_modifier (type, stream, 1, need_post_space);
break;
@@ -225,7 +225,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
case TYPE_CODE_MEMBER:
if (passed_a_ptr)
fprintf_filtered (stream, "(");
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
fprintf_filtered (stream, " ");
name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
if (name)
@@ -238,7 +238,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
case TYPE_CODE_METHOD:
if (passed_a_ptr)
fprintf_filtered (stream, "(");
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
if (passed_a_ptr)
{
fprintf_filtered (stream, " ");
@@ -248,23 +248,27 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
break;
case TYPE_CODE_REF:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 1, 0);
fprintf_filtered (stream, "&");
c_type_print_modifier (type, stream, 1, need_post_space);
break;
case TYPE_CODE_FUNC:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
if (passed_a_ptr)
fprintf_filtered (stream, "(");
break;
case TYPE_CODE_ARRAY:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
if (passed_a_ptr)
fprintf_filtered (stream, "(");
break;
+ case TYPE_CODE_TYPEDEF:
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
+ break;
+
case TYPE_CODE_UNDEF:
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
@@ -280,7 +284,6 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
case TYPE_CODE_STRING:
case TYPE_CODE_BITSTRING:
case TYPE_CODE_COMPLEX:
- case TYPE_CODE_TYPEDEF:
case TYPE_CODE_TEMPLATE:
case TYPE_CODE_NAMESPACE:
/* These types need no prefix. They are listed here so that
@@ -545,19 +548,22 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
/ TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
fprintf_filtered (stream, "]");
- c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
+ 0, 0);
break;
case TYPE_CODE_MEMBER:
if (passed_a_ptr)
fprintf_filtered (stream, ")");
- c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
+ 0, 0);
break;
case TYPE_CODE_METHOD:
if (passed_a_ptr)
fprintf_filtered (stream, ")");
- c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
+ c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
+ 0, 0);
if (passed_a_ptr)
{
c_type_print_args (type, stream);
@@ -566,7 +572,8 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
case TYPE_CODE_PTR:
case TYPE_CODE_REF:
- c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
+ c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
+ 1, 0);
break;
case TYPE_CODE_FUNC:
@@ -594,7 +601,12 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
}
fprintf_filtered (stream, ")");
}
- c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
+ c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
+ passed_a_ptr, 0);
+ break;
+
+ case TYPE_CODE_TYPEDEF:
+ c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
passed_a_ptr, 0);
break;
@@ -613,7 +625,6 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
case TYPE_CODE_STRING:
case TYPE_CODE_BITSTRING:
case TYPE_CODE_COMPLEX:
- case TYPE_CODE_TYPEDEF:
case TYPE_CODE_TEMPLATE:
case TYPE_CODE_NAMESPACE:
/* These types do not need a suffix. They are listed so that
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index ed1dfee81d7..3b4ac2ab3e0 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -1,7 +1,7 @@
/* Support for printing C values for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -511,7 +511,7 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
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"))
+ strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
{
/* Print nothing */
}
diff --git a/gdb/charset.c b/gdb/charset.c
index 00e10659a54..4f5e5b45b68 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -1,5 +1,6 @@
/* Character set conversion support for GDB.
- Copyright 2001 Free Software Foundation, Inc.
+
+ Copyright 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,7 +25,7 @@
#include "gdb_assert.h"
#include <stddef.h>
-#include <string.h>
+#include "gdb_string.h"
#include <ctype.h>
#ifdef HAVE_ICONV
@@ -442,7 +443,7 @@ cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
static void
-register_iconv_charsets ()
+register_iconv_charsets (void)
{
/* Here we should check whether various character sets were
recognized by the local iconv implementation.
@@ -479,7 +480,7 @@ cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
}
static void
-register_iconv_charsets ()
+register_iconv_charsets (void)
{
}
@@ -1016,7 +1017,7 @@ set_host_charset (const char *charset)
const char *
-host_charset ()
+host_charset (void)
{
return current_host_charset->name;
}
@@ -1032,7 +1033,7 @@ set_target_charset (const char *charset)
const char *
-target_charset ()
+target_charset (void)
{
return current_target_charset->name;
}
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index bd079f250bb..e3b45cdd538 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -365,6 +365,15 @@ cli_out_new (struct ui_file *stream)
return ui_out_new (&cli_ui_out_impl, data, flags);
}
+struct ui_file *
+cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
+{
+ struct ui_out_data *data = ui_out_data (uiout);
+ struct ui_file *old = data->stream;
+ data->stream = stream;
+ return old;
+}
+
/* standard gdb initialization hook */
void
_initialize_cli_out (void)
diff --git a/gdb/cli-out.h b/gdb/cli-out.h
index 723b7260cbf..a984d058390 100644
--- a/gdb/cli-out.h
+++ b/gdb/cli-out.h
@@ -24,4 +24,7 @@
extern struct ui_out *cli_out_new (struct ui_file *stream);
+extern struct ui_file *cli_out_set_stream (struct ui_out *uiout,
+ struct ui_file *stream);
+
#endif
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index e8563ff5c59..d8ab67d49f0 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -1,5 +1,6 @@
/* Header file for GDB command decoding library.
- Copyright 2000 Free Software Foundation, Inc.
+
+ Copyright 2000, 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
@@ -19,9 +20,10 @@
#if !defined (CLI_DECODE_H)
#define CLI_DECODE_H 1
-#include "gdb_regex.h" /* Needed by apropos_cmd. */
#include "command.h"
+struct re_pattern_buffer;
+
#if 0
/* FIXME: cagney/2002-03-17: Once cmd_type() has been removed, ``enum
cmd_types'' can be moved from "command.h" to "cli-decode.h". */
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 7a58fcbbd7b..6bd40e033b1 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -132,7 +132,8 @@ bfd_openr_with_cleanup (const char *filename, const char *target)
{
bfd *ibfd;
- if ((ibfd = bfd_openr (filename, target)) == NULL)
+ ibfd = bfd_openr (filename, target);
+ if (ibfd == NULL)
error ("Failed to open %s: %s.", filename,
bfd_errmsg (bfd_get_error ()));
@@ -150,7 +151,8 @@ bfd_openw_with_cleanup (char *filename, const char *target, char *mode)
if (*mode == 'w') /* Write: create new file */
{
- if ((obfd = bfd_openw (filename, target)) == NULL)
+ obfd = bfd_openw (filename, target);
+ if (obfd == NULL)
error ("Failed to open %s: %s.", filename,
bfd_errmsg (bfd_get_error ()));
make_cleanup_bfd_close (obfd);
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
new file mode 100644
index 00000000000..e2116e70c58
--- /dev/null
+++ b/gdb/cli/cli-interp.c
@@ -0,0 +1,138 @@
+/* CLI Definitions for GDB, the GNU debugger.
+
+ Copyright 2002, 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "interps.h"
+#include "wrapper.h"
+#include "event-top.h"
+#include "ui-out.h"
+#include "cli-out.h"
+#include "top.h" /* for "execute_command" */
+#include "gdb_string.h"
+
+struct ui_out *cli_uiout;
+
+/* These are the ui_out and the interpreter for the console interpreter. */
+
+/* Longjmp-safe wrapper for "execute_command" */
+static int do_captured_execute_command (struct ui_out *uiout, void *data);
+static enum gdb_rc safe_execute_command (struct ui_out *uiout, char *command,
+ int from_tty);
+struct captured_execute_command_args
+{
+ char *command;
+ int from_tty;
+};
+
+/* These implement the cli out interpreter: */
+
+static void *
+cli_interpreter_init (void)
+{
+ return NULL;
+}
+
+static int
+cli_interpreter_resume (void *data)
+{
+ /*sync_execution = 1; */
+ gdb_setup_readline ();
+ return 1;
+}
+
+static int
+cli_interpreter_suspend (void *data)
+{
+ gdb_disable_readline ();
+ return 1;
+}
+
+/* Don't display the prompt if we are set quiet. */
+static int
+cli_interpreter_display_prompt_p (void *data)
+{
+ if (interp_quiet_p (NULL))
+ return 0;
+ else
+ return 1;
+}
+
+static int
+cli_interpreter_exec (void *data, const char *command_str)
+{
+ int result;
+ struct ui_file *old_stream;
+
+ /* FIXME: cagney/2003-02-01: Need to const char *propogate
+ safe_execute_command. */
+ char *str = strcpy (alloca (strlen (command_str) + 1), command_str);
+
+ /* gdb_stdout could change between the time cli_uiout was initialized
+ and now. Since we're probably using a different interpreter which has
+ a new ui_file for gdb_stdout, use that one instead of the default.
+
+ It is important that it gets reset everytime, since the user could
+ set gdb to use a different interpreter. */
+ old_stream = cli_out_set_stream (cli_uiout, gdb_stdout);
+ result = safe_execute_command (cli_uiout, str, 1);
+ cli_out_set_stream (cli_uiout, old_stream);
+ return result;
+}
+
+static int
+do_captured_execute_command (struct ui_out *uiout, void *data)
+{
+ struct captured_execute_command_args *args =
+ (struct captured_execute_command_args *) data;
+ execute_command (args->command, args->from_tty);
+ return GDB_RC_OK;
+}
+
+static enum gdb_rc
+safe_execute_command (struct ui_out *uiout, char *command, int from_tty)
+{
+ struct captured_execute_command_args args;
+ args.command = command;
+ args.from_tty = from_tty;
+ return catch_exceptions (uiout, do_captured_execute_command, &args,
+ NULL, RETURN_MASK_ALL);
+}
+
+
+/* standard gdb initialization hook */
+void
+_initialize_cli_interp (void)
+{
+ static const struct interp_procs procs = {
+ cli_interpreter_init, /* init_proc */
+ cli_interpreter_resume, /* resume_proc */
+ cli_interpreter_suspend, /* suspend_proc */
+ cli_interpreter_exec, /* exec_proc */
+ cli_interpreter_display_prompt_p /* prompt_proc_p */
+ };
+ struct interp *cli_interp;
+
+ /* Create a default uiout builder for the CLI. */
+ cli_uiout = cli_out_new (gdb_stdout);
+ cli_interp = interp_new (INTERP_CONSOLE, NULL, cli_uiout, &procs);
+
+ interp_add (cli_interp);
+}
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 2b23301c6b3..d68c365959d 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1093,7 +1093,7 @@ define_command (char *comname, int from_tty)
/* Look it up, and verify that we got an exact match. */
c = lookup_cmd (&tem, cmdlist, "", -1, 1);
- if (c && !STREQ (comname, c->name))
+ if (c && strcmp (comname, c->name) != 0)
c = 0;
if (c)
@@ -1126,7 +1126,7 @@ define_command (char *comname, int from_tty)
/* Look up cmd it hooks, and verify that we got an exact match. */
tem = comname + hook_name_size;
hookc = lookup_cmd (&tem, cmdlist, "", -1, 0);
- if (hookc && !STREQ (comname + hook_name_size, hookc->name))
+ if (hookc && strcmp (comname + hook_name_size, hookc->name) != 0)
hookc = 0;
if (!hookc)
{
@@ -1228,7 +1228,7 @@ struct source_cleanup_lines_args
};
static void
-source_cleanup_lines (PTR args)
+source_cleanup_lines (void *args)
{
struct source_cleanup_lines_args *p =
(struct source_cleanup_lines_args *) args;
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 6fe2ff0816b..1d68ae4aa1a 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -1,6 +1,6 @@
/* Handle set and show GDB commands.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 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
@@ -353,28 +353,35 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
void
cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
{
- ui_out_tuple_begin (uiout, "showlist");
+ struct cleanup *showlist_chain;
+
+ showlist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "showlist");
for (; list != NULL; list = list->next)
{
/* If we find a prefix, run its list, prefixing our output by its
prefix (with "show " skipped). */
if (list->prefixlist && !list->abbrev_flag)
{
- ui_out_tuple_begin (uiout, "optionlist");
+ struct cleanup *optionlist_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist");
ui_out_field_string (uiout, "prefix", list->prefixname + 5);
cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
- ui_out_tuple_end (uiout);
+ /* Close the tuple. */
+ do_cleanups (optionlist_chain);
}
if (list->type == show_cmd)
{
- ui_out_tuple_begin (uiout, "option");
+ struct cleanup *option_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
ui_out_text (uiout, prefix);
ui_out_field_string (uiout, "name", list->name);
ui_out_text (uiout, ": ");
do_setshow_command ((char *) NULL, from_tty, list);
- ui_out_tuple_end (uiout);
+ /* Close the tuple. */
+ do_cleanups (option_chain);
}
}
- ui_out_tuple_end (uiout);
+ /* Close the tuple. */
+ do_cleanups (showlist_chain);
}
diff --git a/gdb/coffread.c b/gdb/coffread.c
index cfd5a9f61e7..6ce6d31cf72 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1,6 +1,6 @@
/* Read coff symbol tables and convert to internal format, for GDB.
Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
@@ -1462,10 +1462,8 @@ process_coff_symbol (register struct coff_symbol *cs,
memset (sym, 0, sizeof (struct symbol));
name = cs->c_name;
name = EXTERNAL_NAME (name, objfile->obfd);
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
- &objfile->symbol_obstack);
SYMBOL_LANGUAGE (sym) = language_auto;
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
+ SYMBOL_SET_NAMES (sym, name, strlen (name), objfile);
/* default assumptions */
SYMBOL_VALUE (sym) = cs->c_value;
diff --git a/gdb/complaints.c b/gdb/complaints.c
index b4c55dab7df..47580086dd2 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -249,16 +249,6 @@ internal_complaint (struct complaints **complaints, const char *file,
va_end (args);
}
-void
-complain (struct deprecated_complaint *complaint, ...)
-{
- va_list args;
- va_start (args, complaint);
- vcomplaint (&symfile_complaints, NULL/*file*/, 0/*line*/,
- complaint->message, args);
- va_end (args);
-}
-
/* Clear out / initialize all complaint counters that have ever been
incremented. If LESS_VERBOSE is 1, be less verbose about
successive complaints, since the messages are appearing all
diff --git a/gdb/complaints.h b/gdb/complaints.h
index a94de27c8ef..0168b524195 100644
--- a/gdb/complaints.h
+++ b/gdb/complaints.h
@@ -50,42 +50,4 @@ extern void clear_complaints (struct complaints **complaints,
int less_verbose, int noisy);
-/* Deprecated interfaces to keep the old code working (until it is all
- converted to the above). Existing code such as:
-
- struct deprecated_complaint msg = { "msg 0x%08x[sic]", 0, 0 };
- deprecated_complain (&msg, addr);
-
- should be replaced by either the new call (for the singular case):
-
- complaint (&symtab_complaints, "msg 0x%s", paddr (addr));
-
- or with a wrapper function (for the many-of case):
-
- msg_complaint (CORE_ADDR addr)
- { complaint (&symtab_complaints, "msg 0x%s", paddr (addr)); }
- ...
- msg_complaint (addr);
-
- Yes, the typo is intentional. The motivation behind this interface
- change is to eliminate all possibility of this problem re-occurring
- (it has occurred in the past and no one is sure that it isn't
- present now).
-
- Support for complaining about things in the symbol file that aren't
- catastrophic.
-
- Each such thing gets a counter. The first time we have the problem,
- during a symbol read, we report it. At the end of symbol reading,
- if verbose, we report how many of each problem we had. */
-
-struct deprecated_complaint
-{
- const char *message;
- unsigned counter_ignored;
- struct deprecated_complaint *next_ignored;
-};
-
-extern void complain (struct deprecated_complaint *, ...);
-
#endif /* !defined (COMPLAINTS_H) */
diff --git a/gdb/config.in b/gdb/config.in
index 921b1682042..06f46709aff 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -71,8 +71,10 @@
/* Define vfork as fork if vfork does not work. */
#undef vfork
-/* Define if compiling on Solaris 7. */
-#undef _MSE_INT_H
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
/* Define if your struct reg has r_fs. */
#undef HAVE_STRUCT_REG_R_FS
@@ -80,9 +82,6 @@
/* Define if your struct reg has r_gs. */
#undef HAVE_STRUCT_REG_R_GS
-/* Define if the pread64 function is available. */
-#undef HAVE_PREAD64
-
/* Define if <link.h> exists and defines struct link_map which has
members with an ``l_'' prefix. (For Solaris, SVR4, and
SVR4-like systems.) */
@@ -147,10 +146,6 @@
size_t, and assorted other type changes. */
#undef PROC_SERVICE_IS_OLD
-/* If you want to specify a default CPU variant, define this to be its
- name, as a C string. */
-#undef TARGET_CPU_DEFAULT
-
/* Define if the simulator is being linked in. */
#undef WITH_SIM
@@ -172,15 +167,6 @@
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
#undef HAVE_PT_GETXMMREGS
-/* Define if gnu-regex.c included with GDB should be used. */
-#undef USE_INCLUDED_REGEX
-
-/* BFD's default architecture. */
-#undef DEFAULT_BFD_ARCH
-
-/* BFD's default target vector. */
-#undef DEFAULT_BFD_VEC
-
/* Multi-arch enabled. */
#undef GDB_MULTI_ARCH
@@ -202,14 +188,8 @@
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
-/* Define if you have the bcopy function. */
-#undef HAVE_BCOPY
-
-/* Define if you have the btowc function. */
-#undef HAVE_BTOWC
-
-/* Define if you have the bzero function. */
-#undef HAVE_BZERO
+/* Define if you have the _mcleanup function. */
+#undef HAVE__MCLEANUP
/* Define if you have the canonicalize_file_name function. */
#undef HAVE_CANONICALIZE_FILE_NAME
@@ -223,8 +203,8 @@
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the isascii function. */
-#undef HAVE_ISASCII
+/* Define if you have the monstartup function. */
+#undef HAVE_MONSTARTUP
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
@@ -232,6 +212,9 @@
/* Define if you have the poll function. */
#undef HAVE_POLL
+/* Define if you have the pread64 function. */
+#undef HAVE_PREAD64
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -277,9 +260,6 @@
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
-/* Define if you have the <asm/debugreg.h> header file. */
-#undef HAVE_ASM_DEBUGREG_H
-
/* Define if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
@@ -316,9 +296,6 @@
/* Define if you have the <nlist.h> header file. */
#undef HAVE_NLIST_H
-/* Define if you have the <objlist.h> header file. */
-#undef HAVE_OBJLIST_H
-
/* Define if you have the <poll.h> header file. */
#undef HAVE_POLL_H
@@ -343,6 +320,9 @@
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
/* Define if you have the <sys/debugreg.h> header file. */
#undef HAVE_SYS_DEBUGREG_H
@@ -418,21 +398,12 @@
/* Define if you have the <wait.h> header file. */
#undef HAVE_WAIT_H
-/* Define if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
-
-/* Define if you have the <wctype.h> header file. */
-#undef HAVE_WCTYPE_H
-
/* Define if you have the dl library (-ldl). */
#undef HAVE_LIBDL
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
-/* Define if you have the socket library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
/* Define if you have the w library (-lw). */
#undef HAVE_LIBW
@@ -451,9 +422,25 @@
/* Name of this package. */
#undef PACKAGE
+/* Global directory for separate debug files. */
+#undef DEBUGDIR
+
+/* Define to BFD's default architecture. */
+#undef DEFAULT_BFD_ARCH
+
+/* Define to BFD's default target vector. */
+#undef DEFAULT_BFD_VEC
+
+/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
+ Solaris 2.[78] when using GCC. */
+#undef _MSE_INT_H
+
/* Define if sigsetjmp is available. */
#undef HAVE_SIGSETJMP
+/* Define to 1 if the regex included in libiberty should be used. */
+#undef USE_INCLUDED_REGEX
+
/* Define if malloc is not declared in system header files. */
#undef NEED_DECLARATION_MALLOC
@@ -520,6 +507,9 @@
/* Define if <thread_db.h> has the TD_NOTALLOC error code. */
#undef THREAD_DB_HAS_TD_NOTALLOC
+/* Define to the default OS ABI for this configuration. */
+#undef GDB_OSABI_DEFAULT
+
/* Define to be a string naming the default host character set. */
#undef GDB_DEFAULT_HOST_CHARSET
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index fed32e7930b..9e99b33cd1f 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -1,7 +1,7 @@
/* Native definitions for alpha running GNU/Linux.
- Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002 Free Software
- Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -45,4 +45,7 @@
pointer to the first register. */
#define ALPHA_REGSET_BASE(regsetp) ((long *) (regsetp))
+/* The address of UNIQUE for ptrace. */
+#define ALPHA_UNIQUE_PTRACE_ADDR 65
+
#endif /* NM_LINUX_H */
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 7c6ab439e64..54f7b42fd08 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -32,6 +32,7 @@
@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
@V@/dejagnu/baseboards/mn10300-cygmon.exp @V@/dejagnu/baseboards/mn10300cygmon.exp
@@ -66,7 +67,9 @@
@V@/gdb/ChangeLog-1999 @V@/gdb/ChangeLog.99
@V@/gdb/ChangeLog-2000 @V@/gdb/ChangeLog.000
@V@/gdb/ChangeLog-2001 @V@/gdb/ChangeLog.001
+@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/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
@@ -105,6 +108,8 @@
@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
@@ -129,6 +134,8 @@
@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
@@ -142,15 +149,17 @@
@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64linux-nat.c
@V@/gdb/jv-exp.tab.c @V@/gdb/jv-exp_tab.c
@V@/gdb/m2-exp.tab.c @V@/gdb/m2-exp_tab.c
+@V@/gdb/m68klinux-nat.c @V@/gdb/m68kl-nat.c
+@V@/gdb/m68klinux-tdep.c @V@/gdb/m68kl-tdep.c
@V@/gdb/m68knbsd-nat.c @V@/gdb/m6nbsd-nat.c
@V@/gdb/m68knbsd-tdep.c @V@/gdb/m6nbsd-tdep.c
@V@/gdb/mips-linux-nat.c @V@/gdb/mipslnxnat.c
@V@/gdb/mips-linux-tdep.c @V@/gdb/mipslnxtdep.c
@V@/gdb/mipsnbsd-nat.c @V@/gdb/mipsnbnat.c
@V@/gdb/mipsnbsd-tdep.c @V@/gdb/mipsnbtdep.c
-@V@/gdb/nindy-share/b.out.h @V@/gdb/nindy-share/b_out.h
@V@/gdb/ns32knbsd-nat.c @V@/gdb/ns32nb-nat.c
@V@/gdb/ns32knbsd-tdep.c @V@/gdb/ns32nb-tdep.c
+@V@/gdb/objc-exp.tab.c @V@/gdb/objc-exp_tab.c
@V@/gdb/osf-share/cma_stack_int.h @V@/gdb/osf-share/cma_stkint.h
@V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
@V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-linx-tdep.c
@@ -162,11 +171,9 @@
@V@/gdb/remote-array.c @V@/gdb/rmt-array.c
@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
@V@/gdb/remote-eb.c @V@/gdb/rmt-eb.c
-@V@/gdb/remote-es.c @V@/gdb/rmt-es.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-nindy.c @V@/gdb/rmt-nindy.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
@@ -198,6 +205,8 @@
@V@/gdb/testsuite/gdb.c++/annota2.exp @V@/gdb/testsuite/gdb.cxx/annota2.exp
@V@/gdb/testsuite/gdb.c++/anon-union.cc @V@/gdb/testsuite/gdb.cxx/anon-union.cc
@V@/gdb/testsuite/gdb.c++/anon-union.exp @V@/gdb/testsuite/gdb.cxx/anon-union.exp
+@V@/gdb/testsuite/gdb.c++/casts.cc @V@/gdb/testsuite/gdb.cxx/casts.cc
+@V@/gdb/testsuite/gdb.c++/casts.exp @V@/gdb/testsuite/gdb.cxx/casts.exp
@V@/gdb/testsuite/gdb.c++/classes.exp @V@/gdb/testsuite/gdb.cxx/classes.exp
@V@/gdb/testsuite/gdb.c++/configure @V@/gdb/testsuite/gdb.cxx/configure
@V@/gdb/testsuite/gdb.c++/configure.in @V@/gdb/testsuite/gdb.cxx/configure.in
@@ -240,6 +249,15 @@
@V@/gdb/testsuite/gdb.c++/overload.exp @V@/gdb/testsuite/gdb.cxx/overload.exp
@V@/gdb/testsuite/gdb.c++/ovldbreak.cc @V@/gdb/testsuite/gdb.cxx/ovldbreak.cc
@V@/gdb/testsuite/gdb.c++/ovldbreak.exp @V@/gdb/testsuite/gdb.cxx/ovldbreak.exp
+@V@/gdb/testsuite/gdb.c++/pr-1023.cc @V@/gdb/testsuite/gdb.cxx/pr-1023.cc
+@V@/gdb/testsuite/gdb.c++/pr-1023.exp @V@/gdb/testsuite/gdb.cxx/pr-1023.exp
+@V@/gdb/testsuite/gdb.c++/pr-574.cc @V@/gdb/testsuite/gdb.cxx/pr-574.cc
+@V@/gdb/testsuite/gdb.c++/pr-574.exp @V@/gdb/testsuite/gdb.cxx/pr-574.exp
+@V@/gdb/testsuite/gdb.c++/printmethod.cc @V@/gdb/testsuite/gdb.cxx/printmethod.cc
+@V@/gdb/testsuite/gdb.c++/printmethod.exp @V@/gdb/testsuite/gdb.cxx/printmethod.exp
+@V@/gdb/testsuite/gdb.c++/psmang.exp @V@/gdb/testsuite/gdb.cxx/psmang.exp
+@V@/gdb/testsuite/gdb.c++/psmang1.cc @V@/gdb/testsuite/gdb.cxx/psmang1.cc
+@V@/gdb/testsuite/gdb.c++/psmang2.cc @V@/gdb/testsuite/gdb.cxx/psmang2.cc
@V@/gdb/testsuite/gdb.c++/ref-types.cc @V@/gdb/testsuite/gdb.cxx/ref-types.cc
@V@/gdb/testsuite/gdb.c++/ref-types.exp @V@/gdb/testsuite/gdb.cxx/ref-types.exp
@V@/gdb/testsuite/gdb.c++/templates.cc @V@/gdb/testsuite/gdb.cxx/templates.cc
@@ -255,6 +273,10 @@
@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
+@V@/gdb/testsuite/gdb.mi/mi1-var-display.exp @V@/gdb/testsuite/gdb.mi/mi1vardisplay.exp
@V@/gdb/tui/tuiSourceWin.c @V@/gdb/tui/tuiWinSource.c
@V@/gdb/tui/tuiSourceWin.h @V@/gdb/tui/tuiWinSource.h
@V@/gdb/x86-64-linux-tdep.c @V@/gdb/x8664-ltdep.c
@@ -371,6 +393,8 @@
@V@/opcodes/ia64-opc-m.c @V@/opcodes/ia64opcm.c
@V@/opcodes/ia64-opc-x.c @V@/opcodes/ia64opcx.c
@V@/opcodes/ia64-opc.c @V@/opcodes/ia64-opc.c
+@V@/opcodes/iq2000-desc.c @V@/opcodes/iq2000desc.c
+@V@/opcodes/iq2000-dis.c @V@/opcodes/iq2000dis.c
@V@/opcodes/m68hc11-dis.c @V@/opcodes/m68hc11dis.c
@V@/opcodes/m68hc11-opc.c @V@/opcodes/m68hc11opc.c
@V@/opcodes/openris-dis.c @V@/opcodes/orisc-dis.c
@@ -379,6 +403,7 @@
@V@/opcodes/openrisc-ibld.c @V@/opcodes/orisc-ibld.c
@V@/opcodes/openrisc-opc.c @V@/opcodes/orisc-opc.c
@V@/opcodes/openrisc-opc.h @V@/opcodes/orisc-opc.h
+@V@/opcodes/po/.cvsignore @V@/opcodes/po/_cvsignore
@V@/readline/config.h.bot @V@/readline/config.h-bot
@V@/readline/config.h.in @V@/readline/config.h-in
@V@/sim/m68hc11/dv-m68hc11eepr.c @V@/sim/m68hc11/dv-eepr.c
diff --git a/gdb/config/h8500/h8500.mt b/gdb/config/h8500/h8500.mt
index 35f6b4ddc86..64608a08957 100644
--- a/gdb/config/h8500/h8500.mt
+++ b/gdb/config/h8500/h8500.mt
@@ -1,6 +1,6 @@
-# Target: H8500 with HMS monitor and H8 simulator
-TDEPFILES= h8500-tdep.o monitor.o remote-hms.o dsrec.o
-TM_FILE= tm-h8500.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/h8500/libsim.a
+# 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
index 4f8f3479d4a..4d0f6407fa5 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -1,295 +1,295 @@
-/* Parameters for execution on a H8/500 series machine.
-
- Copyright 1993, 1994, 1995, 1998, 1999, 2000, 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. */
-
-#include "regcache.h"
-
-/* NOTE: cagney/2002-11-24: This is a guess. */
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-#define CALL_DUMMY_LOCATION ON_STACK
-#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
-
-/* Contributed by Steve Chamberlain sac@cygnus.com */
-
-#define GDB_TARGET_IS_H8500
-
-/* Define the sizes of integers and pointers. */
-
-#define TARGET_INT_BIT 16
-
-#define TARGET_LONG_BIT 32
-
-#define TARGET_PTR_BIT (minimum_mode ? 16 : 32)
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-#define SKIP_PROLOGUE(ip) (h8500_skip_prologue (ip))
-extern CORE_ADDR h8500_skip_prologue (CORE_ADDR);
-
-/* 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. */
-
-#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call()
-extern CORE_ADDR saved_pc_after_call (void);
-
-/* Stack grows downward. */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Illegal instruction - used by the simulator for breakpoint
- detection */
-
-#define BREAKPOINT {0x0b}
-
-/* If your kernel resets the pc after the trap happens you may need to
- define this before including this file. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Say how long registers are. */
-
-#define REGISTER_TYPE unsigned long
-
-/* Say how much memory is needed to store a copy of the register set */
-
-#define REGISTER_BYTES (NUM_REGS * 4)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) ((N)*4)
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#define REGISTER_RAW_SIZE(N) h8500_register_size(N)
-extern int h8500_register_size (int regno);
-
-#define REGISTER_SIZE 4
-
-#define REGISTER_VIRTUAL_SIZE(N) h8500_register_size(N)
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) h8500_register_virtual_type(N)
-extern struct type *h8500_register_virtual_type (int regno);
-
-/* Initializer for an array of names of registers.
- Entries beyond the first NUM_REGS are ignored. */
-
-#define REGISTER_NAMES \
- { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "pr0","pr1","pr2","pr3","pr4","pr5","pr6","pr7", \
- "cp", "dp", "ep", "tp", "sr", "pc"}
-
-/* Register numbers of various important registers. Note that some of
- these values are "real" register numbers, and correspond to the
- general registers of the machine, and some are "phony" register
- numbers which are too large to be actual register numbers as far as
- the user is concerned but do serve to get the desired values when
- passed to read_register. */
-
-#define R0_REGNUM 0
-#define R1_REGNUM 1
-#define R2_REGNUM 2
-#define R3_REGNUM 3
-#define R4_REGNUM 4
-#define R5_REGNUM 5
-#define R6_REGNUM 6
-#define R7_REGNUM 7
-
-#define PR0_REGNUM 8
-#define PR1_REGNUM 9
-#define PR2_REGNUM 10
-#define PR3_REGNUM 11
-#define PR4_REGNUM 12
-#define PR5_REGNUM 13
-#define PR6_REGNUM 14
-#define PR7_REGNUM 15
-
-#define SEG_C_REGNUM 16 /* Segment registers */
-#define SEG_D_REGNUM 17
-#define SEG_E_REGNUM 18
-#define SEG_T_REGNUM 19
-
-#define CCR_REGNUM 20 /* Contains processor status */
-#define PC_REGNUM 21 /* Contains program counter */
-
-#define NUM_REGS 22
-
-#define SP_REGNUM PR7_REGNUM /* Contains address of top of stack */
-#define FP_REGNUM PR6_REGNUM /* Contains address of executing stack frame */
-
-#define PTR_SIZE (minimum_mode ? 2 : 4)
-#define PTR_MASK (minimum_mode ? 0x0000ffff : 0x00ffffff)
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-/*#define STORE_STRUCT_RETURN(ADDR, SP) \
- { write_register (0, (ADDR)); internal_error (__FILE__, __LINE__, "failed internal consistency check"); } */
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- memcpy (VALBUF, (char *)(REGBUF), TYPE_LENGTH(TYPE))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
- deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
-
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR (or an expression that can be used as one). */
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-
-
-/* Define other aspects of the stack frame. */
-
-/* A macro that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0. */
-
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (frameless_look_for_prologue (FI))
-
-/* Any function with a frame looks like this
- SECOND ARG
- FIRST ARG
- RET PC
- SAVED R2
- SAVED R3
- SAVED FP <-FP POINTS HERE
- LOCALS0
- LOCALS1 <-SP POINTS HERE
-
- */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) ;
-/* (fci)->frame |= read_register(SEG_T_REGNUM) << 16; */
-
-#define FRAME_CHAIN(FRAME) h8500_frame_chain(FRAME)
-struct frame_info;
-extern CORE_ADDR h8500_frame_chain (struct frame_info *);
-
-#define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME)
-extern CORE_ADDR frame_saved_pc (struct frame_info *frame);
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Set VAL to the number of args passed to frame described by FI.
- Can set VAL to -1, meaning no way to tell. */
-
-/* We can't tell how many args there are
- now that the C compiler delays popping them. */
-
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
- frame_find_saved_regs(frame_info, &(frame_saved_regs))
-struct frame_saved_regs;
-extern void frame_find_saved_regs (struct frame_info *frame_info,
- struct frame_saved_regs *frame_saved_regs);
-
-
-/* Discard from the stack the innermost frame, restoring all registers. */
-
-#define POP_FRAME { h8500_pop_frame (); }
-extern void h8500_pop_frame (void);
-
-#define SHORT_INT_MAX 32767
-#define SHORT_INT_MIN -32768
-
-typedef unsigned short INSN_WORD;
-
-extern CORE_ADDR h8500_addr_bits_remove (CORE_ADDR);
-#define ADDR_BITS_REMOVE(addr) h8500_addr_bits_remove (addr)
-
-#define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-
-extern void h8500_do_registers_info (int regnum, int all);
-#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
- h8500_do_registers_info (REGNUM, ALL)
-
-extern int minimum_mode;
-
-#define CALL_DUMMY_LENGTH 10
-
-/* Fake variables to make it easy to use 24 bit register pointers */
-
-#define IS_TRAPPED_INTERNALVAR h8500_is_trapped_internalvar
-extern int h8500_is_trapped_internalvar (char *name);
-
-#define VALUE_OF_TRAPPED_INTERNALVAR h8500_value_of_trapped_internalvar
-extern struct value *h8500_value_of_trapped_internalvar ( /* struct internalvar *var */ );
-
-#define SET_TRAPPED_INTERNALVAR h8500_set_trapped_internalvar
-extern void h8500_set_trapped_internalvar ( /* struct internalvar *var, value newval, int bitpos, int bitsize, int offset */ );
-
-extern CORE_ADDR h8500_read_sp (void);
-extern void h8500_write_sp (CORE_ADDR);
-
-extern CORE_ADDR h8500_read_fp (void);
-
-extern CORE_ADDR h8500_read_pc (ptid_t);
-extern void h8500_write_pc (CORE_ADDR, ptid_t);
-
-#define TARGET_READ_SP() h8500_read_sp()
-#define TARGET_WRITE_SP(x) h8500_write_sp(x)
-
-#define TARGET_READ_PC(pid) h8500_read_pc(pid)
-#define TARGET_WRITE_PC(x,pid) h8500_write_pc(x,pid)
-
-#define TARGET_READ_FP() h8500_read_fp()
+// 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/gdbserve.mt b/gdb/config/i386/gdbserve.mt
deleted file mode 100644
index d8a7cbaf43d..00000000000
--- a/gdb/config/i386/gdbserve.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: GDBSERVE.NLM running on a i386
-TDEPFILES= i386.o
-CPU_FILE= i386
diff --git a/gdb/config/i386/go32.mh b/gdb/config/i386/go32.mh
index 94a7a9df24c..846896bffc7 100644
--- a/gdb/config/i386/go32.mh
+++ b/gdb/config/i386/go32.mh
@@ -9,7 +9,6 @@ XM_FILE= xm-go32.h
NAT_FILE= nm-go32.h
NATDEPFILES= go32-nat.o i386-nat.o
-TERMCAP=
HOST_IPC=
CC= gcc
XM_CLIBS= -ldbg
diff --git a/gdb/config/i386/i386dgux.mh b/gdb/config/i386/i386dgux.mh
deleted file mode 100644
index fd7f56c1e46..00000000000
--- a/gdb/config/i386/i386dgux.mh
+++ /dev/null
@@ -1,10 +0,0 @@
-# Host: Intel 386 running DGUX, cloned from SVR4
-
-XM_FILE= xm-i386v4.h
-# for network communication
-XM_CLIBS= -lsocket -lnsl
-
-NAT_FILE= nm-i386v4.h
-NATDEPFILES= corelow.o core-regset.o fork-child.o i386v4-nat.o \
- solib.o solib-svr4.o solib-legacy.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/i386/i386mk.mh b/gdb/config/i386/i386mk.mh
deleted file mode 100644
index 0c119becfda..00000000000
--- a/gdb/config/i386/i386mk.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# Host: Intel 386 running Mach3 with OSF 1/MK
-
-NATDEPFILES= os-mach3.o i386mach3-xdep.o i387-tdep.o
-XM_FILE= xm-i386osf1mk.h
diff --git a/gdb/config/i386/i386mk.mt b/gdb/config/i386/i386mk.mt
deleted file mode 100644
index fc59442ac0d..00000000000
--- a/gdb/config/i386/i386mk.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Target: Intel 386 with a.out in osf 1/mk
-TDEPFILES= i386-tdep.o
-TM_FILE= tm-i386osf1mk.h
-
-TM_CFLAGS= -I/usr/mach3/include
-TM_CLIBS= /usr/mach3/ccs/lib/libmachid.a /usr/mach3/ccs/lib/libnetname.a /usr/mach3/ccs/lib/libmach.a
diff --git a/gdb/config/i386/i386sco5.mt b/gdb/config/i386/i386sco5.mt
deleted file mode 100644
index 11ab55f2c2f..00000000000
--- a/gdb/config/i386/i386sco5.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running SCO Open Server 5
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386v32.mh b/gdb/config/i386/i386v32.mh
deleted file mode 100644
index f39437276bb..00000000000
--- a/gdb/config/i386/i386v32.mh
+++ /dev/null
@@ -1,8 +0,0 @@
-# Host: Intel 386 running System V release 3.2
-
-XM_FILE= xm-i386v32.h
-XM_CLIBS= -lPW
-
-NAT_FILE= nm-i386v.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o
-
diff --git a/gdb/config/i386/i386v4.mt b/gdb/config/i386/i386v4.mt
deleted file mode 100644
index d1b8c26726c..00000000000
--- a/gdb/config/i386/i386v4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running SVR4
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386v42mp.mt b/gdb/config/i386/i386v42mp.mt
deleted file mode 100644
index 1a0ac88d81c..00000000000
--- a/gdb/config/i386/i386v42mp.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running SVR4.2MP
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/tm-i386os9k.h b/gdb/config/i386/tm-i386os9k.h
deleted file mode 100644
index 78fbc21a7c6..00000000000
--- a/gdb/config/i386/tm-i386os9k.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Macro definitions for i386 running under BSD Unix.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996
- Free Software Foundation, Inc.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_I386OS9K_H
-#define TM_I386OS9K_H 1
-
-#include "i386/tm-i386.h"
-
-/* Number of machine registers */
-
-#undef NUM_REGS
-#define NUM_REGS (16) /* Basic i*86 regs */
-
-/* Initializer for an array of names of registers. There should be at least
- NUM_REGS strings in this initializer. Any excess ones are simply ignored.
- The order of the first 8 registers must match the compiler's numbering
- scheme (which is the same as the 386 scheme) and also regmap in the various
- *-nat.c files. */
-
-#undef REGISTER_NAME
-#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
- "esp", "ebp", "esi", "edi", \
- "eip", "eflags", "cs", "ss", \
- "ds", "es", "fs", "gs", \
- }
-
-#define DATABASE_REG 3 /* ebx */
-
-/* Amount PC must be decremented by after a breakpoint. This is often the
- number of bytes in BREAKPOINT but not always (such as now). */
-
-#undef DECR_PC_AFTER_BREAK
-#define DECR_PC_AFTER_BREAK 0
-
-/* On 386 bsd, sigtramp is above the user stack and immediately below
- the user area. Using constants here allows for cross debugging.
- These are tested for BSDI but should work on 386BSD. */
-#define SIGTRAMP_START(pc) 0xfdbfdfc0
-#define SIGTRAMP_END(pc) 0xfdbfe000
-
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-#define SIGCONTEXT_PC_OFFSET 20
-
-#define BELIEVE_PCC_PROMOTION 1
-
-#endif /* #ifndef TM_I386OS9K_H */
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
index 2b7a86c74c3..6a7529887ba 100644
--- a/gdb/config/i386/tm-ptx.h
+++ b/gdb/config/i386/tm-ptx.h
@@ -1,7 +1,9 @@
/* Target machine definitions for GDB on a Sequent Symmetry under ptx
with Weitek 1167 and i387 support.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000,
+ 2003 Free Software Foundation, Inc.
+
Symmetry version by Jay Vosburgh (fubar@sequent.com).
This file is part of GDB.
@@ -41,15 +43,6 @@
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
-#if 0
--- -this code can 't be used unless we know we are running native,
-since it uses host specific ptrace calls.
-/* code for 80387 fpu. Functions are from i386-dep.c, copied into
- * symm-dep.c.
- */
-#define FLOAT_INFO { i386_float_info(); }
-#endif
-
/* Number of machine registers */
#undef NUM_REGS
diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h
index dc7c81f2fb2..a15f45f1c95 100644
--- a/gdb/config/i386/tm-symmetry.h
+++ b/gdb/config/i386/tm-symmetry.h
@@ -1,7 +1,9 @@
/* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0,
with Weitek 1167 and i387 support.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2003 Free
+ Software Foundation, Inc.
+
Symmetry version by Jay Vosburgh (fubar@sequent.com).
This file is part of GDB.
@@ -39,15 +41,6 @@
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
-#if 0
-/* --- this code can't be used unless we know we are running native,
- since it uses host specific ptrace calls. */
-/* code for 80387 fpu. Functions are from i386-dep.c, copied into
- * symm-dep.c.
- */
-#define FLOAT_INFO { i386_float_info(); }
-#endif
-
/* Number of machine registers */
#undef NUM_REGS
diff --git a/gdb/config/i386/xm-i386sco.h b/gdb/config/i386/xm-i386sco.h
index 72552c93341..18b64bf4207 100644
--- a/gdb/config/i386/xm-i386sco.h
+++ b/gdb/config/i386/xm-i386sco.h
@@ -24,10 +24,6 @@
#include "i386/xm-i386v.h"
-/* Apparently there is inconsistency among various System V's about what
- the name of this field is. */
-#define U_FPSTATE(u) u.u_fps.u_fpstate
-
/* SCO 3.2v2 and later have job control. */
/* SCO 3.2v4 I know has termios; I'm not sure about earlier versions.
GDB does not currently support the termio/job control combination. */
diff --git a/gdb/config/m32r/m32r.mt b/gdb/config/m32r/m32r.mt
index a200853b602..a2816084290 100644
--- a/gdb/config/m32r/m32r.mt
+++ b/gdb/config/m32r/m32r.mt
@@ -1,5 +1,5 @@
-# Target: Mitsubishi m32r processor
-TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o
-TM_FILE= tm-m32r.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/m32r/libsim.a
+# OBSOLETE # Target: Mitsubishi m32r processor
+# OBSOLETE TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o
+# OBSOLETE TM_FILE= tm-m32r.h
+# OBSOLETE SIM_OBS = remote-sim.o
+# OBSOLETE SIM = ../sim/m32r/libsim.a
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
index 70a30a8a557..89af4e3ab31 100644
--- a/gdb/config/m32r/tm-m32r.h
+++ b/gdb/config/m32r/tm-m32r.h
@@ -1,234 +1,231 @@
-/* Parameters for execution on a Mitsubishi m32r processor.
- Copyright 1996, 1997 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "regcache.h"
-
-/* Used by mswin. */
-#define TARGET_M32R 1
-
-/* mvs_check REGISTER_NAMES */
-#define REGISTER_NAMES \
-{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp", \
- "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch", \
- /* "cond", "sm", "bsm", "ie", "bie", "bcarry", */ \
-}
-/* mvs_check NUM_REGS */
-#define NUM_REGS 24
-
-/* mvs_check REGISTER_SIZE */
-#define REGISTER_SIZE 4
-/* mvs_check MAX_REGISTER_RAW_SIZE */
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* mvs_check *_REGNUM */
-#define R0_REGNUM 0
-#define STRUCT_RETURN_REGNUM 0
-#define ARG0_REGNUM 0
-#define ARGLAST_REGNUM 3
-#define V0_REGNUM 0
-#define V1_REGNUM 1
-#define FP_REGNUM 13
-#define RP_REGNUM 14
-#define SP_REGNUM 15
-#define PSW_REGNUM 16
-#define CBR_REGNUM 17
-#define SPI_REGNUM 18
-#define SPU_REGNUM 19
-#define BPC_REGNUM 20
-#define PC_REGNUM 21
-#define ACCL_REGNUM 22
-#define ACCH_REGNUM 23
-
-/* mvs_check REGISTER_BYTES */
-#define REGISTER_BYTES (NUM_REGS * 4)
-
-/* mvs_check REGISTER_VIRTUAL_TYPE */
-#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
-
-/* mvs_check REGISTER_BYTE */
-#define REGISTER_BYTE(REG) ((REG) * 4)
-/* mvs_check REGISTER_VIRTUAL_SIZE */
-#define REGISTER_VIRTUAL_SIZE(REG) 4
-/* mvs_check REGISTER_RAW_SIZE */
-#define REGISTER_RAW_SIZE(REG) 4
-
-/* mvs_check MAX_REGISTER_VIRTUAL_SIZE */
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* mvs_check BREAKPOINT */
-#define BREAKPOINT {0x10, 0xf1}
-
-/* mvs_no_check FUNCTION_START_OFFSET */
-#define FUNCTION_START_OFFSET 0
-
-/* mvs_check DECR_PC_AFTER_BREAK */
-#define DECR_PC_AFTER_BREAK 0
-
-/* mvs_check INNER_THAN */
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* mvs_check SAVED_PC_AFTER_CALL */
-#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
-
-struct frame_info;
-struct frame_saved_regs;
-struct type;
-struct value;
-
-/* Define other aspects of the stack frame.
- We keep the offsets of all saved registers, 'cause we need 'em a lot!
- We also keep the current size of the stack frame, and whether
- the frame pointer is valid (for frameless functions, and when we're
- still in the prologue of a function with a frame) */
-
-/* mvs_check EXTRA_FRAME_INFO */
-#define EXTRA_FRAME_INFO \
- struct frame_saved_regs fsr; \
- int framesize; \
- int using_frame_pointer;
-
-
-extern void m32r_init_extra_frame_info (struct frame_info *fi);
-/* mvs_check INIT_EXTRA_FRAME_INFO */
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) m32r_init_extra_frame_info (fi)
-/* mvs_no_check DEPRECATED_INIT_FRAME_PC */
-#define DEPRECATED_INIT_FRAME_PC init_frame_pc_noop
-
-extern void
-m32r_frame_find_saved_regs (struct frame_info *fi,
- struct frame_saved_regs *regaddr);
-
-/* 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. */
-
-/* mvs_check FRAME_FIND_SAVED_REGS */
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
- m32r_frame_find_saved_regs(frame_info, &(frame_saved_regs))
-
-extern CORE_ADDR m32r_frame_chain (struct frame_info *fi);
-/* mvs_check FRAME_CHAIN */
-#define FRAME_CHAIN(fi) m32r_frame_chain (fi)
-
-#define FRAME_CHAIN_VALID(fp, frame) generic_file_frame_chain_valid (fp, frame)
-
-extern CORE_ADDR m32r_find_callers_reg (struct frame_info *fi, int regnum);
-extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
-/* mvs_check FRAME_SAVED_PC */
-#define FRAME_SAVED_PC(fi) m32r_frame_saved_pc (fi)
-
-/* mvs_check DEPRECATED_EXTRACT_RETURN_VALUE */
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
- memcpy ((VALBUF), \
- (char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \
- ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \
- TYPE_LENGTH (TYPE))
-
-/* mvs_check DEPRECATED_STORE_RETURN_VALUE */
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
- deprecated_write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
- ((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\
- (VALBUF), TYPE_LENGTH (TYPE));
-
-extern CORE_ADDR m32r_skip_prologue (CORE_ADDR pc);
-/* mvs_check SKIP_PROLOGUE */
-#define SKIP_PROLOGUE(pc) (m32r_skip_prologue (pc))
-
-/* mvs_no_check FRAME_ARGS_SKIP */
-#define FRAME_ARGS_SKIP 0
-
-/* mvs_no_check FRAME_ARGS_ADDRESS */
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-/* mvs_no_check FRAME_LOCALS_ADDRESS */
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-/* mvs_no_check FRAME_NUM_ARGS */
-#define FRAME_NUM_ARGS(fi) (-1)
-
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
-
-extern void m32r_write_sp (CORE_ADDR val);
-#define TARGET_WRITE_SP m32r_write_sp
-
-
-
-
-
-
-/* struct passing and returning stuff */
-#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
- write_register (0, STRUCT_ADDR)
-
-extern use_struct_convention_fn m32r_use_struct_convention;
-#define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE)
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
- REGISTER_RAW_SIZE (V0_REGNUM))
-
-#define REG_STRUCT_HAS_ADDR(gcc_p,type) (TYPE_LENGTH (type) > 8)
-
-
-/* generic dummy frame stuff */
-
-#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
-#define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-
-
-/* target-specific dummy_frame stuff */
-
-extern struct frame_info *m32r_pop_frame (struct frame_info *frame);
-/* mvs_check POP_FRAME */
-#define POP_FRAME m32r_pop_frame (get_current_frame ())
-
-/* mvs_no_check STACK_ALIGN */
-/* #define STACK_ALIGN(x) ((x + 3) & ~3) */
-
-extern CORE_ADDR m32r_push_return_address (CORE_ADDR, CORE_ADDR);
-extern CORE_ADDR m32r_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- unsigned char struct_return,
- CORE_ADDR struct_addr);
-
-
-
-/* mvs_no_check PUSH_ARGUMENTS */
-#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
- (m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-
-#define PUSH_RETURN_ADDRESS(PC, SP) m32r_push_return_address (PC, SP)
-
-/* override the standard get_saved_register function with
- one that takes account of generic CALL_DUMMY frames */
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
- deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
-
-
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
-#define CALL_DUMMY {0}
-#define CALL_DUMMY_LENGTH (0)
-#define CALL_DUMMY_START_OFFSET (0)
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-#define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
-#define CALL_DUMMY_ADDRESS() entry_point_address ()
+// OBSOLETE /* Parameters for execution on a Mitsubishi m32r processor.
+// OBSOLETE Copyright 1996, 1997, 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 /* Used by mswin. */
+// OBSOLETE #define TARGET_M32R 1
+// OBSOLETE
+// OBSOLETE /* mvs_check REGISTER_NAMES */
+// OBSOLETE #define REGISTER_NAMES \
+// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
+// OBSOLETE "r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp", \
+// OBSOLETE "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch", \
+// OBSOLETE /* "cond", "sm", "bsm", "ie", "bie", "bcarry", */ \
+// OBSOLETE }
+// OBSOLETE /* mvs_check NUM_REGS */
+// OBSOLETE #define NUM_REGS 24
+// OBSOLETE
+// OBSOLETE /* mvs_check REGISTER_SIZE */
+// OBSOLETE #define REGISTER_SIZE 4
+// OBSOLETE /* mvs_check MAX_REGISTER_RAW_SIZE */
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
+// OBSOLETE
+// OBSOLETE /* mvs_check *_REGNUM */
+// OBSOLETE #define R0_REGNUM 0
+// OBSOLETE #define STRUCT_RETURN_REGNUM 0
+// OBSOLETE #define ARG0_REGNUM 0
+// OBSOLETE #define ARGLAST_REGNUM 3
+// OBSOLETE #define V0_REGNUM 0
+// OBSOLETE #define V1_REGNUM 1
+// OBSOLETE #define FP_REGNUM 13
+// OBSOLETE #define RP_REGNUM 14
+// OBSOLETE #define SP_REGNUM 15
+// OBSOLETE #define PSW_REGNUM 16
+// OBSOLETE #define CBR_REGNUM 17
+// OBSOLETE #define SPI_REGNUM 18
+// OBSOLETE #define SPU_REGNUM 19
+// OBSOLETE #define BPC_REGNUM 20
+// OBSOLETE #define PC_REGNUM 21
+// OBSOLETE #define ACCL_REGNUM 22
+// OBSOLETE #define ACCH_REGNUM 23
+// OBSOLETE
+// OBSOLETE /* mvs_check REGISTER_BYTES */
+// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4)
+// OBSOLETE
+// OBSOLETE /* mvs_check REGISTER_VIRTUAL_TYPE */
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
+// OBSOLETE
+// OBSOLETE /* mvs_check REGISTER_BYTE */
+// OBSOLETE #define REGISTER_BYTE(REG) ((REG) * 4)
+// OBSOLETE /* mvs_check REGISTER_VIRTUAL_SIZE */
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(REG) 4
+// OBSOLETE /* mvs_check REGISTER_RAW_SIZE */
+// OBSOLETE #define REGISTER_RAW_SIZE(REG) 4
+// OBSOLETE
+// OBSOLETE /* mvs_check MAX_REGISTER_VIRTUAL_SIZE */
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
+// OBSOLETE
+// OBSOLETE /* mvs_check BREAKPOINT */
+// OBSOLETE #define BREAKPOINT {0x10, 0xf1}
+// OBSOLETE
+// OBSOLETE /* mvs_no_check FUNCTION_START_OFFSET */
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE
+// OBSOLETE /* mvs_check DECR_PC_AFTER_BREAK */
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
+// OBSOLETE
+// OBSOLETE /* mvs_check INNER_THAN */
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+// OBSOLETE
+// OBSOLETE /* mvs_check SAVED_PC_AFTER_CALL */
+// OBSOLETE #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
+// OBSOLETE
+// OBSOLETE struct frame_info;
+// OBSOLETE struct frame_saved_regs;
+// OBSOLETE struct type;
+// OBSOLETE struct value;
+// OBSOLETE
+// OBSOLETE /* Define other aspects of the stack frame.
+// OBSOLETE We keep the offsets of all saved registers, 'cause we need 'em a lot!
+// OBSOLETE We also keep the current size of the stack frame, and whether
+// OBSOLETE the frame pointer is valid (for frameless functions, and when we're
+// OBSOLETE still in the prologue of a function with a frame) */
+// OBSOLETE
+// OBSOLETE /* mvs_check EXTRA_FRAME_INFO */
+// OBSOLETE #define EXTRA_FRAME_INFO \
+// OBSOLETE struct frame_saved_regs fsr; \
+// OBSOLETE int framesize; \
+// OBSOLETE int using_frame_pointer;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE extern void m32r_init_extra_frame_info (struct frame_info *fi);
+// OBSOLETE /* mvs_check INIT_EXTRA_FRAME_INFO */
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) m32r_init_extra_frame_info (fi)
+// OBSOLETE /* mvs_no_check DEPRECATED_INIT_FRAME_PC */
+// OBSOLETE #define DEPRECATED_INIT_FRAME_PC init_frame_pc_noop
+// OBSOLETE
+// OBSOLETE extern void
+// OBSOLETE m32r_frame_find_saved_regs (struct frame_info *fi,
+// OBSOLETE struct frame_saved_regs *regaddr);
+// 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 /* mvs_check FRAME_FIND_SAVED_REGS */
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
+// OBSOLETE m32r_frame_find_saved_regs(frame_info, &(frame_saved_regs))
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR m32r_frame_chain (struct frame_info *fi);
+// OBSOLETE /* mvs_check FRAME_CHAIN */
+// OBSOLETE #define FRAME_CHAIN(fi) m32r_frame_chain (fi)
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR m32r_find_callers_reg (struct frame_info *fi, int regnum);
+// OBSOLETE extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
+// OBSOLETE /* mvs_check FRAME_SAVED_PC */
+// OBSOLETE #define FRAME_SAVED_PC(fi) m32r_frame_saved_pc (fi)
+// OBSOLETE
+// OBSOLETE /* mvs_check DEPRECATED_EXTRACT_RETURN_VALUE */
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+// OBSOLETE memcpy ((VALBUF), \
+// OBSOLETE (char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \
+// OBSOLETE ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \
+// OBSOLETE TYPE_LENGTH (TYPE))
+// OBSOLETE
+// OBSOLETE /* mvs_check DEPRECATED_STORE_RETURN_VALUE */
+// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
+// OBSOLETE deprecated_write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
+// OBSOLETE ((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\
+// OBSOLETE (VALBUF), TYPE_LENGTH (TYPE));
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR m32r_skip_prologue (CORE_ADDR pc);
+// OBSOLETE /* mvs_check SKIP_PROLOGUE */
+// OBSOLETE #define SKIP_PROLOGUE(pc) (m32r_skip_prologue (pc))
+// OBSOLETE
+// OBSOLETE /* mvs_no_check FRAME_ARGS_SKIP */
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE
+// OBSOLETE /* mvs_no_check FRAME_ARGS_ADDRESS */
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+// OBSOLETE /* mvs_no_check FRAME_LOCALS_ADDRESS */
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+// OBSOLETE /* mvs_no_check FRAME_NUM_ARGS */
+// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
+// OBSOLETE
+// OBSOLETE extern void m32r_write_sp (CORE_ADDR val);
+// OBSOLETE #define TARGET_WRITE_SP m32r_write_sp
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* struct passing and returning stuff */
+// OBSOLETE #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
+// OBSOLETE write_register (0, STRUCT_ADDR)
+// OBSOLETE
+// OBSOLETE extern use_struct_convention_fn m32r_use_struct_convention;
+// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE)
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+// OBSOLETE extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
+// OBSOLETE REGISTER_RAW_SIZE (V0_REGNUM))
+// OBSOLETE
+// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type) (TYPE_LENGTH (type) > 8)
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* generic dummy frame stuff */
+// OBSOLETE
+// OBSOLETE #define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
+// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* target-specific dummy_frame stuff */
+// OBSOLETE
+// OBSOLETE extern struct frame_info *m32r_pop_frame (struct frame_info *frame);
+// OBSOLETE /* mvs_check POP_FRAME */
+// OBSOLETE #define POP_FRAME m32r_pop_frame (get_current_frame ())
+// OBSOLETE
+// OBSOLETE /* mvs_no_check STACK_ALIGN */
+// OBSOLETE /* #define STACK_ALIGN(x) ((x + 3) & ~3) */
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR m32r_push_return_address (CORE_ADDR, CORE_ADDR);
+// OBSOLETE extern CORE_ADDR m32r_push_arguments (int nargs,
+// OBSOLETE struct value **args,
+// OBSOLETE CORE_ADDR sp,
+// OBSOLETE unsigned char struct_return,
+// OBSOLETE CORE_ADDR struct_addr);
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* mvs_no_check PUSH_ARGUMENTS */
+// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
+// OBSOLETE (m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
+// OBSOLETE
+// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP) m32r_push_return_address (PC, SP)
+// OBSOLETE
+// OBSOLETE /* override the standard get_saved_register function with
+// OBSOLETE one that takes account of generic CALL_DUMMY frames */
+// OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
+// OBSOLETE deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
+// OBSOLETE #define CALL_DUMMY {0}
+// OBSOLETE #define CALL_DUMMY_LENGTH (0)
+// OBSOLETE #define CALL_DUMMY_START_OFFSET (0)
+// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
+// OBSOLETE #define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP)
+// OBSOLETE #define CALL_DUMMY_LOCATION AT_ENTRY_POINT
+// OBSOLETE #define CALL_DUMMY_ADDRESS() entry_point_address ()
diff --git a/gdb/config/m68k/es1800.mt b/gdb/config/m68k/es1800.mt
deleted file mode 100644
index d809c610718..00000000000
--- a/gdb/config/m68k/es1800.mt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Target: Ericsson ES-1800 emulator (remote) for m68k.
-
-# remote-es.o should perhaps be part of the standard monitor.mt
-# configuration, if it is desirable to reduce the number of different
-# configurations. However, before that happens remote-es.c has to be
-# fixed to compile on a DOS host.
-
-TDEPFILES= m68k-tdep.o remote-es.o
-TM_FILE= tm-es1800.h
diff --git a/gdb/config/m68k/nm-hp300bsd.h b/gdb/config/m68k/nm-hp300bsd.h
deleted file mode 100644
index e0f7a1124bf..00000000000
--- a/gdb/config/m68k/nm-hp300bsd.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Parameters for Hewlett-Packard 9000/300 native support under bsd.
- Copyright 1986, 1987, 1989, 1991, 1992, 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. */
-
-/* Detect whether this is 4.3 or 4.4. */
-
-#include <errno.h>
-#include <sys/param.h>
-#ifdef BSD4_4
-
-/* BSD 4.4 alpha or better */
-
-/* We can attach to processes using ptrace. */
-
-#define ATTACH_DETACH
-#define PTRACE_ATTACH 10
-#define PTRACE_DETACH 11
-
-/* The third argument of ptrace is declared as this type. */
-
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* U_REGS_OFFSET is the offset of the registers within the u area for
- ptrace purposes. */
-#define U_REGS_OFFSET \
- ptrace (PT_READ_U, PIDGET (inferior_ptid), \
- (PTRACE_ARG3_TYPE) \
- (offsetof (struct user, u_kproc.kp_proc.p_md.md_regs)), 0) \
- - USRSTACK
-
-/* No user structure in 4.4, registers are relative to kernel stack
- which is fixed. */
-#define KERNEL_U_ADDR 0xFFF00000
-
-/* FIXME: Is ONE_PROCESS_WRITETEXT still true now that the kernel has
- copy-on-write? It not, move it to the 4.3-specific section below
- (now it is in xm-hp300bsd.h). */
-
-#else
-
-/* This is BSD 4.3 or something like it. */
-
-/* Get kernel u area address at run-time using BSD style nlist (). */
-#define KERNEL_U_ADDR_BSD
-
-#endif
-
-/* This was once broken for 4.4, but probably because we had the wrong
- KERNEL_U_ADDR. */
-
-/* This is a piece of magic that is given a register number REGNO
- and as BLOCKEND the address in the system of the end of the user structure
- and stores in ADDR the address in the kernel or core dump
- of that register. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ \
- if (regno < PS_REGNUM) \
- addr = (int) &((struct frame *)(blockend))->f_regs[regno]; \
- else if (regno == PS_REGNUM) \
- addr = (int) &((struct frame *)(blockend))->f_stackadj; \
- else if (regno == PC_REGNUM) \
- addr = (int) &((struct frame *)(blockend))->f_pc; \
- else if (regno < FPC_REGNUM) \
- addr = (int) \
- &((struct user *)0)->u_pcb.pcb_fpregs.fpf_regs[((regno)-FP0_REGNUM)*3];\
- else if (regno == FPC_REGNUM) \
- addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpcr; \
- else if (regno == FPS_REGNUM) \
- addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpsr; \
- else \
- addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpiar; \
-}
diff --git a/gdb/config/m68k/tm-apollo68b.h b/gdb/config/m68k/tm-apollo68b.h
deleted file mode 100644
index d43eec9d6cf..00000000000
--- a/gdb/config/m68k/tm-apollo68b.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Parameters for execution on Apollo 68k running BSD.
- Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1998
- Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Apollos use vector 0xb for the breakpoint vector */
-
-#define BPT_VECTOR 0xb
-
-#include "m68k/tm-m68k.h"
-
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
-/* These are the jmp_buf registers I could guess. There are 13 registers
- * in the buffer. There are 8 data registers, 6 general address registers,
- * the Frame Pointer, the Stack Pointer, the PC and the SR in the chip. I would
- * guess that 12 is the SR, but we don't need that anyway. 0 and 1 have
- * me stumped. 4 appears to be a5 for some unknown reason. If you care
- * about this, disassemble setjmp to find out. But don't do it with gdb :)
- */
-
-#undef JB_SP
-#undef JB_FP
-#undef JB_PC
-#undef JB_D0
-#undef JB_D1
-#undef JB_D2
-#undef JB_D3
-#undef JB_D4
-#undef JB_D5
-
-#define JB_SP 2
-#define JB_FP 3
-#define JB_PC 5
-#define JB_D0 6
-#define JB_D1 7
-#define JB_D2 8
-#define JB_D3 9
-#define JB_D4 10
-#define JB_D5 11
-
-/* How to decide if we're in a shared library function. (Probably a wrong
- definintion inherited from the VxWorks config file). */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (name && strcmp(name, "<end_of_program>") == 0)
diff --git a/gdb/config/m68k/tm-es1800.h b/gdb/config/m68k/tm-es1800.h
deleted file mode 100644
index 46e4a641f08..00000000000
--- a/gdb/config/m68k/tm-es1800.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Parameters for execution on ES-1800 emulator for 68000.
- The code was originally written by Johan Holmberg TT/SJ Ericsson Telecom
- AB and later modified by Johan Henriksson TT/SJ. It was adapted to GDB 4.0
- by Jan Norden TX/DK.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- GDB is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- GDB is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define GDBINIT_FILENAME ".esgdbinit"
-
-#define DEFAULT_PROMPT "(esgdb) "
-
-#include "m68k/tm-m68k.h"
-
-/* Longjmp stuff borrowed from sun3 configuration. Don't know if correct.
- FIXME. */
-/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
- documented in a comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 4
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_PSL 4
-#define JB_D2 5
-#define JB_D3 6
-#define JB_D4 7
-#define JB_D5 8
-#define JB_D6 9
-#define JB_D7 10
-#define JB_A2 11
-#define JB_A3 12
-#define JB_A4 13
-#define JB_A5 14
-#define JB_A6 15
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
diff --git a/gdb/config/m68k/tm-hp300bsd.h b/gdb/config/m68k/tm-hp300bsd.h
deleted file mode 100644
index 0a033873f81..00000000000
--- a/gdb/config/m68k/tm-hp300bsd.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Parameters for target machine Hewlett-Packard 9000/300, running bsd.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Configuration file for HP9000/300 series machine running BSD,
- including Utah, Mt. Xinu or Berkeley variants. This is NOT for HP-UX.
- Problems to hpbsd-bugs@cs.utah.edu. */
-
-/* GCC is the only compiler used on this OS. So get this right even if
- the code which detects gcc2_compiled. is still broken. */
-
-#define BELIEVE_PCC_PROMOTION 1
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint.
-
- For hp300bsd the normal breakpoint vector is 0x2 (for debugging via
- ptrace); for remote kernel debugging the breakpoint vector is 0xf. */
-
-#define BPT_VECTOR 0x2
-#define REMOTE_BPT_VECTOR 0xf
-
-#define TARGET_NBPG 4096
-
-/* For 4.4 this would be 2, but it is OK for us to detect an area a
- bit bigger than necessary. This way the same gdb binary can target
- either 4.3 or 4.4. */
-
-#define TARGET_UPAGES 3
-
-/* On the HP300, sigtramp is in the u area. Gak! User struct is not
- mapped to the same virtual address in user/kernel address space
- (hence STACK_END_ADDR as opposed to KERNEL_U_ADDR). This tests
- for the whole u area, since we don't necessarily have hp300bsd
- include files around. */
-
-/* For 4.4, it is actually right 20 bytes *before* STACK_END_ADDR, so
- include that in the area we test for. */
-
-#define SIGTRAMP_START(pc) (STACK_END_ADDR - 20)
-#define SIGTRAMP_END(pc) (STACK_END_ADDR + TARGET_UPAGES * TARGET_NBPG)
-
-/* Address of end of stack space. */
-
-#define STACK_END_ADDR 0xfff00000
-
-#include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
index 275ab62dd98..11bb122dfa4 100644
--- a/gdb/config/m68k/tm-m68kv4.h
+++ b/gdb/config/m68k/tm-m68kv4.h
@@ -1,6 +1,6 @@
/* Target definitions for GDB on a Motorola 680x0 running SVR4.
(Commodore Amiga with amix or Atari TT with ASV)
- Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygint)
@@ -30,10 +30,6 @@
#define DECR_PC_AFTER_BREAK 0 /* No decrement required */
-/* Use the alternate method of determining valid frame chains. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
#include "config/tm-sysv4.h"
#include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-mac.h b/gdb/config/m68k/tm-mac.h
deleted file mode 100644
index 270f353297d..00000000000
--- a/gdb/config/m68k/tm-mac.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Target-dependent definitions for Mac running MacOS.
- Copyright 1994, 1995 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-monitor.h b/gdb/config/m68k/tm-monitor.h
index 6d38b5513b1..1b00a8f05de 100644
--- a/gdb/config/m68k/tm-monitor.h
+++ b/gdb/config/m68k/tm-monitor.h
@@ -1,5 +1,5 @@
/* Target machine definitions for a generic m68k monitor/emulator.
- Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999
+ Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -38,9 +38,4 @@
#include "m68k/tm-m68k.h"
-/* Need to do this for ELF targets, where we can't figure out the boundaries of
- the entry file. This method stops the backtrace when we reach main. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
/* FIXME, should do GET_LONGJMP_TARGET for newlib. */
diff --git a/gdb/config/m68k/tm-os68k.h b/gdb/config/m68k/tm-os68k.h
index ed1d5c89902..295457090cf 100644
--- a/gdb/config/m68k/tm-os68k.h
+++ b/gdb/config/m68k/tm-os68k.h
@@ -1,5 +1,5 @@
/* Parameters for execution on VxWorks m68k's, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1998 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1998, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB.
@@ -37,11 +37,3 @@
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) ((thisframe)->frame? read_memory_integer ((thisframe)->frame, 4): 0)
-
-/* If the chain pointer is zero (either because the saved value fetched
- by FRAME_CHAIN was zero, or because the current FP was zero so FRAME_CHAIN
- never fetched anything), we are at the top of the stack. */
-/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
-
-#undef FRAME_CHAIN_VALID
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
index d7581ddd91d..253fd53ff5b 100644
--- a/gdb/config/m68k/tm-sun3.h
+++ b/gdb/config/m68k/tm-sun3.h
@@ -78,7 +78,7 @@
#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
/* If sun3 pcc says that a parameter is a short, it's a short. */
-#define BELIEVE_PCC_PROMOTION_TYPE
+#define BELIEVE_PCC_PROMOTION_TYPE 1
/* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
Apparently Sun fixed this for the sparc but not the sun3. */
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index ea27ac45d02..76ac6fd7303 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -1,5 +1,6 @@
/* Target machine description for VxWorks m68k's, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000,
+ 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -41,14 +42,6 @@
#undef FRAME_CHAIN
#define FRAME_CHAIN(thisframe) ((thisframe)->frame? read_memory_integer ((thisframe)->frame, 4): 0)
-/* If the chain pointer is zero (either because the saved value fetched
- by FRAME_CHAIN was zero, or because the current FP was zero so FRAME_CHAIN
- never fetched anything), we are at the top of the stack. */
-/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
-
-#undef FRAME_CHAIN_VALID
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
/* FIXME, Longjmp information stolen from Sun-3 config. Dunno if right. */
/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
documented in a comment in <machine/setjmp.h>! */
diff --git a/gdb/config/m68k/xm-apollo68b.h b/gdb/config/m68k/xm-apollo68b.h
deleted file mode 100644
index d77509d5a0d..00000000000
--- a/gdb/config/m68k/xm-apollo68b.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Macro definitions for an Apollo m68k in BSD mode
- Copyright 1992, 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. */
-
-#define ALIGN_STACK_ON_STARTUP
diff --git a/gdb/config/mips/linux64.mt b/gdb/config/mips/linux64.mt
new file mode 100644
index 00000000000..985d8f57c15
--- /dev/null
+++ b/gdb/config/mips/linux64.mt
@@ -0,0 +1,7 @@
+# Target: Linux/MIPS w/ support for 64-bit ABIs
+TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
+ solib.o solib-svr4.o
+TM_FILE= tm-linux64.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/powerpc/tm-ppc-sim.h b/gdb/config/mips/tm-linux64.h
index 9fa11861e1a..92226d7fe4a 100644
--- a/gdb/config/powerpc/tm-ppc-sim.h
+++ b/gdb/config/mips/tm-linux64.h
@@ -1,5 +1,6 @@
-/* Macro definitions for Power PC running embedded ABI under the simulator.
- Copyright 1995 Free Software Foundation, Inc.
+/* Target-dependent definitions for 64-bit GNU/Linux MIPS.
+
+ Copyright 2002 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,9 +19,10 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_PPC_SIM_H
-#define TM_PPC_SIM_H
+#ifndef TM_MIPS64LINUX_H
+#define TM_MIPS64LINUX_H
-#include "powerpc/tm-ppc-eabi.h"
+#include "mips/tm-mips64.h"
+#include "mips/tm-linux.h"
-#endif /* TM_PPC_SIM_H */
+#endif /* TM_MIPS64LINUX_H */
diff --git a/gdb/config/mn10200/mn10200.mt b/gdb/config/mn10200/mn10200.mt
index c85a2fb6884..be374ec4619 100644
--- a/gdb/config/mn10200/mn10200.mt
+++ b/gdb/config/mn10200/mn10200.mt
@@ -1,6 +1,6 @@
-# Target: Matsushita mn10200
-TDEPFILES= mn10200-tdep.o
-TM_FILE= tm-mn10200.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/mn10200/libsim.a
+# 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
index b2d03857c56..511c1365939 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -1,215 +1,214 @@
-/* Parameters for execution on a Matsushita mn10200 processor.
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
- Foundation, Inc.
-
- Contributed by Geoffrey Noer <noer@cygnus.com>
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* FIXME: cagney/2001-03-01: The below macros refer to functions
- declared in "regcache.h". The ``correct fix'' is to convert those
- macros into functions. */
-#include "regcache.h"
-#include "symtab.h" /* For namespace_enum. */
-#include "symfile.h" /* For entry_point_address(). */
-
-/* ints are only 16bits on the mn10200. */
-#undef TARGET_INT_BIT
-#define TARGET_INT_BIT 16
-
-/* The mn10200 doesn't support long long types. */
-#undef TARGET_LONG_LONG_BIT
-#define TARGET_LONG_LONG_BIT 32
-
-/* The mn10200 doesn't support double or long double either. */
-#undef TARGET_DOUBLE_BIT
-#undef TARGET_LONG_DOUBLE_BIT
-#define TARGET_DOUBLE_BIT 32
-#define TARGET_LONG_DOUBLE_BIT 32
-
-/* Not strictly correct, but the machine independent code is not
- ready to handle any of the basic sizes not being a power of two. */
-#undef TARGET_PTR_BIT
-#define TARGET_PTR_BIT 32
-
-/* The mn10200 really has 24 bit registers but the simulator reads/writes
- them as 32bit values, so we claim they're 32bits each. This may have
- to be tweaked if the Matsushita emulator/board really deals with them
- as 24bits each. */
-#define REGISTER_SIZE 4
-
-#define MAX_REGISTER_RAW_SIZE REGISTER_SIZE
-#define NUM_REGS 11
-
-#define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
-
-#define REGISTER_NAMES \
-{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "sp", \
- "pc", "mdr", "psw"}
-
-#define FP_REGNUM 6
-#define SP_REGNUM 7
-#define PC_REGNUM 8
-#define MDR_REGNUM 9
-#define PSW_REGNUM 10
-
-/* Treat the registers as 32bit values. */
-#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_long
-
-#define REGISTER_BYTE(REG) ((REG) * REGISTER_SIZE)
-#define REGISTER_VIRTUAL_SIZE(REG) REGISTER_SIZE
-#define REGISTER_RAW_SIZE(REG) REGISTER_SIZE
-
-#define MAX_REGISTER_VIRTUAL_SIZE REGISTER_SIZE
-
-/* The breakpoint instruction must be the same size as te smallest
- instruction in the instruction set.
-
- The Matsushita mn10x00 processors have single byte instructions
- so we need a single byte breakpoint. Matsushita hasn't defined
- one, so we defined it ourselves.
-
- 0xff is the only available single byte insn left on the mn10200. */
-#define BREAKPOINT {0xff}
-
-#define FUNCTION_START_OFFSET 0
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Stacks grow the normal way. */
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-#define SAVED_PC_AFTER_CALL(frame) \
- (read_memory_integer (read_register (SP_REGNUM), REGISTER_SIZE) & 0xffffff)
-
-struct frame_info;
-struct frame_saved_regs;
-struct type;
-struct value;
-
-#define EXTRA_FRAME_INFO struct frame_saved_regs fsr; int status; int stack_size;
-
-extern void mn10200_init_extra_frame_info (struct frame_info *);
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10200_init_extra_frame_info (fi)
-#define DEPRECATED_INIT_FRAME_PC(x,y) (init_frame_pc_noop (x, y))
-#define INIT_FRAME_PC_FIRST(x,y) (init_frame_pc_noop (x, y))
-
-extern void mn10200_frame_find_saved_regs (struct frame_info *,
- struct frame_saved_regs *);
-#define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
-
-extern CORE_ADDR mn10200_frame_chain (struct frame_info *);
-#define FRAME_CHAIN(fi) mn10200_frame_chain (fi)
-#define FRAME_CHAIN_VALID(FP, FI) generic_file_frame_chain_valid (FP, FI)
-
-extern CORE_ADDR mn10200_find_callers_reg (struct frame_info *, int);
-extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
-#define FRAME_SAVED_PC(FI) (mn10200_frame_saved_pc (FI))
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
- { \
- if (TYPE_LENGTH (TYPE) > 8) \
- internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
- else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
- { \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), 2); \
- memcpy (VALBUF + 2, REGBUF + REGISTER_BYTE (1), 2); \
- } \
- else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
- { \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (4), TYPE_LENGTH (TYPE)); \
- } \
- else \
- { \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE)); \
- } \
- }
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- extract_address (REGBUF + REGISTER_BYTE (4), \
- REGISTER_RAW_SIZE (4))
-
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
- { \
- if (TYPE_LENGTH (TYPE) > 8) \
- internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
- else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
- { \
- deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
- deprecated_write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
- } \
- else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
- { \
- deprecated_write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
- } \
- else \
- { \
- deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
- } \
- }
-
-
-extern CORE_ADDR mn10200_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
- (SP) = mn10200_store_struct_return (STRUCT_ADDR, SP)
-
-extern CORE_ADDR mn10200_skip_prologue (CORE_ADDR);
-#define SKIP_PROLOGUE(pc) (mn10200_skip_prologue (pc))
-
-#define FRAME_ARGS_SKIP 0
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-#define FRAME_NUM_ARGS(fi) (-1)
-
-extern void mn10200_pop_frame (struct frame_info *);
-#define POP_FRAME mn10200_pop_frame (get_current_frame ())
-
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
-#define CALL_DUMMY {0}
-#define CALL_DUMMY_START_OFFSET (0)
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
-#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-#define CALL_DUMMY_ADDRESS() entry_point_address ()
-
-extern CORE_ADDR mn10200_push_return_address (CORE_ADDR, CORE_ADDR);
-#define PUSH_RETURN_ADDRESS(PC, SP) mn10200_push_return_address (PC, SP)
-
-#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
-
-extern CORE_ADDR mn10200_push_arguments (int, struct value **, CORE_ADDR,
- unsigned char, CORE_ADDR);
-#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
- (mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-
-#define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-
-#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
- (TYPE_LENGTH (TYPE) > 8)
-
-extern use_struct_convention_fn mn10200_use_struct_convention;
-#define USE_STRUCT_CONVENTION(GCC_P, TYPE) mn10200_use_struct_convention (GCC_P, TYPE)
-
-/* Define this for Wingdb */
-#define TARGET_MN10200
+// 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-lynx.h b/gdb/config/nm-lynx.h
index 1cd2bd1ceb1..1fb0eb61a16 100644
--- a/gdb/config/nm-lynx.h
+++ b/gdb/config/nm-lynx.h
@@ -1,6 +1,7 @@
/* Native-dependent definitions for LynxOS.
- Copyright 1993, 1994, 1995, 1996, 1999, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -42,8 +43,6 @@
#define KERNEL_U_ADDR USRSTACK
-#undef FLOAT_INFO /* No float info yet */
-
/* As of LynxOS 2.2.2 (beta 8/15/94), this is int. Previous versions seem to
have had no prototype, so I'm not sure why GDB used to define this to
char *. */
diff --git a/gdb/config/ns32k/nm-nbsd.h b/gdb/config/ns32k/nm-nbsd.h
index 4e1e13b9e3e..eb803f2e793 100644
--- a/gdb/config/ns32k/nm-nbsd.h
+++ b/gdb/config/ns32k/nm-nbsd.h
@@ -25,10 +25,6 @@
/* Get generic NetBSD native definitions. */
#include "config/nm-nbsd.h"
-#if 0
-#define FLOAT_INFO { extern ns32k_float_info(); ns32k_float_info(); }
-#endif
-
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = ns32k_register_u_addr ((blockend),(regno));
diff --git a/gdb/config/pa/hpux1020.mt b/gdb/config/pa/hpux1020.mt
deleted file mode 100644
index a856d8c1d1d..00000000000
--- a/gdb/config/pa/hpux1020.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: HP PA-RISC running hpux
-TDEPFILES= hppa-tdep.o remote-pa.o somsolib.o corelow.o
-TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/hpux11.mt b/gdb/config/pa/hpux11.mt
deleted file mode 100644
index 405f73a791a..00000000000
--- a/gdb/config/pa/hpux11.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: HP PA-RISC running HPUX 11.00
-TDEPFILES= hppa-tdep.o remote-pa.o somsolib.o
-TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/hpux11w.mt b/gdb/config/pa/hpux11w.mt
deleted file mode 100644
index 4064d20fa75..00000000000
--- a/gdb/config/pa/hpux11w.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: HP PA-RISC running HPUX 11.00
-TDEPFILES= hppa-tdep.o remote-pa.o
-TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index ce35906d2bd..1b9e770f446 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -1,6 +1,6 @@
/* Parameters for execution on any Hewlett-Packard PA-RISC machine.
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1998, 1999, 2000 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -58,47 +58,67 @@ struct inferior_status;
((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
#endif
+#if !GDB_MULTI_ARCH
extern int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
#define REG_STRUCT_HAS_ADDR(gcc_p,type) hppa_reg_struct_has_addr (gcc_p,type)
+#endif
/* Offset from address of function to start of its code.
Zero on most machines. */
+#if !GDB_MULTI_ARCH
#define FUNCTION_START_OFFSET 0
+#endif
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
+#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_skip_prologue (CORE_ADDR);
#define SKIP_PROLOGUE(pc) (hppa_skip_prologue (pc))
+#endif
/* If PC is in some function-call trampoline code, return the PC
where the function itself actually starts. If not, return NULL. */
-#define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, NULL)
-extern CORE_ADDR skip_trampoline_code (CORE_ADDR, char *);
+#if !GDB_MULTI_ARCH
+#define SKIP_TRAMPOLINE_CODE(pc) hppa_skip_trampoline_code (pc)
+extern CORE_ADDR hppa_skip_trampoline_code (CORE_ADDR);
+#endif
/* Return non-zero if we are in an appropriate trampoline. */
+#if !GDB_MULTI_ARCH
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- in_solib_call_trampoline (pc, name)
-extern int in_solib_call_trampoline (CORE_ADDR, char *);
+ hppa_in_solib_call_trampoline (pc, name)
+extern int hppa_in_solib_call_trampoline (CORE_ADDR, char *);
+#endif
+#if !GDB_MULTI_ARCH
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) \
- in_solib_return_trampoline (pc, name)
-extern int in_solib_return_trampoline (CORE_ADDR, char *);
+ hppa_in_solib_return_trampoline (pc, name)
+extern int hppa_in_solib_return_trampoline (CORE_ADDR, char *);
+#endif
+#if !GDB_MULTI_ARCH
#undef SAVED_PC_AFTER_CALL
-#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call (frame)
-extern CORE_ADDR saved_pc_after_call (struct frame_info *);
+#define SAVED_PC_AFTER_CALL(frame) hppa_saved_pc_after_call (frame)
+extern CORE_ADDR hppa_saved_pc_after_call (struct frame_info *);
+#endif
+#if !GDB_MULTI_ARCH
extern int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
#define INNER_THAN(lhs,rhs) hppa_inner_than(lhs,rhs)
+#endif
+#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_stack_align (CORE_ADDR sp);
#define STACK_ALIGN(sp) hppa_stack_align (sp)
+#endif
+#if !GDB_MULTI_ARCH
#define EXTRA_STACK_ALIGNMENT_NEEDED 0
+#endif
/* Sequence of bytes for breakpoint instruction. */
@@ -111,7 +131,9 @@ extern CORE_ADDR hppa_stack_align (CORE_ADDR sp);
Not on the PA-RISC */
+#if !GDB_MULTI_ARCH
#define DECR_PC_AFTER_BREAK 0
+#endif
extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
#define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
@@ -120,11 +142,15 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
used in push_word and a few other places; REGISTER_RAW_SIZE is the
real way to know how big a register is. */
+#if !GDB_MULTI_ARCH
#define REGISTER_SIZE 4
+#endif
/* Number of machine registers */
+#if !GDB_MULTI_ARCH
#define NUM_REGS 128
+#endif
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer.
@@ -159,9 +185,13 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
other r registers. */
#define FLAGS_REGNUM 0 /* Various status flags */
#define RP_REGNUM 2 /* return pointer */
+#if !GDB_MULTI_ARCH
#define FP_REGNUM 3 /* Contains address of executing stack */
/* frame */
+#endif
+#if !GDB_MULTI_ARCH
#define SP_REGNUM 30 /* Contains address of top of stack */
+#endif
#define SAR_REGNUM 32 /* Shift Amount Register */
#define IPSW_REGNUM 41 /* Interrupt Processor Status Word */
#define PCOQ_HEAD_REGNUM 33 /* instruction offset queue head */
@@ -176,7 +206,9 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
#define CCR_REGNUM 54 /* Coprocessor Configuration Register */
#define TR0_REGNUM 57 /* Temporary Registers (cr24 -> cr31) */
#define CR27_REGNUM 60 /* Base register for thread-local storage, cr27 */
+#if !GDB_MULTI_ARCH
#define FP0_REGNUM 64 /* floating point reg. 0 (fspr) */
+#endif
#define FP4_REGNUM 72
#define ARG0_REGNUM 26 /* The first argument of a callee. */
@@ -185,8 +217,12 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
#define ARG3_REGNUM 23 /* The fourth argument of a callee. */
/* compatibility with the rest of gdb. */
+#if !GDB_MULTI_ARCH
#define PC_REGNUM PCOQ_HEAD_REGNUM
+#endif
+#if !GDB_MULTI_ARCH
#define NPC_REGNUM PCOQ_TAIL_REGNUM
+#endif
/*
* Processor Status Word Masks
@@ -219,10 +255,10 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
(buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \
} while (0)
-/* Define DEPRECATED_REGISTERS_INFO() to do machine-specific formatting
- of register dumps. */
+/* Define DEPRECATED_DO_REGISTERS_INFO() to do machine-specific
+ formatting of register dumps. */
-#define DEPRECATED_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp)
+#define DEPRECATED_DO_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp)
extern void pa_do_registers_info (int, int);
#if 0
@@ -240,41 +276,60 @@ extern int hppa_instruction_nullified (void);
for register N. On the PA-RISC, all regs are 4 bytes, including
the FP registers (they're accessed as two 4 byte halves). */
-#define REGISTER_RAW_SIZE(N) 4
+#if !GDB_MULTI_ARCH
+extern int hppa_register_raw_size (int reg_nr);
+#define REGISTER_RAW_SIZE(N) hppa_register_raw_size (N)
+#endif
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
+#if !GDB_MULTI_ARCH
#define REGISTER_BYTES (NUM_REGS * 4)
+#endif
+#if !GDB_MULTI_ARCH
extern int hppa_register_byte (int reg_nr);
#define REGISTER_BYTE(N) hppa_register_byte (N)
+#endif
/* Number of bytes of storage in the program's representation
for register N. */
+#if !GDB_MULTI_ARCH
#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
+#endif
/* Largest value REGISTER_RAW_SIZE can have. */
+#if !GDB_MULTI_ARCH
#define MAX_REGISTER_RAW_SIZE 4
+#endif
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
+#if !GDB_MULTI_ARCH
#define MAX_REGISTER_VIRTUAL_SIZE 8
+#endif
+#if !GDB_MULTI_ARCH
extern struct type * hppa_register_virtual_type (int reg_nr);
#define REGISTER_VIRTUAL_TYPE(N) hppa_register_virtual_type (N)
+#endif
+#if !GDB_MULTI_ARCH
extern void hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
#define STORE_STRUCT_RETURN(ADDR, SP) hppa_store_struct_return (ADDR, SP)
+#endif
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
+#if !GDB_MULTI_ARCH
void hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf);
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
hppa_extract_return_value (TYPE, REGBUF, VALBUF);
+#endif
/* elz: decide whether the function returning a value of type type
will put it on the stack or in the registers.
@@ -287,23 +342,25 @@ void hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf);
sr1: space identifier (32-bit)
stack: any lager than 64-bit, with the address in r28
*/
+#if !GDB_MULTI_ARCH
extern use_struct_convention_fn hppa_use_struct_convention;
#define USE_STRUCT_CONVENTION(gcc_p,type) hppa_use_struct_convention (gcc_p,type)
+#endif
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
-
+#if !GDB_MULTI_ARCH
extern void hppa_store_return_value (struct type *type, char *valbuf);
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
hppa_store_return_value (TYPE, VALBUF);
+#endif
-/* 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). */
-
+#if !GDB_MULTI_ARCH
+extern CORE_ADDR hppa_extract_struct_value_address (char *regbuf);
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- (*(int *)((REGBUF) + REGISTER_BYTE (28)))
+ hppa_extract_struct_value_address (REGBUF)
+#endif
/* elz: Return a large value, which is stored on the stack at addr.
This is defined only for the hppa, at this moment. The above macro
@@ -320,11 +377,15 @@ struct value *hppa_value_returned_from_stack (register struct type *valtype,
#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)
+#if !GDB_MULTI_ARCH
extern int hppa_cannot_store_register (int regnum);
#define CANNOT_STORE_REGISTER(regno) hppa_cannot_store_register (regno)
+#endif
-#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) init_extra_frame_info (fromleaf, frame)
-extern void init_extra_frame_info (int, struct frame_info *);
+#if !GDB_MULTI_ARCH
+#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) hppa_init_extra_frame_info (fromleaf, frame)
+extern void hppa_init_extra_frame_info (int, struct frame_info *);
+#endif
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
@@ -336,58 +397,75 @@ extern void init_extra_frame_info (int, struct frame_info *);
is the address of a 4-byte word containing the calling frame's
address (previous FP). */
-#define FRAME_CHAIN(thisframe) frame_chain (thisframe)
-extern CORE_ADDR frame_chain (struct frame_info *);
+#if !GDB_MULTI_ARCH
+#define FRAME_CHAIN(thisframe) hppa_frame_chain (thisframe)
+extern CORE_ADDR hppa_frame_chain (struct frame_info *);
+#endif
+#if !GDB_MULTI_ARCH
extern int hppa_frame_chain_valid (CORE_ADDR, struct frame_info *);
#define FRAME_CHAIN_VALID(chain, thisframe) hppa_frame_chain_valid (chain, thisframe)
+#endif
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
+#if !GDB_MULTI_ARCH
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (frameless_function_invocation (FI))
-extern int frameless_function_invocation (struct frame_info *);
+ (hppa_frameless_function_invocation (FI))
+extern int hppa_frameless_function_invocation (struct frame_info *);
+#endif
+#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
#define FRAME_SAVED_PC(FRAME) hppa_frame_saved_pc (FRAME)
+#endif
+#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
#define FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
+#endif
+#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
#define FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
+#endif
-/* Set VAL to the number of args passed to frame described by FI.
- Can set VAL to -1, meaning no way to tell. */
-
-/* We can't tell how many args there are
- now that the C compiler delays popping them. */
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Return number of bytes at start of arglist that are not really args. */
+#if !GDB_MULTI_ARCH
+extern int hppa_frame_num_args (struct frame_info *frame);
+#define FRAME_NUM_ARGS(fi) hppa_frame_num_args (fi)
+#endif
+#if !GDB_MULTI_ARCH
#define FRAME_ARGS_SKIP 0
+#endif
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
hppa_frame_find_saved_regs (frame_info, &frame_saved_regs)
-extern void
-hppa_frame_find_saved_regs (struct frame_info *, struct frame_saved_regs *);
+extern void hppa_frame_find_saved_regs (struct frame_info *,
+ struct frame_saved_regs *);
/* Things needed for making the inferior call functions. */
/* Push an empty stack frame, to record the current PC, etc. */
-#define PUSH_DUMMY_FRAME push_dummy_frame (inf_status)
-extern void push_dummy_frame (struct inferior_status *);
+/* FIXME: brobecker 2002-12-26. This macro definition takes advantage
+ of the fact that PUSH_DUMMY_FRAME is called within a function where
+ a variable inf_status of type struct inferior_status * is defined.
+ Ugh! Until this is fixed, we will not be able to move to multiarch
+ partial. */
+#define PUSH_DUMMY_FRAME hppa_push_dummy_frame (inf_status)
+extern void hppa_push_dummy_frame (struct inferior_status *);
/* Discard from the stack the innermost frame,
restoring all saved registers. */
+#if !GDB_MULTI_ARCH
#define POP_FRAME hppa_pop_frame ()
extern void hppa_pop_frame (void);
+#endif
#define INSTRUCTION_SIZE 4
@@ -474,11 +552,16 @@ extern void hppa_pop_frame (void);
0xe6c00002, 0xe4202000, 0x6bdf3fd1, 0x00010004,\
0x00151820, 0xe6c00002, 0x08000240, 0x08000240}
+#if !GDB_MULTI_ARCH
#define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 28)
+#endif
#define REG_PARM_STACK_SPACE 16
#else /* defined PA_LEVEL_0 */
+/* FIXME: brobecker 2002-12-26. PA_LEVEL_0 is only defined for the
+ hppa-pro target, which should be obsoleted soon. The following
+ section will therefore not be included in the multiarch conversion. */
/* This is the call dummy for a level 0 PA. Level 0's don't have space
registers (or floating point?), so we skip all that inter-space call stuff,
and avoid touching the fp regs.
@@ -509,9 +592,11 @@ extern void hppa_pop_frame (void);
#define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 12)
-#endif
+#endif /* defined PA_LEVEL_0 */
+#if !GDB_MULTI_ARCH
#define CALL_DUMMY_START_OFFSET 0
+#endif
/* 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
@@ -530,23 +615,31 @@ extern void hppa_pop_frame (void);
* inferior to do the function call.
*/
+/* FIXME: brobecker 2002-12-26. This macro is going to cause us some
+ problems before we can go to multiarch partial as it has been diverted
+ on HPUX to return the value of the PC! */
#define FIX_CALL_DUMMY hppa_fix_call_dummy
+extern CORE_ADDR hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
+ struct value **, struct type *, int);
-extern CORE_ADDR
-hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
- struct value **, struct type *, int);
-
+#if !GDB_MULTI_ARCH
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
(hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
-extern CORE_ADDR
-hppa_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
+extern CORE_ADDR hppa_push_arguments (int, struct value **, CORE_ADDR, int,
+ CORE_ADDR);
+#endif
+
+#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
#define SMASH_TEXT_ADDRESS(addr) hppa_smash_text_address (addr)
+#endif
#define GDB_TARGET_IS_HPPA
+#if !GDB_MULTI_ARCH
#define BELIEVE_PCC_PROMOTION 1
+#endif
/*
* Unwind table and descriptor.
@@ -673,31 +766,26 @@ extern CORE_ADDR target_read_pc (int);
extern CORE_ADDR skip_trampoline_code (CORE_ADDR, char *);
#endif
-#define TARGET_READ_PC(pid) target_read_pc (pid)
-extern CORE_ADDR target_read_pc (ptid_t);
+#if !GDB_MULTI_ARCH
+#define TARGET_READ_PC(pid) hppa_target_read_pc (pid)
+extern CORE_ADDR hppa_target_read_pc (ptid_t);
+#endif
-#define TARGET_WRITE_PC(v,pid) target_write_pc (v,pid)
-extern void target_write_pc (CORE_ADDR, ptid_t);
+#if !GDB_MULTI_ARCH
+#define TARGET_WRITE_PC(v,pid) hppa_target_write_pc (v,pid)
+extern void hppa_target_write_pc (CORE_ADDR, ptid_t);
+#endif
-#define TARGET_READ_FP() target_read_fp (PIDGET (inferior_ptid))
-extern CORE_ADDR target_read_fp (int);
+#if !GDB_MULTI_ARCH
+#define TARGET_READ_FP() hppa_target_read_fp ()
+extern CORE_ADDR hppa_target_read_fp (void);
+#endif
/* For a number of horrible reasons we may have to adjust the location
of variables on the stack. Ugh. */
#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
-
extern int hpread_adjust_stack_address (CORE_ADDR);
-/* If the current gcc for for this target does not produce correct debugging
- information for float parameters, both prototyped and unprototyped, then
- define this macro. This forces gdb to always assume that floats are
- passed as doubles and then converted in the callee. */
-
-extern int hppa_coerce_float_to_double (struct type *formal,
- struct type *actual);
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) \
- hppa_coerce_float_to_double (formal, actual)
-
/* Here's how to step off a permanent breakpoint. */
#define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
extern void hppa_skip_permanent_breakpoint (void);
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 9a1ceb0a83a..775055f4a1f 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -217,7 +217,6 @@ call_dummy
#undef FUNC_LDO_OFFSET
#undef SR4EXPORT_LDIL_OFFSET
#undef SR4EXPORT_LDO_OFFSET
-#undef CALL_DUMMY_LOCATION
#undef REG_STRUCT_HAS_ADDR
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index d94b381434c..4e68de992f1 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -33,50 +33,24 @@
#include "somsolib.h"
#endif
-/* Actually, for a PA running HPUX the kernel calls the signal handler
- without an intermediate trampoline. Luckily the kernel always sets
- the return pointer for the signal handler to point to _sigreturn. */
-#define PC_IN_SIGTRAMP(pc, name) (name && STREQ ("_sigreturn", name))
-
-/* For HPUX:
-
- The signal context structure pointer is always saved at the base
- of the frame which "calls" the signal handler. We only want to find
- the hardware save state structure, which lives 10 32bit words into
- sigcontext structure.
-
- Within the hardware save state structure, registers are found in the
- same order as the register numbers in GDB.
-
- At one time we peeked at %r31 rather than the PC queues to determine
- what instruction took the fault. This was done on purpose, but I don't
- remember why. Looking at the PC queues is really the right way, and
- I don't remember why that didn't work when this code was originally
- written. */
+extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
+#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
+extern void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
+ CORE_ADDR *tmp);
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-{ \
- *(TMP) = read_memory_integer ((FRAME)->frame + (43 * 4) , 4); \
-}
+ hppa_hpux_frame_saved_pc_in_sigtramp (FRAME, TMP)
+extern void hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
+ CORE_ADDR *tmp);
#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-{ \
- *(TMP) = read_memory_integer ((FRAME)->frame + (40 * 4), 4); \
-}
+ hppa_hpux_frame_base_before_sigtramp (FRAME, TMP)
+struct frame_saved_regs;
+extern void hppa_hpux_frame_find_saved_regs_in_sigtramp
+ (struct frame_info *fi, struct frame_saved_regs *fsr);
#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-{ \
- int i; \
- CORE_ADDR TMP; \
- TMP = (FRAME)->frame + (10 * 4); \
- for (i = 0; i < NUM_REGS; i++) \
- { \
- if (i == SP_REGNUM) \
- (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
- else \
- (FSR)->regs[i] = TMP + i * 4; \
- } \
-}
+ hppa_hpux_frame_find_saved_regs_in_sigtramp (FRAME, FSR)
/* For HP-UX on PA-RISC we have an implementation
for the exception handling target op (in hppa-tdep.c) */
diff --git a/gdb/config/powerpc/gdbserve.mt b/gdb/config/powerpc/gdbserve.mt
deleted file mode 100644
index 77284077db6..00000000000
--- a/gdb/config/powerpc/gdbserve.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: GDBSERVE.NLM running on a Power-PC
-TDEPFILES= ppc.o
-CPU_FILE= ppc
diff --git a/gdb/config/powerpc/ppcle-eabi.mt b/gdb/config/powerpc/ppcle-eabi.mt
deleted file mode 100644
index ee05f163797..00000000000
--- a/gdb/config/powerpc/ppcle-eabi.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: PowerPC running eabi in little endian mode
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-ppcle-eabi.h
diff --git a/gdb/config/powerpc/ppcle-sim.mt b/gdb/config/powerpc/ppcle-sim.mt
deleted file mode 100644
index 31cb9006a30..00000000000
--- a/gdb/config/powerpc/ppcle-sim.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o
-TM_FILE= tm-ppcle-eabi.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/ppc/libsim.a
diff --git a/gdb/config/sparc/sp64sim.mt b/gdb/config/sparc/sp64sim.mt
deleted file mode 100644
index a9c5ac94cd4..00000000000
--- a/gdb/config/sparc/sp64sim.mt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Target: SPARC64 (with simulator)
-# solib.o and procfs.o taken out for now. We don't have shared libraries yet,
-# and the elf version requires procfs.o but the a.out version doesn't.
-# Then again, having procfs.o in a target makefile fragment seems wrong.
-TDEPFILES = sparc-tdep.o
-TM_FILE= tm-sp64.h
-
-# Need gcc for long long support.
-CC = gcc
-
-MH_CFLAGS = -I${srcdir}/../sim/sp64
-SIM_OBS = remote-sim.o
-SIM = ../sim/sp64/libsim.a
diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h
index 0c3731f3065..e8f565692c0 100644
--- a/gdb/config/sparc/tm-sp64.h
+++ b/gdb/config/sparc/tm-sp64.h
@@ -112,14 +112,13 @@
#define FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P)
#undef PUSH_RETURN_ADDRESS
#define PUSH_RETURN_ADDRESS(PC, SP) sparc_at_entry_push_return_address (PC, SP)
-extern CORE_ADDR
-sparc_at_entry_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
+extern CORE_ADDR sparc_at_entry_push_return_address (CORE_ADDR pc,
+ CORE_ADDR sp);
#undef STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(ADDR, SP) \
sparc_at_entry_store_struct_return (ADDR, SP)
-extern void
-sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
+extern void sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
#else
diff --git a/gdb/config/sparc/tm-sp64sim.h b/gdb/config/sparc/tm-sp64sim.h
deleted file mode 100644
index bb1263b40db..00000000000
--- a/gdb/config/sparc/tm-sp64sim.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Macro definitions for GDB with the SPARC64 Simulator.
- Copyright 1993, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* ??? This file is based on tm-spc-em.h. Our contents are probably bogus
- but it's a good start. */
-
-#include "sparc/tm-sp64.h"
-#include "config/tm-sunos.h"
-
-/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
- comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 8 /* Size of each element in jmp_buf */
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_NPC 4
-#define JB_PSR 5
-#define JB_G1 6
-#define JB_O0 7
-#define JB_WBCNT 8
-
-/* Figure out where the longjmp will land. We expect that we have just entered
- longjmp and haven't yet setup the stack frame, so the args are still in the
- output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
- extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 13a0f82d7a4..05495ed4886 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -1,7 +1,7 @@
/* Target machine sub-parameters for SPARC, for GDB, the GNU debugger.
This is included by other tm-*.h files to define SPARC cpu-related info.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000
+ 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@mcc.com)
@@ -280,14 +280,6 @@ extern void sparc_store_return_value (struct type *, char *);
extern CORE_ADDR sparc_extract_struct_value_address (char *);
-/* If the current gcc for for this target does not produce correct
- debugging information for float parameters, both prototyped and
- unprototyped, then define this macro. This forces gdb to always
- assume that floats are passed as doubles and then converted in the
- callee. */
-
-#define COERCE_FLOAT_TO_DOUBLE(FORMAL, ACTUAL) (1)
-
/* Stack must be aligned on 64-bit boundaries when synthesizing
function calls (128-bit for sparc64). */
@@ -496,9 +488,9 @@ extern CORE_ADDR sparc_frame_chain (struct frame_info *);
extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
/* If the argument is on the stack, it will be here. */
-#define FRAME_ARGS_ADDRESS(FI) ((FI)->frame)
+#define FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
-#define FRAME_LOCALS_ADDRESS(FI) ((FI)->frame)
+#define FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
@@ -534,7 +526,7 @@ extern void sparc_print_extra_frame_info (struct frame_info *);
#define FRAME_SAVED_L0 0
#define FRAME_SAVED_I0 (8 * REGISTER_RAW_SIZE (L0_REGNUM))
-#define FRAME_STRUCT_ARGS_ADDRESS(FI) ((FI)->frame)
+#define FRAME_STRUCT_ARGS_ADDRESS(FI) (get_frame_base (FI))
/* Things needed for making the inferior call functions. */
/*
@@ -694,8 +686,8 @@ void sparc_pop_frame (void);
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
sparc32_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
-extern CORE_ADDR
-sparc32_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
+extern CORE_ADDR sparc32_push_arguments (int, struct value **, CORE_ADDR, int,
+ CORE_ADDR);
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function_by_hand.
diff --git a/gdb/config/sparc/tm-sparclite.h b/gdb/config/sparc/tm-sparclite.h
index 8fafe5e3b4f..fb8b6d56fee 100644
--- a/gdb/config/sparc/tm-sparclite.h
+++ b/gdb/config/sparc/tm-sparclite.h
@@ -1,5 +1,5 @@
/* Macro definitions for GDB for a Fujitsu SPARClite.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -63,9 +63,6 @@ enum {
* The following defines must go away for MULTI_ARCH.
*/
-#undef FRAME_CHAIN_VALID
-#define FRAME_CHAIN_VALID(FP,FI) func_frame_chain_valid (FP, FI)
-
#undef NUM_REGS
#define NUM_REGS 80
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
index 86cc4a4b59d..59b6ecbad7b 100644
--- a/gdb/config/z8k/tm-z8k.h
+++ b/gdb/config/z8k/tm-z8k.h
@@ -1,292 +1,292 @@
-/* Parameters for execution on a z8000 series machine.
-
- Copyright 1992, 1993, 1994, 1998, 1999, 2000, 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. */
-
-/* NOTE: cagney/2002-11-24: This is a guess. */
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-#define CALL_DUMMY_LOCATION ON_STACK
-#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
-
-#undef TARGET_INT_BIT
-#undef TARGET_LONG_BIT
-#undef TARGET_SHORT_BIT
-#undef TARGET_PTR_BIT
-
-#define TARGET_SHORT_BIT 16
-#define TARGET_INT_BIT 16
-#define TARGET_LONG_BIT 32
-#define TARGET_PTR_BIT (BIG ? 32: 16)
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-#define SKIP_PROLOGUE(ip) (z8k_skip_prologue (ip))
-extern CORE_ADDR z8k_skip_prologue (CORE_ADDR ip);
-
-
-/* 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. */
-
-
-extern int z8k_saved_pc_after_call (struct frame_info *frame);
-#define SAVED_PC_AFTER_CALL(frame) z8k_saved_pc_after_call(frame)
-
-/* Stack grows downward. */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Sequence of bytes for breakpoint instruction. */
-
-#define BREAKPOINT {0x36,0x00}
-
-/* If your kernel resets the pc after the trap happens you may need to
- define this before including this file. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Say how long registers are. */
-
-#define REGISTER_TYPE unsigned int
-
-#define NUM_REGS 23 /* 16 registers + 1 ccr + 1 pc + 3 debug
- regs + fake fp + fake sp */
-#define REGISTER_BYTES (NUM_REGS *4)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) ((N)*4)
-
-/* Number of bytes of storage in the actual machine representation
- for register N. On the z8k, all but the pc are 2 bytes, but we
- keep them all as 4 bytes and trim them on I/O */
-
-
-#define REGISTER_RAW_SIZE(N) (((N) < 16)? 2:4)
-
-/* Number of bytes of storage in the program's representation
- for register N. */
-
-#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) \
- (REGISTER_VIRTUAL_SIZE(N) == 2? builtin_type_unsigned_int : builtin_type_long)
-
-#define DEPRECATED_INIT_FRAME_PC(x,y) (init_frame_pc_noop (x, y))
-#define INIT_FRAME_PC_FIRST(x,y) (init_frame_pc_noop (x, y))
-
-#define REGISTER_NAMES \
- {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
- "ccr", "pc", "cycles","insts","time","fp","sp"}
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define CCR_REGNUM 16 /* Contains processor status */
-#define PC_REGNUM 17 /* Contains program counter */
-#define CYCLES_REGNUM 18
-#define INSTS_REGNUM 19
-#define TIME_REGNUM 20
-#define FP_REGNUM 21 /* Contains fp, whatever memory model */
-#define SP_REGNUM 22 /* Conatins sp, whatever memory model */
-
-
-
-#define PTR_SIZE (BIG ? 4: 2)
-#define PTR_MASK (BIG ? 0xff00ffff : 0x0000ffff)
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-#define STORE_STRUCT_RETURN(ADDR, SP) internal_error (__FILE__, __LINE__, "failed internal consistency check");
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. This is assuming that floating point values are returned
- as doubles in d0/d1. */
-
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- memcpy(VALBUF, REGBUF + REGISTER_BYTE(2), TYPE_LENGTH(TYPE));
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) internal_error (__FILE__, __LINE__, "failed internal consistency check");
-
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR (or an expression that can be used as one). */
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-
-/* Describe the pointer in each stack frame to the previous stack frame
- (its caller). */
-
-/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
- chain-pointer.
- In the case of the Z8000, the frame's nominal address
- is the address of a ptr sized byte word containing the calling
- frame's address. */
-
-extern CORE_ADDR z8k_frame_chain (struct frame_info *thisframe);
-#define FRAME_CHAIN(thisframe) z8k_frame_chain(thisframe);
-
-
-
-/* Define other aspects of the stack frame. */
-
-/* A macro that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0. */
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (frameless_look_for_prologue (FI))
-
-extern CORE_ADDR z8k_frame_saved_pc (struct frame_info *frame);
-#define FRAME_SAVED_PC(FRAME) z8k_frame_saved_pc(FRAME)
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Set VAL to the number of args passed to frame described by FI.
- Can set VAL to -1, meaning no way to tell. */
-
-/* We can't tell how many args there are
- now that the C compiler delays popping them. */
-#if !defined (FRAME_NUM_ARGS)
-#define FRAME_NUM_ARGS(fi) (-1)
-#endif
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 8
-
-struct frame_info;
-extern void z8k_frame_init_saved_regs (struct frame_info *);
-#define FRAME_INIT_SAVED_REGS(fi) z8k_frame_init_saved_regs (fi)
-
-
-/* Things needed for making the inferior call functions.
- It seems like every m68k based machine has almost identical definitions
- in the individual machine's configuration files. Most other cpu types
- (mips, i386, etc) have routines in their *-tdep.c files to handle this
- for most configurations. The m68k family should be able to do this as
- well. These macros can still be overridden when necessary. */
-
-/* The CALL_DUMMY macro is the sequence of instructions, as disassembled
- by gdb itself:
-
- fmovemx fp0-fp7,sp@- 0xf227 0xe0ff
- moveml d0-a5,sp@- 0x48e7 0xfffc
- clrw sp@- 0x4267
- movew ccr,sp@- 0x42e7
-
- /..* The arguments are pushed at this point by GDB;
- no code is needed in the dummy for this.
- The CALL_DUMMY_START_OFFSET gives the position of
- the following jsr instruction. *../
-
- jsr @#0x32323232 0x4eb9 0x3232 0x3232
- addal #0x69696969,sp 0xdffc 0x6969 0x6969
- trap #<your BPT_VECTOR number here> 0x4e4?
- nop 0x4e71
-
- Note this is CALL_DUMMY_LENGTH bytes (28 for the above example).
- We actually start executing at the jsr, since the pushing of the
- registers is done by PUSH_DUMMY_FRAME. If this were real code,
- the arguments for the function called by the jsr would be pushed
- between the moveml and the jsr, and we could allow it to execute through.
- But the arguments have to be pushed by GDB after the PUSH_DUMMY_FRAME is
- done, and we cannot allow the moveml to push the registers again lest
- they be taken for the arguments. */
-
-
-#define CALL_DUMMY { 0 }
-#define CALL_DUMMY_LENGTH 24 /* Size of CALL_DUMMY */
-#define CALL_DUMMY_START_OFFSET 8 /* Offset to jsr instruction */
-
-
-/* Insert the specified number of args and function address
- into a call sequence of the above form stored at DUMMYNAME.
- We use the BFD routines to store a big-endian value of known size. */
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-{ bfd_putb32 (fun, (char *) dummyname + CALL_DUMMY_START_OFFSET + 2); \
- bfd_putb32 (nargs*4, (char *) dummyname + CALL_DUMMY_START_OFFSET + 8); }
-
-/* Push an empty stack frame, to record the current PC, etc. */
-
-#define PUSH_DUMMY_FRAME { z8k_push_dummy_frame (); }
-
-extern void z8k_push_dummy_frame (void);
-
-extern void z8k_pop_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers. */
-
-#define POP_FRAME { z8k_pop_frame (); }
-
-/* Offset from SP to first arg on stack at first instruction of a function */
-
-#define SP_ARG0 (1 * 4)
-
-extern CORE_ADDR z8k_addr_bits_remove (CORE_ADDR);
-#define ADDR_BITS_REMOVE(addr) z8k_addr_bits_remove (addr)
-int sim_z8001_mode;
-#define BIG (sim_z8001_mode)
-
-#define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-
-#define NO_STD_REGS
-
-extern void z8k_do_registers_info (int regnum, int all);
-#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
- z8k_do_registers_info (REGNUM, ALL)
-
-extern void z8k_set_pointer_size (int newsize);
-#define INIT_EXTRA_SYMTAB_INFO \
- z8k_set_pointer_size(objfile->obfd->arch_info->bits_per_address);
-
-#define REGISTER_SIZE 4
+// 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
index cb8d04376e7..3eb6c7bf4ca 100644
--- a/gdb/config/z8k/z8k.mt
+++ b/gdb/config/z8k/z8k.mt
@@ -1,7 +1,6 @@
-# Target: Z8000 with simulator
-TDEPFILES= z8k-tdep.o
-TM_FILE= tm-z8k.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/z8k/libsim.a
-
+# 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 b/gdb/configure
index b6e9acb8794..b16718a84d5 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -19,17 +19,23 @@ ac_help="$ac_help
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
ac_help="$ac_help
- --enable-multi-ice Build the multi-ice-gdb-server"
+ --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
ac_help="$ac_help
- --enable-gdbcli Enable GDB-CLI interface"
+ --disable-gdbcli disable command-line interface (CLI)"
ac_help="$ac_help
- --enable-gdbmi Enable GDB-MI interface"
+ --disable-gdbmi disable machine-interface (MI)"
ac_help="$ac_help
- --with-uiout Use new uiout functions instead of *printf's"
+ --enable-tui enable full-screen terminal user interface (TUI)"
ac_help="$ac_help
- --enable-tui Enable full-screen terminal user interface"
+ --enable-gdbtk enable gdbtk graphical user interface (GUI)"
ac_help="$ac_help
- --enable-netrom Enable NetROM support"
+ --enable-profiling enable profiling of GDB"
+ac_help="$ac_help
+ --without-included-regex don't use included regex; this is the default
+ on systems with version 2 of the GNU C library
+ (use with caution on other system)"
+ac_help="$ac_help
+ --with-sysroot[=DIR] Search for usr/lib et al within DIR."
ac_help="$ac_help
--enable-build-warnings Enable build-time compiler warnings if gcc is used"
ac_help="$ac_help
@@ -37,12 +43,6 @@ ac_help="$ac_help
ac_help="$ac_help
--with-mmalloc Use memory mapped malloc package"
ac_help="$ac_help
- --with-included-regex Use included regex"
-ac_help="$ac_help
- --with-cpu=CPU Set the default CPU variant to debug"
-ac_help="$ac_help
- --enable-gdbtk Enable GDBTK GUI front end"
-ac_help="$ac_help
--with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
ac_help="$ac_help
--with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
@@ -59,7 +59,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-sim Link gdb with simulator"
ac_help="$ac_help
- --enable-shared Use shared libraries"
+ --enable-multi-ice build the multi-ice-gdb-server"
ac_help="$ac_help
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
@@ -830,8 +830,13 @@ else
fi
fi
+cat >> confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:835: checking how to run the C preprocessor" >&5
+echo "configure:840: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -846,13 +851,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 850 "configure"
+#line 855 "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:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:861: \"$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
:
@@ -863,13 +868,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 867 "configure"
+#line 872 "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:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:878: \"$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
:
@@ -880,13 +885,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 884 "configure"
+#line 889 "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:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:895: \"$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
:
@@ -911,9 +916,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:915: checking for AIX" >&5
+echo "configure:920: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 917 "configure"
+#line 922 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -935,7 +940,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:939: checking for POSIXized ISC" >&5
+echo "configure:944: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -959,7 +964,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -976,7 +981,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 980 "configure"
+#line 985 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1013,7 +1018,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1084,7 +1089,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1088: checking host system type" >&5
+echo "configure:1093: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1105,7 +1110,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1109: checking target system type" >&5
+echo "configure:1114: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1123,7 +1128,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1127: checking build system type" >&5
+echo "configure:1132: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1146,9 +1151,89 @@ test "$host_alias" != "$target_alias" &&
program_prefix=${target_alias}-
+# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
+# doesn't support cross-compilation, but the one from Autoconf 2.5x
+# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
+# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
+# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
+# 2.5x.
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+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:1170: 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
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+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:1202: 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
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1152: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1237: 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
@@ -1177,7 +1262,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1181: checking for $ac_word" >&5
+echo "configure:1266: 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
@@ -1205,12 +1290,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1209: checking for ANSI C header files" >&5
+echo "configure:1294: 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 1214 "configure"
+#line 1299 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1218,7 +1303,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1307: \"$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*
@@ -1235,7 +1320,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 1239 "configure"
+#line 1324 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1253,7 +1338,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 1257 "configure"
+#line 1342 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1274,7 +1359,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1278 "configure"
+#line 1363 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1285,7 +1370,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1309,12 +1394,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1313: checking for working const" >&5
+echo "configure:1398: 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 1318 "configure"
+#line 1403 "configure"
#include "confdefs.h"
int main() {
@@ -1363,7 +1448,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1384,21 +1469,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1388: checking for inline" >&5
+echo "configure:1473: 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 1395 "configure"
+#line 1480 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1424,12 +1509,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1428: checking for off_t" >&5
+echo "configure:1513: 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 1433 "configure"
+#line 1518 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1457,12 +1542,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1461: checking for size_t" >&5
+echo "configure:1546: 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 1466 "configure"
+#line 1551 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1492,19 +1577,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:1496: checking for working alloca.h" >&5
+echo "configure:1581: 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 1501 "configure"
+#line 1586 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1593: \"$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
@@ -1525,12 +1610,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1529: checking for alloca" >&5
+echo "configure:1614: 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 1534 "configure"
+#line 1619 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1558,7 +1643,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1647: \"$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
@@ -1590,12 +1675,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1594: checking whether alloca needs Cray hooks" >&5
+echo "configure:1679: 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 1599 "configure"
+#line 1684 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1620,12 +1705,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:1624: checking for $ac_func" >&5
+echo "configure:1709: 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 1629 "configure"
+#line 1714 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1648,7 +1733,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1737: \"$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
@@ -1675,7 +1760,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1679: checking stack direction for C alloca" >&5
+echo "configure:1764: 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
@@ -1683,7 +1768,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1687 "configure"
+#line 1772 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1702,7 +1787,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1791: \"$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
@@ -1727,17 +1812,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:1731: checking for $ac_hdr" >&5
+echo "configure:1816: 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 1736 "configure"
+#line 1821 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1826: \"$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*
@@ -1766,12 +1851,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1770: checking for $ac_func" >&5
+echo "configure:1855: 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 1775 "configure"
+#line 1860 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1794,7 +1879,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1883: \"$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
@@ -1819,7 +1904,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1823: checking for working mmap" >&5
+echo "configure:1908: 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
@@ -1827,7 +1912,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1831 "configure"
+#line 1916 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1967,7 +2052,7 @@ main()
}
EOF
-if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2056: \"$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
@@ -1995,17 +2080,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:1999: checking for $ac_hdr" >&5
+echo "configure:2084: 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 2004 "configure"
+#line 2089 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2094: \"$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*
@@ -2035,12 +2120,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2039: checking for $ac_func" >&5
+echo "configure:2124: 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 2044 "configure"
+#line 2129 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2063,7 +2148,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2152: \"$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
@@ -2092,12 +2177,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2096: checking for $ac_func" >&5
+echo "configure:2181: 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 2101 "configure"
+#line 2186 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2120,7 +2205,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2209: \"$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
@@ -2154,19 +2239,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2158: checking for LC_MESSAGES" >&5
+echo "configure:2243: 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 2163 "configure"
+#line 2248 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2255: \"$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
@@ -2187,7 +2272,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2191: checking whether NLS is requested" >&5
+echo "configure:2276: 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"
@@ -2207,7 +2292,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2211: checking whether included gettext is requested" >&5
+echo "configure:2296: 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"
@@ -2226,17 +2311,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2230: checking for libintl.h" >&5
+echo "configure:2315: 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 2235 "configure"
+#line 2320 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2325: \"$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*
@@ -2253,19 +2338,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:2257: checking for gettext in libc" >&5
+echo "configure:2342: 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 2262 "configure"
+#line 2347 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2354: \"$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
@@ -2281,7 +2366,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:2285: checking for bindtextdomain in -lintl" >&5
+echo "configure:2370: 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
@@ -2289,7 +2374,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2293 "configure"
+#line 2378 "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
@@ -2300,7 +2385,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2389: \"$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
@@ -2316,19 +2401,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:2320: checking for gettext in libintl" >&5
+echo "configure:2405: 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 2325 "configure"
+#line 2410 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2417: \"$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
@@ -2356,7 +2441,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:2360: checking for $ac_word" >&5
+echo "configure:2445: 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
@@ -2390,12 +2475,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2394: checking for $ac_func" >&5
+echo "configure:2479: 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 2399 "configure"
+#line 2484 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2418,7 +2503,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2507: \"$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
@@ -2445,7 +2530,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:2449: checking for $ac_word" >&5
+echo "configure:2534: 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
@@ -2481,7 +2566,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:2485: checking for $ac_word" >&5
+echo "configure:2570: 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
@@ -2513,7 +2598,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
+#line 2602 "configure"
#include "confdefs.h"
int main() {
@@ -2521,7 +2606,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2553,7 +2638,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:2557: checking for $ac_word" >&5
+echo "configure:2642: 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
@@ -2587,7 +2672,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:2591: checking for $ac_word" >&5
+echo "configure:2676: 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
@@ -2623,7 +2708,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:2627: checking for $ac_word" >&5
+echo "configure:2712: 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
@@ -2713,7 +2798,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2717: checking for catalogs to be installed" >&5
+echo "configure:2802: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2741,17 +2826,17 @@ echo "configure:2717: 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:2745: checking for linux/version.h" >&5
+echo "configure:2830: 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 2750 "configure"
+#line 2835 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2840: \"$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*
@@ -2817,6 +2902,26 @@ cat >> confdefs.h <<\EOF
EOF
+debugdir=${libdir}/debug
+
+# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
+if test "${with_separate_debug_dir+set}" = set; then
+ withval="$with_separate_debug_dir"
+ debugdir="${withval}"
+fi
+
+
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo $debugdir`
+ ac_define_dir=`eval echo $ac_define_dir`
+ cat >> confdefs.h <<EOF
+#define DEBUGDIR "$ac_define_dir"
+EOF
+
+
+#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
CONFIG_OBS=
@@ -2830,57 +2935,288 @@ CONFIG_CLEAN=
CONFIG_INSTALL=
CONFIG_UNINSTALL=
-SUBDIRS="doc testsuite nlm"
-configdirs="doc testsuite"
+subdirs="doc testsuite"
-# Check whether --enable-multi-ice or --disable-multi-ice was given.
-if test "${enable_multi_ice+set}" = set; then
- enableval="$enable_multi_ice"
- case "${enableval}" in
- yes ) enable_multi_ice="yes" ;;
- no) enable_multi_ice="no" ;;
- *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
+configdirs=
+
+. $srcdir/configure.host
+
+. $srcdir/configure.tgt
+
+# Fetch the default architecture and default target vector from BFD.
+targ=$target; . $srcdir/../bfd/config.bfd
+
+# We only want the first architecture, so strip off the others if
+# there is more than one.
+targ_archs=`echo $targ_archs | sed 's/ .*//'`
+
+if test "x$targ_archs" != x; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_BFD_ARCH $targ_archs
+EOF
+
+fi
+if test "x$targ_defvec" != x; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_BFD_VEC $targ_defvec
+EOF
+
+fi
+
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+
+# The CLI cannot be disabled yet, but may be in the future.
+
+# Enable CLI.
+# Check whether --enable-gdbcli or --disable-gdbcli was given.
+if test "${enable_gdbcli+set}" = set; then
+ enableval="$enable_gdbcli"
+ case $enableval in
+ yes)
+ ;;
+ no)
+ { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
+ *)
+ { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
esac
+else
+ enable_gdbcli=yes
+fi
+if test x"$enable_gdbcli" = xyes; then
+ if test -d $srcdir/cli; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
+ CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
+ CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
+ CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
+ CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
+ fi
fi
+# Enable MI.
+# Check whether --enable-gdbmi or --disable-gdbmi was given.
+if test "${enable_gdbmi+set}" = set; then
+ enableval="$enable_gdbmi"
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
+ esac
+else
+ enable_gdbmi=yes
+fi
-if test "${enable_multi_ice}" = "yes"; then
- configdirs="${configdirs} multi-ice"
+if test x"$enable_gdbmi" = xyes; then
+ if test -d $srcdir/mi; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
+ CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
+ CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
+ CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
+ CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
+ fi
fi
+# Enable TUI.
+# Check whether --enable-tui or --disable-tui was given.
+if test "${enable_tui+set}" = set; then
+ enableval="$enable_tui"
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
+ esac
+fi
-. ${srcdir}/configure.host
+if test x"$enable_tui" = xyes; then
+ if test -d $srcdir/tui; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
+ CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
+ CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
+ CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
+ CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
+ need_curses=yes
+ fi
+fi
+
+# Enable gdbtk.
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+ enableval="$enable_gdbtk"
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
+ esac
+else
+ if test -d $srcdir/gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi
+fi
+
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
+ enable_gdbtk=no ;;
+esac
-. ${srcdir}/configure.tgt
+# Profiling support.
+# Check whether --enable-profiling or --disable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+ enableval="$enable_profiling"
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
+ esac
+else
+ enable_profiling=no
+fi
-targ=${target} ; . ${srcdir}/../bfd/config.bfd
+for ac_func in monstartup _mcleanup
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3117: 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 3122 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-targ=${target}
-. ${srcdir}/../bfd/config.bfd
+int main() {
-targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
-if test x"${targ_archs}" != x ; then
- cat >> confdefs.h <<EOF
-#define DEFAULT_BFD_ARCH ${targ_archs}
+; return 0; }
EOF
+if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
fi
-if test x"${targ_defvec}" != x ; then
- cat >> confdefs.h <<EOF
-#define DEFAULT_BFD_VEC ${targ_defvec}
+done
+
+if test "$enable_profiling" = yes ; then
+ if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
+ { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
+ fi
+ PROFILE_CFLAGS=-pg
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+
+ echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
+echo "configure:3178: checking whether $CC supports -pg" >&5
+if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3183 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
EOF
+if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_cc_supports_pg=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_cc_supports_pg=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
+
+ if test $ac_cv_cc_supports_pg = no; then
+ { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
+ fi
+ CFLAGS="$OLD_CFLAGS"
fi
+# --------------------- #
+# Checks for programs. #
+# --------------------- #
+
for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2884: checking for $ac_word" >&5
+echo "configure:3220: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2921,7 +3257,7 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2925: checking for a BSD compatible install" >&5
+echo "configure:3261: 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
@@ -2973,115 +3309,129 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:3314: 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
- ac_tool_prefix=
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
fi
-# 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
+# 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:2986: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+echo "configure:3337: 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
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
+ ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
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
+for ac_prog in 'bison -y' byacc
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3018: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+echo "configure:3369: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ ac_cv_prog_YACC="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+ echo "$ac_t""$YACC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
-if test -z "$ac_cv_prog_RANLIB"; then
-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
+
+# 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:3050: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+echo "configure:3403: 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
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-else
- RANLIB=":"
-fi
-fi
+
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3085: checking for $ac_word" >&5
+echo "configure:3435: 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
@@ -3113,7 +3463,7 @@ fi
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3117: checking for $ac_word" >&5
+echo "configure:3467: 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
@@ -3142,46 +3492,12 @@ fi
-for ac_prog in 'bison -y' byacc
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_YACC="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
+# Needed for GNU/Hurd.
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3185: checking for $ac_word" >&5
+echo "configure:3501: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3211,75 +3527,635 @@ fi
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
+# ---------------------- #
+# Checks for libraries. #
+# ---------------------- #
+
+# We might need to link with -lm; most simulators need it.
+echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:3537: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ ac_save_LIBS="$LIBS"
+LIBS="-lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3545 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+rm -f conftest*
+LIBS="$ac_save_LIBS"
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+ LIBS="-lm $LIBS"
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3236: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+# We need to link with -lw to get `wctype' on Solaris before Solaris
+# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
+# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
+# is known to have this problem). Therefore we avoid libw if we can.
+echo $ac_n "checking for wctype""... $ac_c" 1>&6
+echo "configure:3585: checking for wctype" >&5
+if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3241 "configure"
+#line 3590 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wctype(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char wctype();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_wctype) || defined (__stub___wctype)
+choke me
#else
-void (*signal ()) ();
+wctype();
#endif
+; return 0; }
+EOF
+if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_wctype=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_wctype=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
+echo "configure:3631: checking for wctype in -lw" >&5
+ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lw $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3639 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char wctype();
+
int main() {
-int i;
+wctype()
; return 0; }
EOF
-if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- ac_cv_type_signal=void
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_type_signal=int
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
+
fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
+ LIBS="-lw $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+# Some systems (e.g. Solaris) have `socketpair' in libsocket.
+
+echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
+echo "configure:3683: checking for library containing socketpair" >&5
+if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_socketpair="no"
+cat > conftest.$ac_ext <<EOF
+#line 3690 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socketpair();
+
+int main() {
+socketpair()
+; return 0; }
+EOF
+if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_socketpair="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_socketpair" = "no" && for i in socket; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3712 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socketpair();
+
+int main() {
+socketpair()
+; return 0; }
+EOF
+if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_socketpair="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_socketpair" 1>&6
+if test "$ac_cv_search_socketpair" != "no"; then
+ test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
+
+else :
+
+fi
+
+# Since GDB uses Readline, we need termcap functionality, so we need
+# to find a library that provides that. When GDB is configured with
+# --enable-tui, we need full curses functionality.
+#
+# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
+# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
+# Makefile fragments. That's why we need to have `Hcurses' before
+# `curses'. I don't see why we should use HP curses if a more
+# standard curses is available, except that according to HP's
+# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
+# HP-UX 10.10 and 10.20.
+
+if test "$need_curses" = yes; then
+
+echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
+echo "configure:3759: checking for library containing initscr" >&5
+if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_initscr="no"
+cat > conftest.$ac_ext <<EOF
+#line 3766 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr();
+
+int main() {
+initscr()
+; return 0; }
+EOF
+if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_initscr="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3788 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr();
+
+int main() {
+initscr()
+; return 0; }
+EOF
+if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_initscr="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_initscr" 1>&6
+if test "$ac_cv_search_initscr" != "no"; then
+ test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
+
+else :
+ { echo "configure: error: no curses library found" 1>&2; exit 1; }
+fi
+fi
+
+case $host_os in
+ cygwin*)
+ if test -d $srcdir/libtermcap; then
+ LIBS="../libtermcap/libtermcap.a $LIBS"
+ ac_cv_search_tgetent="../libtermcap/libtermcap.a"
+ fi ;;
+ go32*)
+ # ??? Is this really true?
+ ac_cv_search_tgetent="none required"
+ ;;
+ aix*)
+ # Readline prefers curses over termcap on AIX.
+ # ??? Why?
+
+echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
+echo "configure:3836: checking for library containing tgetent" >&5
+if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_tgetent="no"
+cat > conftest.$ac_ext <<EOF
+#line 3843 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_tgetent="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3865 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_tgetent="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_tgetent" 1>&6
+if test "$ac_cv_search_tgetent" != "no"; then
+ test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
+
+else :
+
+fi
+ ;;
+esac
+
+# Note: We used to check for libtermlib and libterminfo too, but
+# Readline doesn't, so I think we're safe with leaving them out.
+
+echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
+echo "configure:3903: checking for library containing tgetent" >&5
+if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_tgetent="no"
+cat > conftest.$ac_ext <<EOF
+#line 3910 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
EOF
+if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_tgetent="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3932 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_tgetent="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+echo "$ac_t""$ac_cv_search_tgetent" 1>&6
+if test "$ac_cv_search_tgetent" != "no"; then
+ test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
+
+else :
+
+fi
+
+if test "$ac_cv_search_tgetent" = no; then
+ { echo "configure: error: no termcap library found" 1>&2; exit 1; }
+fi
+# ------------------------- #
+# Checks for header files. #
+# ------------------------- #
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+echo "configure:3977: 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 3982 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:3990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:4015: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldir $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4023 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -ldir"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:4056: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lx $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4064 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -lx"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
+echo "configure:4098: checking whether stat file-mode macros are broken" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4103 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(S_ISBLK) && defined(S_IFDIR)
+# if S_ISBLK (S_IFDIR)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISBLK) && defined(S_IFCHR)
+# if S_ISBLK (S_IFCHR)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISLNK) && defined(S_IFREG)
+# if S_ISLNK (S_IFREG)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISSOCK) && defined(S_IFREG)
+# if S_ISSOCK (S_IFREG)
+You lose.
+# endif
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "You lose" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_header_stat_broken=yes
+else
+ rm -rf conftest*
+ ac_cv_header_stat_broken=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
+if test $ac_cv_header_stat_broken = yes; then
+ cat >> confdefs.h <<\EOF
+#define STAT_MACROS_BROKEN 1
+EOF
+
+fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3278: checking for ANSI C header files" >&5
+echo "configure:4154: 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 3283 "configure"
+#line 4159 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3287,7 +4163,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4167: \"$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*
@@ -3304,7 +4180,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 3308 "configure"
+#line 4184 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3322,7 +4198,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 3326 "configure"
+#line 4202 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3343,7 +4219,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3347 "configure"
+#line 4223 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3354,7 +4230,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3377,38 +4253,261 @@ EOF
fi
+for ac_hdr in link.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4261: 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 4266 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in nlist.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4301: 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 4306 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in poll.h sys/poll.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4341: 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 4346 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+for ac_hdr in proc_service.h thread_db.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4381: 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 4386 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
- cat >> confdefs.h <<\EOF
-#define _MSE_INT_H 1
+for ac_hdr in stddef.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4421: 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 4426 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-esac; esac
+for ac_hdr in stdlib.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4461: 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 4466 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
- memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
- string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
- term.h termio.h termios.h unistd.h wait.h sys/wait.h \
- wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
- time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
- dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
- curses.h ncurses.h \
- poll.h sys/poll.h
+for ac_hdr in stdint.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3402: checking for $ac_hdr" >&5
+echo "configure:4501: 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 3407 "configure"
+#line 4506 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4511: \"$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*
@@ -3434,70 +4533,800 @@ else
fi
done
-echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3439: checking whether stat file-mode macros are broken" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
+for ac_hdr in string.h memory.h strings.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4541: 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 3444 "configure"
+#line 4546 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-#if defined(S_ISBLK) && defined(S_IFDIR)
-# if S_ISBLK (S_IFDIR)
-You lose.
-# endif
-#endif
+for ac_hdr in sys/fault.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4581: 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 4586 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-#if defined(S_ISBLK) && defined(S_IFCHR)
-# if S_ISBLK (S_IFCHR)
-You lose.
-# endif
-#endif
+for ac_hdr in sys/file.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4621: 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 4626 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-#if defined(S_ISLNK) && defined(S_IFREG)
-# if S_ISLNK (S_IFREG)
-You lose.
-# endif
-#endif
+for ac_hdr in sys/filio.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4661: 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 4666 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-#if defined(S_ISSOCK) && defined(S_IFREG)
-# if S_ISSOCK (S_IFREG)
-You lose.
-# endif
-#endif
+for ac_hdr in sys/ioctl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4701: 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 4706 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+for ac_hdr in sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4741: 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 4746 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "You lose" >/dev/null 2>&1; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4751: \"$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*
- ac_cv_header_stat_broken=yes
+ eval "ac_cv_header_$ac_safe=yes"
else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_header_stat_broken=no
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+for ac_hdr in sys/proc.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4781: 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 4786 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
fi
+done
-echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
-if test $ac_cv_header_stat_broken = yes; then
- cat >> confdefs.h <<\EOF
-#define STAT_MACROS_BROKEN 1
+for ac_hdr in sys/procfs.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4821: 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 4826 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/ptrace.h ptrace.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4861: 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 4866 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/reg.h sys/debugreg.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4901: 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 4906 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/select.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4941: 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 4946 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/syscall.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4981: 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 4986 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+for ac_hdr in sys/user.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5021: 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 5026 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+for ac_hdr in sys/wait.h wait.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5061: 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 5066 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in termios.h termio.h sgtty.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5101: 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 5106 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5141: 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 5146 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
+# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
+# think that we don't have <curses.h> if we're using GCC.
+case $host_os in
+ solaris2.[78])
+ if test "$GCC" = yes; then
+ cat >> confdefs.h <<\EOF
+#define _MSE_INT_H 1
+EOF
+
+ fi ;;
+esac
+for ac_hdr in curses.h ncurses.h term.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5194: 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 5199 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+# FIXME: kettenis/20030102: In most cases we include these
+# unconditionally, so what's the point in checking these?
+for ac_hdr in ctype.h time.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5237: 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 5242 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+# ------------------ #
+# Checks for types. #
+# ------------------ #
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:5279: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5284 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:5301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_type_signal=void
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+
+# ------------------------------------- #
+# Checks for compiler characteristics. #
+# ------------------------------------- #
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3496: checking for working const" >&5
+echo "configure:5325: 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 3501 "configure"
+#line 5330 "configure"
#include "confdefs.h"
int main() {
@@ -3546,7 +5375,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3567,21 +5396,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3571: checking for inline" >&5
+echo "configure:5400: 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 3578 "configure"
+#line 5407 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3607,78 +5436,26 @@ EOF
esac
-for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
- realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3615: 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 3620 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
+# ------------------------------ #
+# Checks for library functions. #
+# ------------------------------ #
# 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:3670: checking for working alloca.h" >&5
+echo "configure:5447: 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 3675 "configure"
+#line 5452 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5459: \"$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
@@ -3699,12 +5476,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3703: checking for alloca" >&5
+echo "configure:5480: 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 3708 "configure"
+#line 5485 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3732,7 +5509,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5513: \"$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
@@ -3764,12 +5541,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3768: checking whether alloca needs Cray hooks" >&5
+echo "configure:5545: 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 3773 "configure"
+#line 5550 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3794,12 +5571,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:3798: checking for $ac_func" >&5
+echo "configure:5575: 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 3803 "configure"
+#line 5580 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3822,7 +5599,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5603: \"$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
@@ -3849,7 +5626,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3853: checking stack direction for C alloca" >&5
+echo "configure:5630: 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
@@ -3857,7 +5634,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3861 "configure"
+#line 5638 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3876,7 +5653,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5657: \"$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
@@ -3897,13 +5674,279 @@ EOF
fi
+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:5682: 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 5687 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5721: 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 5726 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:5774: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5782 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:5922: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3902: checking for pid_t" >&5
+echo "configure:5945: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3907 "configure"
+#line 5950 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3932,17 +5975,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3936: checking for vfork.h" >&5
+echo "configure:5979: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3941 "configure"
+#line 5984 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5989: \"$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*
@@ -3967,18 +6010,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3971: checking for working vfork" >&5
+echo "configure:6014: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3977: checking for vfork" >&5
+echo "configure:6020: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3982 "configure"
+#line 6025 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -4001,7 +6044,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -4023,7 +6066,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 4027 "configure"
+#line 6070 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -4118,7 +6161,7 @@ main() {
}
}
EOF
-if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -4140,9 +6183,395 @@ EOF
fi
+for ac_func in canonicalize_file_name realpath
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6190: 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 6195 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in poll
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6245: 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 6250 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in pread64
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6300: 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 6305 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in sbrk
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6355: 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 6360 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in setpgid setpgrp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6410: 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 6415 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in sigaction sigprocmask sigsetmask
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6465: 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 6470 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in socketpair
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6520: 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 6525 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4146: checking whether setpgrp takes no argument" >&5
+echo "configure:6575: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4150,7 +6579,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4154 "configure"
+#line 6583 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -4170,7 +6599,7 @@ main()
}
EOF
-if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -4195,12 +6624,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4199: checking whether setpgrp takes no argument" >&5
+echo "configure:6628: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4204 "configure"
+#line 6633 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -4214,7 +6643,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -4238,12 +6667,12 @@ fi
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:4242: checking for sigsetjmp" >&5
+echo "configure:6671: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4247 "configure"
+#line 6676 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -4252,7 +6681,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -4272,22 +6701,75 @@ EOF
fi
+# Assume we'll default to using the included libiberty regex.
+gdb_use_included_regex=yes
+
+# However, if the system regex is GNU regex, then default to *not*
+# using the included regex.
+echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
+echo "configure:6711: checking for GNU regex" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6716 "configure"
+#include "confdefs.h"
+#include <gnu-versions.h>
+int main() {
+#define REGEX_INTERFACE_VERSION 1
+#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
+# error "Version mismatch"
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_have_gnu_regex=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_have_gnu_regex=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
+if test $gdb_cv_have_gnu_regex = yes; then
+ gdb_use_included_regex=no
+fi
+
+# Check whether --with-included-regex or --without-included-regex was given.
+if test "${with_included_regex+set}" = set; then
+ withval="$with_included_regex"
+ gdb_with_regex=$withval
+else
+ gdb_with_regex=$gdb_use_included_regex
+fi
+
+if test "$gdb_with_regex" = yes; then
+ cat >> confdefs.h <<\EOF
+#define USE_INCLUDED_REGEX 1
+EOF
+
+fi
+
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:4279: checking for r_fs in struct reg" >&5
+echo "configure:6761: checking for r_fs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4284 "configure"
+#line 6766 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -4307,19 +6789,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:4311: checking for r_gs in struct reg" >&5
+echo "configure:6793: checking for r_gs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4316 "configure"
+#line 6798 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -4341,19 +6823,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:4345: checking for PTRACE_GETREGS" >&5
+echo "configure:6827: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4350 "configure"
+#line 6832 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -4375,19 +6857,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:4379: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:6861: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4384 "configure"
+#line 6866 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -4409,12 +6891,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:4413: checking for PT_GETDBREGS" >&5
+echo "configure:6895: checking for PT_GETDBREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4418 "configure"
+#line 6900 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4422,7 +6904,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -4444,12 +6926,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:4448: checking for PT_GETXMMREGS" >&5
+echo "configure:6930: checking for PT_GETXMMREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4453 "configure"
+#line 6935 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4457,7 +6939,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -4478,117 +6960,13 @@ EOF
fi
-echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:4483: checking for socketpair in -lsocket" >&5
-ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4491 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char socketpair();
-
-int main() {
-socketpair()
-; return 0; }
-EOF
-if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lsocket $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-for ac_func in socketpair
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4532: 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 4537 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4587: checking whether malloc must be declared" >&5
+echo "configure:6965: 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 4592 "configure"
+#line 6970 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4609,7 +6987,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4630,12 +7008,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4634: checking whether realloc must be declared" >&5
+echo "configure:7012: 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 4639 "configure"
+#line 7017 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4656,7 +7034,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4677,12 +7055,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4681: checking whether free must be declared" >&5
+echo "configure:7059: 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 4686 "configure"
+#line 7064 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4703,7 +7081,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4724,12 +7102,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:4728: checking whether strerror must be declared" >&5
+echo "configure:7106: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4733 "configure"
+#line 7111 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4750,7 +7128,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -4771,12 +7149,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:4775: checking whether strdup must be declared" >&5
+echo "configure:7153: checking whether strdup must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4780 "configure"
+#line 7158 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4797,7 +7175,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -4818,12 +7196,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4822: checking whether strstr must be declared" >&5
+echo "configure:7200: 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 4827 "configure"
+#line 7205 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4844,7 +7222,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4865,12 +7243,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:4869: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:7247: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4874 "configure"
+#line 7252 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4891,7 +7269,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -4917,9 +7295,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4921: checking for HPUX save_state structure" >&5
+echo "configure:7299: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 4923 "configure"
+#line 7301 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4934,7 +7312,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4938 "configure"
+#line 7316 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -5004,12 +7382,12 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5008: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:7386: 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 5013 "configure"
+#line 7391 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5018,7 +7396,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5040,12 +7418,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5044: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:7422: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5049 "configure"
+#line 7427 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5054,7 +7432,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -5076,12 +7454,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5080: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:7458: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5085 "configure"
+#line 7463 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5090,7 +7468,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -5112,12 +7490,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5116: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:7494: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5121 "configure"
+#line 7499 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5126,7 +7504,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -5148,12 +7526,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5152: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:7530: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5157 "configure"
+#line 7535 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5162,7 +7540,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -5184,12 +7562,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5188: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:7566: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5193 "configure"
+#line 7571 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5198,7 +7576,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -5220,12 +7598,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5224: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:7602: checking for prgregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5229 "configure"
+#line 7607 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5234,7 +7612,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -5256,12 +7634,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5260: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:7638: checking for prfpregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5265 "configure"
+#line 7643 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5270,7 +7648,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -5292,12 +7670,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5296: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:7674: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5301 "configure"
+#line 7679 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5306,7 +7684,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -5328,12 +7706,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5332: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:7710: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5337 "configure"
+#line 7715 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5342,7 +7720,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -5364,12 +7742,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5368: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:7746: checking for prsysent_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5373 "configure"
+#line 7751 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5378,7 +7756,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -5400,12 +7778,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5404: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:7782: checking for pr_sigset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5409 "configure"
+#line 7787 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5414,7 +7792,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -5436,12 +7814,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5440: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:7818: checking for pr_sigaction64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5445 "configure"
+#line 7823 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5450,7 +7828,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -5472,12 +7850,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5476: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:7854: checking for pr_siginfo64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5481 "configure"
+#line 7859 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5486,7 +7864,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -5513,7 +7891,7 @@ EOF
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:5517: checking whether prfpregset_t type is broken" >&5
+echo "configure:7895: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5521,7 +7899,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 5525 "configure"
+#line 7903 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -5531,7 +7909,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
@@ -5556,12 +7934,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5560: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:7938: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5565 "configure"
+#line 7943 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -5574,7 +7952,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -5598,19 +7976,19 @@ fi
if test ${host} = ${target} ; then
echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5602: checking for member l_addr in struct link_map" >&5
+echo "configure:7980: checking for member l_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5607 "configure"
+#line 7985 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -5632,12 +8010,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5636: checking for member lm_addr in struct link_map" >&5
+echo "configure:8014: checking for member lm_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5641 "configure"
+#line 8019 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -5645,7 +8023,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -5667,12 +8045,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:5671: checking for member som_addr in struct so_map" >&5
+echo "configure:8049: checking for member som_addr in struct so_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5676 "configure"
+#line 8054 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -5683,7 +8061,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -5705,12 +8083,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:5709: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:8087: checking for struct link_map32 in sys/link.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5714 "configure"
+#line 8092 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -5718,7 +8096,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -5743,146 +8121,14 @@ EOF
fi
fi
-echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5748: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lm $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5756 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lm $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:5792: checking for wctype in -lc" >&5
-ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lc $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5800 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char wctype();
-
-int main() {
-wctype()
-; return 0; }
-EOF
-if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:5830: checking for wctype in -lw" >&5
-ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lw $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5838 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char wctype();
-
-int main() {
-wctype()
-; return 0; }
-EOF
-if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lw $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:5881: checking for long long support in compiler" >&5
+echo "configure:8127: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5886 "configure"
+#line 8132 "configure"
#include "confdefs.h"
int main() {
@@ -5892,7 +8138,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -5914,7 +8160,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:5918: checking for long long support in printf" >&5
+echo "configure:8164: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5922,7 +8168,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 5926 "configure"
+#line 8172 "configure"
#include "confdefs.h"
int main () {
@@ -5936,7 +8182,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -5960,19 +8206,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:5964: checking for long double support in compiler" >&5
+echo "configure:8210: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5969 "configure"
+#line 8215 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:5976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -5994,7 +8240,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:5998: checking for long double support in printf" >&5
+echo "configure:8244: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6002,7 +8248,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6006 "configure"
+#line 8252 "configure"
#include "confdefs.h"
int main () {
@@ -6012,7 +8258,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -6036,7 +8282,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:6040: checking for long double support in scanf" >&5
+echo "configure:8286: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6044,7 +8290,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6048 "configure"
+#line 8294 "configure"
#include "confdefs.h"
int main () {
@@ -6054,7 +8300,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -6076,277 +8322,10 @@ EOF
fi
echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
-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:6084: 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 6089 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6123: 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 6128 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6176: 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
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 6184 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
-}
-
-EOF
-if { (eval echo configure:6324: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:6350: checking for -bbigtoc option" >&5
+echo "configure:8329: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6360,14 +8339,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 6364 "configure"
+#line 8343 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -6390,7 +8369,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:6394: checking for HPUX/OSF thread support" >&5
+echo "configure:8373: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -6413,7 +8392,7 @@ EOF
# because version 0 (present on Solaris 2.4 or earlier) doesn't have
# the same API.
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:6417: checking for Solaris thread debugging library" >&5
+echo "configure:8396: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -6423,7 +8402,7 @@ EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6427: checking for dlopen in -ldl" >&5
+echo "configure:8406: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6431,7 +8410,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6435 "configure"
+#line 8414 "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
@@ -6442,7 +8421,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8425: \"$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
@@ -6474,17 +8453,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:6478: checking for the ld -export-dynamic flag" >&5
+echo "configure:8457: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 6481 "configure"
+#line 8460 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -6503,13 +8482,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:6507: checking if <proc_service.h> is old" >&5
+echo "configure:8486: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6513 "configure"
+#line 8492 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -6520,7 +8499,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -6546,12 +8525,12 @@ EOF
;;
aix*)
echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:6550: checking for AiX thread debugging library" >&5
+echo "configure:8529: checking for AiX thread debugging library" >&5
if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6555 "configure"
+#line 8534 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
@@ -6560,7 +8539,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:6564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
@@ -6585,19 +8564,19 @@ fi
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:6589: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:8568: checking whether <thread_db.h> has TD_NOTALLOC" >&5
if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6594 "configure"
+#line 8573 "configure"
#include "confdefs.h"
#include <thread_db.h>
int main() {
int i = TD_NOTALLOC;
; return 0; }
EOF
-if { (eval echo configure:6601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_thread_db_h_has_td_notalloc=yes
else
@@ -6620,176 +8599,42 @@ EOF
fi
-if test $host = $target; then
- case $target in
- *-linux*)
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
- cat > conftest.$ac_ext <<EOF
-#line 6630 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-int main() {
-pread64 (0, NULL, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
- cat >> confdefs.h <<\EOF
-#define HAVE_PREAD64 1
-EOF
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
- CFLAGS=$save_CFLAGS
- ;;
- esac
-fi
-
-# Check whether --enable-gdbcli or --disable-gdbcli was given.
-if test "${enable_gdbcli+set}" = set; then
- enableval="$enable_gdbcli"
+# Check whether --with-sysroot or --without-sysroot was given.
+if test "${with_sysroot+set}" = set; then
+ withval="$with_sysroot"
- case "${enableval}" in
- yes) enable_gdbcli=yes ;;
- "") enable_gdbcli=yes ;;
- no)
- { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
- ;;
- *)
- { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
- ;;
- esac
-
-else
- enable_gdbcli=yes
-fi
-
-case ${enable_gdbcli} in
- "yes" )
- if test -d "${srcdir}/cli" ; then
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
- CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
- CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
- CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
- CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
- fi
- ;;
-esac
-
-
-# Check whether --enable-gdbmi or --disable-gdbmi was given.
-if test "${enable_gdbmi+set}" = set; then
- enableval="$enable_gdbmi"
-
- case "${enable_gdbmi}" in
- yes | no) ;;
- "") enable_gdbmi=yes ;;
- *)
- { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
- ;;
- esac
-
-else
- enable_gdbmi=yes
-fi
-
-case ${enable_gdbmi} in
- "yes" )
- if test -d "${srcdir}/mi" ; then
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
- CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
- CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
- CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
- CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
- fi
- ;;
-esac
-
-# Configure UI_OUT by default (before 5.2 it can be disabled)
-# It must be configured if gdbmi is configured
+ case ${with_sysroot} in
+ yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;;
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
-UIOUT_CFLAGS=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
+ if test "x$exec_prefix" = xNONE; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ test_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ ${test_prefix}*)
+ t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+ TARGET_SYSTEM_ROOT_DEFINE="$t"
+ ;;
+ esac
-# Check whether --with-uiout or --without-uiout was given.
-if test "${with_uiout+set}" = set; then
- withval="$with_uiout"
- case "${withval}" in
- yes) want_uiout=true ;;
- no) if test $enable_gdbmi = yes; then
- { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
- else
- want_uiout=false
- fi ;;
- *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
-esac
else
- want_uiout=true
-fi
-
-if test $want_uiout = true; then
- UIOUT_CFLAGS="-DUI_OUT=1"
-fi
-
-# Check whether --enable-tui or --disable-tui was given.
-if test "${enable_tui+set}" = set; then
- enableval="$enable_tui"
- case "${enable_tui}" in
- yes | no) ;;
- "") enable_tui=yes ;;
- *)
- { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
- ;;
- esac
-
-fi
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
-case ${enable_tui} in
- "yes" )
- if test -d "${srcdir}/tui" ; then
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
- CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
- CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
- CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
- CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
- fi
- ;;
-esac
-
-# Check whether --enable-netrom or --disable-netrom was given.
-if test "${enable_netrom+set}" = set; then
- enableval="$enable_netrom"
- case "${enableval}" in
-yes) enable_netrom=yes ;;
-no) enable_netrom=no ;;
-*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
-esac
fi
-if test "${enable_netrom}" = "yes"; then
- CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
- CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
-fi
# NOTE: Don't add -Wall or -Wunused, they both include
@@ -6841,7 +8686,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:6845: checking compiler warning flags" >&5
+echo "configure:8690: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -6851,14 +8696,14 @@ echo "configure:6845: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 6855 "configure"
+#line 8700 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -6904,72 +8749,14 @@ EOF
MMALLOC='../mmalloc/libmmalloc.a'
fi
-# Check whether --with-included-regex or --without-included-regex was given.
-if test "${with_included_regex+set}" = set; then
- withval="$with_included_regex"
- case "${withval}" in
- yes) want_included_regex=true ;;
- no) want_included_regex=false;;
- *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
-esac
-else
- want_included_regex=true
-fi
-
-if test $want_included_regex = false; then
- echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6922: checking for GNU regex" >&5
- if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6927 "configure"
-#include "confdefs.h"
-#include <gnu-versions.h>
-#include <sys/types.h>
-#include <regex.h>
-int main() {
-#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
-#error No valid GNU regex.
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- gdb_cv_have_gnu_regex=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gdb_cv_have_gnu_regex=no
-fi
-rm -f conftest*
-fi
-
- echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
- if test $gdb_cv_have_gnu_regex = no; then
- want_included_regex=true
- fi
-fi
-
-if test x${want_included_regex} = xtrue; then
- REGEX="gnu-regex.o"
- cat >> confdefs.h <<\EOF
-#define USE_INCLUDED_REGEX 1
-EOF
-
-fi
-
-
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6968: checking for cygwin" >&5
+echo "configure:8755: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6973 "configure"
+#line 8760 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6998,263 +8785,6 @@ case ${host} in
esac
-
-if test x$gdb_host = xgo32; then
- TERM_LIB=
-else
-if test x$gdb_cv_os_cygwin = xyes; then
- TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
-else
- TERM_LIB=
- echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:7011: checking for tgetent in -lncurses" >&5
-ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lncurses $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7019 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- TERM_LIB=-lncurses
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:7049: checking for tgetent in -lHcurses" >&5
-ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lHcurses $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7057 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- TERM_LIB=-lHcurses
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:7087: checking for tgetent in -ltermlib" >&5
-ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ltermlib $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7095 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:7106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- TERM_LIB=-ltermlib
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:7125: checking for tgetent in -ltermcap" >&5
-ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ltermcap $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7133 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:7144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- TERM_LIB=-ltermcap
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:7163: checking for tgetent in -lcurses" >&5
-ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lcurses $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7171 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:7182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- TERM_LIB=-lcurses
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:7201: checking for tgetent in -lterminfo" >&5
-ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lterminfo $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7209 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- TERM_LIB=-lterminfo
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-fi
-
-fi
-
-fi
-
-fi
-
-
- if test "x$TERM_LIB" = x
- then
- { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
- fi
-fi
-fi
-
-
# libreadline needs libuser32.a in a cygwin environment
WIN32LIBS=
if test x$gdb_cv_os_cygwin = xyes; then
@@ -7271,83 +8801,6 @@ GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
-# Check whether --with-cpu or --without-cpu was given.
-if test "${with_cpu+set}" = set; then
- withval="$with_cpu"
- case "${target}" in
- powerpc-* | powerpcle-* )
- ## It would be nice to keep this table in sync with the one in
- ## gcc/configure.
- case "${with_cpu}" in
- ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
- | 604 | 750 )
- ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
- ;;
- common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
- ## These are all RS6000 variants, as far as GDB is concerned.
- with_cpu=rs6000
- ;;
- 603e | ec603e )
- with_cpu=603
- ;;
- 604e )
- with_cpu=604
- ;;
- * )
- echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
- with_cpu=ppc-uisa
- ;;
- esac
- ;;
- * )
- echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
- ;;
-esac
-cat >> confdefs.h <<EOF
-#define TARGET_CPU_DEFAULT "${with_cpu}"
-EOF
-
-
-fi
-
-
-
-# Check whether --enable-gdbtk or --disable-gdbtk was given.
-if test "${enable_gdbtk+set}" = set; then
- enableval="$enable_gdbtk"
- case "${enableval}" in
- yes)
- case "$host" in
- *go32*)
- echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
- enable_gdbtk=no ;;
- *windows*)
- echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
- enable_gdbtk=no ;;
- *)
- enable_gdbtk=yes ;;
- esac ;;
- no)
- enable_gdbtk=no ;;
- *)
- { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
-esac
-else
-
-# Default is on for everything but go32 and Cygwin
-case "$host" in
- *go32* | *windows*)
- ;;
- *)
- if test -d "${srcdir}/gdbtk" ; then
- enable_gdbtk=yes
- fi
- ;;
-esac
-
-fi
-
-
WIN32LDAPP=
@@ -7381,7 +8834,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:7385: checking for Tcl configuration" >&5
+echo "configure:8838: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7489,7 +8942,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7493: checking for Tk configuration" >&5
+echo "configure:8946: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7598,7 +9051,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7602: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:9055: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -7664,17 +9117,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:7668: checking for tclInt.h" >&5
+echo "configure:9121: checking for tclInt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7673 "configure"
+#line 9126 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9131: \"$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*
@@ -7734,7 +9187,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7738: checking for Tk private headers" >&5
+echo "configure:9191: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -7800,17 +9253,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:7804: checking for tk.h" >&5
+echo "configure:9257: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7809 "configure"
+#line 9262 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9267: \"$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*
@@ -7856,7 +9309,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7860: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:9313: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
@@ -7879,7 +9332,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7883: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:9336: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
@@ -7934,7 +9387,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7938: checking for Itcl configuration" >&5
+echo "configure:9391: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8037,7 +9490,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:8041: checking for Itk configuration" >&5
+echo "configure:9494: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8159,7 +9612,6 @@ fi
fi
fi
- SUBDIRS="${SUBDIRS} gdbtk"
configdirs="${configdirs} gdbtk"
fi
@@ -8181,7 +9633,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:8185: checking for X" >&5
+echo "configure:9637: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -8243,12 +9695,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 8247 "configure"
+#line 9699 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9704: \"$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*
@@ -8317,14 +9769,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8321 "configure"
+#line 9773 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:8328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -8464,68 +9916,6 @@ fi
-# Begin stuff to support --enable-shared
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *) shared=true ;;
-esac
-fi
-
-HLDFLAGS=
-HLDENV=
-# If we have shared libraries, try to set rpath reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- HLDFLAGS='-Wl,+s,+b,$(libdir)'
- ;;
- *-*-irix5* | *-*-irix6*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-linux*aout*)
- ;;
- *-*-linux* | *-pc-linux-gnu*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-solaris*)
- HLDFLAGS='-R $(libdir)'
- ;;
- *-*-sysv4*)
- HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
- ;;
- esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
- *-*-sunos*)
- echo 'main () { }' > conftest.c
- ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
- if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'No such file' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
- :
- elif test "${shared}" = "true"; then
- HLDFLAGS='-Wl,-rpath=$(libdir)'
- else
- HLDFLAGS='-Wl,-rpath='
- fi
- rm -f conftest.t conftest.c conftest
- ;;
-esac
-
-
-# End stuff to support --enable-shared
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
@@ -8609,23 +9999,41 @@ case "${GDB_MULTI_ARCH}" in
*) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
esac
-if test "${enable_multi_ice}" = "yes"; then
- SUBDIRS="${SUBDIRS} multi-ice"
+if test x"${gdb_osabi}" != x ; then
+ cat >> confdefs.h <<EOF
+#define GDB_OSABI_DEFAULT $gdb_osabi
+EOF
+
fi
-# ``gdbserver'' can only be built in a native configuration.
-if test x"${target}" = x"${host}"; then
- echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:8620: checking whether gdbserver is supported on this host" >&5
- if test x"${build_gdbserver}" = xyes ; then
- configdirs="${configdirs} gdbserver"
- SUBDIRS="${SUBDIRS} gdbserver"
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
+# Enable multi-ice-gdb-server.
+# Check whether --enable-multi-ice or --disable-multi-ice was given.
+if test "${enable_multi_ice+set}" = set; then
+ enableval="$enable_multi_ice"
+ case $enableval in
+ yes | no)
+ ;;
+ *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
+ esac
fi
+if test "x$enable_multi_ice" = xyes; then
+ configdirs="$configdirs multi-ice"
+fi
+
+# We only build gdbserver automatically if host and target are the same.
+if test "x$target" = "x$host"; then
+ echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
+echo "configure:10028: checking whether gdbserver is supported on this host" >&5
+ if test "x$build_gdbserver" = xyes; then
+ configdirs="$configdirs gdbserver"
+ echo "$ac_t""yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+fi
+
+subdirs="doc testsuite $configdirs"
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
@@ -8677,37 +10085,15 @@ EOF
fi
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8682: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8706: checking for Cygwin environment" >&5
+echo "configure:10092: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8711 "configure"
+#line 10097 "configure"
#include "confdefs.h"
int main() {
@@ -8718,7 +10104,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:8722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -8735,19 +10121,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8739: checking for mingw32 environment" >&5
+echo "configure:10125: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8744 "configure"
+#line 10130 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:8751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -8766,7 +10152,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8770: checking for executable suffix" >&5
+echo "configure:10156: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8776,10 +10162,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:10166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -8818,7 +10204,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:8822: checking for iconv" >&5
+echo "configure:10208: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8826,7 +10212,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 8830 "configure"
+#line 10216 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8836,7 +10222,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -8848,7 +10234,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 8852 "configure"
+#line 10238 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8858,7 +10244,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -8879,13 +10265,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:8883: checking for iconv declaration" >&5
+echo "configure:10269: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8889 "configure"
+#line 10275 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -8904,7 +10290,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
@@ -8932,8 +10318,6 @@ EOF
-subdirs="$configdirs"
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -9087,8 +10471,8 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@SET_MAKE@%$SET_MAKE%g
s%@RANLIB@%$RANLIB%g
+s%@SET_MAKE@%$SET_MAKE%g
s%@ALLOCA@%$ALLOCA%g
s%@USE_NLS@%$USE_NLS%g
s%@MSGFMT@%$MSGFMT%g
@@ -9110,24 +10494,25 @@ s%@GT_NO@%$GT_NO%g
s%@GT_YES@%$GT_YES%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@l@%$l%g
+s%@subdirs@%$subdirs%g
s%@AWK@%$AWK%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@LN_S@%$LN_S%g
+s%@YACC@%$YACC%g
s%@AR@%$AR%g
s%@DLLTOOL@%$DLLTOOL%g
s%@WINDRES@%$WINDRES%g
-s%@YACC@%$YACC%g
s%@MIG@%$MIG%g
s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
-s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
+s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
+s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
s%@WARN_CFLAGS@%$WARN_CFLAGS%g
s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
s%@MMALLOC@%$MMALLOC%g
-s%@REGEX@%$REGEX%g
s%@SER_HARDWIRE@%$SER_HARDWIRE%g
-s%@TERM_LIB@%$TERM_LIB%g
s%@WIN32LIBS@%$WIN32LIBS%g
s%@LIBGUI@%$LIBGUI%g
s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
@@ -9185,6 +10570,7 @@ s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
s%@IGNORE_SIM@%$IGNORE_SIM%g
s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
+s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
s%@CONFIG_OBS@%$CONFIG_OBS%g
s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
s%@CONFIG_DEPS@%$CONFIG_DEPS%g
@@ -9194,22 +10580,17 @@ s%@CONFIG_ALL@%$CONFIG_ALL%g
s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
-s%@HLDFLAGS@%$HLDFLAGS%g
-s%@HLDENV@%$HLDENV%g
s%@target_subdir@%$target_subdir%g
/@host_makefile_frag@/r $host_makefile_frag
s%@host_makefile_frag@%%g
/@target_makefile_frag@/r $target_makefile_frag
s%@target_makefile_frag@%%g
s%@frags@%$frags%g
-s%@SUBDIRS@%$SUBDIRS%g
s%@xm_h@%$xm_h%g
s%@tm_h@%$tm_h%g
s%@nm_h@%$nm_h%g
-s%@LN_S@%$LN_S%g
s%@EXEEXT@%$EXEEXT%g
s%@LIBICONV@%$LIBICONV%g
-s%@subdirs@%$subdirs%g
CEOF
EOF
@@ -9523,7 +10904,7 @@ if test "$no_recursion" != yes; then
esac
done
- for ac_config_dir in $configdirs; do
+ for ac_config_dir in doc testsuite $configdirs; do
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
diff --git a/gdb/configure.host b/gdb/configure.host
index 883538db3b2..b309a332a19 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -15,7 +15,6 @@ arm*) gdb_host_cpu=arm ;;
hppa*) gdb_host_cpu=pa ;;
i[3456]86*) gdb_host_cpu=i386 ;;
m68*) gdb_host_cpu=m68k ;;
-# OBSOLETE m88*) gdb_host_cpu=m88k ;;
mips*) gdb_host_cpu=mips ;;
powerpc*) gdb_host_cpu=powerpc ;;
sparcv9 | sparc64) gdb_host_cpu=sparc ;;
@@ -40,7 +39,6 @@ alpha*-*-netbsd*) gdb_host=nbsd ;;
arm*-*-linux*) gdb_host=linux ;;
arm*-*-netbsdelf*) gdb_host=nbsdelf ;;
arm*-*-netbsd*) gdb_host=nbsdaout ;;
-arm*-*-*) gdb_host=arm ;;
hppa*-*-bsd*) gdb_host=hppabsd ;;
hppa*-*-hiux*) gdb_host=hppahpux ;;
@@ -54,9 +52,8 @@ i[3456]86-ncr-*) gdb_host=ncr3000 ;;
i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
i[3456]86-sequent-sysv*) gdb_host=ptx ;;
-# OBSOLETE i[3456]86-*-aix*) gdb_host=i386aix ;;
i[3456]86-*-bsd*) gdb_host=i386bsd ;;
-i[3456]86-*-dgux*) gdb_host=i386dgux ;;
+i[3456]86-*-dgux*) gdb_host=i386v4 ;;
i[3456]86-*-freebsd*) gdb_host=fbsd ;;
i[3456]86-*-netbsdelf*) gdb_host=nbsdelf ;;
i[3456]86-*-netbsdaout*) gdb_host=nbsdaout ;;
@@ -65,24 +62,19 @@ i[3456]86-*-go32*) gdb_host=go32 ;;
i[3456]86-*-msdosdjgpp*) gdb_host=go32 ;;
i[3456]86-*-linux*) gdb_host=linux ;;
i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
-# OBSOLETE i[3456]86-*-mach3*) gdb_host=i386m3 ;;
-# OBSOLETE i[3456]86-*-mach*) gdb_host=i386mach ;;
i[3456]86-*-gnu*) gdb_host=i386gnu ;;
i[3456]86-*-openbsd*) gdb_host=obsd ;;
-# OBSOLETE i[3456]86-*-osf1mk*) gdb_host=i386mk ;;
i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
i[3456]86-*-sco*) gdb_host=i386sco ;;
i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
-i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
-i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
i[3456]86-*-sysv4.2*) gdb_host=i386v42mp ;;
i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
i[3456]86-*-sysv5*) gdb_host=i386v42mp ;;
i[3456]86-*-unixware2*) gdb_host=i386v42mp ;;
i[3456]86-*-unixware*) gdb_host=i386v4 ;;
i[3456]86-*-sysv*) gdb_host=i386v ;;
-i[3456]86-*-isc*) gdb_host=i386v32 ;;
+i[3456]86-*-isc*) gdb_host=i386v ;;
i[3456]86-*-cygwin*) gdb_host=cygwin ;;
ia64-*-aix*) gdb_host=aix ;;
@@ -91,12 +83,8 @@ ia64-*-linux*) gdb_host=linux ;;
m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
-# OBSOLETE m68*-apollo*-sysv*) gdb_host=apollo68v ;;
-# OBSOLETE m68*-apollo*-bsd*) gdb_host=apollo68b ;;
m68*-att-*) gdb_host=3b1 ;;
m68*-bull*-sysv*) gdb_host=dpx2 ;;
-# OBSOLETE m68*-hp-bsd*) gdb_host=hp300bsd ;;
-# OBSOLETE m68*-hp-hpux*) gdb_host=hp300hpux ;;
m68*-*-linux*) gdb_host=linux ;;
m68*-*-lynxos*) gdb_host=m68klynx ;;
m68*-*-netbsd*) gdb_host=nbsdaout ;;
@@ -106,10 +94,6 @@ m68*-sun-sunos3*) gdb_host=sun3os3 ;;
m68*-sun-sunos4*) gdb_host=sun3os4 ;;
m68*-sun-*) gdb_host=sun3os4 ;;
-# OBSOLETE m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
-# OBSOLETE m88*-motorola-sysv*) gdb_host=delta88 ;;
-# OBSOLETE m88*-*-*) gdb_host=m88k ;;
-
mips-dec-mach3*) gdb_host=mipsm3 ;;
mips-dec-*) gdb_host=decstation ;;
mips-little-*) gdb_host=littlemips ;;
@@ -159,9 +143,6 @@ sparc64-*-linux*) gdb_host=linux ;;
sparc64-*-netbsd*) gdb_host=nbsd64 ;;
sparcv9-*-* | sparc64-*-*) gdb_host=sun4sol2 ;;
-strongarm-*-*) gdb_host=arm ;;
-xscale-*-*) gdb_host=arm ;;
-
vax-*-bsd*) gdb_host=vaxbsd ;;
vax-*-ultrix2*) gdb_host=vaxult2 ;;
vax-*-ultrix*) gdb_host=vaxult ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index f91503a3e72..65b62f0432c 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -1,5 +1,5 @@
dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
dnl Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
@@ -26,6 +26,7 @@ AC_CONFIG_HEADER(config.h:config.in)
AM_MAINTAINER_MODE
AC_PROG_CC
+AC_GNU_SOURCE
AC_AIX
AC_ISC_POSIX
AM_PROG_CC_STDC
@@ -33,11 +34,28 @@ AM_PROG_CC_STDC
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
AC_CANONICAL_SYSTEM
+# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
+# doesn't support cross-compilation, but the one from Autoconf 2.5x
+# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
+# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
+# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
+# 2.5x.
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+
dnl Set up for gettext. PACKAGE is used when we call bindtextdomain.
ALL_LINGUAS=
CY_GNU_GETTEXT
AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
+debugdir=${libdir}/debug
+
+AC_ARG_WITH(separate-debug-dir,
+[ --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]],
+[debugdir="${withval}"])
+
+AC_DEFINE_DIR(DEBUGDIR, debugdir,
+ [Global directory for separate debug files. ])
+#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
dnl List of object files added by configure.
@@ -52,92 +70,311 @@ CONFIG_CLEAN=
CONFIG_INSTALL=
CONFIG_UNINSTALL=
-SUBDIRS="doc testsuite nlm"
-configdirs="doc testsuite"
+AC_CONFIG_SUBDIRS(doc testsuite)
+configdirs=
-AC_ARG_ENABLE(multi-ice,
-[ --enable-multi-ice Build the multi-ice-gdb-server],
-[case "${enableval}" in
- yes ) enable_multi_ice="yes" ;;
- no) enable_multi_ice="no" ;;
- *) AC_MSG_ERROR(Bad value for --enable-multi-ice: ${enableval}) ;;
- esac
-])
+. $srcdir/configure.host
-if test "${enable_multi_ice}" = "yes"; then
- configdirs="${configdirs} multi-ice"
-fi
+. $srcdir/configure.tgt
-dnl
-changequote(,)dnl
+# Fetch the default architecture and default target vector from BFD.
+targ=$target; . $srcdir/../bfd/config.bfd
-. ${srcdir}/configure.host
+# We only want the first architecture, so strip off the others if
+# there is more than one.
+targ_archs=`echo $targ_archs | sed 's/ .*//'`
-. ${srcdir}/configure.tgt
+if test "x$targ_archs" != x; then
+ AC_DEFINE_UNQUOTED(DEFAULT_BFD_ARCH, $targ_archs,
+ [Define to BFD's default architecture. ])
+fi
+if test "x$targ_defvec" != x; then
+ AC_DEFINE_UNQUOTED(DEFAULT_BFD_VEC, $targ_defvec,
+ [Define to BFD's default target vector. ])
+fi
-targ=${target} ; . ${srcdir}/../bfd/config.bfd
+AC_ARG_PROGRAM
-dnl
-changequote([,])dnl
+# The CLI cannot be disabled yet, but may be in the future.
-dnl use BFD to determine the default architecture and byte order
-dnl (bfd_vec->byteorder provides the latter).
-targ=${target}
-. ${srcdir}/../bfd/config.bfd
+# Enable CLI.
+AC_ARG_ENABLE(gdbcli,
+[ --disable-gdbcli disable command-line interface (CLI)],
+ [case $enableval in
+ yes)
+ ;;
+ no)
+ AC_MSG_ERROR([the command-line interface cannot be disabled yet]) ;;
+ *)
+ AC_MSG_ERROR([bad value $enableval for --enable-gdbcli]) ;;
+ esac],
+ [enable_gdbcli=yes])
+if test x"$enable_gdbcli" = xyes; then
+ if test -d $srcdir/cli; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
+ CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
+ CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
+ CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
+ CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
+ fi
+fi
-dnl We only want the first arch, if there is more than one.
-targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
+# Enable MI.
+AC_ARG_ENABLE(gdbmi,
+[ --disable-gdbmi disable machine-interface (MI)],
+ [case $enableval in
+ yes | no)
+ ;;
+ *)
+ AC_MSG_ERROR([bad value $enableval for --enable-gdbmi]) ;;
+ esac],
+ [enable_gdbmi=yes])
+if test x"$enable_gdbmi" = xyes; then
+ if test -d $srcdir/mi; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
+ CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
+ CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
+ CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
+ CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
+ fi
+fi
-if test x"${targ_archs}" != x ; then
- AC_DEFINE_UNQUOTED(DEFAULT_BFD_ARCH, ${targ_archs})
+# Enable TUI.
+AC_ARG_ENABLE(tui,
+[ --enable-tui enable full-screen terminal user interface (TUI)],
+ [case $enableval in
+ yes | no)
+ ;;
+ *)
+ AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
+ esac])
+if test x"$enable_tui" = xyes; then
+ if test -d $srcdir/tui; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
+ CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
+ CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
+ CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
+ CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
+ need_curses=yes
+ fi
fi
-if test x"${targ_defvec}" != x ; then
- AC_DEFINE_UNQUOTED(DEFAULT_BFD_VEC, ${targ_defvec})
+
+# Enable gdbtk.
+AC_ARG_ENABLE(gdbtk,
+[ --enable-gdbtk enable gdbtk graphical user interface (GUI)],
+ [case $enableval in
+ yes | no)
+ ;;
+ *)
+ AC_MSG_ERROR([bad value $enableval for --enable-gdbtk]) ;;
+ esac],
+ [if test -d $srcdir/gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi])
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ AC_MSG_WARN([gdbtk isn't supported on $host; disabling])
+ enable_gdbtk=no ;;
+esac
+
+# Profiling support.
+AC_ARG_ENABLE(profiling,
+[ --enable-profiling enable profiling of GDB],
+ [case $enableval in
+ yes | no)
+ ;;
+ *)
+ AC_MSG_ERROR([bad value $enableval for --enable-profile]) ;;
+ esac],
+ [enable_profiling=no])
+
+AC_CHECK_FUNCS(monstartup _mcleanup)
+if test "$enable_profiling" = yes ; then
+ if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
+ AC_MSG_ERROR(--enable-profiling requires monstartup and _mcleanup)
+ fi
+ PROFILE_CFLAGS=-pg
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+
+ AC_CACHE_CHECK([whether $CC supports -pg], ac_cv_cc_supports_pg,
+ [AC_TRY_COMPILE([], [int x;], ac_cv_cc_supports_pg=yes,
+ ac_cv_cc_supports_pg=no)])
+
+ if test $ac_cv_cc_supports_pg = no; then
+ AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg)
+ fi
+
+ CFLAGS="$OLD_CFLAGS"
fi
+# --------------------- #
+# Checks for programs. #
+# --------------------- #
+
AC_PROG_AWK
AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_RANLIB
+AC_PROG_YACC
+
AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(DLLTOOL, dlltool)
AC_CHECK_TOOL(WINDRES, windres)
-AC_PROG_YACC
-dnl MiG is needed for the Hurd.
+# Needed for GNU/Hurd.
AC_CHECK_TOOL(MIG, mig)
-AC_ARG_PROGRAM
+# ---------------------- #
+# Checks for libraries. #
+# ---------------------- #
-AC_TYPE_SIGNAL
+# We might need to link with -lm; most simulators need it.
+AC_CHECK_LIB(m, main)
-AC_HEADER_STDC
+# We need to link with -lw to get `wctype' on Solaris before Solaris
+# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
+# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
+# is known to have this problem). Therefore we avoid libw if we can.
+AC_CHECK_FUNC(wctype, [],
+ [AC_CHECK_LIB(w, wctype)])
+
+# Some systems (e.g. Solaris) have `socketpair' in libsocket.
+AC_SEARCH_LIBS(socketpair, socket)
+
+# Since GDB uses Readline, we need termcap functionality, so we need
+# to find a library that provides that. When GDB is configured with
+# --enable-tui, we need full curses functionality.
+#
+# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
+# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
+# Makefile fragments. That's why we need to have `Hcurses' before
+# `curses'. I don't see why we should use HP curses if a more
+# standard curses is available, except that according to HP's
+# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
+# HP-UX 10.10 and 10.20.
+
+if test "$need_curses" = yes; then
+ AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses], [],
+ [AC_MSG_ERROR([no curses library found])])
+fi
+
+case $host_os in
+ cygwin*)
+ if test -d $srcdir/libtermcap; then
+ LIBS="../libtermcap/libtermcap.a $LIBS"
+ ac_cv_search_tgetent="../libtermcap/libtermcap.a"
+ fi ;;
+ go32*)
+ # ??? Is this really true?
+ ac_cv_search_tgetent="none required"
+ ;;
+ aix*)
+ # Readline prefers curses over termcap on AIX.
+ # ??? Why?
+ AC_SEARCH_LIBS(tgetent, [tinfo ncurses curses termcap])
+ ;;
+esac
+
+# Note: We used to check for libtermlib and libterminfo too, but
+# Readline doesn't, so I think we're safe with leaving them out.
+AC_SEARCH_LIBS(tgetent, [termcap tinfo ncurses Hcurses curses])
+
+if test "$ac_cv_search_tgetent" = no; then
+ AC_MSG_ERROR([no termcap library found])
+fi
-dnl Solaris 7 needs _MSE_INT_H defined to avoid a clash between <widec.h>
-dnl and <wchar.h> that causes AC_CHECK_HEADERS to think <curses.h> doesn't
-dnl exist.
-
-case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
- AC_DEFINE(_MSE_INT_H)
-esac; esac
-
-AC_CHECK_HEADERS(ctype.h nlist.h link.h thread_db.h proc_service.h \
- memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
- string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
- term.h termio.h termios.h unistd.h wait.h sys/wait.h \
- wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
- time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
- dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
- curses.h ncurses.h \
- poll.h sys/poll.h)
+# ------------------------- #
+# Checks for header files. #
+# ------------------------- #
+
+AC_HEADER_DIRENT
AC_HEADER_STAT
+AC_HEADER_STDC
+AC_CHECK_HEADERS(link.h)
+AC_CHECK_HEADERS(nlist.h)
+AC_CHECK_HEADERS(poll.h sys/poll.h)
+AC_CHECK_HEADERS(proc_service.h thread_db.h)
+AC_CHECK_HEADERS(stddef.h)
+AC_CHECK_HEADERS(stdlib.h)
+AC_CHECK_HEADERS(stdint.h)
+AC_CHECK_HEADERS(string.h memory.h strings.h)
+AC_CHECK_HEADERS(sys/fault.h)
+AC_CHECK_HEADERS(sys/file.h)
+AC_CHECK_HEADERS(sys/filio.h)
+AC_CHECK_HEADERS(sys/ioctl.h)
+AC_CHECK_HEADERS(sys/param.h)
+AC_CHECK_HEADERS(sys/proc.h)
+AC_CHECK_HEADERS(sys/procfs.h)
+AC_CHECK_HEADERS(sys/ptrace.h ptrace.h)
+AC_CHECK_HEADERS(sys/reg.h sys/debugreg.h)
+AC_CHECK_HEADERS(sys/select.h)
+AC_CHECK_HEADERS(sys/syscall.h)
+AC_CHECK_HEADERS(sys/user.h)
+AC_CHECK_HEADERS(sys/wait.h wait.h)
+AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
+AC_CHECK_HEADERS(unistd.h)
+
+# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
+# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
+# think that we don't have <curses.h> if we're using GCC.
+case $host_os in
+ solaris2.[[78]])
+ if test "$GCC" = yes; then
+ AC_DEFINE(_MSE_INT_H, 1,
+ [[Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
+ Solaris 2.[78] when using GCC. ]])
+ fi ;;
+esac
+AC_CHECK_HEADERS(curses.h ncurses.h term.h)
+
+# FIXME: kettenis/20030102: In most cases we include these
+# unconditionally, so what's the point in checking these?
+AC_CHECK_HEADERS(ctype.h time.h)
+
+# ------------------ #
+# Checks for types. #
+# ------------------ #
+
+AC_TYPE_SIGNAL
+
+# ------------------------------------- #
+# Checks for compiler characteristics. #
+# ------------------------------------- #
AC_C_CONST
AC_C_INLINE
-AC_CHECK_FUNCS(bcopy btowc bzero canonicalize_file_name isascii poll \
- realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask )
+# ------------------------------ #
+# Checks for library functions. #
+# ------------------------------ #
+
AC_FUNC_ALLOCA
+AC_FUNC_MMAP
AC_FUNC_VFORK
+AC_CHECK_FUNCS(canonicalize_file_name realpath)
+AC_CHECK_FUNCS(poll)
+AC_CHECK_FUNCS(pread64)
+AC_CHECK_FUNCS(sbrk)
+AC_CHECK_FUNCS(setpgid setpgrp)
+AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
+AC_CHECK_FUNCS(socketpair)
+
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
if test "$cross_compiling" = no; then
@@ -168,6 +405,37 @@ if test $gdb_cv_func_sigsetjmp = yes; then
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
fi
+# Assume we'll default to using the included libiberty regex.
+gdb_use_included_regex=yes
+
+# However, if the system regex is GNU regex, then default to *not*
+# using the included regex.
+AC_CACHE_CHECK(
+ [for GNU regex],
+ [gdb_cv_have_gnu_regex],
+ [AC_TRY_COMPILE(
+ [#include <gnu-versions.h>],
+ [#define REGEX_INTERFACE_VERSION 1
+#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
+# error "Version mismatch"
+#endif],
+ gdb_cv_have_gnu_regex=yes,
+ gdb_cv_have_gnu_regex=no)])
+if test $gdb_cv_have_gnu_regex = yes; then
+ gdb_use_included_regex=no
+fi
+
+AC_ARG_WITH(included-regex,
+ [ --without-included-regex don't use included regex; this is the default
+ on systems with version 2 of the GNU C library
+ (use with caution on other system)],
+ gdb_with_regex=$withval,
+ gdb_with_regex=$gdb_use_included_regex)
+if test "$gdb_with_regex" = yes; then
+ AC_DEFINE(USE_INCLUDED_REGEX, 1,
+ [Define to 1 if the regex included in libiberty should be used.])
+fi
+
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_reg_r_fs,
@@ -234,10 +502,6 @@ if test $gdb_cv_have_pt_getxmmregs = yes; then
fi
-AC_CHECK_LIB(socket, socketpair)
-AC_CHECK_FUNCS(socketpair)
-
-
BFD_NEED_DECLARATION(malloc)
BFD_NEED_DECLARATION(realloc)
BFD_NEED_DECLARATION(free)
@@ -415,16 +679,6 @@ if test ${host} = ${target} ; then
fi
fi
-dnl See if host has libm. This is usually needed by simulators.
-AC_CHECK_LIB(m, main)
-
-dnl Solaris puts wctype in /usr/lib/libw.a before Solaris 2.6.
-dnl
-dnl A bug in GNU ld 2.9.1 causes a problem if we link in -lw
-dnl under Solaris 2.6 because it is some funky empty library.
-dnl So only link in libw if we have to.
-AC_CHECK_LIB(c, wctype,: ,AC_CHECK_LIB(w, wctype))
-
dnl See if compiler supports "long long" type.
AC_MSG_CHECKING(for long long support in compiler)
@@ -513,8 +767,6 @@ if test $gdb_cv_scanf_has_long_double = yes; then
fi
AC_MSG_RESULT($gdb_cv_scanf_has_long_double)
-AC_FUNC_MMAP
-
case ${host_os} in
aix*)
AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [
@@ -637,151 +889,39 @@ if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
[Define if <thread_db.h> has the TD_NOTALLOC error code.])
fi
-dnl linux-proc.c wants to use pread64, which may require special CFLAGS
-dnl -D_BSD_SOURCE is normally assumed but we have to specify it because of
-dnl -D_XOPEN_SOURCE=500.
-if test $host = $target; then
- case $target in
- *-linux*)
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
- AC_TRY_LINK([#include <unistd.h>],
- [pread64 (0, NULL, 0, 0);],
- [ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
- AC_DEFINE(HAVE_PREAD64)], [])
- CFLAGS=$save_CFLAGS
- ;;
- esac
-fi
-
-dnl The CLI cannot be disabled yet, but may be in the future
-
-dnl Handle CLI sub-directory configury.
-AC_ARG_ENABLE(gdbcli,
-[ --enable-gdbcli Enable GDB-CLI interface],
-[
- case "${enableval}" in
- yes) enable_gdbcli=yes ;;
- "") enable_gdbcli=yes ;;
- no)
- AC_MSG_ERROR(The CLI cannot be disabled yet)
- ;;
- *)
- AC_MSG_ERROR(Bad value for --enable-gdbcli: ${enableval})
- ;;
- esac
-],
-[enable_gdbcli=yes])
-case ${enable_gdbcli} in
- "yes" )
- if test -d "${srcdir}/cli" ; then
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
- CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
- CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
- CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
- CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
- fi
- ;;
-esac
-
dnl Handle optional features that can be enabled.
-dnl Handle MI sub-directory configury.
-AC_ARG_ENABLE(gdbmi,
-[ --enable-gdbmi Enable GDB-MI interface],
+AC_ARG_WITH(sysroot,
+[ --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
[
- case "${enable_gdbmi}" in
- yes | no) ;;
- "") enable_gdbmi=yes ;;
- *)
- AC_MSG_ERROR(Bad value for --enable-gdbmi: ${enableval})
- ;;
- esac
-],
-[enable_gdbmi=yes])
-case ${enable_gdbmi} in
- "yes" )
- if test -d "${srcdir}/mi" ; then
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
- CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
- CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
- CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
- CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
- fi
- ;;
-esac
-
-# Configure UI_OUT by default (before 5.2 it can be disabled)
-# It must be configured if gdbmi is configured
+ case ${with_sysroot} in
+ yes) AC_ERROR(with-sysroot must specify path) ;;
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
-UIOUT_CFLAGS=
-AC_SUBST(UIOUT_CFLAGS)
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
-AC_ARG_WITH(uiout,
-[ --with-uiout Use new uiout functions instead of *printf's],
-[case "${withval}" in
- yes) want_uiout=true ;;
- no) if test $enable_gdbmi = yes; then
- AC_MSG_ERROR(uiout is needed for MI and cannot be disabled)
- else
- want_uiout=false
- fi ;;
- *) AC_MSG_ERROR(bad value ${withval} for GDB with-uiout option) ;;
-esac],
-[want_uiout=true])dnl
-
-if test $want_uiout = true; then
- UIOUT_CFLAGS="-DUI_OUT=1"
-fi
-
-AC_ARG_ENABLE(tui,
-[ --enable-tui Enable full-screen terminal user interface],
-[
- case "${enable_tui}" in
- yes | no) ;;
- "") enable_tui=yes ;;
- *)
- AC_MSG_ERROR(Bad value for --enable-tui: ${enableval})
- ;;
- esac
+ if test "x$exec_prefix" = xNONE; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ test_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ ${test_prefix}*)
+ t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+ TARGET_SYSTEM_ROOT_DEFINE="$t"
+ ;;
+ esac
+], [
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
])
-case ${enable_tui} in
- "yes" )
- if test -d "${srcdir}/tui" ; then
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
- CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
- CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
- CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
- CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
- fi
- ;;
-esac
-
-AC_ARG_ENABLE(netrom,
-[ --enable-netrom Enable NetROM support],
-[case "${enableval}" in
-yes) enable_netrom=yes ;;
-no) enable_netrom=no ;;
-*) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
-esac])
-
-if test "${enable_netrom}" = "yes"; then
- CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
- CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
-fi
-
+AC_SUBST(TARGET_SYSTEM_ROOT)
+AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
# NOTE: Don't add -Wall or -Wunused, they both include
# -Wunused-parameter which reports bogus warnings.
@@ -865,38 +1005,6 @@ if test x$want_mmalloc = xtrue; then
MMALLOC='../mmalloc/libmmalloc.a'
fi
-AC_ARG_WITH(included-regex,
-[ --with-included-regex Use included regex],
-[case "${withval}" in
- yes) want_included_regex=true ;;
- no) want_included_regex=false;;
- *) AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;;
-esac],[want_included_regex=true])dnl
-
-if test $want_included_regex = false; then
- AC_MSG_CHECKING(for GNU regex)
- AC_CACHE_VAL(gdb_cv_have_gnu_regex,
-[AC_TRY_COMPILE([#include <gnu-versions.h>
-#include <sys/types.h>
-#include <regex.h>],
-[#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
-#error No valid GNU regex.
-#endif
-],
- [gdb_cv_have_gnu_regex=yes],
- [gdb_cv_have_gnu_regex=no])])
- AC_MSG_RESULT($gdb_cv_have_gnu_regex)
- if test $gdb_cv_have_gnu_regex = no; then
- want_included_regex=true
- fi
-fi
-
-if test x${want_included_regex} = xtrue; then
- REGEX="gnu-regex.o"
- AC_DEFINE(USE_INCLUDED_REGEX)
-fi
-AC_SUBST(REGEX)
-
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
[AC_EGREP_CPP(lose, [
@@ -913,30 +1021,6 @@ case ${host} in
esac
AC_SUBST(SER_HARDWIRE)
-
-dnl Figure out which term library to use.
-if test x$gdb_host = xgo32; then
- TERM_LIB=
-else
-if test x$gdb_cv_os_cygwin = xyes; then
- TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
-else
- TERM_LIB=
- AC_CHECK_LIB(ncurses, tgetent, TERM_LIB=-lncurses,
- AC_CHECK_LIB(Hcurses, tgetent, TERM_LIB=-lHcurses,
- AC_CHECK_LIB(termlib, tgetent, TERM_LIB=-ltermlib,
- AC_CHECK_LIB(termcap, tgetent, TERM_LIB=-ltermcap,
- AC_CHECK_LIB(curses, tgetent, TERM_LIB=-lcurses,
- AC_CHECK_LIB(terminfo, tgetent, TERM_LIB=-lterminfo))))))
-
- if test "x$TERM_LIB" = x
- then
- AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!)
- fi
-fi
-fi
-AC_SUBST(TERM_LIB)
-
# libreadline needs libuser32.a in a cygwin environment
WIN32LIBS=
if test x$gdb_cv_os_cygwin = xyes; then
@@ -953,73 +1037,6 @@ GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
AC_SUBST(LIBGUI)
AC_SUBST(GUI_CFLAGS_X)
-AC_ARG_WITH(cpu,
-[ --with-cpu=CPU Set the default CPU variant to debug],
-[case "${target}" in
- powerpc-* | powerpcle-* )
- ## It would be nice to keep this table in sync with the one in
- ## gcc/configure.
- case "${with_cpu}" in
- ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
- | 604 | 750 )
- ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
- ;;
- common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
- ## These are all RS6000 variants, as far as GDB is concerned.
- with_cpu=rs6000
- ;;
- 603e | ec603e )
- with_cpu=603
- ;;
- 604e )
- with_cpu=604
- ;;
- * )
- AC_MSG_WARN(GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'.)
- with_cpu=ppc-uisa
- ;;
- esac
- ;;
- * )
- AC_MSG_WARN(GDB may ignore the --with-cpu flag for ${target} targets)
- ;;
-esac
-AC_DEFINE_UNQUOTED(TARGET_CPU_DEFAULT, "${with_cpu}")
-],)
-
-
-AC_ARG_ENABLE(gdbtk,
-[ --enable-gdbtk Enable GDBTK GUI front end],
-[case "${enableval}" in
- yes)
- case "$host" in
- *go32*)
- AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
- enable_gdbtk=no ;;
- *windows*)
- AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
- enable_gdbtk=no ;;
- *)
- enable_gdbtk=yes ;;
- esac ;;
- no)
- enable_gdbtk=no ;;
- *)
- AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
-esac],
-[
-# Default is on for everything but go32 and Cygwin
-case "$host" in
- *go32* | *windows*)
- ;;
- *)
- if test -d "${srcdir}/gdbtk" ; then
- enable_gdbtk=yes
- fi
- ;;
-esac
-])
-
WIN32LDAPP=
AC_SUBST(WIN32LIBS)
AC_SUBST(WIN32LDAPP)
@@ -1134,7 +1151,6 @@ if test "${enable_gdbtk}" = "yes"; then
fi
fi
- SUBDIRS="${SUBDIRS} gdbtk"
configdirs="${configdirs} gdbtk"
fi
@@ -1188,6 +1204,7 @@ AC_SUBST(IGNORE_SIM)
AC_SUBST(IGNORE_SIM_OBS)
AC_SUBST(ENABLE_CFLAGS)
+AC_SUBST(PROFILE_CFLAGS)
AC_SUBST(CONFIG_OBS)
AC_SUBST(CONFIG_LIB_OBS)
@@ -1199,67 +1216,6 @@ AC_SUBST(CONFIG_CLEAN)
AC_SUBST(CONFIG_INSTALL)
AC_SUBST(CONFIG_UNINSTALL)
-# Begin stuff to support --enable-shared
-AC_ARG_ENABLE(shared,
-[ --enable-shared Use shared libraries],
-[case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *) shared=true ;;
-esac])dnl
-
-HLDFLAGS=
-HLDENV=
-# If we have shared libraries, try to set rpath reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- HLDFLAGS='-Wl,+s,+b,$(libdir)'
- ;;
- *-*-irix5* | *-*-irix6*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-linux*aout*)
- ;;
- *-*-linux* | *-pc-linux-gnu*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-solaris*)
- HLDFLAGS='-R $(libdir)'
- ;;
- *-*-sysv4*)
- HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
- ;;
- esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
- *-*-sunos*)
- echo 'main () { }' > conftest.c
- ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
- if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'No such file' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
- :
- elif test "${shared}" = "true"; then
- HLDFLAGS='-Wl,-rpath=$(libdir)'
- else
- HLDFLAGS='-Wl,-rpath='
- fi
- rm -f conftest.t conftest.c conftest
- ;;
-esac
-AC_SUBST(HLDFLAGS)
-AC_SUBST(HLDENV)
-# End stuff to support --enable-shared
-
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
@@ -1340,23 +1296,35 @@ case "${GDB_MULTI_ARCH}" in
*) AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
esac
-if test "${enable_multi_ice}" = "yes"; then
- SUBDIRS="${SUBDIRS} multi-ice"
+if test x"${gdb_osabi}" != x ; then
+ AC_DEFINE_UNQUOTED(GDB_OSABI_DEFAULT, $gdb_osabi,
+ [Define to the default OS ABI for this configuration.])
fi
-# ``gdbserver'' can only be built in a native configuration.
-if test x"${target}" = x"${host}"; then
- AC_MSG_CHECKING(whether gdbserver is supported on this host)
- if test x"${build_gdbserver}" = xyes ; then
- configdirs="${configdirs} gdbserver"
- SUBDIRS="${SUBDIRS} gdbserver"
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
+# Enable multi-ice-gdb-server.
+AC_ARG_ENABLE(multi-ice,
+[ --enable-multi-ice build the multi-ice-gdb-server],
+ [case $enableval in
+ yes | no)
+ ;;
+ *) AC_MSG_ERROR([bad value $enableval for --enable-multi-ice]) ;;
+ esac])
+if test "x$enable_multi_ice" = xyes; then
+ configdirs="$configdirs multi-ice"
+fi
+
+# We only build gdbserver automatically if host and target are the same.
+if test "x$target" = "x$host"; then
+ AC_MSG_CHECKING(whether gdbserver is supported on this host)
+ if test "x$build_gdbserver" = xyes; then
+ configdirs="$configdirs gdbserver"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
fi
-AC_SUBST(SUBDIRS)
+AC_CONFIG_SUBDIRS($configdirs)
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
@@ -1398,8 +1366,6 @@ if test "${nativefile}" != ""; then
fi
AC_SUBST(nm_h)
-AC_PROG_LN_S
-
AC_LINK_FILES($files, $links)
dnl Check for exe extension set on certain hosts (e.g. Win32)
@@ -1417,7 +1383,6 @@ AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "ISO-8859-1",
AM_ICONV
-AC_CONFIG_SUBDIRS($configdirs)
AC_OUTPUT(Makefile .gdbinit:gdbinit.in,
[
dnl Autoconf doesn't provide a mechanism for modifying definitions
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index d272950a845..17ac70fa170 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -19,7 +19,6 @@ hppa*) gdb_target_cpu=pa ;;
i[3456]86*) gdb_target_cpu=i386 ;;
m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;;
m68*) gdb_target_cpu=m68k ;;
-# OBSOLETE m88*) gdb_target_cpu=m88k ;;
mips*) gdb_target_cpu=mips ;;
powerpc*) gdb_target_cpu=powerpc ;;
sparc*) gdb_target_cpu=sparc ;;
@@ -46,8 +45,6 @@ alpha*-*-linux*) gdb_target=alpha-linux ;;
alpha*-*-netbsd*) gdb_target=nbsd ;;
alpha*-*-*) gdb_target=alpha ;;
-# OBSOLETE arc-*-*) gdb_target=arc ;;
-
arm*-wince-pe) gdb_target=wince ;;
arm*-*-linux*) gdb_target=linux
build_gdbserver=yes
@@ -69,13 +66,10 @@ avr-*-*) gdb_target=avr
cris*) gdb_target=cris ;;
d10v-*-*) gdb_target=d10v ;;
-# OBSOLETE d30v-*-*) gdb_target=d30v ;;
h8300-*-*) gdb_target=h8300 ;;
-h8500-*-*) gdb_target=h8500 ;;
-
+# OBSOLETE h8500-*-*) gdb_target=h8500 ;;
-# OBSOLETE fr30-*-elf*) gdb_target=fr30 ;;
frv-*-*) gdb_target=frv ;;
@@ -91,63 +85,42 @@ i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
i[3456]86-sequent-sysv*) gdb_target=ptx ;;
i[3456]86-ncr-*) gdb_target=ncr3000 ;;
-# OBSOLETE i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
i[3456]86-*-netbsd*) gdb_target=nbsd ;;
i[3456]86-*-openbsd*) gdb_target=obsd ;;
-# OBSOLETE i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
i[3456]86-*-lynxos*) gdb_target=i386lynx ;;
i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
-i[3456]86-*-sysv4.2*) gdb_target=i386v42mp ;;
-i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
-i[3456]86-*-sysv5*) gdb_target=i386v42mp ;;
-i[3456]86-*-sco3.2v4*) gdb_target=i386sco4 ;;
-i[3456]86-*-sco3.2v5*) gdb_target=i386sco5 ;;
i[3456]86-*-sco*) gdb_target=i386v ;;
i[3456]86-*-sysv*) gdb_target=i386v ;;
i[3456]86-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
i[3456]86-*-isc*) gdb_target=i386v ;;
-# OBSOLETE i[3456]86-*-mach3*) gdb_target=i386m3 ;;
i[3456]86-*-gnu*) gdb_target=i386gnu ;;
i[3456]86-*-netware*) gdb_target=i386nw
configdirs="${configdirs} nlm" ;;
-# OBSOLETE i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
i[3456]86-*-cygwin*) gdb_target=cygwin ;;
i[3456]86-*-vxworks*) gdb_target=vxworks ;;
i[3456]86-*-*) gdb_target=embed ;;
-# OBSOLETE i960-*-bout*) gdb_target=vxworks960 ;;
-# OBSOLETE i960-nindy-coff*) gdb_target=nindy960 ;;
-# OBSOLETE i960-*-coff*) gdb_target=mon960 ;;
-# OBSOLETE i960-nindy-elf*) gdb_target=nindy960 ;;
-# OBSOLETE i960-*-elf*) gdb_target=mon960 ;;
-# OBSOLETE i960-*-nindy*) gdb_target=nindy960 ;;
-# OBSOLETE i960-*-vxworks*) gdb_target=vxworks960 ;;
-
ia64-*-aix*) gdb_target=aix ;;
ia64-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
ia64*-*-*) gdb_target=ia64 ;;
-m32r-*-elf*) gdb_target=m32r ;;
+# OBSOLETE m32r-*-elf*) gdb_target=m32r ;;
m68hc11*-*-*|m6811*-*-*) gdb_target=m68hc11 ;;
m68000-*-sunos3*) gdb_target=sun2os3 ;;
m68000-*-sunos4*) gdb_target=sun2os4 ;;
-# OBSOLETE m68*-apollo*-bsd*) gdb_target=apollo68b ;;
m68*-bull-sysv*) gdb_target=dpx2 ;;
-# OBSOLETE m68*-hp-bsd*) gdb_target=hp300bsd ;;
-# OBSOLETE m68*-hp-hpux*) gdb_target=hp300hpux ;;
m68*-att-*) gdb_target=3b1 ;;
m68*-cisco*-*) gdb_target=cisco ;;
-m68*-ericsson-*) gdb_target=es1800 ;;
m68*-motorola-*) gdb_target=delta68 ;;
m68*-netx-*) gdb_target=vxworks68 ;;
m68*-tandem-*) gdb_target=st2000 ;;
@@ -165,14 +138,9 @@ m68*-*-sunos4*) gdb_target=sun3os4 ;;
m68*-*-sysv4*) gdb_target=m68kv4 ;;
m68*-*-vxworks*) gdb_target=vxworks68 ;;
-# OBSOLETE m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
-# OBSOLETE m88*-motorola-*) gdb_target=delta88 ;;
-# OBSOLETE m88*-*-*) gdb_target=m88k ;;
-
mcore*-*-*) gdb_target=mcore ;;
mips64*-big-*) gdb_target=bigmips64 ;;
mips*-big-*) gdb_target=bigmips ;;
-mips*-dec-mach3*) gdb_target=mach3 ;;
mips*-dec-*) gdb_target=decstation ;;
mips*-*-pe) gdb_target=wince ;;
mips64*el-*-ecoff*) gdb_target=embedl64 ;;
@@ -189,6 +157,7 @@ mips*tx39*el*-elf*) gdb_target=tx39l ;;
mips*tx39*-elf*) gdb_target=tx39 ;;
mips64*el-*-elf*) gdb_target=embedl64 ;;
mips64*-*-elf*) gdb_target=embed64 ;;
+mips64*-*-linux*) gdb_target=linux64 ;;
mips*el-*-ecoff*) gdb_target=embedl ;;
mips*-*-ecoff*) gdb_target=embed ;;
mips*el-*-elf*) gdb_target=embedl ;;
@@ -210,7 +179,7 @@ mips*-*-riscos*) gdb_target=bigmips ;;
mips*-*-vxworks*) gdb_target=vxmips ;;
mips*-*-*) gdb_target=embed ;;
-mn10200-*-*) gdb_target=mn10200 ;;
+# OBSOLETE mn10200-*-*) gdb_target=mn10200 ;;
mn10300-*-*) gdb_target=mn10300 ;;
none-*-*) gdb_target=none ;;
@@ -277,9 +246,6 @@ xstormy16-*-*) gdb_target=xstormy16 ;;
vax-*-*) gdb_target=vax ;;
-# OBSOLETE fr30-*-*) gdb_target=fr30
-# OBSOLETE ;;
-
v850*-*-*) gdb_target=v850
case ${gdb_host} in
cygwin*)
@@ -292,7 +258,7 @@ x86_64-*-linux*) gdb_target=x86-64linux
build_gdbserver=yes
;;
-z8k-*-coff*) gdb_target=z8k ;;
+# OBSOLETE z8k-*-coff*) gdb_target=z8k ;;
esac
@@ -308,3 +274,11 @@ v850) gdb_multi_arch=yes ;;
xstormy16) gdb_multi_arch=yes ;;
mcore) gdb_multi_arch=yes ;;
esac
+
+# map target onto default OS ABI
+
+case "${target}" in
+*-*-linux*) gdb_osabi=GDB_OSABI_LINUX ;;
+*-*-gnu*) gdb_osabi=GDB_OSABI_HURD ;;
+*-*-solaris*) gdb_osabi=GDB_OSABI_SOLARIS ;;
+esac
diff --git a/gdb/corefile.c b/gdb/corefile.c
index be0ecf0e3b0..8a0073a83df 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -1,7 +1,7 @@
/* Core dump and executable file functions above target vector, for GDB.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -439,7 +439,7 @@ static void set_gnutarget_command (char *, int, struct cmd_list_element *);
static void
set_gnutarget_command (char *ignore, int from_tty, struct cmd_list_element *c)
{
- if (STREQ (gnutarget_string, "auto"))
+ if (strcmp (gnutarget_string, "auto") == 0)
gnutarget = NULL;
else
gnutarget = gnutarget_string;
diff --git a/gdb/corelow.c b/gdb/corelow.c
index ff758b81c9d..016140fdac6 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -58,7 +58,7 @@ static struct core_fns *core_vec = NULL;
static void core_files_info (struct target_ops *);
#ifdef SOLIB_ADD
-static int solib_add_stub (PTR);
+static int solib_add_stub (void *);
#endif
static struct core_fns *sniff_core_bfd (bfd *);
@@ -75,7 +75,7 @@ static void core_close_cleanup (void *ignore);
static void get_core_registers (int);
-static void add_to_thread_list (bfd *, asection *, PTR);
+static void add_to_thread_list (bfd *, asection *, void *);
static int ignore (CORE_ADDR, char *);
@@ -222,7 +222,7 @@ core_close_cleanup (void *ignore)
is really an int * which points to from_tty. */
static int
-solib_add_stub (PTR from_ttyp)
+solib_add_stub (void *from_ttyp)
{
SOLIB_ADD (NULL, *(int *) from_ttyp, &current_target, auto_solib_add);
re_enable_breakpoints_in_shlibs ();
@@ -234,7 +234,7 @@ solib_add_stub (PTR from_ttyp)
list of threads in a core file. */
static void
-add_to_thread_list (bfd *abfd, asection *asect, PTR reg_sect_arg)
+add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
{
int thread_id;
asection *reg_sect = (asection *) reg_sect_arg;
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 33b476ce897..29754f239f5 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -130,7 +130,8 @@ cp_print_class_method (char *valaddr,
check_stub_method_group (domain, i);
for (j = 0; j < len2; j++)
{
- if (STREQ (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j)))
+ if (strcmp (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))
+ == 0)
goto common;
}
}
@@ -259,8 +260,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
if ((len == n_baseclasses)
|| ((len - n_baseclasses == 1)
&& TYPE_HAS_VTABLE (type)
- && STREQN (TYPE_FIELD_NAME (type, n_baseclasses),
- hpacc_vtbl_ptr_name, 5))
+ && strncmp (TYPE_FIELD_NAME (type, n_baseclasses),
+ hpacc_vtbl_ptr_name, 5) == 0)
|| !len)
fprintf_filtered (stream, "<No data fields>");
else
@@ -284,7 +285,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
/* If a vtable pointer appears, we'll print it out later */
if (TYPE_HAS_VTABLE (type)
- && STREQN (TYPE_FIELD_NAME (type, i), hpacc_vtbl_ptr_name, 5))
+ && strncmp (TYPE_FIELD_NAME (type, i), hpacc_vtbl_ptr_name,
+ 5) == 0)
continue;
if (fields_seen)
@@ -407,9 +409,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
} /* if there are data fields */
/* Now print out the virtual table pointer if there is one */
if (TYPE_HAS_VTABLE (type)
- && STREQN (TYPE_FIELD_NAME (type, n_baseclasses),
- hpacc_vtbl_ptr_name,
- 5))
+ && strncmp (TYPE_FIELD_NAME (type, n_baseclasses),
+ hpacc_vtbl_ptr_name, 5) == 0)
{
struct value *v;
/* First get the virtual table pointer and print it out */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 0d552b8bda4..59113182668 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1,5 +1,5 @@
/* Target dependent code for CRIS, for GDB, the GNU debugger.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
@@ -488,7 +488,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
short source_register;
/* This frame is with respect to a leaf until a push srp is found. */
- fi->extra_info->leaf_function = 1;
+ get_frame_extra_info (fi)->leaf_function = 1;
/* This frame is without the FP until a push fp is found. */
have_fp = 0;
@@ -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 (fi->saved_regs)
+ if (get_frame_saved_regs (fi))
{
for (regno = 0; regno < NUM_REGS; regno++)
- fi->saved_regs[regno] = 0;
+ get_frame_saved_regs (fi)[regno] = 0;
}
/* Find the prologue instructions. */
@@ -527,7 +527,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
{
return ip;
}
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
}
else if (regno == FP_REGNUM)
{
@@ -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 (!fi->saved_regs)
+ if (!get_frame_saved_regs (fi))
return ip;
if (have_fp)
{
- fi->saved_regs[FP_REGNUM] = get_frame_base (fi);
+ get_frame_saved_regs (fi)[FP_REGNUM] = get_frame_base (fi);
/* Calculate the addresses. */
for (regno = regsave; regno >= 0; regno--)
{
- fi->saved_regs[regno] = get_frame_base (fi) - val;
+ get_frame_saved_regs (fi)[regno] = get_frame_base (fi) - val;
val -= 4;
}
- if (fi->extra_info->leaf_function)
+ if (get_frame_extra_info (fi)->leaf_function)
{
/* Set the register SP to contain the stack pointer of
the caller. */
- fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 4;
+ 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. */
- fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 8;
+ get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
/* Set the register SRP to contain the return address of
the caller. */
- fi->saved_regs[SRP_REGNUM] = get_frame_base (fi) + 4;
+ get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
}
}
return ip;
@@ -734,17 +734,15 @@ cris_skip_prologue_frameless_p (CORE_ADDR pc)
CORE_ADDR
cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
{
- struct frame_info fi;
- static struct frame_extra_info fei;
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+ struct frame_info *fi;
struct symtab_and_line sal = find_pc_line (pc, 0);
int best_limit;
CORE_ADDR pc_after_prologue;
- /* frame_info now contains dynamic memory. Since fi is a dummy here,
- I use static memory for extra_info, and don't bother allocating
- memory for saved_regs. */
- fi.saved_regs = 0;
- fi.extra_info = &fei;
+ /* frame_info now contains dynamic memory. Since fi is a dummy
+ here, I don't bother allocating memory for saved_regs. */
+ fi = deprecated_frame_xmalloc_with_cleanup (0, sizeof (struct frame_extra_info));
/* If there is no symbol information then sal.end == 0, and we end up
examining only the first instruction in the function prologue.
@@ -754,7 +752,8 @@ cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
else
best_limit = pc + 100;
- pc_after_prologue = cris_examine (pc, best_limit, &fi, frameless_p);
+ pc_after_prologue = cris_examine (pc, best_limit, fi, frameless_p);
+ do_cleanups (old_chain);
return pc_after_prologue;
}
@@ -1149,8 +1148,7 @@ cris_frameless_function_invocation (struct frame_info *fi)
/* See frame.h. Determines the address of all registers in the current stack
frame storing each in frame->saved_regs. Space for frame->saved_regs shall
- be allocated by FRAME_INIT_SAVED_REGS using either frame_saved_regs_zalloc
- or frame_obstack_alloc. */
+ be allocated by FRAME_INIT_SAVED_REGS using frame_saved_regs_zalloc. */
void
cris_frame_init_saved_regs (struct frame_info *fi)
@@ -1158,13 +1156,14 @@ cris_frame_init_saved_regs (struct frame_info *fi)
CORE_ADDR ip;
struct symtab_and_line sal;
int best_limit;
- char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
+ get_frame_base (fi));
/* Examine the entire prologue. */
register int frameless_p = 0;
/* Has this frame's registers already been initialized? */
- if (fi->saved_regs)
+ if (get_frame_saved_regs (fi))
return;
frame_saved_regs_zalloc (fi);
@@ -1174,11 +1173,11 @@ 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 (&fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+ memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
}
else
{
- ip = get_pc_function_start (fi->pc);
+ ip = get_pc_function_start (get_frame_pc (fi));
sal = find_pc_line (ip, 0);
/* If there is no symbol information then sal.end == 0, and we end up
@@ -1201,29 +1200,30 @@ cris_frame_init_saved_regs (struct frame_info *fi)
void
cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- if (fi->next)
+ if (get_next_frame (fi))
{
/* Called from get_prev_frame. */
- fi->pc = FRAME_SAVED_PC (fi->next);
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
}
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- fi->extra_info->return_pc = 0;
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->return_pc = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
- SP_REGNUM);
- fi->extra_info->return_pc =
- deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+ 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);
/* FIXME: Is this necessarily true? */
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
}
else
{
@@ -1231,19 +1231,19 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Check fromleaf/frameless_function_invocation. (FIXME) */
- if (fi->saved_regs[SRP_REGNUM] != 0)
+ if (get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
{
/* SRP was saved on the stack; non-leaf function. */
- fi->extra_info->return_pc =
- read_memory_integer (fi->saved_regs[SRP_REGNUM],
+ get_frame_extra_info (fi)->return_pc =
+ read_memory_integer (get_frame_saved_regs (fi)[SRP_REGNUM],
REGISTER_RAW_SIZE (SRP_REGNUM));
}
else
{
/* SRP is still in a register; leaf function. */
- fi->extra_info->return_pc = read_register (SRP_REGNUM);
+ get_frame_extra_info (fi)->return_pc = read_register (SRP_REGNUM);
/* FIXME: Should leaf_function be set to 1 here? */
- fi->extra_info->leaf_function = 1;
+ get_frame_extra_info (fi)->leaf_function = 1;
}
}
}
@@ -1254,11 +1254,13 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
CORE_ADDR
cris_frame_chain (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
+ get_frame_base (fi),
+ get_frame_base (fi)))
{
- return fi->frame;
+ return get_frame_base (fi);
}
- else if (!inside_entry_file (fi->pc))
+ else if (!inside_entry_file (get_frame_pc (fi)))
{
return read_memory_unsigned_integer (get_frame_base (fi), 4);
}
@@ -1273,7 +1275,7 @@ cris_frame_chain (struct frame_info *fi)
CORE_ADDR
cris_frame_saved_pc (struct frame_info *fi)
{
- return fi->extra_info->return_pc;
+ return get_frame_extra_info (fi)->return_pc;
}
/* Setup the function arguments for calling a function in the inferior. */
@@ -1512,7 +1514,9 @@ cris_pop_frame (void)
register int regno;
register int stack_offset = 0;
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
+ get_frame_base (fi),
+ get_frame_base (fi)))
{
/* This happens when we hit a breakpoint set at the entry point,
when returning from a dummy frame. */
@@ -1533,30 +1537,30 @@ cris_pop_frame (void)
after SP was saved. */
for (regno = 0; regno < FP_REGNUM; regno++)
{
- if (fi->saved_regs[regno])
+ if (get_frame_saved_regs (fi)[regno])
{
write_register (regno,
- read_memory_integer (fi->saved_regs[regno], 4));
+ read_memory_integer (get_frame_saved_regs (fi)[regno], 4));
}
}
- if (fi->saved_regs[FP_REGNUM])
+ if (get_frame_saved_regs (fi)[FP_REGNUM])
{
/* Pop the frame pointer (R8). It was pushed before SP
was saved. */
write_register (FP_REGNUM,
- read_memory_integer (fi->saved_regs[FP_REGNUM], 4));
+ read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4));
stack_offset += 4;
/* Not a leaf function. */
- if (fi->saved_regs[SRP_REGNUM])
+ if (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, fi->saved_regs[FP_REGNUM] + stack_offset);
+ write_register (SP_REGNUM, get_frame_saved_regs (fi)[FP_REGNUM] + stack_offset);
}
else
{
@@ -1565,7 +1569,7 @@ cris_pop_frame (void)
}
/* Restore the PC. */
- write_register (PC_REGNUM, fi->extra_info->return_pc);
+ write_register (PC_REGNUM, get_frame_extra_info (fi)->return_pc);
}
flush_cached_frames ();
}
@@ -1864,8 +1868,7 @@ process_autoincrement (int size, unsigned short inst, inst_env_type *inst_env)
/* Just a forward declaration. */
-unsigned long
-get_data_from_address (unsigned short *inst, CORE_ADDR address);
+unsigned long get_data_from_address (unsigned short *inst, CORE_ADDR address);
/* Calculates the prefix value for the general case of offset addressing
mode. */
@@ -4004,7 +4007,7 @@ bfd_lookup_symbol (bfd *abfd, const char *symname)
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (free, (PTR) symbol_table);
+ back_to = make_cleanup (free, symbol_table);
number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
@@ -4312,7 +4315,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation
(gdbarch, cris_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, cris_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, cris_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, cris_saved_pc_after_call);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 14fd95a032f..c6b94bd21bd 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for Mitsubishi D10V, for GDB.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -24,6 +24,7 @@
#include "defs.h"
#include "frame.h"
+#include "frame-unwind.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
@@ -42,6 +43,8 @@
#include "gdb/sim-d10v.h"
#include "sim-regno.h"
+#include "gdb_assert.h"
+
struct frame_extra_info
{
CORE_ADDR return_pc;
@@ -102,26 +105,6 @@ static void d10v_eva_prepare_to_trace (void);
static void d10v_eva_get_trace_data (void);
-static int prologue_find_regs (unsigned short op, struct frame_info *fi,
- CORE_ADDR addr);
-
-static void d10v_frame_init_saved_regs (struct frame_info *);
-
-static void do_d10v_pop_frame (struct frame_info *fi);
-
-static int
-d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
-{
- if (chain != 0 && frame != NULL)
- {
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return 1; /* Path back from a call dummy must be valid. */
- return ((frame)->pc > IMEM_START
- && !inside_main_func (frame->pc));
- }
- else return 0;
-}
-
static CORE_ADDR
d10v_stack_align (CORE_ADDR len)
{
@@ -436,7 +419,7 @@ d10v_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
}
static CORE_ADDR
-d10v_pointer_to_address (struct type *type, void *buf)
+d10v_pointer_to_address (struct type *type, const void *buf)
{
CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
@@ -479,22 +462,36 @@ d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
static void
-d10v_store_return_value (struct type *type, char *valbuf)
+d10v_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
{
- char tmp = 0;
- /* Only char return values need to be shifted right within R0. */
+ /* Only char return values need to be shifted right within the first
+ regnum. */
if (TYPE_LENGTH (type) == 1
&& TYPE_CODE (type) == TYPE_CODE_INT)
{
- /* zero the high byte */
- deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM), &tmp, 1);
- /* copy the low byte */
- deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
- valbuf, 1);
+ bfd_byte tmp[2];
+ tmp[1] = *(bfd_byte *)valbuf;
+ regcache_cooked_write (regcache, RET1_REGNUM, tmp);
}
else
- deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ {
+ 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++)
+ {
+ regcache_cooked_write (regcache, RET1_REGNUM + reg,
+ (bfd_byte *) valbuf + 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
@@ -502,22 +499,11 @@ d10v_store_return_value (struct type *type, char *valbuf)
as a CORE_ADDR (or an expression that can be used as one). */
static CORE_ADDR
-d10v_extract_struct_value_address (char *regbuf)
+d10v_extract_struct_value_address (struct regcache *regcache)
{
- return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
- REGISTER_RAW_SIZE (ARG1_REGNUM))
- | DMEM_START);
-}
-
-static CORE_ADDR
-d10v_frame_saved_pc (struct frame_info *frame)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return d10v_make_iaddr (deprecated_read_register_dummy (frame->pc,
- frame->frame,
- PC_REGNUM));
- else
- return ((frame)->extra_info->return_pc);
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &addr);
+ return (addr | DMEM_START);
}
/* Immediately after a function call, return the saved pc. We can't
@@ -531,55 +517,6 @@ d10v_saved_pc_after_call (struct frame_info *frame)
| IMEM_START);
}
-/* Discard from the stack the innermost frame, restoring all saved
- registers. */
-
-static void
-d10v_pop_frame (void)
-{
- generic_pop_current_frame (do_d10v_pop_frame);
-}
-
-static void
-do_d10v_pop_frame (struct frame_info *fi)
-{
- CORE_ADDR fp;
- int regnum;
- char raw_buffer[8];
-
- fp = get_frame_base (fi);
- /* fill out fsr with the address of where each */
- /* register was stored in the frame */
- d10v_frame_init_saved_regs (fi);
-
- /* now update the current registers with the old values */
- for (regnum = A0_REGNUM; regnum < A0_REGNUM + NR_A_REGS; regnum++)
- {
- if (fi->saved_regs[regnum])
- {
- read_memory (fi->saved_regs[regnum], raw_buffer, REGISTER_RAW_SIZE (regnum));
- deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
- REGISTER_RAW_SIZE (regnum));
- }
- }
- for (regnum = 0; regnum < SP_REGNUM; regnum++)
- {
- if (fi->saved_regs[regnum])
- {
- write_register (regnum, read_memory_unsigned_integer (fi->saved_regs[regnum], REGISTER_RAW_SIZE (regnum)));
- }
- }
- if (fi->saved_regs[PSW_REGNUM])
- {
- write_register (PSW_REGNUM, read_memory_unsigned_integer (fi->saved_regs[PSW_REGNUM], REGISTER_RAW_SIZE (PSW_REGNUM)));
- }
-
- write_register (PC_REGNUM, read_register (LR_REGNUM));
- write_register (SP_REGNUM, fp + fi->extra_info->size);
- target_store_registers (-1);
- flush_cached_frames ();
-}
-
static int
check_prologue (unsigned short op)
{
@@ -677,53 +614,20 @@ d10v_skip_prologue (CORE_ADDR pc)
return pc;
}
-/* 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 INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC will be
- called for the new frame. */
-
-static CORE_ADDR
-d10v_frame_chain (struct frame_info *fi)
+struct d10v_unwind_cache
{
- CORE_ADDR addr;
-
- /* A generic call dummy's frame is the same as caller's. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return fi->frame;
-
- d10v_frame_init_saved_regs (fi);
-
-
- if (fi->extra_info->return_pc == IMEM_START
- || inside_entry_file (fi->extra_info->return_pc))
- {
- /* This is meant to halt the backtrace at "_start".
- Make sure we don't halt it at a generic dummy frame. */
- if (!DEPRECATED_PC_IN_CALL_DUMMY (fi->extra_info->return_pc, 0, 0))
- return (CORE_ADDR) 0;
- }
-
- if (!fi->saved_regs[FP_REGNUM])
- {
- if (!fi->saved_regs[SP_REGNUM]
- || fi->saved_regs[SP_REGNUM] == STACK_START)
- return (CORE_ADDR) 0;
-
- return fi->saved_regs[SP_REGNUM];
- }
-
- addr = read_memory_unsigned_integer (fi->saved_regs[FP_REGNUM],
- REGISTER_RAW_SIZE (FP_REGNUM));
- if (addr == 0)
- return (CORE_ADDR) 0;
-
- return d10v_make_daddr (addr);
-}
-
-static int next_addr, uses_frame;
+ CORE_ADDR return_pc;
+ int frameless;
+ int size;
+ CORE_ADDR *saved_regs;
+ CORE_ADDR next_addr;
+ int uses_frame;
+ void **regs;
+};
static int
-prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
+prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
+ CORE_ADDR addr)
{
int n;
@@ -731,8 +635,8 @@ prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
if ((op & 0x7E1F) == 0x6C1F)
{
n = (op & 0x1E0) >> 5;
- next_addr -= 2;
- fi->saved_regs[n] = next_addr;
+ info->next_addr -= 2;
+ info->saved_regs[n] = info->next_addr;
return 1;
}
@@ -740,9 +644,9 @@ prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
else if ((op & 0x7E3F) == 0x6E1F)
{
n = (op & 0x1E0) >> 5;
- next_addr -= 4;
- fi->saved_regs[n] = next_addr;
- fi->saved_regs[n + 1] = next_addr + 2;
+ info->next_addr -= 4;
+ info->saved_regs[n] = info->next_addr;
+ info->saved_regs[n + 1] = info->next_addr + 2;
return 1;
}
@@ -752,14 +656,14 @@ prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
n = (op & 0x1E) >> 1;
if (n == 0)
n = 16;
- next_addr -= n;
+ info->next_addr -= n;
return 1;
}
/* mv r11, sp */
if (op == 0x417E)
{
- uses_frame = 1;
+ info->uses_frame = 1;
return 1;
}
@@ -771,7 +675,7 @@ prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
if ((op & 0x7E1F) == 0x681E)
{
n = (op & 0x1E0) >> 5;
- fi->saved_regs[n] = next_addr;
+ info->saved_regs[n] = info->next_addr;
return 1;
}
@@ -779,8 +683,8 @@ prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
if ((op & 0x7E3F) == 0x3A1E)
{
n = (op & 0x1E0) >> 5;
- fi->saved_regs[n] = next_addr;
- fi->saved_regs[n + 1] = next_addr + 2;
+ info->saved_regs[n] = info->next_addr;
+ info->saved_regs[n + 1] = info->next_addr + 2;
return 1;
}
@@ -793,21 +697,33 @@ prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-static void
-d10v_frame_init_saved_regs (struct frame_info *fi)
+struct d10v_unwind_cache *
+d10v_frame_unwind_cache (struct frame_info *fi,
+ void **cache)
{
CORE_ADDR fp, pc;
unsigned long op;
unsigned short op1, op2;
int i;
+ struct d10v_unwind_cache *info;
+
+ if ((*cache))
+ return (*cache);
+
+ info = FRAME_OBSTACK_ZALLOC (struct d10v_unwind_cache);
+ (*cache) = info;
+ info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+
+ info->frameless = 0;
+ info->size = 0;
+ info->return_pc = 0;
- fp = fi->frame;
- memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
- next_addr = 0;
+ fp = get_frame_base (fi);
+ info->next_addr = 0;
- pc = get_pc_function_start (fi->pc);
+ pc = get_pc_function_start (get_frame_pc (fi));
- uses_frame = 0;
+ info->uses_frame = 0;
while (1)
{
op = (unsigned long) read_memory_integer (pc, 4);
@@ -818,22 +734,22 @@ d10v_frame_init_saved_regs (struct frame_info *fi)
{
/* add3 sp,sp,n */
short n = op & 0xFFFF;
- next_addr += n;
+ info->next_addr += n;
}
else if ((op & 0x3F0F0000) == 0x340F0000)
{
/* st rn, @(offset,sp) */
short offset = op & 0xFFFF;
short n = (op >> 20) & 0xF;
- fi->saved_regs[n] = next_addr + offset;
+ info->saved_regs[n] = info->next_addr + offset;
}
else if ((op & 0x3F1F0000) == 0x350F0000)
{
/* st2w rn, @(offset,sp) */
short offset = op & 0xFFFF;
short n = (op >> 20) & 0xF;
- fi->saved_regs[n] = next_addr + offset;
- fi->saved_regs[n + 1] = next_addr + offset + 2;
+ info->saved_regs[n] = info->next_addr + offset;
+ info->saved_regs[n + 1] = info->next_addr + offset + 2;
}
else
break;
@@ -851,140 +767,142 @@ d10v_frame_init_saved_regs (struct frame_info *fi)
op1 = (op & 0x3FFF8000) >> 15;
op2 = op & 0x7FFF;
}
- if (!prologue_find_regs (op1, fi, pc)
- || !prologue_find_regs (op2, fi, pc))
+ if (!prologue_find_regs (info, op1, pc)
+ || !prologue_find_regs (info, op2, pc))
break;
}
pc += 4;
}
- fi->extra_info->size = -next_addr;
+ info->size = -info->next_addr;
if (!(fp & 0xffff))
fp = d10v_read_sp ();
for (i = 0; i < NUM_REGS - 1; i++)
- if (fi->saved_regs[i])
+ if (info->saved_regs[i])
{
- fi->saved_regs[i] = fp - (next_addr - fi->saved_regs[i]);
+ info->saved_regs[i] = fp - (info->next_addr - info->saved_regs[i]);
}
- if (fi->saved_regs[LR_REGNUM])
+ if (info->saved_regs[LR_REGNUM])
{
CORE_ADDR return_pc
- = read_memory_unsigned_integer (fi->saved_regs[LR_REGNUM],
+ = read_memory_unsigned_integer (info->saved_regs[LR_REGNUM],
REGISTER_RAW_SIZE (LR_REGNUM));
- fi->extra_info->return_pc = d10v_make_iaddr (return_pc);
+ info->return_pc = d10v_make_iaddr (return_pc);
}
else
{
- fi->extra_info->return_pc = d10v_make_iaddr (read_register (LR_REGNUM));
+ ULONGEST return_pc;
+ frame_read_unsigned_register (fi, LR_REGNUM, &return_pc);
+ info->return_pc = d10v_make_iaddr (return_pc);
}
/* The SP is not normally (ever?) saved, but check anyway */
- if (!fi->saved_regs[SP_REGNUM])
+ if (!info->saved_regs[SP_REGNUM])
{
/* if the FP was saved, that means the current FP is valid, */
/* otherwise, it isn't being used, so we use the SP instead */
- if (uses_frame)
- fi->saved_regs[SP_REGNUM]
- = d10v_read_fp () + fi->extra_info->size;
+ if (info->uses_frame)
+ info->saved_regs[SP_REGNUM]
+ = d10v_read_fp () + info->size;
else
{
- fi->saved_regs[SP_REGNUM] = fp + fi->extra_info->size;
- fi->extra_info->frameless = 1;
- fi->saved_regs[FP_REGNUM] = 0;
+ info->saved_regs[SP_REGNUM] = fp + info->size;
+ info->frameless = 1;
+ info->saved_regs[FP_REGNUM] = 0;
}
}
+
+ return info;
}
static void
-d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
+d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, int regnum, int all)
{
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
- frame_saved_regs_zalloc (fi);
-
- fi->extra_info->frameless = 0;
- fi->extra_info->size = 0;
- fi->extra_info->return_pc = 0;
-
- /* If fi->pc is zero, but this is not the outermost frame,
- then let's snatch the return_pc from the callee, so that
- DEPRECATED_PC_IN_CALL_DUMMY will work. */
- if (fi->pc == 0 && fi->level != 0 && fi->next != NULL)
- fi->pc = d10v_frame_saved_pc (fi->next);
-
- /* The call dummy doesn't save any registers on the stack, so we can
- return now. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (regnum >= 0)
{
+ default_print_registers_info (gdbarch, file, frame, regnum, all);
return;
}
- else
- {
- d10v_frame_init_saved_regs (fi);
- }
+
+ {
+ ULONGEST pc, psw, rpt_s, rpt_e, rpt_c;
+ frame_read_unsigned_register (frame, PC_REGNUM, &pc);
+ frame_read_unsigned_register (frame, PSW_REGNUM, &psw);
+ frame_read_unsigned_register (frame, frame_map_name_to_regnum ("rpt_s", -1), &rpt_s);
+ frame_read_unsigned_register (frame, frame_map_name_to_regnum ("rpt_e", -1), &rpt_e);
+ frame_read_unsigned_register (frame, frame_map_name_to_regnum ("rpt_c", -1), &rpt_c);
+ 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);
+ }
+
+ {
+ int group;
+ for (group = 0; group < 16; group += 8)
+ {
+ int r;
+ fprintf_filtered (file, "R%d-R%-2d", group, group + 7);
+ for (r = group; r < group + 8; r++)
+ {
+ ULONGEST tmp;
+ frame_read_unsigned_register (frame, r, &tmp);
+ fprintf_filtered (file, " %04lx", (long) tmp);
+ }
+ fprintf_filtered (file, "\n");
+ }
+ }
+
+ /* Note: The IMAP/DMAP registers don't participate in function
+ calls. Don't bother trying to unwind them. */
+
+ {
+ int a;
+ for (a = 0; a < NR_IMAP_REGS; a++)
+ {
+ if (a > 0)
+ fprintf_filtered (file, " ");
+ fprintf_filtered (file, "IMAP%d %04lx", a, d10v_imap_register (a));
+ }
+ if (NR_DMAP_REGS == 1)
+ /* Registers DMAP0 and DMAP1 are constant. Just return dmap2. */
+ fprintf_filtered (file, " DMAP %04lx\n", d10v_dmap_register (2));
+ else
+ {
+ for (a = 0; a < NR_DMAP_REGS; a++)
+ {
+ fprintf_filtered (file, " DMAP%d %04lx", a, d10v_dmap_register (a));
+ }
+ fprintf_filtered (file, "\n");
+ }
+ }
+
+ {
+ char *num = alloca (max_register_size (gdbarch));
+ int a;
+ fprintf_filtered (file, "A0-A%d", NR_A_REGS - 1);
+ for (a = A0_REGNUM; a < A0_REGNUM + NR_A_REGS; a++)
+ {
+ int i;
+ fprintf_filtered (file, " ");
+ frame_register_read (frame, a, num);
+ for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++)
+ {
+ fprintf_filtered (file, "%02x", (num[i] & 0xff));
+ }
+ }
+ }
+ fprintf_filtered (file, "\n");
}
static void
show_regs (char *args, int from_tty)
{
- int a;
- printf_filtered ("PC=%04lx (0x%lx) PSW=%04lx RPT_S=%04lx RPT_E=%04lx RPT_C=%04lx\n",
- (long) read_register (PC_REGNUM),
- (long) d10v_make_iaddr (read_register (PC_REGNUM)),
- (long) read_register (PSW_REGNUM),
- (long) read_register (24),
- (long) read_register (25),
- (long) read_register (23));
- printf_filtered ("R0-R7 %04lx %04lx %04lx %04lx %04lx %04lx %04lx %04lx\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 %04lx %04lx %04lx %04lx %04lx %04lx %04lx %04lx\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));
- for (a = 0; a < NR_IMAP_REGS; a++)
- {
- if (a > 0)
- printf_filtered (" ");
- printf_filtered ("IMAP%d %04lx", a, d10v_imap_register (a));
- }
- if (NR_DMAP_REGS == 1)
- printf_filtered (" DMAP %04lx\n", d10v_dmap_register (2));
- else
- {
- for (a = 0; a < NR_DMAP_REGS; a++)
- {
- printf_filtered (" DMAP%d %04lx", a, d10v_dmap_register (a));
- }
- printf_filtered ("\n");
- }
- printf_filtered ("A0-A%d", NR_A_REGS - 1);
- for (a = A0_REGNUM; a < A0_REGNUM + NR_A_REGS; a++)
- {
- char num[MAX_REGISTER_RAW_SIZE];
- int i;
- printf_filtered (" ");
- deprecated_read_register_gen (a, (char *) &num);
- for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++)
- {
- printf_filtered ("%02x", (num[i] & 0xff));
- }
- }
- printf_filtered ("\n");
+ d10v_print_registers_info (current_gdbarch, gdb_stdout,
+ get_current_frame (), -1, 1);
}
static CORE_ADDR
@@ -1152,8 +1070,8 @@ d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
extract and copy its value into `valbuf'. */
static void
-d10v_extract_return_value (struct type *type, char regbuf[REGISTER_BYTES],
- char *valbuf)
+d10v_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
int len;
#if 0
@@ -1162,25 +1080,34 @@ d10v_extract_return_value (struct type *type, char regbuf[REGISTER_BYTES],
(int) extract_unsigned_integer (regbuf + REGISTER_BYTE(RET1_REGNUM),
REGISTER_RAW_SIZE (RET1_REGNUM)));
#endif
- len = TYPE_LENGTH (type);
- if (len == 1)
+ if (TYPE_LENGTH (type) == 1)
{
- unsigned short c;
-
- c = extract_unsigned_integer (regbuf + REGISTER_BYTE (RET1_REGNUM),
- REGISTER_RAW_SIZE (RET1_REGNUM));
+ ULONGEST c;
+ regcache_cooked_read_unsigned (regcache, RET1_REGNUM, &c);
store_unsigned_integer (valbuf, 1, c);
}
- else if ((len & 1) == 0)
- memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM), len);
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. */
- memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM) + 1, len);
+ 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);
+ }
}
}
@@ -1495,6 +1422,171 @@ display_trace (int low, int high)
}
+static CORE_ADDR
+d10v_frame_pc_unwind (struct frame_info *frame,
+ void **cache)
+{
+ struct d10v_unwind_cache *info = d10v_frame_unwind_cache (frame, cache);
+ return info->return_pc;
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
+
+static void
+d10v_frame_id_unwind (struct frame_info *frame,
+ void **cache,
+ struct frame_id *id)
+{
+ struct d10v_unwind_cache *info = d10v_frame_unwind_cache (frame, cache);
+ CORE_ADDR addr;
+
+ /* Start with a NULL frame ID. */
+ (*id) = null_frame_id;
+
+ if (info->return_pc == IMEM_START
+ || info->return_pc <= IMEM_START
+ || inside_entry_file (info->return_pc))
+ {
+ /* This is meant to halt the backtrace at "_start".
+ Make sure we don't halt it at a generic dummy frame. */
+ return;
+ }
+
+ if (!info->saved_regs[FP_REGNUM])
+ {
+ if (!info->saved_regs[SP_REGNUM]
+ || info->saved_regs[SP_REGNUM] == STACK_START)
+ return;
+
+ id->base = info->saved_regs[SP_REGNUM];
+ id->pc = info->return_pc;
+ }
+
+ addr = read_memory_unsigned_integer (info->saved_regs[FP_REGNUM],
+ REGISTER_RAW_SIZE (FP_REGNUM));
+ if (addr == 0)
+ return;
+
+ id->base = d10v_make_daddr (addr);
+ id->pc = info->return_pc;
+}
+
+static void
+saved_regs_unwinder (struct frame_info *frame,
+ CORE_ADDR *saved_regs,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ /* If we're using generic dummy frames, we'd better not be in a call
+ dummy. (generic_call_dummy_register_unwind ought to have been called
+ instead.) */
+ gdb_assert (!(DEPRECATED_USE_GENERIC_DUMMY_FRAMES
+ && (get_frame_type (frame) == DUMMY_FRAME)));
+
+ if (saved_regs[regnum] != 0)
+ {
+ if (regnum == SP_REGNUM)
+ {
+ /* SP register treated specially. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_address (bufferp, REGISTER_RAW_SIZE (regnum),
+ saved_regs[regnum]);
+ }
+ else
+ {
+ /* Any other register is saved in memory, fetch it but cache
+ a local copy of its value. */
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ {
+ /* Read the value in from memory. */
+ read_memory (saved_regs[regnum], bufferp,
+ REGISTER_RAW_SIZE (regnum));
+ }
+ }
+ return;
+ }
+
+ /* No luck, assume this and the next frame have the same register
+ value. If a value is needed, pass the request on down the chain;
+ otherwise just return an indication that the value is in the same
+ register as the next frame. */
+ frame_register (frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+
+static void
+d10v_frame_register_unwind (struct frame_info *frame,
+ void **cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ struct d10v_unwind_cache *info = d10v_frame_unwind_cache (frame, cache);
+ saved_regs_unwinder (frame, info->saved_regs, regnum, optimizedp,
+ lvalp, addrp, realnump, bufferp);
+}
+
+
+static void
+d10v_frame_pop (struct frame_info *fi, void **unwind_cache,
+ struct regcache *regcache)
+{
+ struct d10v_unwind_cache *info = d10v_frame_unwind_cache (fi, unwind_cache);
+ CORE_ADDR fp;
+ int regnum;
+ char raw_buffer[8];
+
+ fp = get_frame_base (fi);
+
+ /* now update the current registers with the old values */
+ for (regnum = A0_REGNUM; regnum < A0_REGNUM + NR_A_REGS; regnum++)
+ {
+ frame_unwind_register (fi, regnum, raw_buffer);
+ regcache_cooked_write (regcache, regnum, raw_buffer);
+ }
+ for (regnum = 0; regnum < SP_REGNUM; regnum++)
+ {
+ frame_unwind_register (fi, regnum, raw_buffer);
+ regcache_cooked_write (regcache, regnum, raw_buffer);
+ }
+ frame_unwind_register (fi, PSW_REGNUM, raw_buffer);
+ regcache_cooked_write (regcache, PSW_REGNUM, raw_buffer);
+
+ frame_unwind_register (fi, LR_REGNUM, raw_buffer);
+ regcache_cooked_write (regcache, PC_REGNUM, raw_buffer);
+
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (SP_REGNUM),
+ fp + info->size);
+ regcache_cooked_write (regcache, SP_REGNUM, raw_buffer);
+
+ target_store_registers (-1);
+ flush_cached_frames ();
+}
+
+static struct frame_unwind d10v_frame_unwind = {
+ d10v_frame_pop,
+ d10v_frame_pc_unwind,
+ d10v_frame_id_unwind,
+ d10v_frame_register_unwind
+};
+
+const struct frame_unwind *
+d10v_frame_p (CORE_ADDR pc)
+{
+ return &d10v_frame_unwind;
+}
+
static gdbarch_init_ftype d10v_gdbarch_init;
static struct gdbarch *
@@ -1518,10 +1610,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
- /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
- ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
-
switch (info.bfd_arch_info->mach)
{
case bfd_mach_d10v_ts2:
@@ -1607,21 +1695,16 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_deprecated_extract_return_value (gdbarch, d10v_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, d10v_push_return_address);
set_gdbarch_store_struct_return (gdbarch, d10v_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, d10v_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
+ 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_frame_init_saved_regs (gdbarch, d10v_frame_init_saved_regs);
- set_gdbarch_init_extra_frame_info (gdbarch, d10v_init_extra_frame_info);
-
- set_gdbarch_pop_frame (gdbarch, d10v_pop_frame);
-
set_gdbarch_skip_prologue (gdbarch, d10v_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_decr_pc_after_break (gdbarch, 4);
@@ -1632,9 +1715,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
- set_gdbarch_frame_chain (gdbarch, d10v_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, d10v_frame_chain_valid);
- set_gdbarch_frame_saved_pc (gdbarch, d10v_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, d10v_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
@@ -1643,6 +1723,10 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_sim_regno (gdbarch, d10v_register_sim_regno);
set_gdbarch_extra_stack_alignment_needed (gdbarch, 0);
+ set_gdbarch_print_registers_info (gdbarch, d10v_print_registers_info);
+
+ frame_unwind_append_predicate (gdbarch, d10v_frame_p);
+
return gdbarch;
}
@@ -1660,7 +1744,8 @@ _initialize_d10v_tdep (void)
target_resume_hook = d10v_eva_prepare_to_trace;
target_wait_loop_hook = d10v_eva_get_trace_data;
- 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,
"Enable tracing of instruction execution.");
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 39a53ca1b4c..996b5a5d619 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1,6 +1,6 @@
/* Read dbx symbol tables and convert to internal format, for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003.
Free Software Foundation, Inc.
This file is part of GDB.
@@ -257,7 +257,9 @@ static int bincls_allocated;
extern void _initialize_dbxread (void);
-static void process_now (struct objfile *);
+#if 0 /* OBSOLETE CFront */
+// OBSOLETE static void process_now (struct objfile *);
+#endif /* OBSOLETE CFront */
static void read_ofile_symtab (struct partial_symtab *);
@@ -636,7 +638,7 @@ dbx_symfile_init (struct objfile *objfile)
/* Allocate struct to keep track of the symfile */
objfile->sym_stab_info = (struct dbx_symfile_info *)
xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
- memset ((PTR) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
+ memset (objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
DBX_TEXT_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data");
@@ -688,8 +690,8 @@ dbx_symfile_init (struct objfile *objfile)
if (val < 0)
perror_with_name (name);
- memset ((PTR) size_temp, 0, sizeof (size_temp));
- val = bfd_bread ((PTR) size_temp, sizeof (size_temp), sym_bfd);
+ memset (size_temp, 0, sizeof (size_temp));
+ val = bfd_bread (size_temp, sizeof (size_temp), sym_bfd);
if (val < 0)
{
perror_with_name (name);
@@ -770,105 +772,106 @@ static struct external_nlist symbuf[4096];
static int symbuf_idx;
static int symbuf_end;
-/* cont_elem is used for continuing information in cfront.
- It saves information about which types need to be fixed up and
- completed after all the stabs are read. */
-struct cont_elem
- {
- /* sym and stabstring for continuing information in cfront */
- struct symbol *sym;
- char *stabs;
- /* state dependencies (statics that must be preserved) */
- int sym_idx;
- int sym_end;
- int symnum;
- int (*func) (struct objfile *, struct symbol *, char *);
- /* other state dependencies include:
- (assumption is that these will not change since process_now FIXME!!)
- stringtab_global
- n_stabs
- objfile
- symfile_bfd */
- };
-
-static struct cont_elem *cont_list = 0;
-static int cont_limit = 0;
-static int cont_count = 0;
-
-/* Arrange for function F to be called with arguments SYM and P later
- in the stabs reading process. */
-void
-process_later (struct symbol *sym, char *p,
- int (*f) (struct objfile *, struct symbol *, char *))
-{
-
- /* Allocate more space for the deferred list. */
- if (cont_count >= cont_limit - 1)
- {
- cont_limit += 32; /* chunk size */
-
- cont_list
- = (struct cont_elem *) xrealloc (cont_list,
- (cont_limit
- * sizeof (struct cont_elem)));
- if (!cont_list)
- error ("Virtual memory exhausted\n");
- }
-
- /* Save state variables so we can process these stabs later. */
- cont_list[cont_count].sym_idx = symbuf_idx;
- cont_list[cont_count].sym_end = symbuf_end;
- cont_list[cont_count].symnum = symnum;
- cont_list[cont_count].sym = sym;
- cont_list[cont_count].stabs = p;
- cont_list[cont_count].func = f;
- cont_count++;
-}
-
-/* Call deferred funtions in CONT_LIST. */
-
-static void
-process_now (struct objfile *objfile)
-{
- int i;
- int save_symbuf_idx;
- int save_symbuf_end;
- int save_symnum;
- struct symbol *sym;
- char *stabs;
- int err;
- int (*func) (struct objfile *, struct symbol *, char *);
-
- /* Save the state of our caller, we'll want to restore it before
- returning. */
- save_symbuf_idx = symbuf_idx;
- save_symbuf_end = symbuf_end;
- save_symnum = symnum;
-
- /* Iterate over all the deferred stabs. */
- for (i = 0; i < cont_count; i++)
- {
- /* Restore the state for this deferred stab. */
- symbuf_idx = cont_list[i].sym_idx;
- symbuf_end = cont_list[i].sym_end;
- symnum = cont_list[i].symnum;
- sym = cont_list[i].sym;
- stabs = cont_list[i].stabs;
- func = cont_list[i].func;
-
- /* Call the function to handle this deferrd stab. */
- err = (*func) (objfile, sym, stabs);
- if (err)
- error ("Internal error: unable to resolve stab.\n");
- }
-
- /* Restore our caller's state. */
- symbuf_idx = save_symbuf_idx;
- symbuf_end = save_symbuf_end;
- symnum = save_symnum;
- cont_count = 0;
-}
-
+#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. */
@@ -890,6 +893,10 @@ static struct stab_section_list *symbuf_sections;
static unsigned int symbuf_left;
static unsigned int symbuf_read;
+/* This variable stores a global stabs buffer, if we read stabs into
+ memory in one chunk in order to process relocations. */
+static bfd_byte *stabs_data;
+
/* Refill the symbol table input buffer
and set the variables that control fetching entries from it.
Reports an error if no data available.
@@ -902,8 +909,18 @@ fill_symbuf (bfd *sym_bfd)
unsigned int count;
int nbytes;
- if (symbuf_sections == NULL)
- count = sizeof (symbuf);
+ if (stabs_data)
+ {
+ nbytes = sizeof (symbuf);
+ if (nbytes > symbuf_left)
+ nbytes = symbuf_left;
+ memcpy (symbuf, stabs_data + symbuf_read, nbytes);
+ }
+ else if (symbuf_sections == NULL)
+ {
+ count = sizeof (symbuf);
+ nbytes = bfd_bread (symbuf, count, sym_bfd);
+ }
else
{
if (symbuf_left <= 0)
@@ -919,9 +936,9 @@ fill_symbuf (bfd *sym_bfd)
count = symbuf_left;
if (count > sizeof (symbuf))
count = sizeof (symbuf);
+ nbytes = bfd_bread (symbuf, count, sym_bfd);
}
- nbytes = bfd_bread ((PTR) symbuf, count, sym_bfd);
if (nbytes < 0)
perror_with_name (bfd_get_filename (sym_bfd));
else if (nbytes == 0)
@@ -932,6 +949,18 @@ fill_symbuf (bfd *sym_bfd)
symbuf_read += nbytes;
}
+static void
+stabs_seek (int sym_offset)
+{
+ if (stabs_data)
+ {
+ symbuf_read += sym_offset;
+ symbuf_left -= sym_offset;
+ }
+ else
+ bfd_seek (symfile_bfd, sym_offset, SEEK_CUR);
+}
+
#define INTERNALIZE_SYMBOL(intern, extern, abfd) \
{ \
(intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \
@@ -1022,7 +1051,7 @@ find_corresponding_bincl_psymtab (char *name, int instance)
static void
free_bincl_list (struct objfile *objfile)
{
- xmfree (objfile->md, (PTR) bincl_list);
+ xmfree (objfile->md, bincl_list);
bincls_allocated = 0;
}
@@ -1673,7 +1702,7 @@ read_dbx_symtab (struct objfile *objfile)
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
@@ -1775,20 +1804,22 @@ read_dbx_symtab (struct objfile *objfile)
psymtab_language, objfile);
p += 1;
}
- /* The semantics of C++ state that "struct foo { ... }"
- also defines a typedef for "foo". Unfortuantely, cfront
- never makes the typedef when translating from C++ to C.
- We make the typedef here so that "ptype foo" works as
- expected for cfront translated code. */
- else if (psymtab_language == language_cplus)
- {
- /* Also a typedef with the same name. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
- }
+#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_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE &objfile->static_psymbols,
+// OBSOLETE nlist.n_value, 0,
+// OBSOLETE psymtab_language, objfile);
+// OBSOLETE }
+#endif /* OBSOLETE CFront */
}
goto check_enum;
case 't':
@@ -2023,9 +2054,11 @@ read_dbx_symtab (struct objfile *objfile)
case '9':
case '-':
case '#': /* for symbol identification (used in live ranges) */
- /* added to support cfront stabs strings */
- case 'Z': /* for definition continuations */
- case 'P': /* for prototypes */
+#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 ':':
@@ -2093,7 +2126,7 @@ read_dbx_symtab (struct objfile *objfile)
(struct partial_symtab **)
alloca ((dependencies_allocated *= 2)
* sizeof (struct partial_symtab *));
- memcpy ((PTR) dependency_list, (PTR) orig,
+ memcpy (dependency_list, orig,
(dependencies_used
* sizeof (struct partial_symtab *)));
#ifdef DEBUG_INFO
@@ -2465,6 +2498,7 @@ static void
dbx_psymtab_to_symtab (struct partial_symtab *pst)
{
bfd *sym_bfd;
+ struct cleanup *back_to = NULL;
if (!pst)
return;
@@ -2490,8 +2524,21 @@ dbx_psymtab_to_symtab (struct partial_symtab *pst)
next_symbol_text_func = dbx_next_symbol_text;
+ if (DBX_STAB_SECTION (pst->objfile))
+ {
+ stabs_data
+ = symfile_relocate_debug_section (pst->objfile->obfd,
+ DBX_STAB_SECTION (pst->objfile),
+ NULL);
+ if (stabs_data)
+ back_to = make_cleanup (free_current_contents, (void *) &stabs_data);
+ }
+
dbx_psymtab_to_symtab_1 (pst);
+ if (back_to)
+ do_cleanups (back_to);
+
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (pst->objfile);
@@ -2540,6 +2587,8 @@ read_ofile_symtab (struct partial_symtab *pst)
abfd = objfile->obfd;
symfile_bfd = objfile->obfd; /* Implicit param to next_text_symbol */
symbuf_end = symbuf_idx = 0;
+ symbuf_read = 0;
+ symbuf_left = sym_offset + sym_size;
/* It is necessary to actually read one symbol *before* the start
of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
@@ -2549,7 +2598,7 @@ read_ofile_symtab (struct partial_symtab *pst)
would slow down initial readin, so we look for it here instead. */
if (!processing_acc_compilation && sym_offset >= (int) symbol_size)
{
- bfd_seek (symfile_bfd, sym_offset - symbol_size, SEEK_CUR);
+ stabs_seek (sym_offset - symbol_size);
fill_symbuf (abfd);
bufp = &symbuf[symbuf_idx++];
INTERNALIZE_SYMBOL (nlist, bufp, abfd);
@@ -2592,7 +2641,7 @@ read_ofile_symtab (struct partial_symtab *pst)
/* The N_SO starting this symtab is the first symbol, so we
better not check the symbol before it. I'm not this can
happen, but it doesn't hurt to check for it. */
- bfd_seek (symfile_bfd, sym_offset, SEEK_CUR);
+ stabs_seek (sym_offset);
processing_gcc_compilation = 0;
}
@@ -2681,10 +2730,11 @@ read_ofile_symtab (struct partial_symtab *pst)
pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
- /* Process items which we had to "process_later" due to dependencies
- on other stabs. */
- process_now (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 ();
}
@@ -3451,8 +3501,7 @@ coffstab_build_psymtabs (struct objfile *objfile, int mainline,
the base address of the text segment).
MAINLINE is true if we are reading the main symbol
table (as opposed to a shared lib or dynamically loaded file).
- STABOFFSET and STABSIZE define the location in OBJFILE where the .stab
- section exists.
+ STABSECT is the BFD section information for the .stab section.
STABSTROFFSET and STABSTRSIZE define the location in OBJFILE where the
.stabstr section exists.
@@ -3461,13 +3510,14 @@ coffstab_build_psymtabs (struct objfile *objfile, int mainline,
void
elfstab_build_psymtabs (struct objfile *objfile, int mainline,
- file_ptr staboffset, unsigned int stabsize,
+ asection *stabsect,
file_ptr stabstroffset, unsigned int stabstrsize)
{
int val;
bfd *sym_bfd = objfile->obfd;
char *name = bfd_get_filename (sym_bfd);
struct dbx_symfile_info *info;
+ struct cleanup *back_to = NULL;
/* There is already a dbx_symfile_info allocated by our caller.
It might even contain some info from the ELF symtab to help us. */
@@ -3479,9 +3529,11 @@ elfstab_build_psymtabs (struct objfile *objfile, int mainline,
#define ELF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
DBX_SYMBOL_SIZE (objfile) = ELF_STABS_SYMBOL_SIZE;
- DBX_SYMCOUNT (objfile) = stabsize / DBX_SYMBOL_SIZE (objfile);
+ DBX_SYMCOUNT (objfile)
+ = bfd_section_size (objfile->obfd, stabsect) / DBX_SYMBOL_SIZE (objfile);
DBX_STRINGTAB_SIZE (objfile) = stabstrsize;
- DBX_SYMTAB_OFFSET (objfile) = staboffset;
+ DBX_SYMTAB_OFFSET (objfile) = stabsect->filepos;
+ DBX_STAB_SECTION (objfile) = stabsect;
if (stabstrsize > bfd_get_size (sym_bfd))
error ("ridiculous string table size: %d bytes", stabstrsize);
@@ -3506,10 +3558,19 @@ elfstab_build_psymtabs (struct objfile *objfile, int mainline,
processing_acc_compilation = 1;
+ symbuf_read = 0;
+ symbuf_left = bfd_section_size (objfile->obfd, stabsect);
+ stabs_data = symfile_relocate_debug_section (objfile->obfd, stabsect, NULL);
+ if (stabs_data)
+ back_to = make_cleanup (free_current_contents, (void *) &stabs_data);
+
/* In an elf file, we've already installed the minimal symbols that came
from the elf (non-stab) symbol table, so always act like an
incremental load here. */
dbx_symfile_read (objfile, 0);
+
+ if (back_to)
+ do_cleanups (back_to);
}
/* Scan and build partial symbols for a file with special sections for stabs
diff --git a/gdb/defs.h b/gdb/defs.h
index 413c415b444..09f04202ae3 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1,7 +1,7 @@
/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -169,6 +169,9 @@ extern int xdb_commands;
/* enable dbx commands if set */
extern int dbx_commands;
+/* System root path, used to find libraries etc. */
+extern char *gdb_sysroot;
+
extern int quit_flag;
extern int immediate_quit;
extern int sevenbit_strings;
@@ -207,7 +210,6 @@ enum language
language_cplus, /* C++ */
language_objc, /* Objective-C */
language_java, /* Java */
- /* OBSOLETE language_chill, */ /* Chill */
language_fortran, /* Fortran */
language_m2, /* Modula-2 */
language_asm, /* Assembly language */
@@ -243,8 +245,8 @@ enum auto_boolean
struct cleanup
{
struct cleanup *next;
- void (*function) (PTR);
- PTR arg;
+ void (*function) (void *);
+ void *arg;
};
@@ -298,10 +300,6 @@ extern int inside_entry_file (CORE_ADDR addr);
extern int inside_main_func (CORE_ADDR pc);
-/* OBSOLETE From ch-lang.c, for the moment. (FIXME) */
-
-/* OBSOLETE extern char *chill_demangle (const char *); */
-
/* From utils.c */
extern void initialize_utils (void);
@@ -310,6 +308,8 @@ extern void notice_quit (void);
extern int strcmp_iw (const char *, const char *);
+extern int streq (const char *, const char *);
+
extern int subset_compare (char *, char *);
extern char *safe_strerror (int);
@@ -376,12 +376,12 @@ extern int query (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void init_page_info (void);
-extern CORE_ADDR host_pointer_to_address (void *ptr);
-extern void *address_to_host_pointer (CORE_ADDR addr);
-
extern char *gdb_realpath (const char *);
extern char *xfullpath (const char *);
+extern unsigned long gnu_debuglink_crc32 (unsigned long crc,
+ unsigned char *buf, size_t len);
+
/* From demangle.c */
extern void set_demangling_style (char *);
@@ -969,7 +969,7 @@ extern int catch_exceptions (struct ui_out *uiout,
This function is superseeded by catch_exceptions(). */
-typedef int (catch_errors_ftype) (PTR);
+typedef int (catch_errors_ftype) (void *);
extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
/* Template to catch_errors() that wraps calls to command
@@ -982,6 +982,39 @@ extern void warning (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void vwarning (const char *, va_list args);
+/* List of known OS ABIs. If you change this, make sure to update the
+ table in osabi.c. */
+enum gdb_osabi
+{
+ GDB_OSABI_UNINITIALIZED = -1, /* For struct gdbarch_info. */
+
+ GDB_OSABI_UNKNOWN = 0, /* keep this zero */
+
+ GDB_OSABI_SVR4,
+ GDB_OSABI_HURD,
+ GDB_OSABI_SOLARIS,
+ GDB_OSABI_OSF1,
+ GDB_OSABI_LINUX,
+ GDB_OSABI_FREEBSD_AOUT,
+ GDB_OSABI_FREEBSD_ELF,
+ GDB_OSABI_NETBSD_AOUT,
+ GDB_OSABI_NETBSD_ELF,
+ GDB_OSABI_WINCE,
+ GDB_OSABI_GO32,
+ GDB_OSABI_NETWARE,
+ GDB_OSABI_IRIX,
+ GDB_OSABI_LYNXOS,
+ GDB_OSABI_INTERIX,
+ GDB_OSABI_HPUX_ELF,
+ GDB_OSABI_HPUX_SOM,
+
+ GDB_OSABI_ARM_EABI_V1,
+ GDB_OSABI_ARM_EABI_V2,
+ GDB_OSABI_ARM_APCS,
+
+ GDB_OSABI_INVALID /* keep this last */
+};
+
/* Global functions from other, non-gdb GNU thingies.
Libiberty thingies are no longer declared here. We include libiberty.h
above, instead. */
@@ -1083,11 +1116,11 @@ extern LONGEST extract_signed_integer (const void *, int);
extern ULONGEST extract_unsigned_integer (const void *, int);
-extern int extract_long_unsigned_integer (void *, int, LONGEST *);
+extern int extract_long_unsigned_integer (const void *, int, LONGEST *);
-extern CORE_ADDR extract_address (void *, int);
+extern CORE_ADDR extract_address (const void *, int);
-extern CORE_ADDR extract_typed_address (void *buf, struct type *type);
+extern CORE_ADDR extract_typed_address (const void *buf, struct type *type);
extern void store_signed_integer (void *, int, LONGEST);
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 2b9579bc59c..bcf9b77de51 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -1,6 +1,8 @@
/* Basic C++ demangling support for GDB.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+ 2001, 2003 Free Software Foundation, Inc.
+
Written by Fred Fish at Cygnus Support.
This file is part of GDB.
@@ -87,8 +89,8 @@ set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
dem->demangling_style != unknown_demangling;
dem++)
{
- if (STREQ (current_demangling_style_string,
- dem->demangling_style_name))
+ if (strcmp (current_demangling_style_string,
+ dem->demangling_style_name) == 0)
{
current_demangling_style = dem->demangling_style;
break;
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 8ce9a155166..75d1783d13f 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -1,5 +1,6 @@
/* Disassemble support for GDB.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -66,7 +67,7 @@ gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr,
}
static int
-compare_lines (const PTR mle1p, const PTR mle2p)
+compare_lines (const void *mle1p, const void *mle2p)
{
struct dis_line_entry *mle1, *mle2;
int val;
@@ -96,6 +97,7 @@ dump_insns (struct ui_out *uiout, disassemble_info * di,
char *name = NULL;
int offset;
int line;
+ struct cleanup *ui_out_chain;
for (pc = low; pc < high;)
{
@@ -107,7 +109,7 @@ dump_insns (struct ui_out *uiout, disassemble_info * di,
else
num_displayed++;
}
- ui_out_tuple_begin (uiout, NULL);
+ ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_core_addr (uiout, "address", pc);
if (!build_address_symbolic (pc, 0, &name, &offset, &filename,
@@ -130,7 +132,7 @@ dump_insns (struct ui_out *uiout, disassemble_info * di,
pc += TARGET_PRINT_INSN (pc, di);
ui_out_field_stream (uiout, "inst", stb);
ui_file_rewind (stb->stream);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_chain);
ui_out_text (uiout, "\n");
}
return num_displayed;
@@ -156,6 +158,7 @@ do_mixed_source_and_assembly (struct ui_out *uiout,
int next_line = 0;
CORE_ADDR pc;
int num_displayed = 0;
+ struct cleanup *ui_out_chain;
mle = (struct dis_line_entry *) alloca (nlines
* sizeof (struct dis_line_entry));
@@ -209,11 +212,14 @@ do_mixed_source_and_assembly (struct ui_out *uiout,
they have been emitted before), followed by the assembly code
for that line. */
- ui_out_list_begin (uiout, "asm_insns");
+ ui_out_chain = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns");
for (i = 0; i < newlines; i++)
{
+ struct cleanup *ui_out_tuple_chain = NULL;
+ struct cleanup *ui_out_list_chain = NULL;
int close_list = 1;
+
/* Print out everything from next_line to the current line. */
if (mle[i].line >= next_line)
{
@@ -222,7 +228,9 @@ do_mixed_source_and_assembly (struct ui_out *uiout,
/* Just one line to print. */
if (next_line == mle[i].line)
{
- ui_out_tuple_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout,
+ "src_and_asm_line");
print_source_lines (symtab, next_line, mle[i].line + 1, 0);
}
else
@@ -230,27 +238,38 @@ do_mixed_source_and_assembly (struct ui_out *uiout,
/* Several source lines w/o asm instructions associated. */
for (; next_line < mle[i].line; next_line++)
{
- ui_out_tuple_begin (uiout, "src_and_asm_line");
+ struct cleanup *ui_out_list_chain_line;
+ struct cleanup *ui_out_tuple_chain_line;
+
+ ui_out_tuple_chain_line
+ = make_cleanup_ui_out_tuple_begin_end (uiout,
+ "src_and_asm_line");
print_source_lines (symtab, next_line, next_line + 1,
0);
- ui_out_list_begin (uiout, "line_asm_insn");
- ui_out_list_end (uiout);
- ui_out_tuple_end (uiout);
+ ui_out_list_chain_line
+ = make_cleanup_ui_out_list_begin_end (uiout,
+ "line_asm_insn");
+ do_cleanups (ui_out_list_chain_line);
+ do_cleanups (ui_out_tuple_chain_line);
}
/* Print the last line and leave list open for
asm instructions to be added. */
- ui_out_tuple_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout,
+ "src_and_asm_line");
print_source_lines (symtab, next_line, mle[i].line + 1, 0);
}
}
else
{
- ui_out_tuple_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "src_and_asm_line");
print_source_lines (symtab, mle[i].line, mle[i].line + 1, 0);
}
next_line = mle[i].line + 1;
- ui_out_list_begin (uiout, "line_asm_insn");
+ ui_out_list_chain
+ = make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn");
/* Don't close the list if the lines are not in order. */
if (i < (newlines - 1) && mle[i + 1].line <= mle[i].line)
close_list = 0;
@@ -260,8 +279,8 @@ do_mixed_source_and_assembly (struct ui_out *uiout,
how_many, stb);
if (close_list)
{
- ui_out_list_end (uiout);
- ui_out_tuple_end (uiout);
+ do_cleanups (ui_out_list_chain);
+ do_cleanups (ui_out_tuple_chain);
ui_out_text (uiout, "\n");
close_list = 0;
}
@@ -269,7 +288,7 @@ do_mixed_source_and_assembly (struct ui_out *uiout,
if (num_displayed >= how_many)
break;
}
- ui_out_list_end (uiout);
+ do_cleanups (ui_out_chain);
}
@@ -279,12 +298,13 @@ do_assembly_only (struct ui_out *uiout, disassemble_info * di,
int how_many, struct ui_stream *stb)
{
int num_displayed = 0;
+ struct cleanup *ui_out_chain;
- ui_out_list_begin (uiout, "asm_insns");
+ ui_out_chain = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns");
num_displayed = dump_insns (uiout, di, low, high, how_many, stb);
- ui_out_list_end (uiout);
+ do_cleanups (ui_out_chain);
}
void
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 9e3e6b448b3..abd5de9a7b2 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,131 @@
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ descrption of IS_TRAPPED_INTERNALVAR.
+
+ From Keith Seitz <keiths@redhat.com>:
+ * gdb.texinfo (Interpreters): New chapter. Refer the command-line
+ option "-i"/"--interpreter" to this chapter. Include index
+ entries.
+
+2003-02-04 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.texinfo (C@t{++}): Recommend DWARF 2, then stabs+.
+ (Variables): Recommend stabs+ and DWARF 2.
+ (C plus plus expressions): Correct info about
+ compiler versions, debug formats.
+ (Contributors): Change 'DWARF2' to 'DWARF 2'.
+ PR symtab/874.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of ADDITIONAL_OPTIONS, ADDITIONAL_OPTION_CASES,
+ ADDITIONAL_OPTION_HANDLER, and ADDITIONAL_OPTION_HELP, and
+ BEFORE_MAIN_LOOP_HOOK, and DBX_PARM_SYMBOL_CLASS along with
+ references to nindy and i960.
+ * gdb.texinfo (i960): Delete all references to i960 and nindy.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ FLOAT_INFO.
+
+2003-01-30 Andrew Cagney <ac131313@redhat.com>
+
+ * stabs.texinfo (Member Type Descriptor): Clarify description of
+ `@'. Suggested by Ben Hutchings.
+
+2003-01-29 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.texinfo (M68K): Delete reference to es1800.
+
+2003-01-29 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.texinfo (Maintenance Commands): Document `maint print
+ reggroups' and `maint print register-groups'.
+ * gdbint.texinfo (Target Architecture Definition): Document
+ register_reggroup_p.
+
+2003-01-23 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (Separate Debug Files): New section.
+
+2003-01-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Maintenance Commands): Add "maint set profile"
+ and "maint show profile".
+
+2003-01-16 Michael Chastain <mec@shout.net>
+
+ * gdb.texinfo (Installing GDB): Warn against
+ ".../gdb-VERSION/gdb/configure".
+ (Separate Objdir): Likewise.
+
+2003-01-15 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ definition of PRINT_REGISTER_HOOK.
+
+2003-01-15 Elena Zannoni <ezannoni@redhat.com>
+
+ (OpenRISC 1000): Fix formatting of command names.
+
+2003-01-15 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.texinfo (Continuing and Stepping): Add new command
+ 'advance'. Clarify behavior of 'until'.
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Files): Document solib-absolute-prefix and
+ solib-search-path.
+
+2003-01-09 Michael Chastain <mec@shout.net>
+
+ * gdbint.texinfo (Configuring @value{GDBN} for Release): Delete.
+ (Create a Release): Add new instructions for new @file{src-release}.
+ Document existing instructions for @file{Makefile.in} as
+ being for @value{GDBN} 5.3.1 or earlier.
+
+2003-01-09 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Mention
+ frame_saved_regs_zalloc and frame_extra_info_zalloc as the way to
+ allocate memory.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Controlling GDB): Add @kindex for
+ "show osabi".
+ (Backtraces): Add @kindex's for backtrace-below-main.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Controlling GDB): Document "set osabi".
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Backtraces): Document "set backtrace-below-main".
+ * gdbint.texinfo (FRAME_CHAIN_VALID): Update documentation.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Controlling GDB): Add ABI section. Document
+ "set coerce-float-to-double".
+ * gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Remove documentation.
+
+2003-01-02 Andrew Cagney <ac131313@redhat.com>
+
+ * stabs.texinfo: Remove obsolete text.
+ * gdbint.texinfo: Ditto.
+ * gdb.texinfo: Ditto.
+
+2002-12-22 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Update
+ description of gdbarch_register_osabi.
+
2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
* agentexpr.texi: Fix typos.
diff --git a/gdb/doc/fdl.texi b/gdb/doc/fdl.texi
index 142a8e1b717..f4726b9b149 100644
--- a/gdb/doc/fdl.texi
+++ b/gdb/doc/fdl.texi
@@ -197,9 +197,9 @@ J. Preserve the network location, if any, given in the Document for
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.@*
-K. In any section entitled ``Acknowledgments'' or ``Dedications'',
+K. In any section entitled ``Acknowledgements'' or ``Dedications'',
preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgments
+ substance and tone of each of the contributor acknowledgements
and/or dedications given therein.@*
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
@@ -257,7 +257,7 @@ Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections entitled ``History''
in the various original documents, forming one section entitled
-``History''; likewise combine any sections entitled ``Acknowledgments'',
+``History''; likewise combine any sections entitled ``Acknowledgements'',
and any sections entitled ``Dedications.'' You must delete all sections
entitled ``Endorsements.''
@sp 1
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 56db6ca04fe..c2601023ba0 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 1999, 2000, 2001, 2002
+@c 1999, 2000, 2001, 2002, 2003
@c Free Software Foundation, Inc.
@c
@c %**start of header
@@ -54,7 +54,7 @@ of @cite{Debugging with @value{GDBN}: the @sc{gnu} Source-Level Debugger}
for @value{GDBN} Version @value{GDBVN}.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -87,7 +87,7 @@ development.''
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation @*
59 Temple Place - Suite 330, @*
@@ -118,7 +118,7 @@ This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
@value{GDBVN}.
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
+Copyright (C) 1988-2003 Free Software Foundation, Inc.
@menu
* Summary:: Summary of @value{GDBN}
@@ -146,6 +146,7 @@ Copyright (C) 1988-2002 Free Software Foundation, Inc.
* Controlling GDB:: Controlling @value{GDBN}
* Sequences:: Canned sequences of commands
* TUI:: @value{GDBN} Text User Interface
+* Interpreters:: Command Interpreters
* Emacs:: Using @value{GDBN} under @sc{gnu} Emacs
* Annotations:: @value{GDBN}'s annotation interface.
* GDB/MI:: @value{GDBN}'s Machine Interface.
@@ -197,12 +198,9 @@ You can use @value{GDBN} to debug programs written in C and C++.
For more information, see @ref{Support,,Supported languages}.
For more information, see @ref{C,,C and C++}.
-@c OBSOLETE @cindex Chill
@cindex Modula-2
-Support for Modula-2
-@c OBSOLETE and Chill
-is partial. For information on Modula-2, see @ref{Modula-2,,Modula-2}.
-@c OBSOLETE For information on Chill, see @ref{Chill}.
+Support for Modula-2 is partial. For information on Modula-2, see
+@ref{Modula-2,,Modula-2}.
@cindex Pascal
Debugging Pascal programs which use sets, subranges, file variables, or
@@ -374,7 +372,7 @@ Henkel-Wallace, Rich Pixley, Steve Chamberlain, and John Gilmore.
David Johnson wrote the original COFF support; Pace Willison did
the original support for encapsulated COFF.
-Brent Benson of Harris Computer Systems contributed DWARF2 support.
+Brent Benson of Harris Computer Systems contributed DWARF 2 support.
Adam de Boor and Bradley Davis contributed the ISI Optimum V support.
Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS
@@ -1127,6 +1125,7 @@ Do not use this option if you run @value{GDBN} from Emacs
Use the interpreter @var{interp} for interface with the controlling
program or device. This option is meant to be set by programs which
communicate with @value{GDBN} using it as a back end.
+@xref{Interpreters, , Command Interpreters}.
@samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes
@value{GDBN} to use the current @dfn{@sc{gdb/mi} interface}
@@ -3465,8 +3464,35 @@ argument.
Continue running your program until either the specified location is
reached, or the current stack frame returns. @var{location} is any of
the forms of argument acceptable to @code{break} (@pxref{Set Breaks,
-,Setting breakpoints}). This form of the command uses breakpoints,
-and hence is quicker than @code{until} without an argument.
+,Setting breakpoints}). This form of the command uses breakpoints, and
+hence is quicker than @code{until} without an argument. The specified
+location is actually reached only if it is in the current frame. This
+implies that @code{until} can be used to skip over recursive function
+invocations. For instance in the code below, if the current location is
+line @code{96}, issuing @code{until 99} will execute the program up to
+line @code{99} in the same invocation of factorial, i.e. after the inner
+invocations have returned.
+
+@smallexample
+94 int factorial (int value)
+95 @{
+96 if (value > 1) @{
+97 value *= factorial (value - 1);
+98 @}
+99 return (value);
+100 @}
+@end smallexample
+
+
+@kindex advance @var{location}
+@itemx advance @var{location}
+Continue running the program up to the given location. An argument is
+required, anything of the same form as arguments for the @code{break}
+command. Execution will also stop upon exit from the current stack
+frame. This command is similar to @code{until}, but @code{advance} will
+not skip over recursive function calls, and the target location doesn't
+have to be in the same frame as the current one.
+
@kindex stepi
@kindex si @r{(@code{stepi})}
@@ -3860,6 +3886,29 @@ The display for frame zero does not begin with a program counter
value, indicating that your program has stopped at the beginning of the
code for line @code{993} of @code{builtin.c}.
+@kindex set backtrace-below-main
+@kindex show backtrace-below-main
+
+Most programs have a standard entry point---a place where system libraries
+and startup code transition into user code. For C this is @code{main}.
+When @value{GDBN} finds the entry function in a backtrace it will terminate
+the backtrace, to avoid tracing into highly system-specific (and generally
+uninteresting) code. If you need to examine the startup code, then you can
+change this behavior.
+
+@table @code
+@item set backtrace-below-main off
+Backtraces will stop when they encounter the user entry point. This is the
+default.
+
+@item set backtrace-below-main
+@itemx set backtrace-below-main on
+Backtraces will continue past the user entry point to the top of the stack.
+
+@item show backtrace-below-main
+Display the current backtrace policy.
+@end table
+
@node Selection
@section Selecting a frame
@@ -4664,13 +4713,12 @@ No symbol "foo" in current context.
To solve such problems, either recompile without optimizations, or use a
different debug info format, if the compiler supports several such
-formats. For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler usually
-supports the @samp{-gstabs} option. @samp{-gstabs} produces debug info
-in a format that is superior to formats such as COFF. You may be able
-to use DWARF2 (@samp{-gdwarf-2}), which is also an effective form for
-debug info. See @ref{Debugging Options,,Options for Debugging Your
-Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}, for more
-information.
+formats. For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler
+usually supports the @option{-gstabs+} option. @option{-gstabs+}
+produces debug info in a format that is superior to formats such as
+COFF. You may be able to use DWARF 2 (@option{-gdwarf-2}), which is also
+an effective form for debug info. @xref{Debugging Options,,Options
+for Debugging Your Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}.
@node Arrays
@@ -7454,11 +7502,6 @@ C@t{++} source file
@itemx .F
Fortran source file
-@c OBSOLETE @item .ch
-@c OBSOLETE @itemx .c186
-@c OBSOLETE @itemx .c286
-@c OBSOLETE CHILL source file
-
@item .mod
Modula-2 source file
@@ -7730,9 +7773,7 @@ being set automatically by @value{GDBN}.
@node Support
@section Supported languages
-@value{GDBN} supports C, C@t{++}, Fortran, Java,
-@c OBSOLETE Chill,
-assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Fortran, Java, assembly, and Modula-2.
@c This is false ...
Some @value{GDBN} features may be used in expressions regardless of the
language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -7751,7 +7792,6 @@ language reference or tutorial.
@menu
* C:: C and C@t{++}
* Modula-2:: Modula-2
-@c OBSOLETE * Chill:: Chill
@end menu
@node C
@@ -7773,11 +7813,12 @@ effectively, you must compile your C@t{++} programs with a supported
C@t{++} compiler, such as @sc{gnu} @code{g++}, or the HP ANSI C@t{++}
compiler (@code{aCC}).
-For best results when using @sc{gnu} C@t{++}, use the stabs debugging
-format. You can select that format explicitly with the @code{g++}
-command-line options @samp{-gstabs} or @samp{-gstabs+}. See
-@ref{Debugging Options,,Options for Debugging Your Program or @sc{gnu}
-CC, gcc.info, Using @sc{gnu} CC}, for more information.
+For best results when using @sc{gnu} C@t{++}, use the DWARF 2 debugging
+format; if it doesn't work on your system, try the stabs+ debugging
+format. You can select those formats explicitly with the @code{g++}
+command-line options @option{-gdwarf-2} and @option{-gstabs+}.
+@xref{Debugging Options,,Options for Debugging Your Program or @sc{gnu}
+CC, gcc.info, Using @sc{gnu} CC}.
@menu
* C Operators:: C and C@t{++} operators
@@ -8023,28 +8064,21 @@ and @samp{@{&"hi", &"there", &"fred"@}} is a three-element array of pointers.
@cindex expressions in C@t{++}
@value{GDBN} expression handling can interpret most C@t{++} expressions.
-@cindex C@t{++} support, not in @sc{coff}
-@cindex @sc{coff} versus C@t{++}
-@cindex C@t{++} and object formats
-@cindex object formats and C@t{++}
-@cindex a.out and C@t{++}
-@cindex @sc{ecoff} and C@t{++}
-@cindex @sc{xcoff} and C@t{++}
-@cindex @sc{elf}/stabs and C@t{++}
-@cindex @sc{elf}/@sc{dwarf} and C@t{++}
-@c FIXME!! GDB may eventually be able to debug C++ using DWARF; check
-@c periodically whether this has happened...
+@cindex debugging C@t{++} programs
+@cindex C@t{++} compilers
+@cindex debug formats and C@t{++}
+@cindex @value{NGCC} and C@t{++}
@quotation
@emph{Warning:} @value{GDBN} can only debug C@t{++} code if you use the
-proper compiler. Typically, C@t{++} debugging depends on the use of
-additional debugging information in the symbol table, and thus requires
-special support. In particular, if your compiler generates a.out, MIPS
-@sc{ecoff}, RS/6000 @sc{xcoff}, or @sc{elf} with stabs extensions to the
-symbol table, these facilities are all available. (With @sc{gnu} CC,
-you can use the @samp{-gstabs} option to request stabs debugging
-extensions explicitly.) Where the object code format is standard
-@sc{coff} or @sc{dwarf} in @sc{elf}, on the other hand, most of the C@t{++}
-support in @value{GDBN} does @emph{not} work.
+proper compiler and the proper debug format. Currently, @value{GDBN}
+works best when debugging C@t{++} code that is compiled with
+@value{NGCC} 2.95.3 or with @value{NGCC} 3.1 or newer, using the options
+@option{-gdwarf-2} or @option{-gstabs+}. DWARF 2 is preferred over
+stabs+. Most configurations of @value{NGCC} emit either DWARF 2 or
+stabs+ as their default debug format, so you usually don't need to
+specify a debug format explicitly. Other compilers and/or debug formats
+are likely to work badly or not at all when using @value{GDBN} to debug
+C@t{++} code.
@end quotation
@enumerate
@@ -8717,505 +8751,6 @@ address can be specified by an integral constant, the construct
In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
interpreted as the beginning of a comment. Use @code{<>} instead.
-@c OBSOLETE @node Chill
-@c OBSOLETE @subsection Chill
-@c OBSOLETE
-@c OBSOLETE The extensions made to @value{GDBN} to support Chill only support output
-@c OBSOLETE from the @sc{gnu} Chill compiler. Other Chill compilers are not currently
-@c OBSOLETE supported, and attempting to debug executables produced by them is most
-@c OBSOLETE likely to give an error as @value{GDBN} reads in the executable's symbol
-@c OBSOLETE table.
-@c OBSOLETE
-@c OBSOLETE @c This used to say "... following Chill related topics ...", but since
-@c OBSOLETE @c menus are not shown in the printed manual, it would look awkward.
-@c OBSOLETE This section covers the Chill related topics and the features
-@c OBSOLETE of @value{GDBN} which support these topics.
-@c OBSOLETE
-@c OBSOLETE @menu
-@c OBSOLETE * How modes are displayed:: How modes are displayed
-@c OBSOLETE * Locations:: Locations and their accesses
-@c OBSOLETE * Values and their Operations:: Values and their Operations
-@c OBSOLETE * Chill type and range checks::
-@c OBSOLETE * Chill defaults::
-@c OBSOLETE @end menu
-@c OBSOLETE
-@c OBSOLETE @node How modes are displayed
-@c OBSOLETE @subsubsection How modes are displayed
-@c OBSOLETE
-@c OBSOLETE The Chill Datatype- (Mode) support of @value{GDBN} is directly related
-@c OBSOLETE with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
-@c OBSOLETE slightly from the standard specification of the Chill language. The
-@c OBSOLETE provided modes are:
-@c OBSOLETE
-@c OBSOLETE @c FIXME: this @table's contents effectively disable @code by using @r
-@c OBSOLETE @c on every @item. So why does it need @code?
-@c OBSOLETE @table @code
-@c OBSOLETE @item @r{@emph{Discrete modes:}}
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item
-@c OBSOLETE @emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
-@c OBSOLETE UINT, LONG, ULONG},
-@c OBSOLETE @item
-@c OBSOLETE @emph{Boolean Mode} which is predefined by @code{BOOL},
-@c OBSOLETE @item
-@c OBSOLETE @emph{Character Mode} which is predefined by @code{CHAR},
-@c OBSOLETE @item
-@c OBSOLETE @emph{Set Mode} which is displayed by the keyword @code{SET}.
-@c OBSOLETE @smallexample
-@c OBSOLETE (@value{GDBP}) ptype x
-@c OBSOLETE type = SET (karli = 10, susi = 20, fritzi = 100)
-@c OBSOLETE @end smallexample
-@c OBSOLETE If the type is an unnumbered set the set element values are omitted.
-@c OBSOLETE @item
-@c OBSOLETE @emph{Range Mode} which is displayed by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{type = <basemode>(<lower bound> : <upper bound>)}
-@c OBSOLETE @end smallexample
-@c OBSOLETE where @code{<lower bound>, <upper bound>} can be of any discrete literal
-@c OBSOLETE expression (e.g. set element names).
-@c OBSOLETE @end itemize
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Powerset Mode:}}
-@c OBSOLETE A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
-@c OBSOLETE the member mode of the powerset. The member mode can be any discrete mode.
-@c OBSOLETE @smallexample
-@c OBSOLETE (@value{GDBP}) ptype x
-@c OBSOLETE type = POWERSET SET (egon, hugo, otto)
-@c OBSOLETE @end smallexample
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Reference Modes:}}
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item
-@c OBSOLETE @emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
-@c OBSOLETE followed by the mode name to which the reference is bound.
-@c OBSOLETE @item
-@c OBSOLETE @emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
-@c OBSOLETE @end itemize
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Procedure mode}}
-@c OBSOLETE The procedure mode is displayed by @code{type = PROC(<parameter list>)
-@c OBSOLETE <return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
-@c OBSOLETE list>} is a list of the parameter modes. @code{<return mode>} indicates
-@c OBSOLETE the mode of the result of the procedure if any. The exceptionlist lists
-@c OBSOLETE all possible exceptions which can be raised by the procedure.
-@c OBSOLETE
-@c OBSOLETE @ignore
-@c OBSOLETE @item @r{@emph{Instance mode}}
-@c OBSOLETE The instance mode is represented by a structure, which has a static
-@c OBSOLETE type, and is therefore not really of interest.
-@c OBSOLETE @end ignore
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Synchronization Modes:}}
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item
-@c OBSOLETE @emph{Event Mode} which is displayed by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{EVENT (<event length>)}
-@c OBSOLETE @end smallexample
-@c OBSOLETE where @code{(<event length>)} is optional.
-@c OBSOLETE @item
-@c OBSOLETE @emph{Buffer Mode} which is displayed by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{BUFFER (<buffer length>)<buffer element mode>}
-@c OBSOLETE @end smallexample
-@c OBSOLETE where @code{(<buffer length>)} is optional.
-@c OBSOLETE @end itemize
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Timing Modes:}}
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item
-@c OBSOLETE @emph{Duration Mode} which is predefined by @code{DURATION}
-@c OBSOLETE @item
-@c OBSOLETE @emph{Absolute Time Mode} which is predefined by @code{TIME}
-@c OBSOLETE @end itemize
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Real Modes:}}
-@c OBSOLETE Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{String Modes:}}
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item
-@c OBSOLETE @emph{Character String Mode} which is displayed by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{CHARS(<string length>)}
-@c OBSOLETE @end smallexample
-@c OBSOLETE followed by the keyword @code{VARYING} if the String Mode is a varying
-@c OBSOLETE mode
-@c OBSOLETE @item
-@c OBSOLETE @emph{Bit String Mode} which is displayed by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{BOOLS(<string
-@c OBSOLETE length>)}
-@c OBSOLETE @end smallexample
-@c OBSOLETE @end itemize
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Array Mode:}}
-@c OBSOLETE The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
-@c OBSOLETE followed by the element mode (which may in turn be an array mode).
-@c OBSOLETE @smallexample
-@c OBSOLETE (@value{GDBP}) ptype x
-@c OBSOLETE type = ARRAY (1:42)
-@c OBSOLETE ARRAY (1:20)
-@c OBSOLETE SET (karli = 10, susi = 20, fritzi = 100)
-@c OBSOLETE @end smallexample
-@c OBSOLETE
-@c OBSOLETE @item @r{@emph{Structure Mode}}
-@c OBSOLETE The Structure mode is displayed by the keyword @code{STRUCT(<field
-@c OBSOLETE list>)}. The @code{<field list>} consists of names and modes of fields
-@c OBSOLETE of the structure. Variant structures have the keyword @code{CASE <field>
-@c OBSOLETE OF <variant fields> ESAC} in their field list. Since the current version
-@c OBSOLETE of the GNU Chill compiler doesn't implement tag processing (no runtime
-@c OBSOLETE checks of variant fields, and therefore no debugging info), the output
-@c OBSOLETE always displays all variant fields.
-@c OBSOLETE @smallexample
-@c OBSOLETE (@value{GDBP}) ptype str
-@c OBSOLETE type = STRUCT (
-@c OBSOLETE as x,
-@c OBSOLETE bs x,
-@c OBSOLETE CASE bs OF
-@c OBSOLETE (karli):
-@c OBSOLETE cs a
-@c OBSOLETE (ott):
-@c OBSOLETE ds x
-@c OBSOLETE ESAC
-@c OBSOLETE )
-@c OBSOLETE @end smallexample
-@c OBSOLETE @end table
-@c OBSOLETE
-@c OBSOLETE @node Locations
-@c OBSOLETE @subsubsection Locations and their accesses
-@c OBSOLETE
-@c OBSOLETE A location in Chill is an object which can contain values.
-@c OBSOLETE
-@c OBSOLETE A value of a location is generally accessed by the (declared) name of
-@c OBSOLETE the location. The output conforms to the specification of values in
-@c OBSOLETE Chill programs. How values are specified
-@c OBSOLETE is the topic of the next section, @ref{Values and their Operations}.
-@c OBSOLETE
-@c OBSOLETE The pseudo-location @code{RESULT} (or @code{result}) can be used to
-@c OBSOLETE display or change the result of a currently-active procedure:
-@c OBSOLETE
-@c OBSOLETE @smallexample
-@c OBSOLETE set result := EXPR
-@c OBSOLETE @end smallexample
-@c OBSOLETE
-@c OBSOLETE @noindent
-@c OBSOLETE This does the same as the Chill action @code{RESULT EXPR} (which
-@c OBSOLETE is not available in @value{GDBN}).
-@c OBSOLETE
-@c OBSOLETE Values of reference mode locations are printed by @code{PTR(<hex
-@c OBSOLETE value>)} in case of a free reference mode, and by @code{(REF <reference
-@c OBSOLETE mode>) (<hex-value>)} in case of a bound reference. @code{<hex value>}
-@c OBSOLETE represents the address where the reference points to. To access the
-@c OBSOLETE value of the location referenced by the pointer, use the dereference
-@c OBSOLETE operator @samp{->}.
-@c OBSOLETE
-@c OBSOLETE Values of procedure mode locations are displayed by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{@{ PROC
-@c OBSOLETE (<argument modes> ) <return mode> @} <address> <name of procedure
-@c OBSOLETE location>}
-@c OBSOLETE @end smallexample
-@c OBSOLETE @code{<argument modes>} is a list of modes according to the parameter
-@c OBSOLETE specification of the procedure and @code{<address>} shows the address of
-@c OBSOLETE the entry point.
-@c OBSOLETE
-@c OBSOLETE @ignore
-@c OBSOLETE Locations of instance modes are displayed just like a structure with two
-@c OBSOLETE fields specifying the @emph{process type} and the @emph{copy number} of
-@c OBSOLETE the investigated instance location@footnote{This comes from the current
-@c OBSOLETE implementation of instances. They are implemented as a structure (no
-@c OBSOLETE na). The output should be something like @code{[<name of the process>;
-@c OBSOLETE <instance number>]}.}. The field names are @code{__proc_type} and
-@c OBSOLETE @code{__proc_copy}.
-@c OBSOLETE
-@c OBSOLETE Locations of synchronization modes are displayed like a structure with
-@c OBSOLETE the field name @code{__event_data} in case of a event mode location, and
-@c OBSOLETE like a structure with the field @code{__buffer_data} in case of a buffer
-@c OBSOLETE mode location (refer to previous paragraph).
-@c OBSOLETE
-@c OBSOLETE Structure Mode locations are printed by @code{[.<field name>: <value>,
-@c OBSOLETE ...]}. The @code{<field name>} corresponds to the structure mode
-@c OBSOLETE definition and the layout of @code{<value>} varies depending of the mode
-@c OBSOLETE of the field. If the investigated structure mode location is of variant
-@c OBSOLETE structure mode, the variant parts of the structure are enclosed in curled
-@c OBSOLETE braces (@samp{@{@}}). Fields enclosed by @samp{@{,@}} are residing
-@c OBSOLETE on the same memory location and represent the current values of the
-@c OBSOLETE memory location in their specific modes. Since no tag processing is done
-@c OBSOLETE all variants are displayed. A variant field is printed by
-@c OBSOLETE @code{(<variant name>) = .<field name>: <value>}. (who implements the
-@c OBSOLETE stuff ???)
-@c OBSOLETE @smallexample
-@c OBSOLETE (@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
-@c OBSOLETE [.cs: []], (susi) = [.ds: susi]}]
-@c OBSOLETE @end smallexample
-@c OBSOLETE @end ignore
-@c OBSOLETE
-@c OBSOLETE Substructures of string mode-, array mode- or structure mode-values
-@c OBSOLETE (e.g. array slices, fields of structure locations) are accessed using
-@c OBSOLETE certain operations which are described in the next section, @ref{Values
-@c OBSOLETE and their Operations}.
-@c OBSOLETE
-@c OBSOLETE A location value may be interpreted as having a different mode using the
-@c OBSOLETE location conversion. This mode conversion is written as @code{<mode
-@c OBSOLETE name>(<location>)}. The user has to consider that the sizes of the modes
-@c OBSOLETE have to be equal otherwise an error occurs. Furthermore, no range
-@c OBSOLETE checking of the location against the destination mode is performed, and
-@c OBSOLETE therefore the result can be quite confusing.
-@c OBSOLETE
-@c OBSOLETE @smallexample
-@c OBSOLETE (@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
-@c OBSOLETE @end smallexample
-@c OBSOLETE
-@c OBSOLETE @node Values and their Operations
-@c OBSOLETE @subsubsection Values and their Operations
-@c OBSOLETE
-@c OBSOLETE Values are used to alter locations, to investigate complex structures in
-@c OBSOLETE more detail or to filter relevant information out of a large amount of
-@c OBSOLETE data. There are several (mode dependent) operations defined which enable
-@c OBSOLETE such investigations. These operations are not only applicable to
-@c OBSOLETE constant values but also to locations, which can become quite useful
-@c OBSOLETE when debugging complex structures. During parsing the command line
-@c OBSOLETE (e.g. evaluating an expression) @value{GDBN} treats location names as
-@c OBSOLETE the values behind these locations.
-@c OBSOLETE
-@c OBSOLETE This section describes how values have to be specified and which
-@c OBSOLETE operations are legal to be used with such values.
-@c OBSOLETE
-@c OBSOLETE @table @code
-@c OBSOLETE @item Literal Values
-@c OBSOLETE Literal values are specified in the same manner as in @sc{gnu} Chill programs.
-@c OBSOLETE For detailed specification refer to the @sc{gnu} Chill implementation Manual
-@c OBSOLETE chapter 1.5.
-@c OBSOLETE @c FIXME: if the Chill Manual is a Texinfo documents, the above should
-@c OBSOLETE @c be converted to a @ref.
-@c OBSOLETE
-@c OBSOLETE @ignore
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item
-@c OBSOLETE @emph{Integer Literals} are specified in the same manner as in Chill
-@c OBSOLETE programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
-@c OBSOLETE @item
-@c OBSOLETE @emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
-@c OBSOLETE @item
-@c OBSOLETE @emph{Character Literals} are defined by @code{'<character>'}. (e.g.
-@c OBSOLETE @code{'M'})
-@c OBSOLETE @item
-@c OBSOLETE @emph{Set Literals} are defined by a name which was specified in a set
-@c OBSOLETE mode. The value delivered by a Set Literal is the set value. This is
-@c OBSOLETE comparable to an enumeration in C/C@t{++} language.
-@c OBSOLETE @item
-@c OBSOLETE @emph{Emptiness Literal} is predefined by @code{NULL}. The value of the
-@c OBSOLETE emptiness literal delivers either the empty reference value, the empty
-@c OBSOLETE procedure value or the empty instance value.
-@c OBSOLETE
-@c OBSOLETE @item
-@c OBSOLETE @emph{Character String Literals} are defined by a sequence of characters
-@c OBSOLETE enclosed in single- or double quotes. If a single- or double quote has
-@c OBSOLETE to be part of the string literal it has to be stuffed (specified twice).
-@c OBSOLETE @item
-@c OBSOLETE @emph{Bitstring Literals} are specified in the same manner as in Chill
-@c OBSOLETE programs (refer z200/88 chpt 5.2.4.8).
-@c OBSOLETE @item
-@c OBSOLETE @emph{Floating point literals} are specified in the same manner as in
-@c OBSOLETE (gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
-@c OBSOLETE @end itemize
-@c OBSOLETE @end ignore
-@c OBSOLETE
-@c OBSOLETE @item Tuple Values
-@c OBSOLETE A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
-@c OBSOLETE name>} can be omitted if the mode of the tuple is unambiguous. This
-@c OBSOLETE unambiguity is derived from the context of a evaluated expression.
-@c OBSOLETE @code{<tuple>} can be one of the following:
-@c OBSOLETE
-@c OBSOLETE @itemize @bullet
-@c OBSOLETE @item @emph{Powerset Tuple}
-@c OBSOLETE @item @emph{Array Tuple}
-@c OBSOLETE @item @emph{Structure Tuple}
-@c OBSOLETE Powerset tuples, array tuples and structure tuples are specified in the
-@c OBSOLETE same manner as in Chill programs refer to z200/88 chpt 5.2.5.
-@c OBSOLETE @end itemize
-@c OBSOLETE
-@c OBSOLETE @item String Element Value
-@c OBSOLETE A string element value is specified by
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{<string value>(<index>)}
-@c OBSOLETE @end smallexample
-@c OBSOLETE where @code{<index>} is a integer expression. It delivers a character
-@c OBSOLETE value which is equivalent to the character indexed by @code{<index>} in
-@c OBSOLETE the string.
-@c OBSOLETE
-@c OBSOLETE @item String Slice Value
-@c OBSOLETE A string slice value is specified by @code{<string value>(<slice
-@c OBSOLETE spec>)}, where @code{<slice spec>} can be either a range of integer
-@c OBSOLETE expressions or specified by @code{<start expr> up <size>}.
-@c OBSOLETE @code{<size>} denotes the number of elements which the slice contains.
-@c OBSOLETE The delivered value is a string value, which is part of the specified
-@c OBSOLETE string.
-@c OBSOLETE
-@c OBSOLETE @item Array Element Values
-@c OBSOLETE An array element value is specified by @code{<array value>(<expr>)} and
-@c OBSOLETE delivers a array element value of the mode of the specified array.
-@c OBSOLETE
-@c OBSOLETE @item Array Slice Values
-@c OBSOLETE An array slice is specified by @code{<array value>(<slice spec>)}, where
-@c OBSOLETE @code{<slice spec>} can be either a range specified by expressions or by
-@c OBSOLETE @code{<start expr> up <size>}. @code{<size>} denotes the number of
-@c OBSOLETE arrayelements the slice contains. The delivered value is an array value
-@c OBSOLETE which is part of the specified array.
-@c OBSOLETE
-@c OBSOLETE @item Structure Field Values
-@c OBSOLETE A structure field value is derived by @code{<structure value>.<field
-@c OBSOLETE name>}, where @code{<field name>} indicates the name of a field specified
-@c OBSOLETE in the mode definition of the structure. The mode of the delivered value
-@c OBSOLETE corresponds to this mode definition in the structure definition.
-@c OBSOLETE
-@c OBSOLETE @item Procedure Call Value
-@c OBSOLETE The procedure call value is derived from the return value of the
-@c OBSOLETE procedure@footnote{If a procedure call is used for instance in an
-@c OBSOLETE expression, then this procedure is called with all its side
-@c OBSOLETE effects. This can lead to confusing results if used carelessly.}.
-@c OBSOLETE
-@c OBSOLETE Values of duration mode locations are represented by @code{ULONG} literals.
-@c OBSOLETE
-@c OBSOLETE Values of time mode locations appear as
-@c OBSOLETE @smallexample
-@c OBSOLETE @code{TIME(<secs>:<nsecs>)}
-@c OBSOLETE @end smallexample
-@c OBSOLETE
-@c OBSOLETE
-@c OBSOLETE @ignore
-@c OBSOLETE This is not implemented yet:
-@c OBSOLETE @item Built-in Value
-@c OBSOLETE @noindent
-@c OBSOLETE The following built in functions are provided:
-@c OBSOLETE
-@c OBSOLETE @table @code
-@c OBSOLETE @item @code{ADDR()}
-@c OBSOLETE @item @code{NUM()}
-@c OBSOLETE @item @code{PRED()}
-@c OBSOLETE @item @code{SUCC()}
-@c OBSOLETE @item @code{ABS()}
-@c OBSOLETE @item @code{CARD()}
-@c OBSOLETE @item @code{MAX()}
-@c OBSOLETE @item @code{MIN()}
-@c OBSOLETE @item @code{SIZE()}
-@c OBSOLETE @item @code{UPPER()}
-@c OBSOLETE @item @code{LOWER()}
-@c OBSOLETE @item @code{LENGTH()}
-@c OBSOLETE @item @code{SIN()}
-@c OBSOLETE @item @code{COS()}
-@c OBSOLETE @item @code{TAN()}
-@c OBSOLETE @item @code{ARCSIN()}
-@c OBSOLETE @item @code{ARCCOS()}
-@c OBSOLETE @item @code{ARCTAN()}
-@c OBSOLETE @item @code{EXP()}
-@c OBSOLETE @item @code{LN()}
-@c OBSOLETE @item @code{LOG()}
-@c OBSOLETE @item @code{SQRT()}
-@c OBSOLETE @end table
-@c OBSOLETE
-@c OBSOLETE For a detailed description refer to the GNU Chill implementation manual
-@c OBSOLETE chapter 1.6.
-@c OBSOLETE @end ignore
-@c OBSOLETE
-@c OBSOLETE @item Zero-adic Operator Value
-@c OBSOLETE The zero-adic operator value is derived from the instance value for the
-@c OBSOLETE current active process.
-@c OBSOLETE
-@c OBSOLETE @item Expression Values
-@c OBSOLETE The value delivered by an expression is the result of the evaluation of
-@c OBSOLETE the specified expression. If there are error conditions (mode
-@c OBSOLETE incompatibility, etc.) the evaluation of expressions is aborted with a
-@c OBSOLETE corresponding error message. Expressions may be parenthesised which
-@c OBSOLETE causes the evaluation of this expression before any other expression
-@c OBSOLETE which uses the result of the parenthesised expression. The following
-@c OBSOLETE operators are supported by @value{GDBN}:
-@c OBSOLETE
-@c OBSOLETE @table @code
-@c OBSOLETE @item @code{OR, ORIF, XOR}
-@c OBSOLETE @itemx @code{AND, ANDIF}
-@c OBSOLETE @itemx @code{NOT}
-@c OBSOLETE Logical operators defined over operands of boolean mode.
-@c OBSOLETE
-@c OBSOLETE @item @code{=, /=}
-@c OBSOLETE Equality and inequality operators defined over all modes.
-@c OBSOLETE
-@c OBSOLETE @item @code{>, >=}
-@c OBSOLETE @itemx @code{<, <=}
-@c OBSOLETE Relational operators defined over predefined modes.
-@c OBSOLETE
-@c OBSOLETE @item @code{+, -}
-@c OBSOLETE @itemx @code{*, /, MOD, REM}
-@c OBSOLETE Arithmetic operators defined over predefined modes.
-@c OBSOLETE
-@c OBSOLETE @item @code{-}
-@c OBSOLETE Change sign operator.
-@c OBSOLETE
-@c OBSOLETE @item @code{//}
-@c OBSOLETE String concatenation operator.
-@c OBSOLETE
-@c OBSOLETE @item @code{()}
-@c OBSOLETE String repetition operator.
-@c OBSOLETE
-@c OBSOLETE @item @code{->}
-@c OBSOLETE Referenced location operator which can be used either to take the
-@c OBSOLETE address of a location (@code{->loc}), or to dereference a reference
-@c OBSOLETE location (@code{loc->}).
-@c OBSOLETE
-@c OBSOLETE @item @code{OR, XOR}
-@c OBSOLETE @itemx @code{AND}
-@c OBSOLETE @itemx @code{NOT}
-@c OBSOLETE Powerset and bitstring operators.
-@c OBSOLETE
-@c OBSOLETE @item @code{>, >=}
-@c OBSOLETE @itemx @code{<, <=}
-@c OBSOLETE Powerset inclusion operators.
-@c OBSOLETE
-@c OBSOLETE @item @code{IN}
-@c OBSOLETE Membership operator.
-@c OBSOLETE @end table
-@c OBSOLETE @end table
-@c OBSOLETE
-@c OBSOLETE @node Chill type and range checks
-@c OBSOLETE @subsubsection Chill type and range checks
-@c OBSOLETE
-@c OBSOLETE @value{GDBN} considers two Chill variables mode equivalent if the sizes
-@c OBSOLETE of the two modes are equal. This rule applies recursively to more
-@c OBSOLETE complex datatypes which means that complex modes are treated
-@c OBSOLETE equivalent if all element modes (which also can be complex modes like
-@c OBSOLETE structures, arrays, etc.) have the same size.
-@c OBSOLETE
-@c OBSOLETE Range checking is done on all mathematical operations, assignment, array
-@c OBSOLETE index bounds and all built in procedures.
-@c OBSOLETE
-@c OBSOLETE Strong type checks are forced using the @value{GDBN} command @code{set
-@c OBSOLETE check strong}. This enforces strong type and range checks on all
-@c OBSOLETE operations where Chill constructs are used (expressions, built in
-@c OBSOLETE functions, etc.) in respect to the semantics as defined in the z.200
-@c OBSOLETE language specification.
-@c OBSOLETE
-@c OBSOLETE All checks can be disabled by the @value{GDBN} command @code{set check
-@c OBSOLETE off}.
-@c OBSOLETE
-@c OBSOLETE @ignore
-@c OBSOLETE @c Deviations from the Chill Standard Z200/88
-@c OBSOLETE see last paragraph ?
-@c OBSOLETE @end ignore
-@c OBSOLETE
-@c OBSOLETE @node Chill defaults
-@c OBSOLETE @subsubsection Chill defaults
-@c OBSOLETE
-@c OBSOLETE If type and range checking are set automatically by @value{GDBN}, they
-@c OBSOLETE both default to @code{on} whenever the working language changes to
-@c OBSOLETE Chill. This happens regardless of whether you or @value{GDBN}
-@c OBSOLETE selected the working language.
-@c OBSOLETE
-@c OBSOLETE If you allow @value{GDBN} to set the language automatically, then entering
-@c OBSOLETE code compiled from a file whose name ends with @file{.ch} sets the
-@c OBSOLETE working language to Chill. @xref{Automatically, ,Having @value{GDBN} set
-@c OBSOLETE the language automatically}, for further details.
-
@node Symbols
@chapter Examining the Symbol Table
@@ -9802,6 +9337,7 @@ program. To debug a core dump of a previous run, you must also tell
@menu
* Files:: Commands to specify files
+* Separate Debug Files:: Debugging information in separate files
* Symbol Errors:: Errors reading symbol files
@end menu
@@ -10206,6 +9742,233 @@ Mb).
Display the current autoloading size threshold, in megabytes.
@end table
+Shared libraries are also supported in many cross or remote debugging
+configurations. A copy of the target's libraries need to be present on the
+host system; they need to be the same as the target libraries, although the
+copies on the target can be stripped as long as the copies on the host are
+not.
+
+You need to tell @value{GDBN} where the target libraries are, so that it can
+load the correct copies---otherwise, it may try to load the host's libraries.
+@value{GDBN} has two variables to specify the search directories for target
+libraries.
+
+@table @code
+@kindex set solib-absolute-prefix
+@item set solib-absolute-prefix @var{path}
+If this variable is set, @var{path} will be used as a prefix for any
+absolute shared library paths; many runtime loaders store the absolute
+paths to the shared library in the target program's memory. If you use
+@samp{solib-absolute-prefix} to find shared libraries, they need to be laid
+out in the same way that they are on the target, with e.g.@: a
+@file{/usr/lib} hierarchy under @var{path}.
+
+You can set the default value of @samp{solib-absolute-prefix} by using the
+configure-time @samp{--with-sysroot} option.
+
+@kindex show solib-absolute-prefix
+@item show solib-absolute-prefix
+Display the current shared library prefix.
+
+@kindex set solib-search-path
+@item set solib-search-path @var{path}
+If this variable is set, @var{path} is a colon-separated list of directories
+to search for shared libraries. @samp{solib-search-path} is used after
+@samp{solib-absolute-prefix} fails to locate the library, or if the path to
+the library is relative instead of absolute. If you want to use
+@samp{solib-search-path} instead of @samp{solib-absolute-prefix}, be sure to
+set @samp{solib-absolute-prefix} to a nonexistant directory to prevent
+@value{GDBN} from finding your host's libraries.
+
+@kindex show solib-search-path
+@item show solib-search-path
+Display the current shared library search path.
+@end table
+
+
+@node Separate Debug Files
+@section Debugging Information in Separate Files
+@cindex separate debugging information files
+@cindex debugging information in separate files
+@cindex @file{.debug} subdirectories
+@cindex debugging information directory, global
+@cindex global debugging information directory
+
+@value{GDBN} allows you to put a program's debugging information in a
+file separate from the executable itself, in a way that allows
+@value{GDBN} to find and load the debugging information automatically.
+Since debugging information can be very large --- sometimes larger
+than the executable code itself --- some systems distribute debugging
+information for their executables in separate files, which users can
+install only when they need to debug a problem.
+
+If an executable's debugging information has been extracted to a
+separate file, the executable should contain a @dfn{debug link} giving
+the name of the debugging information file (with no directory
+components), and a checksum of its contents. (The exact form of a
+debug link is described below.) If the full name of the directory
+containing the executable is @var{execdir}, and the executable has a
+debug link that specifies the name @var{debugfile}, then @value{GDBN}
+will automatically search for the debugging information file in three
+places:
+
+@itemize @bullet
+@item
+the directory containing the executable file (that is, it will look
+for a file named @file{@var{execdir}/@var{debugfile}},
+@item
+a subdirectory of that directory named @file{.debug} (that is, the
+file @file{@var{execdir}/.debug/@var{debugfile}}, and
+@item
+a subdirectory of the global debug file directory that includes the
+executable's full path, and the name from the link (that is, the file
+@file{@var{globaldebugdir}/@var{execdir}/@var{debugfile}}, where
+@var{globaldebugdir} is the global debug file directory, and
+@var{execdir} has been turned into a relative path).
+@end itemize
+@noindent
+@value{GDBN} checks under each of these names for a debugging
+information file whose checksum matches that given in the link, and
+reads the debugging information from the first one it finds.
+
+So, for example, if you ask @value{GDBN} to debug @file{/usr/bin/ls},
+which has a link containing the name @file{ls.debug}, and the global
+debug directory is @file{/usr/lib/debug}, then @value{GDBN} will look
+for debug information in @file{/usr/bin/ls.debug},
+@file{/usr/bin/.debug/ls.debug}, and
+@file{/usr/lib/debug/usr/bin/ls.debug}.
+
+You can set the global debugging info directory's name, and view the
+name @value{GDBN} is currently using.
+
+@table @code
+
+@kindex set debug-file-directory
+@item set debug-file-directory @var{directory}
+Set the directory which @value{GDBN} searches for separate debugging
+information files to @var{directory}.
+
+@kindex show debug-file-directory
+@item show debug-file-directory
+Show the directory @value{GDBN} searches for separate debugging
+information files.
+
+@end table
+
+@cindex @code{.gnu_debuglink} sections
+@cindex debug links
+A debug link is a special section of the executable file named
+@code{.gnu_debuglink}. The section must contain:
+
+@itemize
+@item
+A filename, with any leading directory components removed, followed by
+a zero byte,
+@item
+zero to three bytes of padding, as needed to reach the next four-byte
+boundary within the section, and
+@item
+a four-byte CRC checksum, stored in the same endianness used for the
+executable file itself. The checksum is computed on the debugging
+information file's full contents by the function given below, passing
+zero as the @var{crc} argument.
+@end itemize
+
+Any executable file format can carry a debug link, as long as it can
+contain a section named @code{.gnu_debuglink} with the contents
+described above.
+
+The debugging information file itself should be an ordinary
+executable, containing a full set of linker symbols, sections, and
+debugging information. The sections of the debugging information file
+should have the same names, addresses and sizes as the original file,
+but they need not contain any data --- much like a @code{.bss} section
+in an ordinary executable.
+
+As of December 2002, there is no standard GNU utility to produce
+separated executable / debugging information file pairs. Ulrich
+Drepper's @file{elfutils} package, starting with version 0.53,
+contains a version of the @code{strip} command such that the command
+@kbd{strip foo -f foo.debug} removes the debugging information from
+the executable file @file{foo}, places it in the file
+@file{foo.debug}, and leaves behind a debug link in @file{foo}.
+
+Since there are many different ways to compute CRC's (different
+polynomials, reversals, byte ordering, etc.), the simplest way to
+describe the CRC used in @code{.gnu_debuglink} sections is to give the
+complete code for a function that computes it:
+
+@kindex @code{gnu_debuglink_crc32}
+@smallexample
+unsigned long
+gnu_debuglink_crc32 (unsigned long crc,
+ unsigned char *buf, size_t len)
+@{
+ static const unsigned long crc32_table[256] =
+ @{
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ @};
+ unsigned char *end;
+
+ crc = ~crc & 0xffffffff;
+ for (end = buf + len; buf < end; ++buf)
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ return ~crc & 0xffffffff;;
+@}
+@end smallexample
+
+
@node Symbol Errors
@section Errors reading symbol files
@@ -11646,10 +11409,8 @@ configurations.
* ARM:: ARM
* H8/300:: Hitachi H8/300
* H8/500:: Hitachi H8/500
-* i960:: Intel i960
* M32R/D:: Mitsubishi M32R/D
* M68K:: Motorola M68K
-@c OBSOLETE * M88K:: Motorola M88K
* MIPS Embedded:: MIPS Embedded
* OpenRISC 1000:: OpenRisc 1000
* PA:: HP PA Embedded
@@ -11901,128 +11662,6 @@ memory}. The accepted values for @var{mod} are @code{small},
@end table
-@node i960
-@subsection Intel i960
-
-@table @code
-
-@kindex target mon960
-@item target mon960 @var{dev}
-MON960 monitor for Intel i960.
-
-@kindex target nindy
-@item target nindy @var{devicename}
-An Intel 960 board controlled by a Nindy Monitor. @var{devicename} is
-the name of the serial device to use for the connection, e.g.
-@file{/dev/ttya}.
-
-@end table
-
-@cindex Nindy
-@cindex i960
-@dfn{Nindy} is a ROM Monitor program for Intel 960 target systems. When
-@value{GDBN} is configured to control a remote Intel 960 using Nindy, you can
-tell @value{GDBN} how to connect to the 960 in several ways:
-
-@itemize @bullet
-@item
-Through command line options specifying serial port, version of the
-Nindy protocol, and communications speed;
-
-@item
-By responding to a prompt on startup;
-
-@item
-By using the @code{target} command at any point during your @value{GDBN}
-session. @xref{Target Commands, ,Commands for managing targets}.
-
-@end itemize
-
-@cindex download to Nindy-960
-With the Nindy interface to an Intel 960 board, @code{load}
-downloads @var{filename} to the 960 as well as adding its symbols in
-@value{GDBN}.
-
-@menu
-* Nindy Startup:: Startup with Nindy
-* Nindy Options:: Options for Nindy
-* Nindy Reset:: Nindy reset command
-@end menu
-
-@node Nindy Startup
-@subsubsection Startup with Nindy
-
-If you simply start @code{@value{GDBP}} without using any command-line
-options, you are prompted for what serial port to use, @emph{before} you
-reach the ordinary @value{GDBN} prompt:
-
-@smallexample
-Attach /dev/ttyNN -- specify NN, or "quit" to quit:
-@end smallexample
-
-@noindent
-Respond to the prompt with whatever suffix (after @samp{/dev/tty})
-identifies the serial port you want to use. You can, if you choose,
-simply start up with no Nindy connection by responding to the prompt
-with an empty line. If you do this and later wish to attach to Nindy,
-use @code{target} (@pxref{Target Commands, ,Commands for managing targets}).
-
-@node Nindy Options
-@subsubsection Options for Nindy
-
-These are the startup options for beginning your @value{GDBN} session with a
-Nindy-960 board attached:
-
-@table @code
-@item -r @var{port}
-Specify the serial port name of a serial interface to be used to connect
-to the target system. This option is only available when @value{GDBN} is
-configured for the Intel 960 target architecture. You may specify
-@var{port} as any of: a full pathname (e.g. @samp{-r /dev/ttya}), a
-device name in @file{/dev} (e.g. @samp{-r ttya}), or simply the unique
-suffix for a specific @code{tty} (e.g. @samp{-r a}).
-
-@item -O
-(An uppercase letter ``O'', not a zero.) Specify that @value{GDBN} should use
-the ``old'' Nindy monitor protocol to connect to the target system.
-This option is only available when @value{GDBN} is configured for the Intel 960
-target architecture.
-
-@quotation
-@emph{Warning:} if you specify @samp{-O}, but are actually trying to
-connect to a target system that expects the newer protocol, the connection
-fails, appearing to be a speed mismatch. @value{GDBN} repeatedly
-attempts to reconnect at several different line speeds. You can abort
-this process with an interrupt.
-@end quotation
-
-@item -brk
-Specify that @value{GDBN} should first send a @code{BREAK} signal to the target
-system, in an attempt to reset it, before connecting to a Nindy target.
-
-@quotation
-@emph{Warning:} Many target systems do not have the hardware that this
-requires; it only works with a few boards.
-@end quotation
-@end table
-
-The standard @samp{-b} option controls the line speed used on the serial
-port.
-
-@c @group
-@node Nindy Reset
-@subsubsection Nindy reset command
-
-@table @code
-@item reset
-@kindex reset
-For a Nindy target, this command sends a ``break'' to the remote target
-system; this is only useful if the target has been equipped with a
-circuit to perform a hard reset (or some other interesting action) when
-a break is detected.
-@end table
-@c @end group
-
@node M32R/D
@subsection Mitsubishi M32R/D
@@ -12064,19 +11703,6 @@ ROM 68K monitor, running on an M68K IDP board.
@end table
-If @value{GDBN} is configured with @code{m68*-ericsson-*}, it will
-instead have only a single special target command:
-
-@table @code
-
-@kindex target es1800
-@item target es1800 @var{dev}
-ES-1800 emulator for M68K.
-
-@end table
-
-[context?]
-
@table @code
@kindex target rombug
@@ -12085,17 +11711,6 @@ ROMBUG ROM monitor for OS/9000.
@end table
-@c OBSOLETE @node M88K
-@c OBSOLETE @subsection M88K
-@c OBSOLETE
-@c OBSOLETE @table @code
-@c OBSOLETE
-@c OBSOLETE @kindex target bug
-@c OBSOLETE @item target bug @var{dev}
-@c OBSOLETE BUG monitor, running on a MVME187 (m88k) board.
-@c OBSOLETE
-@c OBSOLETE @end table
-
@node MIPS Embedded
@subsection MIPS Embedded
@@ -12333,7 +11948,7 @@ Set acquisition qualifier for HW trace.
Set HW trace stopping criteria.
@kindex htrace record
-@item htrace record @var{[data]*}
+@item htrace record [@var{data}]*
Selects the data to be recorded, when qualifier is met and HW trace was
triggered.
@@ -12344,14 +11959,14 @@ triggered.
Enables/disables the HW trace.
@kindex htrace rewind
-@item htrace rewind @var{[filename]}
+@item htrace rewind [@var{filename}]
Clears currently recorded trace data.
If filename is specified, new trace file is made and any newly collected data
will be written there.
@kindex htrace print
-@item htrace print @var{[start [len]]}
+@item htrace print [@var{start} [@var{len}]]
Prints trace buffer, using current record configuration.
@kindex htrace mode continuous
@@ -12778,6 +12393,7 @@ described here.
* History:: Command history
* Screen Size:: Screen size
* Numbers:: Numbers
+* ABI:: Configuring the current ABI
* Messages/Warnings:: Optional warnings and messages
* Debugging Output:: Optional messages about internal happenings
@end menu
@@ -13024,6 +12640,63 @@ Display the current default base for numeric input.
Display the current default base for numeric display.
@end table
+@node ABI
+@section Configuring the current ABI
+
+@value{GDBN} can determine the @dfn{ABI} (Application Binary Interface) of your
+application automatically. However, sometimes you need to override its
+conclusions. Use these commands to manage @value{GDBN}'s view of the
+current ABI.
+
+@cindex OS ABI
+@kindex set osabi
+@kindex show osabi
+
+One @value{GDBN} configuration can debug binaries for multiple operating
+system targets, either via remote debugging or native emulation.
+@value{GDBN} will autodetect the @dfn{OS ABI} (Operating System ABI) in use,
+but you can override its conclusion using the @code{set osabi} command.
+One example where this is useful is in debugging of binaries which use
+an alternate C library (e.g.@: @sc{uClibc} for @sc{gnu}/Linux) which does
+not have the same identifying marks that the standard C library for your
+platform provides.
+
+@table @code
+@item show osabi
+Show the OS ABI currently in use.
+
+@item set osabi
+With no argument, show the list of registered available OS ABI's.
+
+@item set osabi @var{abi}
+Set the current OS ABI to @var{abi}.
+@end table
+
+@cindex float promotion
+@kindex set coerce-float-to-double
+
+Generally, the way that an argument of type @code{float} is passed to a
+function depends on whether the function is prototyped. For a prototyped
+(i.e.@: ANSI/ISO style) function, @code{float} arguments are passed unchanged,
+according to the architecture's convention for @code{float}. For unprototyped
+(i.e.@: K&R style) functions, @code{float} arguments are first promoted to type
+@code{double} and then passed.
+
+Unfortunately, some forms of debug information do not reliably indicate whether
+a function is prototyped. If @value{GDBN} calls a function that is not marked
+as prototyped, it consults @kbd{set coerce-float-to-double}.
+
+@table @code
+@item set coerce-float-to-double
+@itemx set coerce-float-to-double on
+Arguments of type @code{float} will be promoted to @code{double} when passed
+to an unprototyped function. This is the default setting.
+
+@item set coerce-float-to-double off
+Arguments of type @code{float} will be passed directly to unprototyped
+functions.
+@end table
+
@node Messages/Warnings
@section Optional warnings and messages
@@ -13542,6 +13215,69 @@ string are the simple ones that consist of backslash followed by a
letter.
@end table
+@node Interpreters
+@chapter Command Interpreters
+@cindex command interpreters
+
+@value{GDBN} supports multiple command interpreters, and some command
+infrastructure to allow users or user interface writers to switch
+between interpreters or run commands in other interpreters.
+
+@value{GDBN} currently supports two command interpreters, the console
+interpreter (sometimes called the command-line interpreter or @sc{cli})
+and the machine interface interpreter (or @sc{gdb/mi}). This manual
+describes both of these interfaces in great detail.
+
+By default, @value{GDBN} will start with the console interpreter.
+However, the user may choose to start @value{GDBN} with another
+interpreter by specifying the @option{-i} or @option{--interpreter}
+startup options. Defined interpreters include:
+
+@table @code
+@item console
+@cindex console interpreter
+The traditional console or command-line interpreter. This is the most often
+used interpreter with @value{GDBN}. With no interpreter specified at runtime,
+@value{GDBN} will use this interpreter.
+
+@item mi
+@cindex mi interpreter
+The newest @sc{gdb/mi} interface (currently @code{mi2}). Used primarily
+by programs wishing to use @value{GDBN} as a backend for a debugger GUI
+or an IDE. For more information, see @ref{GDB/MI, ,The @sc{gdb/mi}
+Interface}.
+
+@item mi2
+@cindex mi2 interpreter
+The current @sc{gdb/mi} interface.
+
+@item mi1
+@cindex mi1 interpreter
+The @sc{gdb/mi} interface included in @value{GDBN} 5.1, 5.2, and 5.3.
+
+@end table
+
+@cindex invoke another interpreter
+The interpreter being used by @value{GDBN} may not be dynamically
+switched at runtime. Although possible, this could lead to a very
+precarious situation. Consider an IDE using @sc{gdb/mi}. If a user
+enters the command "interpreter-set console" in a console view,
+@value{GDBN} would switch to using the console interpreter, rendering
+the IDE inoperable!
+
+@kindex interpreter-exec
+Although you may only choose a single interpreter at startup, you may execute
+commands in any interpreter from the current interpreter using the appropriate
+command. If you are running the console interpreter, simply use the
+@code{interpreter-exec} command:
+
+@smallexample
+interpreter-exec mi "-data-list-register-names"
+@end smallexample
+
+@sc{gdb/mi} has a similar command, although it is only available in versions of
+@value{GDBN} which support @sc{gdb/mi} version 2 (or greater).
+
@node TUI
@chapter @value{GDBN} Text User Interface
@cindex TUI
@@ -14456,6 +14192,7 @@ Then give @file{gdb.dvi} to your @sc{dvi} printing program.
@appendix Installing @value{GDBN}
@cindex configuring @value{GDBN}
@cindex installation
+@cindex configuring @value{GDBN}, and source tree subdirectories
@value{GDBN} comes with a @code{configure} script that automates the process
of preparing @value{GDBN} for installation; you can then use @code{make} to
@@ -14546,19 +14283,15 @@ directories for multiple libraries or programs, such as the
creates configuration files for every directory level underneath (unless
you tell it not to, with the @samp{--norecursion} option).
-You can run the @code{configure} script from any of the
-subordinate directories in the @value{GDBN} distribution if you only want to
-configure that subdirectory, but be sure to specify a path to it.
-
-For example, with version @value{GDBVN}, type the following to configure only
-the @code{bfd} subdirectory:
-
-@smallexample
-@group
-cd gdb-@value{GDBVN}/bfd
-../configure @var{host}
-@end group
-@end smallexample
+You should run the @code{configure} script from the top directory in the
+source tree, the @file{gdb-@var{version-number}} directory. If you run
+@code{configure} from one of the subdirectories, you will configure only
+that subdirectory. That is usually not what you want. In particular,
+if you run the first @code{configure} from the @file{gdb} subdirectory
+of the @file{gdb-@var{version-number}} directory, you will omit the
+configuration of @file{bfd}, @file{readline}, and other sibling
+directories of the @file{gdb} subdirectory. This leads to build errors
+about missing include files such as @file{bfd/bfd.h}.
You can install @code{@value{GDBP}} anywhere; it has no hardwired paths.
However, you should make sure that the shell on your path (named by
@@ -14611,6 +14344,12 @@ the example, you'd find the Sun 4 library @file{libiberty.a} in the
directory @file{gdb-sun4/libiberty}, and @value{GDBN} itself in
@file{gdb-sun4/gdb}.
+Make sure that your path to the @file{configure} script has just one
+instance of @file{gdb} in it. If your path to @file{configure} looks
+like @file{../gdb-@value{GDBVN}/gdb/configure}, you are configuring only
+one subdirectory of @value{GDBN}, not the whole package. This leads to
+build errors about missing include files such as @file{bfd/bfd.h}.
+
One popular reason to build several @value{GDBN} configurations in separate
directories is to configure @value{GDBN} for cross-compiling (where
@value{GDBN} runs on one machine---the @dfn{host}---while debugging
@@ -14814,18 +14553,58 @@ warning message.
@kindex maint print registers
@kindex maint print raw-registers
@kindex maint print cooked-registers
+@kindex maint print register-groups
@item maint print registers
@itemx maint print raw-registers
@itemx maint print cooked-registers
+@itemx maint print register-groups
Print @value{GDBN}'s internal register data structures.
-The command @samp{maint print raw-registers} includes the contents of
-the raw register cache; and the command @samp{maint print
-cooked-registers} includes the (cooked) value of all registers.
-@xref{Registers,, Registers, gdbint, @value{GDBN} Internals}.
+The command @code{maint print raw-registers} includes the contents of
+the raw register cache; the command @code{maint print cooked-registers}
+includes the (cooked) value of all registers; and the command
+@code{maint print register-groups} includes the groups that each
+register is a member of. @xref{Registers,, Registers, gdbint,
+@value{GDBN} Internals}.
Takes an optional file parameter.
+@kindex maint print reggroups
+@item maint print reggroups
+Print @value{GDBN}'s internal register group data structures.
+
+Takes an optional file parameter.
+
+@smallexample
+(gdb) @kbd{maint print reggroups}
+ Group Type
+ general user
+ float user
+ all user
+ vector user
+ system user
+ save internal
+ restore internal
+@end smallexample
+
+@kindex maint set profile
+@kindex maint show profile
+@cindex profiling GDB
+@item maint set profile
+@itemx maint show profile
+Control profiling of @value{GDBN}.
+
+Profiling will be disabled until you use the @samp{maint set profile}
+command to enable it. When you enable profiling, the system will begin
+collecting timing and execution count data; when you disable profiling or
+exit @value{GDBN}, the results will be written to a log file. Remember that
+if you use profiling, @value{GDBN} will overwrite the profiling log file
+(often called @file{gmon.out}). If you have a record of important profiling
+data in a @file{gmon.out} file, be sure to move it to a safe location.
+
+Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be
+compiled with the @samp{-pg} compiler option.
+
@end table
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 84a72a53a29..587705387b9 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -8,7 +8,7 @@
@ifinfo
This file documents the internals of the GNU debugger @value{GDBN}.
-Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002
+Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003
Free Software Foundation, Inc.
Contributed by Cygnus Solutions. Written by John Gilmore.
Second Edition by Stan Shebs.
@@ -41,7 +41,7 @@ Software Foundation raise funds for GNU development.''
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.102.2.4 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.102.2.5 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Solutions\par
\hfill \manvers\par
@@ -50,8 +50,8 @@ Software Foundation raise funds for GNU development.''
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001, 2002
- Free Software Foundation, Inc.
+Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,
+ 2002, 2003 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -1841,7 +1841,6 @@ The file @file{mdebugread.c} implements reading for this format.
DWARF 1 is a debugging format that was originally designed to be
used with ELF in SVR4 systems.
-@c OBSOLETE CHILL_PRODUCER
@c GCC_PRODUCER
@c GPLUS_PRODUCER
@c LCC_PRODUCER
@@ -2296,9 +2295,8 @@ always linked in.)
@item USG
Means that System V (prior to SVR4) include files are in use. (FIXME:
-This symbol is abused in @file{infrun.c}, @file{regex.c},
-@file{remote-nindy.c}, and @file{utils.c} for other things, at the
-moment.)
+This symbol is abused in @file{infrun.c}, @file{regex.c}, and
+@file{utils.c} for other things, at the moment.)
@item lint
Define this to help placate @code{lint} in some situations.
@@ -2424,9 +2422,12 @@ Here are the functions that make up the OS ABI framework:
Return the name of the OS ABI corresponding to @var{osabi}.
@end deftypefun
-@deftypefun void gdbarch_register_osabi (enum bfd_architecture @var{arch}, enum gdb_osabi @var{osabi}, void (*@var{init_osabi})(struct gdbarch_info @var{info}, struct gdbarch *@var{gdbarch}))
+@deftypefun void gdbarch_register_osabi (enum bfd_architecture @var{arch}, unsigned long @var{machine}, enum gdb_osabi @var{osabi}, void (*@var{init_osabi})(struct gdbarch_info @var{info}, struct gdbarch *@var{gdbarch}))
Register the OS ABI handler specified by @var{init_osabi} for the
-architecture/OS ABI pair specified by @var{arch} and @var{osabi}.
+architecture, machine type and OS ABI specified by @var{arch},
+@var{machine} and @var{osabi}. In most cases, a value of zero for the
+machine type, which implies the architecture's default machine type,
+will suffice.
@end deftypefun
@deftypefun void gdbarch_register_osabi_sniffer (enum bfd_architecture @var{arch}, enum bfd_flavour @var{flavour}, enum gdb_osabi (*@var{sniffer})(bfd *@var{abfd}))
@@ -2911,18 +2912,6 @@ machine.
@table @code
-@item ADDITIONAL_OPTIONS
-@itemx ADDITIONAL_OPTION_CASES
-@itemx ADDITIONAL_OPTION_HANDLER
-@itemx ADDITIONAL_OPTION_HELP
-@findex ADDITIONAL_OPTION_HELP
-@findex ADDITIONAL_OPTION_HANDLER
-@findex ADDITIONAL_OPTION_CASES
-@findex ADDITIONAL_OPTIONS
-These are a set of macros that allow the addition of additional command
-line options to @value{GDBN}. They are currently used only for the unsupported
-i960 Nindy target, and should not be used in any other configuration.
-
@item ADDR_BITS_REMOVE (addr)
@findex ADDR_BITS_REMOVE
If a raw machine instruction address includes any bits that are not
@@ -2988,16 +2977,6 @@ This macro may safely assume that @var{type} is either a pointer or a
C@t{++} reference type.
@xref{Target Architecture Definition, , Pointers Are Not Always Addresses}.
-@item BEFORE_MAIN_LOOP_HOOK
-@findex BEFORE_MAIN_LOOP_HOOK
-Define this to expand into any code that you want to execute before the
-main loop starts. Although this is not, strictly speaking, a target
-conditional, that is how it is currently being used. Note that if a
-configuration were to define it one way for a host and a different way
-for the target, @value{GDBN} will probably not compile, let alone run
-correctly. This macro is currently used only for the unsupported i960 Nindy
-target, and should not be used in any other configuration.
-
@item BELIEVE_PCC_PROMOTION
@findex BELIEVE_PCC_PROMOTION
Define if the compiler promotes a @code{short} or @code{char}
@@ -3142,62 +3121,12 @@ and to cancel any deferred stores.
Currently only implemented correctly for native Sparc configurations?
-@item COERCE_FLOAT_TO_DOUBLE (@var{formal}, @var{actual})
-@findex COERCE_FLOAT_TO_DOUBLE
-@cindex promotion to @code{double}
-@cindex @code{float} arguments
-@cindex prototyped functions, passing arguments to
-@cindex passing arguments to prototyped functions
-Return non-zero if GDB should promote @code{float} values to
-@code{double} when calling a non-prototyped function. The argument
-@var{actual} is the type of the value we want to pass to the function.
-The argument @var{formal} is the type of this argument, as it appears in
-the function's definition. Note that @var{formal} may be zero if we
-have no debugging information for the function, or if we're passing more
-arguments than are officially declared (for example, varargs). This
-macro is never invoked if the function definitely has a prototype.
-
-How you should pass arguments to a function depends on whether it was
-defined in K&R style or prototype style. If you define a function using
-the K&R syntax that takes a @code{float} argument, then callers must
-pass that argument as a @code{double}. If you define the function using
-the prototype syntax, then you must pass the argument as a @code{float},
-with no promotion.
-
-Unfortunately, on certain older platforms, the debug info doesn't
-indicate reliably how each function was defined. A function type's
-@code{TYPE_FLAG_PROTOTYPED} flag may be unset, even if the function was
-defined in prototype style. When calling a function whose
-@code{TYPE_FLAG_PROTOTYPED} flag is unset, GDB consults the
-@code{COERCE_FLOAT_TO_DOUBLE} macro to decide what to do.
-
-@findex standard_coerce_float_to_double
-For modern targets, it is proper to assume that, if the prototype flag
-is unset, that can be trusted: @code{float} arguments should be promoted
-to @code{double}. You should use the function
-@code{standard_coerce_float_to_double} to get this behavior.
-
-@findex default_coerce_float_to_double
-For some older targets, if the prototype flag is unset, that doesn't
-tell us anything. So we guess that, if we don't have a type for the
-formal parameter (@i{i.e.}, the first argument to
-@code{COERCE_FLOAT_TO_DOUBLE} is null), then we should promote it;
-otherwise, we should leave it alone. The function
-@code{default_coerce_float_to_double} provides this behavior; it is the
-default value, for compatibility with older configurations.
-
@item int CONVERT_REGISTER_P(@var{regnum})
@findex CONVERT_REGISTER_P
Return non-zero if register @var{regnum} can represent data values in a
non-standard form.
@xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}.
-@item DBX_PARM_SYMBOL_CLASS
-@findex DBX_PARM_SYMBOL_CLASS
-Hook for the @code{SYMBOL_CLASS} of a parameter when decoding DBX symbol
-information. In the i960, parameters can be stored as locals or as
-args, depending on the type of the debug record.
-
@item DECR_PC_AFTER_BREAK
@findex DECR_PC_AFTER_BREAK
Define this to be the amount by which to decrement the PC after the
@@ -3274,10 +3203,6 @@ If not defined, @code{EXTRACT_RETURN_VALUE} is used.
@findex EXTRACT_STRUCT_VALUE_ADDRESS_P
Predicate for @code{EXTRACT_STRUCT_VALUE_ADDRESS}.
-@item FLOAT_INFO
-@findex FLOAT_INFO
-Deprecated in favor of @code{PRINT_FLOAT_INFO}.
-
@item FP_REGNUM
@findex FP_REGNUM
If the virtual frame pointer is kept in a register, then define this
@@ -3319,34 +3244,19 @@ Given @var{frame}, return a pointer to the calling frame.
@item FRAME_CHAIN_VALID(@var{chain}, @var{thisframe})
@findex FRAME_CHAIN_VALID
-Define this to be an expression that returns zero if the given frame is
-an outermost frame, with no caller, and nonzero otherwise. Several
-common definitions are available:
-
-@itemize @bullet
-@item
-@code{file_frame_chain_valid} is nonzero if the chain pointer is nonzero
-and given frame's PC is not inside the startup file (such as
-@file{crt0.o}).
-
-@item
-@code{func_frame_chain_valid} is nonzero if the chain
-pointer is nonzero and the given frame's PC is not in @code{main} or a
-known entry point function (such as @code{_start}).
-
-@item
-@code{generic_file_frame_chain_valid} and
-@code{generic_func_frame_chain_valid} are equivalent implementations for
-targets using generic dummy frames.
-@end itemize
+Define this to be an expression that returns zero if the given frame is an
+outermost frame, with no caller, and nonzero otherwise. Most normal
+situations can be handled without defining this macro, including @code{NULL}
+chain pointers, dummy frames, and frames whose PC values are inside the
+startup file (e.g.@: @file{crt0.o}), inside @code{main}, or inside
+@code{_start}.
@item FRAME_INIT_SAVED_REGS(@var{frame})
@findex FRAME_INIT_SAVED_REGS
See @file{frame.h}. Determines the address of all registers in the
current stack frame storing each in @code{frame->saved_regs}. Space for
@code{frame->saved_regs} shall be allocated by
-@code{FRAME_INIT_SAVED_REGS} using either
-@code{frame_saved_regs_zalloc} or @code{frame_obstack_alloc}.
+@code{FRAME_INIT_SAVED_REGS} using @code{frame_saved_regs_zalloc}.
@code{FRAME_FIND_SAVED_REGS} and @code{EXTRA_FRAME_INFO} are deprecated.
@@ -3451,7 +3361,7 @@ routine that handles inter-space procedure calls on PA-RISC.
@findex INIT_EXTRA_FRAME_INFO
If additional information about the frame is required this should be
stored in @code{frame->extra_info}. Space for @code{frame->extra_info}
-is allocated using @code{frame_obstack_alloc}.
+is allocated using @code{frame_extra_info_zalloc}.
@item DEPRECATED_INIT_FRAME_PC (@var{fromleaf}, @var{prev})
@findex DEPRECATED_INIT_FRAME_PC
@@ -3527,13 +3437,6 @@ method like @code{INTEGER_TO_ADDRESS} certainly makes it possible for
@xref{Target Architecture Definition, , Pointers Are Not Always
Addresses}.
-@item IS_TRAPPED_INTERNALVAR (@var{name})
-@findex IS_TRAPPED_INTERNALVAR
-This is an ugly hook to allow the specification of special actions that
-should occur as a side-effect of setting the value of a variable
-internal to @value{GDBN}. Currently only used by the h8500. Note that this
-could be either a host or target conditional.
-
@item NEED_TEXT_START_END
@findex NEED_TEXT_START_END
Define this if @value{GDBN} should determine the start and end addresses of the
@@ -3567,6 +3470,28 @@ 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}.
+@item register_reggroup_p (@var{gdbarch}, @var{regnum}, @var{reggroup})
+@findex register_reggroup_p
+@cindex register groups
+Return non-zero if register @var{regnum} is a member of the register
+group @var{reggroup}.
+
+By default, registers are grouped as follows:
+
+@table @code
+@item float_reggroup
+Any register with a valid name and a floating-point type.
+@item vector_reggroup
+Any register with a valid name and a vector type.
+@item general_reggroup
+Any register with a valid name and a type other than vector or
+floating-point. @samp{float_reggroup}.
+@item save_reggroup
+@itemx restore_reggroup
+@itemx all_reggroup
+Any register with a valid name.
+@end table
+
@item REGISTER_VIRTUAL_SIZE (@var{reg})
@findex REGISTER_VIRTUAL_SIZE
Return the virtual size of @var{reg}; defaults to the size of the
@@ -3709,11 +3634,6 @@ The number of the ``next program counter'' register, if defined.
If non-zero, round arguments to a boundary of this many bits before
pushing them on the stack.
-@item PRINT_REGISTER_HOOK (@var{regno})
-@findex PRINT_REGISTER_HOOK
-If defined, this must be a function that prints the contents of the
-given register to standard output.
-
@item PRINT_TYPELESS_INTEGER
@findex PRINT_TYPELESS_INTEGER
This is an obscure substitute for @code{print_longest} that seems to
@@ -3779,10 +3699,6 @@ for parameters/results have been allocated on the stack.
Define this to convert sdb register numbers into @value{GDBN} regnums. If not
defined, no conversion will be done.
-@c OBSOLETE @item SHIFT_INST_REGS
-@c OBSOLETE @findex SHIFT_INST_REGS
-@c OBSOLETE (Only used for m88k targets.)
-
@item SKIP_PERMANENT_BREAKPOINT
@findex SKIP_PERMANENT_BREAKPOINT
Advance the inferior's PC past a permanent breakpoint. @value{GDBN} normally
@@ -5457,62 +5373,6 @@ target-dependent @file{.h} and @file{.c} files used for your
configuration.
@end itemize
-@section Configuring @value{GDBN} for Release
-
-@cindex preparing a release
-@cindex making a distribution tarball
-From the top level directory (containing @file{gdb}, @file{bfd},
-@file{libiberty}, and so on):
-
-@smallexample
-make -f Makefile.in gdb.tar.gz
-@end smallexample
-
-@noindent
-This will properly configure, clean, rebuild any files that are
-distributed pre-built (e.g. @file{c-exp.tab.c} or @file{refcard.ps}),
-and will then make a tarfile. (If the top level directory has already
-been configured, you can just do @code{make gdb.tar.gz} instead.)
-
-This procedure requires:
-
-@itemize @bullet
-
-@item
-symbolic links;
-
-@item
-@code{makeinfo} (texinfo2 level);
-
-@item
-@TeX{};
-
-@item
-@code{dvips};
-
-@item
-@code{yacc} or @code{bison}.
-@end itemize
-
-@noindent
-@dots{} and the usual slew of utilities (@code{sed}, @code{tar}, etc.).
-
-@subheading TEMPORARY RELEASE PROCEDURE FOR DOCUMENTATION
-
-@file{gdb.texinfo} is currently marked up using the texinfo-2 macros,
-which are not yet a default for anything (but we have to start using
-them sometime).
-
-For making paper, the only thing this implies is the right generation of
-@file{texinfo.tex} needs to be included in the distribution.
-
-For making info files, however, rather than duplicating the texinfo2
-distribution, generate @file{gdb-all.texinfo} locally, and include the
-files @file{gdb.info*} in the distribution. Note the plural;
-@code{makeinfo} will split the document into one overall file and five
-or so included files.
-
-
@node Releasing GDB
@chapter Releasing @value{GDBN}
@@ -6048,6 +5908,17 @@ This is identical to the process used to create the daily snapshot.
@smallexample
$ for m in gdb insight
do
+( cd $m/src && gmake -f src-release $m.tar )
+done
+$ ( m=dejagnu; cd $m/src && gmake -f src-release $m.tar.bz2 )
+@end smallexample
+
+If the top level source directory does not have @file{src-release}
+(@value{GDBN} version 5.3.1 or earlier), try these commands instead:
+
+@smallexample
+$ for m in gdb insight
+do
( cd $m/src && gmake -f Makefile.in $m.tar )
done
$ ( m=dejagnu; cd $m/src && gmake -f Makefile.in $m.tar.bz2 )
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 1dc0d063cd9..3f91fd37a10 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -39,7 +39,7 @@ Software Foundation raise funds for GNU development.''
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.7 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.7.8.1 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill \manvers\par
@@ -1754,8 +1754,7 @@ Pascal set type. @var{type-information} must be a small type such as an
enumeration or a subrange, and the type is a bitmask whose length is
specified by the number of elements in @var{type-information}.
-In CHILL, @c OBSOLETE
-if it is a bitstring instead of a set, also use the @samp{S}
+In CHILL, if it is a bitstring instead of a set, also use the @samp{S}
type attribute (@pxref{String Field}).
@item * @var{type-information}
@@ -1956,8 +1955,7 @@ string. I don't know the difference.
Pascal Stringptr. What is this? This is an AIX feature.
@end table
-Languages, such as CHILL @c OBSOLETE
-which have a string type which is basically
+Languages, such as CHILL which have a string type which is basically
just an array of characters use the @samp{S} type attribute
(@pxref{String Field}).
@@ -2726,11 +2724,22 @@ compiler it can also be used in other contexts.
@node Member Type Descriptor
@section The @samp{@@} Type Descriptor
-The @samp{@@} type descriptor is for a member (class and variable) type.
-It is followed by type information for the offset basetype, a comma, and
-type information for the type of the field being pointed to. (FIXME:
-this is acknowledged to be gibberish. Can anyone say what really goes
-here?).
+The @samp{@@} type descriptor is used together with the @samp{*} type
+descriptor for a pointer-to-non-static-member-data type. It is followed
+by type information for the class (or union), a comma, and type
+information for the member data.
+
+The following C++ source:
+
+@smallexample
+typedef int A::*int_in_a;
+@end smallexample
+
+generates the following stab:
+
+@smallexample
+.stabs "int_in_a:t20=*21=@@19,1",128,0,0,0
+@end smallexample
Note that there is a conflict between this and type attributes
(@pxref{String Field}); both use type descriptor @samp{@@}.
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index fab10c08e02..5b638306fd3 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -28,6 +28,7 @@
#include "frame.h"
#include "inferior.h"
#include "gdb_assert.h"
+#include "frame-unwind.h"
/* Dummy frame. This saves the processor state just prior to setting
up the inferior function call. Older targets save the registers
@@ -269,8 +270,48 @@ generic_pop_current_frame (void (*popper) (struct frame_info * frame))
(*popper) (frame);
}
-/* Function: pop_dummy_frame
- Restore the machine state from a saved dummy stack frame. */
+/* Discard the innermost dummy frame from the dummy frame stack
+ (passed in as a parameter). */
+
+static void
+discard_innermost_dummy (struct dummy_frame **stack)
+{
+ struct dummy_frame *tbd = (*stack);
+ (*stack) = (*stack)->next;
+ regcache_xfree (tbd->regcache);
+ xfree (tbd);
+}
+
+/* Function: dummy_frame_pop. Restore the machine state from a saved
+ dummy stack frame. */
+
+static void
+dummy_frame_pop (struct frame_info *fi, void **cache,
+ struct regcache *regcache)
+{
+ struct dummy_frame *dummy = cached_find_dummy_frame (fi, cache);
+
+ /* If it isn't, what are we even doing here? */
+ gdb_assert (get_frame_type (fi) == DUMMY_FRAME);
+
+ if (dummy == NULL)
+ error ("Can't pop dummy frame!");
+
+ /* Discard all dummy frames up-to but not including this one. */
+ while (dummy_frame_stack != dummy)
+ discard_innermost_dummy (&dummy_frame_stack);
+
+ /* Restore this one. */
+ regcache_cpy (regcache, dummy->regcache);
+ flush_cached_frames ();
+
+ /* Now discard it. */
+ discard_innermost_dummy (&dummy_frame_stack);
+
+ /* Note: target changed would be better. Registers, memory and
+ frame are all invalid. */
+ flush_cached_frames ();
+}
void
generic_pop_dummy_frame (void)
@@ -282,12 +323,10 @@ generic_pop_dummy_frame (void)
if (!dummy_frame)
error ("Can't pop dummy frame!");
- dummy_frame_stack = dummy_frame->next;
regcache_cpy (current_regcache, dummy_frame->regcache);
flush_cached_frames ();
- regcache_xfree (dummy_frame->regcache);
- xfree (dummy_frame);
+ discard_innermost_dummy (&dummy_frame_stack);
}
/* Function: fix_call_dummy
@@ -304,7 +343,7 @@ generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
/* Given a call-dummy dummy-frame, return the registers. Here the
register value is taken from the local copy of the register buffer. */
-void
+static void
dummy_frame_register_unwind (struct frame_info *frame, void **cache,
int regnum, int *optimized,
enum lval_type *lvalp, CORE_ADDR *addrp,
@@ -331,7 +370,10 @@ dummy_frame_register_unwind (struct frame_info *frame, void **cache,
}
}
-CORE_ADDR
+/* Assuming that FRAME is a dummy, return the resume address for the
+ previous frame. */
+
+static CORE_ADDR
dummy_frame_pc_unwind (struct frame_info *frame,
void **cache)
{
@@ -345,16 +387,39 @@ dummy_frame_pc_unwind (struct frame_info *frame,
}
-struct frame_id
+/* Assuming that FRAME is a dummy, return the ID of the calling frame
+ (the frame that the dummy has the saved state of). */
+
+static void
dummy_frame_id_unwind (struct frame_info *frame,
- void **cache)
+ void **cache,
+ struct frame_id *id)
{
struct dummy_frame *dummy = cached_find_dummy_frame (frame, cache);
/* Oops! In a dummy-frame but can't find the stack dummy. Pretend
that the frame doesn't unwind. Should this function instead
return a has-no-caller indication? */
if (dummy == NULL)
- return null_frame_id;
- return dummy->id;
+ (*id) = null_frame_id;
+ else
+ (*id) = dummy->id;
}
+static struct frame_unwind dummy_frame_unwind =
+{
+ dummy_frame_pop,
+ dummy_frame_pc_unwind,
+ dummy_frame_id_unwind,
+ dummy_frame_register_unwind
+};
+
+const struct frame_unwind *
+dummy_frame_p (CORE_ADDR pc)
+{
+ if (DEPRECATED_PC_IN_CALL_DUMMY_P ()
+ ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
+ : pc_in_dummy_frame (pc))
+ return &dummy_frame_unwind;
+ else
+ return NULL;
+}
diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h
index cfa2709142e..2d0342115a2 100644
--- a/gdb/dummy-frame.h
+++ b/gdb/dummy-frame.h
@@ -24,6 +24,8 @@
struct frame_info;
struct regcache;
+struct frame_unwind;
+struct frame_id;
/* GENERIC DUMMY FRAMES
@@ -42,29 +44,10 @@ struct regcache;
generic_{file,func}_frame_chain_valid and FIX_CALL_DUMMY as
generic_fix_call_dummy. */
-/* Assuming that FRAME is a dummy, return a register value for the
- previous frame. */
+/* If the PC falls in a dummy frame, return a dummy frame
+ unwinder. */
-extern void dummy_frame_register_unwind (struct frame_info *frame,
- void **unwind_cache,
- int regnum,
- int *optimized,
- enum lval_type *lvalp,
- CORE_ADDR *addrp,
- int *realnump,
- void *valuep);
-
-/* Assuming that FRAME is a dummy, return the resume address for the
- previous frame. */
-
-extern CORE_ADDR dummy_frame_pc_unwind (struct frame_info *frame,
- void **unwind_cache);
-
-/* Assuming that FRAME is a dummy, return the ID of the calling frame
- (the frame that the dummy has the saved state of). */
-
-extern struct frame_id dummy_frame_id_unwind (struct frame_info *frame,
- void **unwind_cache);
+extern const struct frame_unwind *dummy_frame_p (CORE_ADDR pc);
/* Does the PC fall in a dummy frame?
diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c
index c8834e92795..e7329f8988a 100644
--- a/gdb/dve3900-rom.c
+++ b/gdb/dve3900-rom.c
@@ -32,7 +32,7 @@
/* Type of function passed to bfd_map_over_sections. */
-typedef void (*section_map_func) (bfd * abfd, asection * sect, PTR obj);
+typedef void (*section_map_func) (bfd * abfd, asection * sect, void *obj);
/* Packet escape character used by Densan monitor. */
@@ -455,7 +455,7 @@ static void
fetch_bitmapped_register (int regno, struct bit_field *bf)
{
unsigned long val;
- unsigned char regbuf[MAX_REGISTER_RAW_SIZE];
+ unsigned char *regbuf = alloca (max_register_size (current_gdbarch));
char *regname = NULL;
if (regno >= sizeof (r3900_regnames) / sizeof (r3900_regnames[0]))
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 75c3c4daf8e..618bede45ae 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -1,5 +1,7 @@
/* Stack unwinding code based on dwarf2 frame info for GDB, the GNU debugger.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Jiri Smid, SuSE Labs.
Based on code written by Daniel Berlin (dan@dberlin.org).
@@ -156,7 +158,7 @@ enum ptr_encoding
PE_funcrel = DW_EH_PE_funcrel
};
-#define UNWIND_CONTEXT(fi) ((struct context *) (fi->context))
+#define UNWIND_CONTEXT(fi) ((struct context *) (deprecated_get_frame_context (fi)))
static struct cie_unit *cie_chunks;
@@ -168,10 +170,13 @@ extern file_ptr dwarf_frame_offset;
extern unsigned int dwarf_frame_size;
extern file_ptr dwarf_eh_frame_offset;
extern unsigned int dwarf_eh_frame_size;
+extern asection *dwarf_frame_section;
+extern asection *dwarf_eh_frame_section;
+
extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
- unsigned int size);
+ unsigned int size, asection* sectp);
static struct fde_unit *fde_unit_alloc (void);
static struct cie_unit *cie_unit_alloc (void);
@@ -194,7 +199,7 @@ static LONGEST read_sleb128 (bfd *abfd, char **p);
static CORE_ADDR read_pointer (bfd *abfd, char **p);
static CORE_ADDR read_encoded_pointer (bfd *abfd, char **p,
unsigned char encoding);
-static enum ptr_encoding pointer_encoding (unsigned char encoding);
+static enum ptr_encoding pointer_encoding (unsigned char encoding, struct objfile *objfile);
static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
@@ -457,7 +462,8 @@ read_pointer (bfd *abfd, char **p)
case 8:
return read_8u (abfd, p);
default:
- error ("dwarf cfi error: unsupported target address length.");
+ error ("dwarf cfi error: unsupported target address length [in module %s]",
+ bfd_get_filename (abfd));
}
}
@@ -504,7 +510,8 @@ read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
default:
internal_error (__FILE__, __LINE__,
- "read_encoded_pointer: unknown pointer encoding");
+ "read_encoded_pointer: unknown pointer encoding [in module %s]",
+ bfd_get_filename (abfd));
}
return ret;
@@ -515,12 +522,13 @@ read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
- encoding & 0x70 : type (absolute, relative, ...)
- encoding & 0x80 : indirect flag (DW_EH_PE_indirect == 0x80). */
enum ptr_encoding
-pointer_encoding (unsigned char encoding)
+pointer_encoding (unsigned char encoding, struct objfile *objfile)
{
int ret;
if (encoding & DW_EH_PE_indirect)
- warning ("CFI: Unsupported pointer encoding: DW_EH_PE_indirect");
+ warning ("CFI: Unsupported pointer encoding: DW_EH_PE_indirect [in module %s]",
+ objfile->name);
switch (encoding & 0x70)
{
@@ -532,7 +540,8 @@ pointer_encoding (unsigned char encoding)
ret = encoding & 0x70;
break;
default:
- internal_error (__FILE__, __LINE__, "CFI: unknown pointer encoding");
+ internal_error (__FILE__, __LINE__, "CFI: unknown pointer encoding [in module %s]",
+ objfile->name);
}
return ret;
}
@@ -609,8 +618,9 @@ execute_cfa_program (struct objfile *objfile, char *insn_ptr, char *insn_end,
fs->pc = read_encoded_pointer (objfile->obfd, &insn_ptr,
fs->addr_encoding);
- if (pointer_encoding (fs->addr_encoding) != PE_absptr)
- warning ("CFI: DW_CFA_set_loc uses relative addressing");
+ if (pointer_encoding (fs->addr_encoding, objfile) != PE_absptr)
+ warning ("CFI: DW_CFA_set_loc uses relative addressing [in module %s]",
+ objfile->name);
break;
@@ -759,7 +769,8 @@ execute_cfa_program (struct objfile *objfile, char *insn_ptr, char *insn_end,
break;
default:
- error ("dwarf cfi error: unknown cfa instruction %d.", insn);
+ error ("dwarf cfi error: unknown cfa instruction %d [in module %s]", insn,
+ objfile->name);
}
}
}
@@ -1022,25 +1033,25 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_dup:
if (stack_elt < 1)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
result = stack[stack_elt - 1];
break;
case DW_OP_drop:
if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
goto no_push;
case DW_OP_pick:
offset = *op_ptr++;
if (offset >= stack_elt - 1)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
result = stack[stack_elt - 1 - offset];
break;
case DW_OP_over:
if (stack_elt < 2)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
result = stack[stack_elt - 2];
break;
@@ -1049,7 +1060,7 @@ execute_stack_op (struct objfile *objfile,
CORE_ADDR t1, t2, t3;
if (stack_elt < 3)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
t1 = stack[stack_elt - 1];
t2 = stack[stack_elt - 2];
t3 = stack[stack_elt - 3];
@@ -1067,7 +1078,7 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_plus_uconst:
/* Unary operations. */
if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
result = stack[stack_elt];
switch (op)
@@ -1077,7 +1088,7 @@ execute_stack_op (struct objfile *objfile,
int len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
if (len != 4 && len != 8)
internal_error (__FILE__, __LINE__,
- "execute_stack_op error");
+ "execute_stack_op error [in module %s]", objfile->name);
result = read_memory_unsigned_integer (result, len);
}
break;
@@ -1087,7 +1098,7 @@ execute_stack_op (struct objfile *objfile,
int len = *op_ptr++;
if (len != 1 && len != 2 && len != 4 && len != 8)
internal_error (__FILE__, __LINE__,
- "execute_stack_op error");
+ "execute_stack_op error [in module %s]", objfile->name);
result = read_memory_unsigned_integer (result, len);
}
break;
@@ -1127,7 +1138,7 @@ execute_stack_op (struct objfile *objfile,
/* Binary operations. */
CORE_ADDR first, second;
if ((stack_elt -= 2) < 0)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
second = stack[stack_elt];
first = stack[stack_elt + 1];
@@ -1185,7 +1196,7 @@ execute_stack_op (struct objfile *objfile,
result = (LONGEST) first != (LONGEST) second;
break;
default:
- error ("execute_stack_op: Unknown DW_OP_ value");
+ error ("execute_stack_op: Unknown DW_OP_ value [in module %s]", objfile->name);
break;
}
}
@@ -1198,7 +1209,7 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_bra:
if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
offset = read_2s (objfile->obfd, &op_ptr);
if (stack[stack_elt] != 0)
op_ptr += offset;
@@ -1208,12 +1219,12 @@ execute_stack_op (struct objfile *objfile,
goto no_push;
default:
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
}
/* Most things push a result value. */
if ((size_t) stack_elt >= sizeof (stack) / sizeof (*stack))
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
stack[++stack_elt] = result;
no_push:;
}
@@ -1221,7 +1232,7 @@ execute_stack_op (struct objfile *objfile,
/* We were executing this program to get a value. It should be
at top of stack. */
if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__, "execute_stack_op error");
+ internal_error (__FILE__, __LINE__, "execute_stack_op error [in module %s]", objfile->name);
return stack[stack_elt];
}
@@ -1306,7 +1317,8 @@ update_context (struct context *context, struct frame_state *fs, int chain)
orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr;
break;
default:
- internal_error (__FILE__, __LINE__, "bad switch");
+ internal_error (__FILE__, __LINE__, "bad switch 0x%02X",
+ orig_context->reg[fs->regs.reg[i].loc.reg].how);
}
break;
case REG_SAVED_EXP:
@@ -1323,7 +1335,8 @@ update_context (struct context *context, struct frame_state *fs, int chain)
}
break;
default:
- internal_error (__FILE__, __LINE__, "bad switch");
+ internal_error (__FILE__, __LINE__, "bad switch 0x%02X",
+ fs->regs.reg[i].how);
}
get_reg ((char *) &context->ra, context, fs->retaddr_column);
unwind_tmp_obstack_free ();
@@ -1366,7 +1379,8 @@ compare_fde_unit (const void *a, const void *b)
-- mludvig */
static void
parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
- unsigned int frame_size, int eh_frame)
+ unsigned int frame_size, asection *frame_section,
+ int eh_frame)
{
bfd *abfd = objfile->obfd;
asection *curr_section_ptr;
@@ -1381,7 +1395,8 @@ parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
unwind_tmp_obstack_init ();
- frame_buffer = dwarf2_read_section (objfile, frame_offset, frame_size);
+ frame_buffer = dwarf2_read_section (objfile, frame_offset, frame_size,
+ frame_section);
start = frame_buffer;
end = frame_buffer + frame_size;
@@ -1533,13 +1548,14 @@ parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
cie = cie->next;
}
if (!cie)
- error ("CFI: can't find CIE pointer");
+ error ("CFI: can't find CIE pointer [in module %s]",
+ bfd_get_filename (abfd));
}
init_loc = read_encoded_pointer (abfd, &start,
cie->addr_encoding);
- switch (pointer_encoding (cie->addr_encoding))
+ switch (pointer_encoding (cie->addr_encoding, objfile))
{
case PE_absptr:
break;
@@ -1549,7 +1565,8 @@ parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
init_loc += curr_section_vma + start - frame_buffer;
break;
default:
- warning ("CFI: Unsupported pointer encoding\n");
+ warning ("CFI: Unsupported pointer encoding [in module %s]",
+ bfd_get_filename (abfd));
}
/* For relocatable objects we must add an offset telling
@@ -1634,12 +1651,14 @@ dwarf2_build_frame_info (struct objfile *objfile)
if (dwarf_frame_offset)
{
parse_frame_info (objfile, dwarf_frame_offset,
- dwarf_frame_size, 0 /* = debug_frame */ );
+ dwarf_frame_size, dwarf_frame_section,
+ 0 /* = debug_frame */ );
after_debug_frame = 1;
}
if (dwarf_eh_frame_offset)
parse_frame_info (objfile, dwarf_eh_frame_offset, dwarf_eh_frame_size,
+ dwarf_eh_frame_section,
1 /* = eh_frame */ + after_debug_frame);
}
@@ -1770,21 +1789,21 @@ cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
unwind_tmp_obstack_init ();
fs = frame_state_alloc ();
- fi->context = frame_obstack_alloc (sizeof (struct context));
+ deprecated_set_frame_context (fi, frame_obstack_zalloc (sizeof (struct context)));
UNWIND_CONTEXT (fi)->reg =
- frame_obstack_alloc (sizeof (struct context_reg) * NUM_REGS);
+ frame_obstack_zalloc (sizeof (struct context_reg) * NUM_REGS);
memset (UNWIND_CONTEXT (fi)->reg, 0,
sizeof (struct context_reg) * NUM_REGS);
- if (fi->next)
+ if (get_next_frame (fi))
{
- context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (fi->next));
+ context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (get_next_frame (fi)));
frame_state_for (UNWIND_CONTEXT (fi), fs);
update_context (UNWIND_CONTEXT (fi), fs, 1);
}
else
{
- UNWIND_CONTEXT (fi)->ra = fi->pc + 1;
+ UNWIND_CONTEXT (fi)->ra = get_frame_pc (fi) + 1;
frame_state_for (UNWIND_CONTEXT (fi), fs);
update_context (UNWIND_CONTEXT (fi), fs, 0);
}
@@ -1823,7 +1842,7 @@ cfi_get_saved_register (char *raw_buffer,
if (addrp) /* default assumption: not found in memory */
*addrp = 0;
- if (!frame->next)
+ if (!get_next_frame (frame))
{
deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
@@ -1833,7 +1852,7 @@ cfi_get_saved_register (char *raw_buffer,
}
else
{
- frame = frame->next;
+ frame = get_next_frame (frame);
switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
{
case REG_CTX_UNSAVED:
@@ -1881,7 +1900,8 @@ cfi_get_saved_register (char *raw_buffer,
break;
default:
internal_error (__FILE__, __LINE__,
- "cfi_get_saved_register: unknown register rule");
+ "cfi_get_saved_register: unknown register rule 0x%02X",
+ UNWIND_CONTEXT (frame)->reg[regnum].how);
}
}
}
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 1952ad47498..9e9969dd44d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1,5 +1,5 @@
/* DWARF 2 debugging format support for GDB.
- 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.
Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
@@ -133,6 +133,7 @@ static file_ptr dwarf_aranges_offset;
static file_ptr dwarf_loc_offset;
static file_ptr dwarf_macinfo_offset;
static file_ptr dwarf_str_offset;
+static file_ptr dwarf_ranges_offset;
file_ptr dwarf_frame_offset;
file_ptr dwarf_eh_frame_offset;
@@ -144,9 +145,22 @@ static unsigned int dwarf_aranges_size;
static unsigned int dwarf_loc_size;
static unsigned int dwarf_macinfo_size;
static unsigned int dwarf_str_size;
+static unsigned int dwarf_ranges_size;
unsigned int dwarf_frame_size;
unsigned int dwarf_eh_frame_size;
+static asection *dwarf_info_section;
+static asection *dwarf_abbrev_section;
+static asection *dwarf_line_section;
+static asection *dwarf_pubnames_section;
+static asection *dwarf_aranges_section;
+static asection *dwarf_loc_section;
+static asection *dwarf_macinfo_section;
+static asection *dwarf_str_section;
+static asection *dwarf_ranges_section;
+asection *dwarf_frame_section;
+asection *dwarf_eh_frame_section;
+
/* names of the debugging sections */
#define INFO_SECTION ".debug_info"
@@ -157,6 +171,7 @@ unsigned int dwarf_eh_frame_size;
#define LOC_SECTION ".debug_loc"
#define MACINFO_SECTION ".debug_macinfo"
#define STR_SECTION ".debug_str"
+#define RANGES_SECTION ".debug_ranges"
#define FRAME_SECTION ".debug_frame"
#define EH_FRAME_SECTION ".eh_frame"
@@ -202,6 +217,10 @@ struct comp_unit_head
/* DWARF abbreviation table associated with this compilation unit */
struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE];
+
+ /* Pointer to the DIE associated with the compilation unit. */
+
+ struct die_info *die;
};
/* The line number information for a compilation unit (found in the
@@ -373,6 +392,7 @@ static char *dwarf_abbrev_buffer;
static char *dwarf_line_buffer;
static char *dwarf_str_buffer;
static char *dwarf_macinfo_buffer;
+static char *dwarf_ranges_buffer;
/* A zeroed version of a partial die for initialization purposes. */
static struct partial_die_info zeroed_partial_die;
@@ -481,6 +501,14 @@ struct dwarf2_pinfo
unsigned int dwarf_macinfo_size;
+ /* Pointer to start of dwarf ranges buffer for the objfile. */
+
+ char *dwarf_ranges_buffer;
+
+ /* Size of dwarf ranges buffer for the objfile. */
+
+ unsigned int dwarf_ranges_size;
+
};
#define PST_PRIVATE(p) ((struct dwarf2_pinfo *)(p)->read_symtab_private)
@@ -494,6 +522,8 @@ struct dwarf2_pinfo
#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size)
#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer)
#define DWARF_MACINFO_SIZE(p) (PST_PRIVATE(p)->dwarf_macinfo_size)
+#define DWARF_RANGES_BUFFER(p) (PST_PRIVATE(p)->dwarf_ranges_buffer)
+#define DWARF_RANGES_SIZE(p) (PST_PRIVATE(p)->dwarf_ranges_size)
/* Maintain an array of referenced fundamental types for the current
compilation unit being read. For DWARF version 1, we have to construct
@@ -621,7 +651,7 @@ dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2)
/* local function prototypes */
-static void dwarf2_locate_sections (bfd *, asection *, PTR);
+static void dwarf2_locate_sections (bfd *, asection *, void *);
#if 0
static void dwarf2_build_psymtabs_easy (struct objfile *, int);
@@ -668,11 +698,12 @@ static void dwarf2_psymtab_to_symtab (struct partial_symtab *);
static void psymtab_to_symtab_1 (struct partial_symtab *);
-char *dwarf2_read_section (struct objfile *, file_ptr, unsigned int);
+char *dwarf2_read_section (struct objfile *, file_ptr, unsigned int,
+ asection *);
static void dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header);
-static void dwarf2_empty_abbrev_table (PTR);
+static void dwarf2_empty_abbrev_table (void *);
static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
const struct comp_unit_head *cu_header);
@@ -779,7 +810,8 @@ static void read_lexical_block_scope (struct die_info *, struct objfile *,
const struct comp_unit_head *);
static int dwarf2_get_pc_bounds (struct die_info *,
- CORE_ADDR *, CORE_ADDR *, struct objfile *);
+ CORE_ADDR *, CORE_ADDR *, struct objfile *,
+ const struct comp_unit_head *);
static void dwarf2_add_field (struct field_info *, struct die_info *,
struct objfile *, const struct comp_unit_head *);
@@ -887,7 +919,7 @@ static struct type *dwarf2_fundamental_type (struct objfile *, int);
/* memory allocation interface */
-static void dwarf2_free_tmp_obstack (PTR);
+static void dwarf2_free_tmp_obstack (void *);
static struct dwarf_block *dwarf_alloc_block (void);
@@ -918,6 +950,8 @@ dwarf2_has_info (bfd *abfd)
dwarf_macinfo_offset = 0;
dwarf_frame_offset = 0;
dwarf_eh_frame_offset = 0;
+ dwarf_ranges_offset = 0;
+
bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL);
if (dwarf_info_offset && dwarf_abbrev_offset)
{
@@ -934,57 +968,73 @@ dwarf2_has_info (bfd *abfd)
in. */
static void
-dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, PTR ignore_ptr)
+dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
{
if (STREQ (sectp->name, INFO_SECTION))
{
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))
{
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))
{
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))
{
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))
{
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))
{
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))
{
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))
{
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))
{
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))
{
dwarf_eh_frame_offset = sectp->filepos;
dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_eh_frame_section = sectp;
+ }
+ else if (STREQ (sectp->name, RANGES_SECTION))
+ {
+ dwarf_ranges_offset = sectp->filepos;
+ dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_ranges_section = sectp;
}
}
@@ -998,32 +1048,45 @@ dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
dwarf_info_buffer = dwarf2_read_section (objfile,
dwarf_info_offset,
- dwarf_info_size);
+ dwarf_info_size,
+ dwarf_info_section);
dwarf_abbrev_buffer = dwarf2_read_section (objfile,
dwarf_abbrev_offset,
- dwarf_abbrev_size);
+ dwarf_abbrev_size,
+ dwarf_abbrev_section);
if (dwarf_line_offset)
dwarf_line_buffer = dwarf2_read_section (objfile,
dwarf_line_offset,
- dwarf_line_size);
+ dwarf_line_size,
+ dwarf_line_section);
else
dwarf_line_buffer = NULL;
if (dwarf_str_offset)
dwarf_str_buffer = dwarf2_read_section (objfile,
dwarf_str_offset,
- dwarf_str_size);
+ dwarf_str_size,
+ dwarf_str_section);
else
dwarf_str_buffer = NULL;
if (dwarf_macinfo_offset)
dwarf_macinfo_buffer = dwarf2_read_section (objfile,
dwarf_macinfo_offset,
- dwarf_macinfo_size);
+ dwarf_macinfo_size,
+ dwarf_macinfo_section);
else
dwarf_macinfo_buffer = NULL;
+ if (dwarf_ranges_offset)
+ dwarf_ranges_buffer = dwarf2_read_section (objfile,
+ dwarf_ranges_offset,
+ dwarf_ranges_size,
+ dwarf_ranges_section);
+ else
+ dwarf_ranges_buffer = NULL;
+
if (mainline
|| (objfile->global_psymbols.size == 0
&& objfile->static_psymbols.size == 0))
@@ -1062,7 +1125,8 @@ dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline)
pubnames_buffer = dwarf2_read_section (objfile,
dwarf_pubnames_offset,
- dwarf_pubnames_size);
+ dwarf_pubnames_size,
+ dwarf_pubnames_section);
pubnames_ptr = pubnames_buffer;
while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size)
{
@@ -1082,7 +1146,8 @@ dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline)
aranges_buffer = dwarf2_read_section (objfile,
dwarf_aranges_offset,
- dwarf_aranges_size);
+ dwarf_aranges_size,
+ dwarf_aranges_section);
}
#endif
@@ -1185,22 +1250,24 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
if (cu_header.version != 2)
{
- error ("Dwarf Error: wrong version in compilation unit header.");
+ error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu_header.version, 2, bfd_get_filename (abfd));
return;
}
if (cu_header.abbrev_offset >= dwarf_abbrev_size)
{
- error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6).",
+ error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]",
(long) cu_header.abbrev_offset,
- (long) (beg_of_comp_unit - dwarf_info_buffer));
+ (long) (beg_of_comp_unit - dwarf_info_buffer),
+ bfd_get_filename (abfd));
return;
}
if (beg_of_comp_unit + cu_header.length + cu_header.initial_length_size
> dwarf_info_buffer + dwarf_info_size)
{
- error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0).",
+ error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]",
(long) cu_header.length,
- (long) (beg_of_comp_unit - dwarf_info_buffer));
+ (long) (beg_of_comp_unit - dwarf_info_buffer),
+ bfd_get_filename (abfd));
return;
}
/* Complete the cu_header */
@@ -1239,6 +1306,8 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
DWARF_STR_SIZE (pst) = dwarf_str_size;
DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer;
DWARF_MACINFO_SIZE (pst) = dwarf_macinfo_size;
+ DWARF_RANGES_BUFFER (pst) = dwarf_ranges_buffer;
+ DWARF_RANGES_SIZE (pst) = dwarf_ranges_size;
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
/* Store the function that reads in the rest of the symbol table */
@@ -1773,6 +1842,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
dwarf_str_size = DWARF_STR_SIZE (pst);
dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst);
dwarf_macinfo_size = DWARF_MACINFO_SIZE (pst);
+ dwarf_ranges_buffer = DWARF_RANGES_BUFFER (pst);
+ dwarf_ranges_size = DWARF_RANGES_SIZE (pst);
baseaddr = ANOFFSET (pst->section_offsets, SECT_OFF_TEXT (objfile));
cu_header_offset = offset;
info_ptr = dwarf_info_buffer + offset;
@@ -1798,9 +1869,10 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
make_cleanup_free_die_list (dies);
/* Do line number decoding in read_file_scope () */
+ cu_header.die = dies;
process_die (dies, objfile, &cu_header);
- if (!dwarf2_get_pc_bounds (dies, &lowpc, &highpc, objfile))
+ if (!dwarf2_get_pc_bounds (dies, &lowpc, &highpc, objfile, &cu_header))
{
/* Some compilers don't define a DW_AT_high_pc attribute for
the compilation unit. If the DW_AT_high_pc is missing,
@@ -1815,7 +1887,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
{
CORE_ADDR low, high;
- if (dwarf2_get_pc_bounds (child_die, &low, &high, objfile))
+ if (dwarf2_get_pc_bounds (child_die, &low, &high,
+ objfile, &cu_header))
{
highpc = max (highpc, high);
}
@@ -1945,7 +2018,7 @@ read_file_scope (struct die_info *die, struct objfile *objfile,
bfd *abfd = objfile->obfd;
struct line_header *line_header = 0;
- if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile))
+ if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile, cu_header))
{
if (die->has_children)
{
@@ -1956,7 +2029,8 @@ read_file_scope (struct die_info *die, struct objfile *objfile,
{
CORE_ADDR low, high;
- if (dwarf2_get_pc_bounds (child_die, &low, &high, objfile))
+ if (dwarf2_get_pc_bounds (child_die, &low, &high,
+ objfile, cu_header))
{
lowpc = min (lowpc, low);
highpc = max (highpc, high);
@@ -2100,7 +2174,7 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
/* Ignore functions with missing or empty names and functions with
missing or invalid low and high pc attributes. */
- if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile))
+ if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile, cu_header))
return;
lowpc += baseaddr;
@@ -2198,7 +2272,11 @@ read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
struct die_info *child_die;
/* Ignore blocks with missing or invalid low and high pc attributes. */
- if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile))
+ /* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges
+ as multiple lexical blocks? Handling children in a sane way would
+ be nasty. Might be easier to properly extend generic blocks to
+ describe ranges. */
+ if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile, cu_header))
return;
lowpc += baseaddr;
highpc += baseaddr;
@@ -2223,27 +2301,159 @@ read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
local_symbols = new->locals;
}
-/* Get low and high pc attributes from a die.
- Return 1 if the attributes are present and valid, otherwise, return 0. */
-
+/* Get low and high pc attributes from a die. Return 1 if the attributes
+ are present and valid, otherwise, return 0. Return -1 if the range is
+ discontinuous, i.e. derived from DW_AT_ranges information. */
static int
-dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, CORE_ADDR *highpc,
- struct objfile *objfile)
+dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
+ CORE_ADDR *highpc, struct objfile *objfile,
+ const struct comp_unit_head *cu_header)
{
struct attribute *attr;
- CORE_ADDR low;
- CORE_ADDR high;
+ bfd *obfd = objfile->obfd;
+ CORE_ADDR low = 0;
+ CORE_ADDR high = 0;
+ int ret = 0;
- attr = dwarf_attr (die, DW_AT_low_pc);
- if (attr)
- low = DW_ADDR (attr);
- else
- return 0;
attr = dwarf_attr (die, DW_AT_high_pc);
if (attr)
- high = DW_ADDR (attr);
+ {
+ high = DW_ADDR (attr);
+ attr = dwarf_attr (die, DW_AT_low_pc);
+ if (attr)
+ low = DW_ADDR (attr);
+ else
+ /* Found high w/o low attribute. */
+ return 0;
+
+ /* Found consecutive range of addresses. */
+ ret = 1;
+ }
else
- return 0;
+ {
+ attr = dwarf_attr (die, DW_AT_ranges);
+ if (attr != NULL)
+ {
+ unsigned int addr_size = cu_header->addr_size;
+ CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
+ /* Value of the DW_AT_ranges attribute is the offset in the
+ .debug_renges section. */
+ unsigned int offset = DW_UNSND (attr);
+ /* Base address selection entry. */
+ CORE_ADDR base = 0;
+ int found_base = 0;
+ int dummy;
+ unsigned int i;
+ char *buffer;
+ CORE_ADDR marker;
+ int low_set;
+
+ /* The applicable base address is determined by (1) the closest
+ preceding base address selection entry in the range list or
+ (2) the DW_AT_low_pc of the compilation unit. */
+
+ /* ??? Was in dwarf3 draft4, and has since been removed.
+ GCC still uses it though. */
+ attr = dwarf_attr (cu_header->die, DW_AT_entry_pc);
+ if (attr)
+ {
+ base = DW_ADDR (attr);
+ found_base = 1;
+ }
+
+ if (!found_base)
+ {
+ attr = dwarf_attr (cu_header->die, DW_AT_low_pc);
+ if (attr)
+ {
+ base = DW_ADDR (attr);
+ found_base = 1;
+ }
+ }
+
+ buffer = dwarf_ranges_buffer + offset;
+
+
+ /* Read in the largest possible address. */
+ marker = read_address (obfd, buffer, cu_header, &dummy);
+ if ((marker & mask) == mask)
+ {
+ /* If we found the largest possible address, then
+ read the base address. */
+ base = read_address (obfd, buffer + addr_size,
+ cu_header, &dummy);
+ buffer += 2 * addr_size;
+ offset += 2 * addr_size;
+ found_base = 1;
+ }
+
+ low_set = 0;
+
+ while (1)
+ {
+ CORE_ADDR range_beginning, range_end;
+
+ range_beginning = read_address (obfd, buffer,
+ cu_header, &dummy);
+ buffer += addr_size;
+ range_end = read_address (obfd, buffer, cu_header, &dummy);
+ buffer += addr_size;
+ offset += 2 * addr_size;
+
+ /* An end of list marker is a pair of zero addresses. */
+ if (range_beginning == 0 && range_end == 0)
+ /* Found the end of list entry. */
+ break;
+
+ /* Each base address selection entry is a pair of 2 values.
+ The first is the largest possible address, the second is
+ the base address. Check for a base address here. */
+ if ((range_beginning & mask) == mask)
+ {
+ /* If we found the largest possible address, then
+ read the base address. */
+ base = read_address (obfd, buffer + addr_size,
+ cu_header, &dummy);
+ found_base = 1;
+ continue;
+ }
+
+ if (!found_base)
+ {
+ /* We have no valid base address for the ranges
+ data. */
+ complaint (&symfile_complaints,
+ "Invalid .debug_ranges data (no base address)");
+ return 0;
+ }
+
+ /* FIXME: This is recording everything as a low-high
+ segment of consecutive addresses. We should have a
+ data structure for discontiguous block ranges
+ instead. */
+ if (! low_set)
+ {
+ low = range_beginning;
+ high = range_end;
+ low_set = 1;
+ }
+ else
+ {
+ if (range_beginning < low)
+ low = range_beginning;
+ if (range_end > high)
+ high = range_end;
+ }
+ }
+
+ if (! low_set)
+ /* If the first entry is an end-of-list marker, the range
+ describes an empty scope, i.e. no instructions. */
+ return 0;
+
+ ret = -1;
+ }
+ }
if (high < low)
return 0;
@@ -2256,12 +2466,12 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, CORE_ADDR *highpc,
labels are not in the output, so the relocs get a value of 0.
If this is a discarded function, mark the pc bounds as invalid,
so that GDB will ignore it. */
- if (low == 0 && (bfd_get_file_flags (objfile->obfd) & HAS_RELOC) == 0)
+ if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0)
return 0;
*lowpc = low;
*highpc = high;
- return 1;
+ return ret;
}
/* Add an aggregate field to the field list. */
@@ -3739,15 +3949,20 @@ make_cleanup_free_die_list (struct die_info *dies)
char *
dwarf2_read_section (struct objfile *objfile, file_ptr offset,
- unsigned int size)
+ unsigned int size, asection *sectp)
{
bfd *abfd = objfile->obfd;
- char *buf;
+ char *buf, *retbuf;
if (size == 0)
return NULL;
buf = (char *) obstack_alloc (&objfile->psymbol_obstack, size);
+ retbuf
+ = (char *) symfile_relocate_debug_section (abfd, sectp, (bfd_byte *) buf);
+ if (retbuf != NULL)
+ return retbuf;
+
if ((bfd_seek (abfd, offset, SEEK_SET) != 0) ||
(bfd_bread (buf, size, abfd) != size))
{
@@ -3838,7 +4053,7 @@ dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
/* ARGSUSED */
static void
-dwarf2_empty_abbrev_table (PTR ptr_to_abbrevs_table)
+dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table)
{
int i;
struct abbrev_info *abbrev, *next;
@@ -3905,7 +4120,8 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
if (!abbrev)
{
- error ("Dwarf Error: Could not find abbrev number %d.", abbrev_number);
+ error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number,
+ bfd_get_filename (abfd));
}
part_die->offset = info_ptr - dwarf_info_buffer;
part_die->tag = abbrev->tag;
@@ -4049,7 +4265,8 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
if (!abbrev)
{
- error ("Dwarf Error: could not find abbrev number %d.", abbrev_number);
+ error ("Dwarf Error: could not find abbrev number %d [in module %s]", abbrev_number,
+ bfd_get_filename (abfd));
}
die = dwarf_alloc_die ();
die->offset = offset;
@@ -4185,8 +4402,9 @@ read_attribute_value (struct attribute *attr, unsigned form,
info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu_header);
break;
default:
- error ("Dwarf Error: Cannot handle %s in DWARF reader.",
- dwarf_form_name (form));
+ error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]",
+ dwarf_form_name (form),
+ bfd_get_filename (abfd));
}
return info_ptr;
}
@@ -4267,7 +4485,8 @@ read_address (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
break;
default:
internal_error (__FILE__, __LINE__,
- "read_address: bad switch, signed");
+ "read_address: bad switch, signed [in module %s]",
+ bfd_get_filename (abfd));
}
}
else
@@ -4285,7 +4504,8 @@ read_address (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
break;
default:
internal_error (__FILE__, __LINE__,
- "read_address: bad switch, unsigned");
+ "read_address: bad switch, unsigned [in module %s]",
+ bfd_get_filename (abfd));
}
}
@@ -4400,7 +4620,8 @@ read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
break;
default:
internal_error (__FILE__, __LINE__,
- "read_offset: bad switch");
+ "read_offset: bad switch [in module %s]",
+ bfd_get_filename (abfd));
}
return retval;
@@ -4442,12 +4663,14 @@ read_indirect_string (bfd *abfd, char *buf,
if (dwarf_str_buffer == NULL)
{
- error ("DW_FORM_strp used without .debug_str section");
+ error ("DW_FORM_strp used without .debug_str section [in module %s]",
+ bfd_get_filename (abfd));
return NULL;
}
if (str_offset >= dwarf_str_size)
{
- error ("DW_FORM_strp pointing outside of .debug_str section");
+ error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]",
+ bfd_get_filename (abfd));
return NULL;
}
gdb_assert (HOST_CHAR_BIT == 8);
@@ -5058,8 +5281,10 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
sizeof (struct symbol));
OBJSTAT (objfile, n_syms++);
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
- &objfile->symbol_obstack);
+
+ /* Cache this symbol's name and the name's demangled form (if any). */
+ SYMBOL_LANGUAGE (sym) = cu_language;
+ SYMBOL_SET_NAMES (sym, name, strlen (name), objfile);
/* Default assumptions.
Use the passed type or decode it from the die. */
@@ -5074,15 +5299,6 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
{
SYMBOL_LINE (sym) = DW_UNSND (attr);
}
-
- /* If this symbol is from a C++ compilation, then attempt to
- cache the demangled form for future reference. This is a
- typical time versus space tradeoff, that was decided in favor
- of time because it sped up C++ symbol lookups by a factor of
- about 20. */
-
- SYMBOL_LANGUAGE (sym) = cu_language;
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
switch (die->tag)
{
case DW_TAG_label:
@@ -5536,7 +5752,8 @@ die_type (struct die_info *die, struct objfile *objfile,
type_die = follow_die_ref (ref);
if (!type_die)
{
- error ("Dwarf Error: Cannot find referent at offset %d.", ref);
+ error ("Dwarf Error: Cannot find referent at offset %d [in module %s]",
+ ref, objfile->name);
return NULL;
}
}
@@ -5544,7 +5761,8 @@ die_type (struct die_info *die, struct objfile *objfile,
if (!type)
{
dump_die (type_die);
- error ("Dwarf Error: Problem turning type die at offset into gdb type.");
+ error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]",
+ objfile->name);
}
return type;
}
@@ -5568,7 +5786,8 @@ die_containing_type (struct die_info *die, struct objfile *objfile,
type_die = follow_die_ref (ref);
if (!type_die)
{
- error ("Dwarf Error: Cannot find referent at offset %d.", ref);
+ error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref,
+ objfile->name);
return NULL;
}
type = tag_type_to_type (type_die, objfile, cu_header);
@@ -5577,7 +5796,8 @@ die_containing_type (struct die_info *die, struct objfile *objfile,
{
if (type_die)
dump_die (type_die);
- error ("Dwarf Error: Problem turning containing type into gdb type.");
+ error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]",
+ objfile->name);
}
return type;
}
@@ -5614,7 +5834,8 @@ tag_type_to_type (struct die_info *die, struct objfile *objfile,
if (!die->type)
{
dump_die (die);
- error ("Dwarf Error: Cannot find type of die.");
+ error ("Dwarf Error: Cannot find type of die [in module %s]",
+ objfile->name);
}
return die->type;
}
@@ -6826,8 +7047,8 @@ dwarf2_fundamental_type (struct objfile *objfile, int typeid)
{
if (typeid < 0 || typeid >= FT_NUM_MEMBERS)
{
- error ("Dwarf Error: internal error - invalid fundamental type id %d.",
- typeid);
+ error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]",
+ typeid, objfile->name);
}
/* Look for this particular type in the fundamental type vector. If
@@ -7137,7 +7358,7 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
/* ARGSUSED */
static void
-dwarf2_free_tmp_obstack (PTR ignore)
+dwarf2_free_tmp_obstack (void *ignore)
{
obstack_free (&dwarf2_tmp_obstack, NULL);
}
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 8050f0b4234..9292d0b4fec 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -1,7 +1,8 @@
/* DWARF debugging format support for GDB.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
Written by Fred Fish at Cygnus Support. Portions based on dbxread.c,
mipsread.c, coffread.c, and dwarfread.c from a Data General SVR4 gdb port.
@@ -22,6 +23,46 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
+ If you are looking for DWARF-2 support, you are in the wrong file.
+ Go look in dwarf2read.c. This file is for the original DWARF.
+
+ DWARF (also known as DWARF-1) is headed for obsoletion.
+
+ In gcc 3.2.1, these targets prefer dwarf-1:
+
+ i[34567]86-sequent-ptx4* # TD-R2
+ i[34567]86-sequent-sysv4* # TD-R2
+ i[34567]86-dg-dgux* # obsolete in gcc 3.2.1, to be removed in 3.3
+ m88k-dg-dgux* # TD-R2
+ mips-sni-sysv4 # TD-R2
+ sparc-hal-solaris2* # TD-R2
+
+ Configurations marked with "# TD-R2" are on Zach Weinberg's list
+ of "Target Deprecation, Round 2". This is a candidate list of
+ targets to be deprecated in gcc 3.3 and removed in gcc 3.4.
+
+ http://gcc.gnu.org/ml/gcc/2002-12/msg00702.html
+
+ gcc 2.95.3 had many configurations which prefer dwarf-1.
+ We may have to support dwarf-1 as long as we support gcc 2.95.3.
+ This could use more analysis.
+
+ DG/UX (Data General Unix) used dwarf-1 for its native format.
+ DG/UX uses gcc for its system C compiler, but they have their
+ own linker and their own debuggers.
+
+ Takis Psarogiannakopoulos has a complete gnu toolchain for DG/UX
+ with gcc 2.95.3, gdb 5.1, and debug formats of dwarf-2 and stabs.
+ For more info, see PR gdb/979 and PR gdb/1013; also:
+
+ http://sources.redhat.com/ml/gdb/2003-02/msg00074.html
+
+ There may be non-gcc compilers that still emit dwarf-1.
+
+ -- chastain 2003-02-04
+*/
+
+/*
FIXME: Do we need to generate dependencies in partial symtabs?
(Perhaps we don't need to).
@@ -108,10 +149,6 @@ typedef unsigned int DIE_REF; /* Reference to a DIE */
#define LCC_PRODUCER "NCR C/C++"
#endif
-/* OBSOLETE #ifndef CHILL_PRODUCER */
-/* OBSOLETE #define CHILL_PRODUCER "GNU Chill " */
-/* OBSOLETE #endif */
-
/* Flags to target_to_host() that tell whether or not the data object is
expected to be signed. Used, for example, when fetching a signed
integer in the target environment which is used as a signed integer
@@ -363,7 +400,7 @@ static const struct language_defn *cu_language_defn;
/* Forward declarations of static functions so we don't have to worry
about ordering within this file. */
-static void free_utypes (PTR);
+static void free_utypes (void *);
static int attribute_size (unsigned int);
@@ -373,19 +410,19 @@ static void add_enum_psymbol (struct dieinfo *, struct objfile *);
static void handle_producer (char *);
-static void
-read_file_scope (struct dieinfo *, char *, char *, struct objfile *);
+static void read_file_scope (struct dieinfo *, char *, char *,
+ struct objfile *);
-static void
-read_func_scope (struct dieinfo *, char *, char *, struct objfile *);
+static void read_func_scope (struct dieinfo *, char *, char *,
+ struct objfile *);
-static void
-read_lexical_block_scope (struct dieinfo *, char *, char *, struct objfile *);
+static void read_lexical_block_scope (struct dieinfo *, char *, char *,
+ struct objfile *);
static void scan_partial_symbols (char *, char *, struct objfile *);
-static void
-scan_compilation_units (char *, char *, file_ptr, file_ptr, struct objfile *);
+static void scan_compilation_units (char *, char *, file_ptr, file_ptr,
+ struct objfile *);
static void add_partial_symbol (struct dieinfo *, struct objfile *);
@@ -401,8 +438,8 @@ static void read_ofile_symtab (struct partial_symtab *);
static void process_dies (char *, char *, struct objfile *);
-static void
-read_structure_scope (struct dieinfo *, char *, char *, struct objfile *);
+static void read_structure_scope (struct dieinfo *, char *, char *,
+ struct objfile *);
static struct type *decode_array_element_type (char *);
@@ -416,8 +453,8 @@ static void read_tag_string_type (struct dieinfo *dip);
static void read_subroutine_type (struct dieinfo *, char *, char *);
-static void
-read_enumeration (struct dieinfo *, char *, char *, struct objfile *);
+static void read_enumeration (struct dieinfo *, char *, char *,
+ struct objfile *);
static struct type *struct_type (struct dieinfo *, char *, char *,
struct objfile *);
@@ -444,8 +481,8 @@ static struct type *alloc_utype (DIE_REF, struct type *);
static struct symbol *new_symbol (struct dieinfo *, struct objfile *);
-static void
-synthesize_typedef (struct dieinfo *, struct objfile *, struct type *);
+static void synthesize_typedef (struct dieinfo *, struct objfile *,
+ struct type *);
static int locval (struct dieinfo *);
@@ -543,9 +580,6 @@ set_cu_language (struct dieinfo *dip)
case LANG_C_PLUS_PLUS:
cu_language = language_cplus;
break;
- /* OBSOLETE case LANG_CHILL: */
- /* OBSOLETE cu_language = language_chill; */
- /* OBSOLETE break; */
case LANG_MODULA2:
cu_language = language_m2;
break;
@@ -778,7 +812,7 @@ alloc_utype (DIE_REF die_ref, struct type *utypep)
SYNOPSIS
- static void free_utypes (PTR dummy)
+ static void free_utypes (void *dummy)
DESCRIPTION
@@ -788,7 +822,7 @@ alloc_utype (DIE_REF die_ref, struct type *utypep)
*/
static void
-free_utypes (PTR dummy)
+free_utypes (void *dummy)
{
xfree (utypes);
utypes = NULL;
@@ -1760,7 +1794,6 @@ handle_producer (char *producer)
{
processing_gcc_compilation =
STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER));
- /* OBSOLETE || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER)); */
}
/* Select a demangling style if we can identify the producer and if
@@ -2219,7 +2252,7 @@ read_ofile_symtab (struct partial_symtab *pst)
if (LNFOFF (pst))
{
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
- (bfd_bread ((PTR) lnsizedata, sizeof (lnsizedata), abfd)
+ (bfd_bread (lnsizedata, sizeof (lnsizedata), abfd)
!= sizeof (lnsizedata)))
{
error ("can't read DWARF line number table size");
@@ -2786,8 +2819,6 @@ new_symbol (struct dieinfo *dip, struct objfile *objfile)
sizeof (struct symbol));
OBJSTAT (objfile, n_syms++);
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = create_name (dip->at_name,
- &objfile->symbol_obstack);
/* default assumptions */
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
SYMBOL_CLASS (sym) = LOC_STATIC;
@@ -2799,7 +2830,7 @@ new_symbol (struct dieinfo *dip, struct objfile *objfile)
C++ symbol lookups by a factor of about 20. */
SYMBOL_LANGUAGE (sym) = cu_language;
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
+ SYMBOL_SET_NAMES (sym, dip->at_name, strlen (dip->at_name), objfile);
switch (dip->die_tag)
{
case TAG_label:
diff --git a/gdb/elfread.c b/gdb/elfread.c
index ba8fc490a7d..b96d6e7ff28 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1,7 +1,8 @@
/* Read ELF (Executable and Linking Format) object files for GDB.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
Written by Fred Fish at Cygnus Support.
This file is part of GDB.
@@ -346,10 +347,10 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
/* Looks like a compiler-generated label. Skip
it. The assembler should be skipping these (to
keep executables small), but apparently with
- gcc on the (OBSOLETE) delta m88k SVR4, it
- loses. So to have us check too should be
- harmless (but I encourage people to fix this in
- the assembler instead of adding checks here). */
+ gcc on the (deleted) delta m88k SVR4, it loses.
+ So to have us check too should be harmless (but
+ I encourage people to fix this in the assembler
+ instead of adding checks here). */
continue;
else
{
@@ -590,8 +591,7 @@ elf_symfile_read (struct objfile *objfile, int mainline)
if (str_sect)
elfstab_build_psymtabs (objfile,
mainline,
- ei.stabsect->filepos,
- bfd_section_size (abfd, ei.stabsect),
+ ei.stabsect,
str_sect->filepos,
bfd_section_size (abfd, str_sect));
}
diff --git a/gdb/eval.c b/gdb/eval.c
index ad7279f0746..649c340fc9d 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1,7 +1,8 @@
/* Evaluate expressions for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 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.
@@ -186,7 +187,7 @@ get_label (register struct expression *exp, int *pos)
return NULL;
}
-/* This function evaluates tuples (in (OBSOLETE) Chill) or
+/* This function evaluates tuples (in (the deleted) Chill) or
brace-initializers (in C/C++) for structure types. */
static struct value *
@@ -326,10 +327,11 @@ evaluate_struct_tuple (struct value *struct_val,
}
/* Recursive helper function for setting elements of array tuples for
- (OBSOLETE) Chill. The target is ARRAY (which has bounds LOW_BOUND
- to HIGH_BOUND); the element value is ELEMENT; EXP, POS and NOSIDE
- are as usual. Evaluates index expresions and sets the specified
- element(s) of ARRAY to ELEMENT. Returns last index value. */
+ (the deleted) Chill. The target is ARRAY (which has bounds
+ LOW_BOUND to HIGH_BOUND); the element value is ELEMENT; EXP, POS
+ and NOSIDE are as usual. Evaluates index expresions and sets the
+ specified element(s) of ARRAY to ELEMENT. Returns last index
+ value. */
static LONGEST
init_array_element (struct value *array, struct value *element,
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 8f39998ed9b..2b2c4ff2785 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -26,6 +26,7 @@
#include "terminal.h" /* for job_control */
#include "event-loop.h"
#include "event-top.h"
+#include "interps.h"
#include <signal.h>
/* For dont_repeat() */
@@ -250,9 +251,9 @@ display_gdb_prompt (char *new_prompt)
int prompt_length = 0;
char *gdb_prompt = get_prompt ();
- /* When an alternative interpreter has been installed, do not
- display the comand prompt. */
- if (interpreter_p)
+ /* Each interpreter has its own rules on displaying the command
+ prompt. */
+ if (!current_interp_display_prompt_p ())
return;
if (target_executing && sync_execution)
@@ -1125,6 +1126,11 @@ gdb_setup_readline (void)
if (event_loop_p)
{
+ gdb_stdout = stdio_fileopen (stdout);
+ gdb_stderr = stdio_fileopen (stderr);
+ gdb_stdlog = gdb_stderr; /* for moment */
+ gdb_stdtarg = gdb_stderr; /* for moment */
+
/* If the input stream is connected to a terminal, turn on
editing. */
if (ISATTY (instream))
@@ -1197,8 +1203,6 @@ gdb_disable_readline (void)
void
_initialize_event_loop (void)
{
- gdb_setup_readline ();
-
/* Tell gdb to use the cli_command_loop as the main loop. */
if (event_loop_p && command_loop_hook == NULL)
command_loop_hook = cli_command_loop;
diff --git a/gdb/event-top.h b/gdb/event-top.h
index 24044a57bab..d8c0a963989 100644
--- a/gdb/event-top.h
+++ b/gdb/event-top.h
@@ -71,6 +71,8 @@ struct prompts
FIXME: these should really go into top.h. */
extern void display_gdb_prompt (char *new_prompt);
+void gdb_setup_readline (void);
+void gdb_disable_readline (void);
extern void async_init_signals (void);
extern void set_async_editing_command (char *args, int from_tty,
struct cmd_list_element *c);
diff --git a/gdb/exec.c b/gdb/exec.c
index 16b7e5f4e8d..0bde096c7c2 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -55,7 +55,7 @@ void (*file_changed_hook) (char *);
/* Prototypes for local functions */
-static void add_to_section_table (bfd *, sec_ptr, PTR);
+static void add_to_section_table (bfd *, sec_ptr, void *);
static void exec_close (int);
@@ -65,7 +65,7 @@ static void set_section_command (char *, int);
static void exec_files_info (struct target_ops *);
-static void bfdsec_to_vmap (bfd *, sec_ptr, PTR);
+static void bfdsec_to_vmap (bfd *, sec_ptr, void *);
static int ignore (CORE_ADDR, char *);
@@ -90,7 +90,6 @@ int write_files = 0;
#ifndef NEED_TEXT_START_END
#define NEED_TEXT_START_END (0)
#endif
-CORE_ADDR text_start = 0;
CORE_ADDR text_end = 0;
struct vmap *vmap;
@@ -279,7 +278,7 @@ exec_file_attach (char *filename, int from_tty)
/* FIXME: The comment above does not match the code. The
code checks for sections with are either code *or*
readonly. */
- text_start = ~(CORE_ADDR) 0;
+ 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)
@@ -366,7 +365,7 @@ 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, PTR table_pp_char)
+add_to_section_table (bfd *abfd, sec_ptr asect, void *table_pp_char)
{
struct section_table **table_pp = (struct section_table **) table_pp_char;
flagword aflag;
@@ -405,7 +404,7 @@ build_section_table (bfd *some_bfd, struct section_table **start,
}
static void
-bfdsec_to_vmap (bfd *abfd, sec_ptr sect, PTR arg3)
+bfdsec_to_vmap (bfd *abfd, sec_ptr sect, void *arg3)
{
struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
struct vmap *vp;
@@ -485,7 +484,7 @@ 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, PTR, file_ptr, bfd_size_type);
+ int (*xfer_fn) (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
asection *section = NULL;
if (len <= 0)
@@ -545,6 +544,7 @@ void
print_section_info (struct target_ops *t, bfd *abfd)
{
struct section_table *p;
+ /* FIXME: "016l" is not wide enough when TARGET_ADDR_BIT > 64. */
char *fmt = TARGET_ADDR_BIT <= 32 ? "08l" : "016l";
printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
@@ -560,6 +560,12 @@ print_section_info (struct target_ops *t, bfd *abfd)
{
printf_filtered ("\t%s", local_hex_string_custom (p->addr, fmt));
printf_filtered (" - %s", local_hex_string_custom (p->endaddr, fmt));
+
+ /* FIXME: A format of "08l" is not wide enough for file offsets
+ larger than 4GB. OTOH, making it "016l" isn't desirable either
+ since most output will then be much wider than necessary. It
+ may make sense to test the size of the file and choose the
+ format string accordingly. */
if (info_verbose)
printf_filtered (" @ %s",
local_hex_string_custom (p->the_bfd_section->filepos, "08l"));
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 63d6d3b35c7..60c3e918e84 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -1,6 +1,7 @@
/* Print in infix form a struct expression.
+
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -221,7 +222,7 @@ print_subexp (register struct expression *exp, register int *pos,
}
fprintf_unfiltered (stream, "]");
/* "selector" was malloc'd by target_read_string. Free it. */
- free (selector);
+ xfree (selector);
return;
}
@@ -268,8 +269,6 @@ print_subexp (register struct expression *exp, register int *pos,
}
else
{
- /* OBSOLETE int is_chill = exp->language_defn->la_language == language_chill; */
- /* OBSOLETE fputs_filtered (is_chill ? " [" : " {", stream); */
fputs_filtered (" {", stream);
for (tem = 0; tem < nargs; tem++)
{
@@ -279,7 +278,6 @@ print_subexp (register struct expression *exp, register int *pos,
}
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
}
- /* OBSOLETE fputs_filtered (is_chill ? "]" : "}", stream); */
fputs_filtered ("}", stream);
}
return;
@@ -287,29 +285,15 @@ print_subexp (register struct expression *exp, register int *pos,
case OP_LABELED:
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
-
-#if 0
- if (0 /* OBSOLETE exp->language_defn->la_language == language_chill */)
- { /* OBSOLETE */
- fputs_filtered (".", stream); /* OBSOLETE */
- fputs_filtered (&exp->elts[pc + 2].string, stream); /* OBSOLETE */
- fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", " /* OBSOLETE */
- : ": ", /* OBSOLETE */
- stream); /* OBSOLETE */
- } /* OBSOLETE */
- else /* OBSOLETE */
-#endif
- {
- /* Gcc support both these syntaxes. Unsure which is preferred. */
+ /* Gcc support both these syntaxes. Unsure which is preferred. */
#if 1
- fputs_filtered (&exp->elts[pc + 2].string, stream);
- fputs_filtered (": ", stream);
+ fputs_filtered (&exp->elts[pc + 2].string, stream);
+ fputs_filtered (": ", stream);
#else
- fputs_filtered (".", stream);
- fputs_filtered (&exp->elts[pc + 2].string, stream);
- fputs_filtered ("=", stream);
+ fputs_filtered (".", stream);
+ fputs_filtered (&exp->elts[pc + 2].string, stream);
+ fputs_filtered ("=", stream);
#endif
- }
print_subexp (exp, pos, stream, PREC_SUFFIX);
return;
diff --git a/gdb/expression.h b/gdb/expression.h
index f831337f634..e8bc90c0c47 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -1,5 +1,7 @@
/* Definitions for expressions stored in reversed prefix form, for GDB.
- Copyright 1986, 1989, 1992, 1994, 2000 Free Software Foundation, Inc.
+
+ Copyright 1986, 1989, 1992, 1994, 2000, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -109,11 +111,11 @@ enum exp_opcode
the second operand with itself that many times. */
BINOP_CONCAT,
- /* For (OBSOLETE) Chill (OBSOLETE) and Pascal. */
+ /* For (the deleted) Chill and Pascal. */
BINOP_IN, /* Returns 1 iff ARG1 IN ARG2. */
- /* This is the "colon operator" used various places in (OBSOLETE)
- Chill (OBSOLETE). */
+ /* This is the "colon operator" used various places in (the
+ deleted) Chill. */
BINOP_RANGE,
/* This must be the highest BINOP_ value, for expprint.c. */
@@ -122,13 +124,13 @@ enum exp_opcode
/* Operates on three values computed by following subexpressions. */
TERNOP_COND, /* ?: */
- /* A sub-string/sub-array. (OBSOLETE) Chill (OBSOLETE) syntax:
+ /* A sub-string/sub-array. (the deleted) Chill syntax:
OP1(OP2:OP3). Return elements OP2 through OP3 of OP1. */
TERNOP_SLICE,
- /* A sub-string/sub-array. (OBSOLETE) Chill (OBSOLETE) syntax:
- OP1(OP2 UP OP3). Return OP3 elements of OP1, starting with
- element OP2. */
+ /* A sub-string/sub-array. (The deleted) Chill syntax: OP1(OP2 UP
+ OP3). Return OP3 elements of OP1, starting with element
+ OP2. */
TERNOP_SLICE_COUNT,
/* Multidimensional subscript operator, such as Modula-2 x[a,b,...].
@@ -263,7 +265,7 @@ enum exp_opcode
UNOP_ODD,
UNOP_TRUNC,
- /* (OBSOLETE) Chill (OBSOLETE) builtin functions. */
+ /* (The deleted) Chill builtin functions. */
UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH, UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN,
OP_BOOL, /* Modula-2 builtin BOOLEAN type */
@@ -301,14 +303,14 @@ enum exp_opcode
OP_SCOPE,
/* Used to represent named structure field values in brace
- initializers (or tuples as they are called in (OBSOLETE) Chill
- (OBSOLETE)).
+ initializers (or tuples as they are called in (the deleted)
+ Chill).
- The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (OBSOLETE)
- Chill (OBSOLETE) syntax is .NAME:VALUE. Multiple labels (as in
- the (OBSOLETE) Chill (OBSOLETE) syntax .NAME1,.NAME2:VALUE) is
+ The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (the
+ deleted) Chill syntax is .NAME:VALUE. Multiple labels (as in
+ the (the deleted) Chill syntax .NAME1,.NAME2:VALUE) is
represented as if it were .NAME1:(.NAME2:VALUE) (though that is
- not valid (OBSOLETE) Chill (OBSOLETE) syntax).
+ not valid (the deleted) Chill syntax).
The NAME is represented as for STRUCTOP_STRUCT; VALUE follows. */
OP_LABELED,
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 17693f7c8bc..0de1d460b98 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -565,7 +565,7 @@ direct_abs_decl: '(' abs_decl ')'
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
typebase /* Implements (approximately): (type-qualifier)* type-specifier */
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index 1b9a9b258c1..28a96ebcb1a 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -1,7 +1,8 @@
/* Support for printing Fortran types for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1998, 2000,
- 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1998,
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Motorola. Adapted from the C version by Farooq Butt
(fmbutt@engage.sps.mot.com).
@@ -356,7 +357,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
through as TYPE_CODE_INT since dbxstclass.h is so
C-oriented, we must change these to "character" from "char". */
- if (STREQ (TYPE_NAME (type), "char"))
+ if (strcmp (TYPE_NAME (type), "char") == 0)
fprintf_filtered (stream, "character");
else
goto default_case;
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 211da7012b1..4c7adce9172 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -563,7 +563,7 @@ list_all_visible_commons (char *funname)
while (tmp != NULL)
{
- if (STREQ (tmp->owning_function, funname))
+ if (strcmp (tmp->owning_function, funname) == 0)
printf_filtered ("%s\n", tmp->name);
tmp = tmp->next;
@@ -644,7 +644,7 @@ info_common_command (char *comname, int from_tty)
if (the_common)
{
- if (STREQ (comname, BLANK_COMMON_NAME_LOCAL))
+ if (strcmp (comname, BLANK_COMMON_NAME_LOCAL) == 0)
printf_filtered ("Contents of blank COMMON block:\n");
else
printf_filtered ("Contents of F77 COMMON block '%s':\n", comname);
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 3eff9305c03..b970d8ac353 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -1,7 +1,8 @@
/* Find a variable's value in memory, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -116,7 +117,7 @@ That operation is not available on integers of more than %d bytes.",
function returns 1 and sets *PVAL. Otherwise it returns 0. */
int
-extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval)
+extract_long_unsigned_integer (const void *addr, int orig_len, LONGEST *pval)
{
char *p, *first_addr;
int len;
@@ -174,7 +175,7 @@ extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval)
else based on POINTER_TO_ADDRESS. */
CORE_ADDR
-extract_address (void *addr, int len)
+extract_address (const void *addr, int len)
{
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
whether we want this to be true eventually. */
@@ -185,7 +186,7 @@ extract_address (void *addr, int len)
/* Treat the bytes at BUF as a pointer of type TYPE, and return the
address it represents. */
CORE_ADDR
-extract_typed_address (void *buf, struct type *type)
+extract_typed_address (const void *buf, struct type *type)
{
if (TYPE_CODE (type) != TYPE_CODE_PTR
&& TYPE_CODE (type) != TYPE_CODE_REF)
@@ -348,13 +349,13 @@ value_of_register (int regnum, struct frame_info *frame)
/* Given a pointer of type TYPE in target form in BUF, return the
address it represents. */
CORE_ADDR
-unsigned_pointer_to_address (struct type *type, void *buf)
+unsigned_pointer_to_address (struct type *type, const void *buf)
{
return extract_address (buf, TYPE_LENGTH (type));
}
CORE_ADDR
-signed_pointer_to_address (struct type *type, void *buf)
+signed_pointer_to_address (struct type *type, const void *buf)
{
return extract_signed_integer (buf, TYPE_LENGTH (type));
}
@@ -663,8 +664,10 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
1);
if (num_storage_locs > 1
-#ifdef GDB_TARGET_IS_H8500
- || TYPE_CODE (type) == TYPE_CODE_PTR
+#if 0
+ // OBSOLETE #ifdef GDB_TARGET_IS_H8500
+ // OBSOLETE || TYPE_CODE (type) == TYPE_CODE_PTR
+ // OBSOLETE #endif
#endif
)
{
@@ -680,76 +683,78 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
/* Copy all of the data out, whereever it may be. */
-#ifdef GDB_TARGET_IS_H8500
-/* This piece of hideosity is required because the H8500 treats registers
- differently depending upon whether they are used as pointers or not. As a
- pointer, a register needs to have a page register tacked onto the front.
- An alternate way to do this would be to have gcc output different register
- numbers for the pointer & non-pointer form of the register. But, it
- doesn't, so we're stuck with this. */
-
- if (TYPE_CODE (type) == TYPE_CODE_PTR
- && len > 2)
- {
- int page_regnum;
-
- switch (regnum)
- {
- case R0_REGNUM:
- case R1_REGNUM:
- case R2_REGNUM:
- case R3_REGNUM:
- page_regnum = SEG_D_REGNUM;
- break;
- case R4_REGNUM:
- case R5_REGNUM:
- page_regnum = SEG_E_REGNUM;
- break;
- case R6_REGNUM:
- case R7_REGNUM:
- page_regnum = SEG_T_REGNUM;
- break;
- }
-
- value_bytes[0] = 0;
- get_saved_register (value_bytes + 1,
- &optim,
- &addr,
- frame,
- page_regnum,
- &lval);
-
- if (register_cached (page_regnum) == -1)
- return NULL; /* register value not available */
-
- if (lval == lval_register)
- reg_stor++;
- else
- mem_stor++;
- first_addr = addr;
- last_addr = addr;
-
- get_saved_register (value_bytes + 2,
- &optim,
- &addr,
- frame,
- regnum,
- &lval);
-
- if (register_cached (regnum) == -1)
- return NULL; /* register value not available */
-
- if (lval == lval_register)
- reg_stor++;
- else
- {
- mem_stor++;
- mem_tracking = mem_tracking && (addr == last_addr);
- }
- last_addr = addr;
- }
- else
-#endif /* GDB_TARGET_IS_H8500 */
+#if 0
+ // OBSOLETE #ifdef GDB_TARGET_IS_H8500
+ // OBSOLETE /* This piece of hideosity is required because the H8500 treats registers
+ // OBSOLETE differently depending upon whether they are used as pointers or not. As a
+ // OBSOLETE pointer, a register needs to have a page register tacked onto the front.
+ // OBSOLETE An alternate way to do this would be to have gcc output different register
+ // OBSOLETE numbers for the pointer & non-pointer form of the register. But, it
+ // OBSOLETE doesn't, so we're stuck with this. */
+ // OBSOLETE
+ // OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_PTR
+ // OBSOLETE && len > 2)
+ // OBSOLETE {
+ // OBSOLETE int page_regnum;
+ // OBSOLETE
+ // OBSOLETE switch (regnum)
+ // OBSOLETE {
+ // OBSOLETE case R0_REGNUM:
+ // OBSOLETE case R1_REGNUM:
+ // OBSOLETE case R2_REGNUM:
+ // OBSOLETE case R3_REGNUM:
+ // OBSOLETE page_regnum = SEG_D_REGNUM;
+ // OBSOLETE break;
+ // OBSOLETE case R4_REGNUM:
+ // OBSOLETE case R5_REGNUM:
+ // OBSOLETE page_regnum = SEG_E_REGNUM;
+ // OBSOLETE break;
+ // OBSOLETE case R6_REGNUM:
+ // OBSOLETE case R7_REGNUM:
+ // OBSOLETE page_regnum = SEG_T_REGNUM;
+ // OBSOLETE break;
+ // OBSOLETE }
+ // OBSOLETE
+ // OBSOLETE value_bytes[0] = 0;
+ // OBSOLETE get_saved_register (value_bytes + 1,
+ // OBSOLETE &optim,
+ // OBSOLETE &addr,
+ // OBSOLETE frame,
+ // OBSOLETE page_regnum,
+ // OBSOLETE &lval);
+ // OBSOLETE
+ // OBSOLETE if (register_cached (page_regnum) == -1)
+ // OBSOLETE return NULL; /* register value not available */
+ // OBSOLETE
+ // OBSOLETE if (lval == lval_register)
+ // OBSOLETE reg_stor++;
+ // OBSOLETE else
+ // OBSOLETE mem_stor++;
+ // OBSOLETE first_addr = addr;
+ // OBSOLETE last_addr = addr;
+ // OBSOLETE
+ // OBSOLETE get_saved_register (value_bytes + 2,
+ // OBSOLETE &optim,
+ // OBSOLETE &addr,
+ // OBSOLETE frame,
+ // OBSOLETE regnum,
+ // OBSOLETE &lval);
+ // OBSOLETE
+ // OBSOLETE if (register_cached (regnum) == -1)
+ // OBSOLETE return NULL; /* register value not available */
+ // OBSOLETE
+ // OBSOLETE if (lval == lval_register)
+ // OBSOLETE reg_stor++;
+ // OBSOLETE else
+ // OBSOLETE {
+ // OBSOLETE mem_stor++;
+ // OBSOLETE mem_tracking = mem_tracking && (addr == last_addr);
+ // OBSOLETE }
+ // OBSOLETE last_addr = addr;
+ // OBSOLETE }
+ // OBSOLETE else
+ // OBSOLETE #endif /* GDB_TARGET_IS_H8500 */
+#endif
for (local_regnum = regnum;
value_bytes_copied < len;
(value_bytes_copied += REGISTER_RAW_SIZE (local_regnum),
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
new file mode 100644
index 00000000000..a889f955d84
--- /dev/null
+++ b/gdb/frame-unwind.c
@@ -0,0 +1,103 @@
+/* Definitions for frame unwinder, for GDB, the GNU debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "gdb_assert.h"
+#include "dummy-frame.h"
+
+static struct gdbarch_data *frame_unwind_data;
+
+struct frame_unwind_table
+{
+ frame_unwind_p_ftype **p;
+ int middle;
+ int nr;
+};
+
+/* Append a predicate to the end of the table. */
+static void
+append_predicate (struct frame_unwind_table *table, frame_unwind_p_ftype *p)
+{
+ table->p = xrealloc (table->p, ((table->nr + 1)
+ * sizeof (frame_unwind_p_ftype *)));
+ table->p[table->nr] = p;
+ table->nr++;
+}
+
+static void *
+frame_unwind_init (struct gdbarch *gdbarch)
+{
+ struct frame_unwind_table *table = XCALLOC (1, struct frame_unwind_table);
+ append_predicate (table, dummy_frame_p);
+ return table;
+}
+
+static void
+frame_unwind_free (struct gdbarch *gdbarch, void *data)
+{
+ struct frame_unwind_table *table =
+ gdbarch_data (gdbarch, frame_unwind_data);
+ xfree (table->p);
+ xfree (table);
+}
+
+void
+frame_unwind_append_predicate (struct gdbarch *gdbarch,
+ frame_unwind_p_ftype *p)
+{
+ struct frame_unwind_table *table =
+ gdbarch_data (gdbarch, frame_unwind_data);
+ if (table == NULL)
+ {
+ /* ULGH, called during architecture initialization. Patch
+ things up. */
+ table = frame_unwind_init (gdbarch);
+ set_gdbarch_data (gdbarch, frame_unwind_data, table);
+ }
+ append_predicate (table, p);
+}
+
+const struct frame_unwind *
+frame_unwind_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ int i;
+ struct frame_unwind_table *table =
+ gdbarch_data (gdbarch, frame_unwind_data);
+ /* Seriously old code. Don't even try to use this new mechanism. */
+ if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
+ return trad_frame_unwind;
+ for (i = 0; i < table->nr; i++)
+ {
+ const struct frame_unwind *desc = table->p[i] (pc);
+ if (desc != NULL)
+ return desc;
+ }
+ return trad_frame_unwind;
+}
+
+void
+_initialize_frame_unwind (void)
+{
+ frame_unwind_data = register_gdbarch_data (frame_unwind_init,
+ frame_unwind_free);
+}
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
new file mode 100644
index 00000000000..2c67c969fb1
--- /dev/null
+++ b/gdb/frame-unwind.h
@@ -0,0 +1,111 @@
+/* Definitions for a frame unwinder, for GDB, the GNU debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined (FRAME_UNWIND_H)
+#define FRAME_UNWIND_H 1
+
+struct frame_info;
+struct frame_id;
+struct frame_unwind;
+struct gdbarch;
+struct regcache;
+
+/* Return the frame unwind methods for the function that contains PC,
+ or NULL if this this unwinder can't handle this frame. */
+
+typedef const struct frame_unwind *(frame_unwind_p_ftype) (CORE_ADDR pc);
+
+/* Add a frame unwinder to the list. The predicates are polled in the
+ order that they are appended. The initial list contains the dummy
+ frame's predicate. */
+
+extern void frame_unwind_append_predicate (struct gdbarch *gdbarch,
+ frame_unwind_p_ftype *p);
+
+/* Iterate through the list of frame unwinders until one returns an
+ implementation. */
+
+extern const struct frame_unwind *frame_unwind_find_by_pc (struct gdbarch
+ *gdbarch,
+ CORE_ADDR pc);
+
+/* Return the location (and possibly value) of REGNUM for the previous
+ (older, up) frame. All parameters except VALUEP can be assumed to
+ be non NULL. When VALUEP is NULL, just the location of the
+ register should be returned.
+
+ UNWIND_CACHE is provided as mechanism for implementing a per-frame
+ local cache. It's initial value being NULL. Memory for that cache
+ should be allocated using frame_obstack_zalloc().
+
+ Register window architectures (eg SPARC) should note that REGNUM
+ identifies the register for the previous frame. For instance, a
+ request for the value of "o1" for the previous frame would be found
+ in the register "i1" in this FRAME. */
+
+typedef void (frame_unwind_reg_ftype) (struct frame_info * frame,
+ void **unwind_cache,
+ int regnum,
+ int *optimized,
+ enum lval_type * lvalp,
+ CORE_ADDR *addrp,
+ int *realnump, void *valuep);
+
+/* Same as for registers above, but return the address at which the
+ calling frame would resume. */
+
+typedef CORE_ADDR (frame_unwind_pc_ftype) (struct frame_info * frame,
+ void **unwind_cache);
+
+/* Same as for registers above, but return the ID of the frame that
+ called this one. */
+
+typedef void (frame_unwind_id_ftype) (struct frame_info * frame,
+ void **unwind_cache,
+ struct frame_id * id);
+
+/* Discard the frame by restoring the registers (in regcache) back to
+ that of the caller. */
+/* NOTE: cagney/2003-01-19: While at present the callers all pop each
+ frame in turn, the implementor should try to code things so that
+ any frame can be popped directly. */
+/* FIXME: cagney/2003-01-19: Since both FRAME and REGCACHE refer to a
+ common register cache, care must be taken when restoring the
+ registers. The `correct fix' is to first first save the registers
+ in a scratch cache, and second write that scratch cache back to to
+ the real register cache. */
+
+typedef void (frame_unwind_pop_ftype) (struct frame_info *frame,
+ void **unwind_cache,
+ struct regcache *regcache);
+
+struct frame_unwind
+{
+ /* Should the frame's type go here? */
+ /* Should an attribute indicating the frame's address-in-block go
+ here? */
+ frame_unwind_pop_ftype *pop;
+ frame_unwind_pc_ftype *pc;
+ frame_unwind_id_ftype *id;
+ frame_unwind_reg_ftype *reg;
+};
+
+#endif
diff --git a/gdb/frame.c b/gdb/frame.c
index ecdf408c5cf..0c3009cf4d5 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1,7 +1,7 @@
/* Cache and manage frames for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -31,9 +31,17 @@
#include "builtin-regs.h"
#include "gdb_obstack.h"
#include "dummy-frame.h"
+#include "sentinel-frame.h"
#include "gdbcore.h"
#include "annotate.h"
#include "language.h"
+#include "frame-unwind.h"
+#include "command.h"
+#include "gdbcmd.h"
+
+/* Flag to indicate whether backtraces should stop at main. */
+
+static int backtrace_below_main;
/* Return a frame uniq ID that can be used to, later, re-find the
frame. */
@@ -127,7 +135,7 @@ frame_pc_unwind (struct frame_info *frame)
{
if (!frame->pc_unwind_cache_p)
{
- frame->pc_unwind_cache = frame->pc_unwind (frame, &frame->unwind_cache);
+ frame->pc_unwind_cache = frame->unwind->pc (frame, &frame->unwind_cache);
frame->pc_unwind_cache_p = 1;
}
return frame->pc_unwind_cache;
@@ -138,13 +146,24 @@ frame_id_unwind (struct frame_info *frame)
{
if (!frame->id_unwind_cache_p)
{
- frame->id_unwind_cache =
- frame->id_unwind (frame, &frame->unwind_cache);
+ frame->unwind->id (frame, &frame->unwind_cache, &frame->id_unwind_cache);
frame->id_unwind_cache_p = 1;
}
return frame->id_unwind_cache;
}
+void
+frame_pop (struct frame_info *frame)
+{
+ /* FIXME: cagney/2003-01-18: There is probably a chicken-egg problem
+ with passing in current_regcache. The pop function needs to be
+ written carefully so as to not overwrite registers whose [old]
+ values are needed to restore other registers. Instead, this code
+ should pass in a scratch cache and, as a second step, restore the
+ registers using that. */
+ frame->unwind->pop (frame, &frame->unwind_cache, current_regcache);
+ flush_cached_frames ();
+}
void
frame_register_unwind (struct frame_info *frame, int regnum,
@@ -161,33 +180,15 @@ frame_register_unwind (struct frame_info *frame, int regnum,
gdb_assert (realnump != NULL);
/* gdb_assert (bufferp != NULL); */
- /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
- special case, there was always an inner frame dedicated to the
- hardware registers. Unfortunatly, there is too much unwind code
- around that looks up/down the frame chain while making the
- assumption that each frame level is using the same unwind code. */
-
- if (frame == NULL)
- {
- /* We're in the inner-most frame, get the value direct from the
- register cache. */
- *optimizedp = 0;
- *lvalp = lval_register;
- /* ULGH! Code uses the offset into the raw register byte array
- as a way of identifying a register. */
- *addrp = REGISTER_BYTE (regnum);
- /* Should this code test ``register_cached (regnum) < 0'' and do
- something like set realnum to -1 when the register isn't
- available? */
- *realnump = regnum;
- if (bufferp)
- deprecated_read_register_gen (regnum, bufferp);
- return;
- }
+ /* NOTE: cagney/2002-11-27: A program trying to unwind a NULL frame
+ is broken. There is always a frame. If there, for some reason,
+ isn't, there is some pretty busted code as it should have
+ detected the problem before calling here. */
+ gdb_assert (frame != NULL);
/* Ask this frame to unwind its register. */
- frame->register_unwind (frame, &frame->unwind_cache, regnum,
- optimizedp, lvalp, addrp, realnump, bufferp);
+ frame->unwind->reg (frame, &frame->unwind_cache, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
void
@@ -229,38 +230,30 @@ frame_register (struct frame_info *frame, int regnum,
return;
}
- /* Reached the the bottom (youngest, inner most) of the frame chain
- (youngest, inner most) frame, go direct to the hardware register
- cache (do not pass go, do not try to cache the value, ...). The
- unwound value would have been cached in frame->next but that
- doesn't exist. This doesn't matter as the hardware register
- cache is stopping any unnecessary accesses to the target. */
-
- /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
- special case, there was always an inner frame dedicated to the
- hardware registers. Unfortunatly, there is too much unwind code
- around that looks up/down the frame chain while making the
- assumption that each frame level is using the same unwind code. */
-
- if (frame == NULL)
- frame_register_unwind (NULL, regnum, optimizedp, lvalp, addrp, realnump,
- bufferp);
- else
- frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
- realnump, bufferp);
+ /* Obtain the register value by unwinding the register from the next
+ (more inner frame). */
+ gdb_assert (frame != NULL && frame->next != NULL);
+ frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
}
void
-frame_unwind_signed_register (struct frame_info *frame, int regnum,
- LONGEST *val)
+frame_unwind_register (struct frame_info *frame, int regnum, void *buf)
{
int optimized;
CORE_ADDR addr;
int realnum;
enum lval_type lval;
- void *buf = alloca (MAX_REGISTER_RAW_SIZE);
frame_register_unwind (frame, regnum, &optimized, &lval, &addr,
&realnum, buf);
+}
+
+void
+frame_unwind_signed_register (struct frame_info *frame, int regnum,
+ LONGEST *val)
+{
+ void *buf = alloca (MAX_REGISTER_RAW_SIZE);
+ frame_unwind_register (frame, regnum, buf);
(*val) = extract_signed_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
}
@@ -268,17 +261,19 @@ void
frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
ULONGEST *val)
{
- int optimized;
- CORE_ADDR addr;
- int realnum;
- enum lval_type lval;
void *buf = alloca (MAX_REGISTER_RAW_SIZE);
- frame_register_unwind (frame, regnum, &optimized, &lval, &addr,
- &realnum, buf);
+ 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)
{
@@ -299,17 +294,17 @@ frame_read_unsigned_register (struct frame_info *frame, int regnum,
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_unwind_unsigned_register (get_next_frame (frame), regnum, val);
+ 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 in frame_read_unsigned_register(). */
- gdb_assert (frame != NULL);
- frame_unwind_signed_register (get_next_frame (frame), regnum, val);
+ /* See note above in frame_read_unsigned_register(). */
+ gdb_assert (frame != NULL && frame->next != NULL);
+ frame_unwind_signed_register (frame->next, regnum, val);
}
static void
@@ -337,25 +332,9 @@ generic_unwind_get_saved_register (char *raw_buffer,
if (addrp == NULL)
addrp = &addrx;
- /* Reached the the bottom (youngest, inner most) of the frame chain
- (youngest, inner most) frame, go direct to the hardware register
- cache (do not pass go, do not try to cache the value, ...). The
- unwound value would have been cached in frame->next but that
- doesn't exist. This doesn't matter as the hardware register
- cache is stopping any unnecessary accesses to the target. */
-
- /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
- special case, there was always an inner frame dedicated to the
- hardware registers. Unfortunatly, there is too much unwind code
- around that looks up/down the frame chain while making the
- assumption that each frame level is using the same unwind code. */
-
- if (frame == NULL)
- frame_register_unwind (NULL, regnum, optimizedp, lvalp, addrp, &realnumx,
- raw_buffer);
- else
- frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
- &realnumx, raw_buffer);
+ gdb_assert (frame != NULL && frame->next != NULL);
+ frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+ &realnumx, raw_buffer);
}
void
@@ -414,6 +393,9 @@ frame_map_name_to_regnum (const char *name, int len)
{
int i;
+ if (len < 0)
+ len = strlen (name);
+
/* Search register name space. */
for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
if (REGISTER_NAME (i) && len == strlen (REGISTER_NAME (i))
@@ -445,6 +427,32 @@ frame_map_regnum_to_name (int regnum)
return builtin_reg_map_regnum_to_name (regnum);
}
+/* Create a sentinel frame. */
+
+struct frame_info *
+create_sentinel_frame (struct regcache *regcache)
+{
+ struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
+ frame->type = NORMAL_FRAME;
+ frame->level = -1;
+ /* Explicitly initialize the sentinel frame's cache. Provide it
+ with the underlying regcache. In the future additional
+ information, such as the frame's thread will be added. */
+ frame->unwind_cache = sentinel_frame_cache (regcache);
+ /* For the moment there is only one sentinel frame implementation. */
+ frame->unwind = sentinel_frame_unwind;
+ /* Link this frame back to itself. The frame is self referential
+ (the unwound PC is the same as the pc), so make it so. */
+ frame->next = frame;
+ /* Always unwind the PC as part of creating this frame. This
+ ensures that the frame's PC points at something valid. */
+ /* FIXME: cagney/2003-01-10: Problem here. Unwinding a sentinel
+ frame's PC may require information such as the frame's thread's
+ stop reason. Is it possible to get to that? */
+ frame->pc = frame_pc_unwind (frame);
+ return frame;
+}
+
/* Info about the innermost stack frame (contents of FP register) */
static struct frame_info *current_frame;
@@ -456,17 +464,18 @@ static struct frame_info *current_frame;
static struct obstack frame_cache_obstack;
void *
-frame_obstack_alloc (unsigned long size)
+frame_obstack_zalloc (unsigned long size)
{
- return obstack_alloc (&frame_cache_obstack, size);
+ void *data = obstack_alloc (&frame_cache_obstack, size);
+ memset (data, 0, size);
+ return data;
}
CORE_ADDR *
frame_saved_regs_zalloc (struct frame_info *fi)
{
fi->saved_regs = (CORE_ADDR *)
- frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
- memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+ frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
return fi->saved_regs;
}
@@ -476,17 +485,43 @@ get_frame_saved_regs (struct frame_info *fi)
return fi->saved_regs;
}
-/* Return the innermost (currently executing) stack frame. */
+/* Return the innermost (currently executing) stack frame. This is
+ split into two functions. The function unwind_to_current_frame()
+ is wrapped in catch exceptions so that, even when the unwind of the
+ sentinel frame fails, the function still returns a stack frame. */
+
+static int
+unwind_to_current_frame (struct ui_out *ui_out, void *args)
+{
+ struct frame_info *frame = get_prev_frame (args);
+ /* A sentinel frame can fail to unwind, eg, because it's PC value
+ lands in somewhere like start. */
+ if (frame == NULL)
+ return 1;
+ current_frame = frame;
+ return 0;
+}
struct frame_info *
get_current_frame (void)
{
+ if (!target_has_stack)
+ error ("No stack.");
+ if (!target_has_registers)
+ error ("No registers.");
+ if (!target_has_memory)
+ error ("No memory.");
if (current_frame == NULL)
{
- if (target_has_stack)
- current_frame = create_new_frame (read_fp (), read_pc ());
- else
- error ("No stack.");
+ struct frame_info *sentinel_frame =
+ create_sentinel_frame (current_regcache);
+ if (catch_exceptions (uiout, unwind_to_current_frame, sentinel_frame,
+ NULL, RETURN_MASK_ERROR) != 0)
+ {
+ /* Oops! Fake a current frame? Is this useful? It has a PC
+ of zero, for instance. */
+ current_frame = sentinel_frame;
+ }
}
return current_frame;
}
@@ -569,12 +604,16 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
gdb_assert (!(DEPRECATED_USE_GENERIC_DUMMY_FRAMES
&& (get_frame_type (frame) == DUMMY_FRAME)));
+ /* Only (older) architectures that implement the
+ FRAME_INIT_SAVED_REGS method should be using this function. */
+ gdb_assert (FRAME_INIT_SAVED_REGS_P ());
+
/* Load the saved_regs register cache. */
- if (frame->saved_regs == NULL)
+ if (get_frame_saved_regs (frame) == NULL)
FRAME_INIT_SAVED_REGS (frame);
- if (frame->saved_regs != NULL
- && frame->saved_regs[regnum] != 0)
+ if (get_frame_saved_regs (frame) != NULL
+ && get_frame_saved_regs (frame)[regnum] != 0)
{
if (regnum == SP_REGNUM)
{
@@ -585,7 +624,7 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
*realnump = -1;
if (bufferp != NULL)
store_address (bufferp, REGISTER_RAW_SIZE (regnum),
- frame->saved_regs[regnum]);
+ get_frame_saved_regs (frame)[regnum]);
}
else
{
@@ -593,7 +632,7 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
a local copy of its value. */
*optimizedp = 0;
*lvalp = lval_memory;
- *addrp = frame->saved_regs[regnum];
+ *addrp = get_frame_saved_regs (frame)[regnum];
*realnump = -1;
if (bufferp != NULL)
{
@@ -605,21 +644,20 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
{
int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
* sizeof (void *));
- regs = frame_obstack_alloc (sizeof_cache);
- memset (regs, 0, sizeof_cache);
+ regs = frame_obstack_zalloc (sizeof_cache);
(*cache) = regs;
}
if (regs[regnum] == NULL)
{
regs[regnum]
- = frame_obstack_alloc (REGISTER_RAW_SIZE (regnum));
- read_memory (frame->saved_regs[regnum], regs[regnum],
+ = frame_obstack_zalloc (REGISTER_RAW_SIZE (regnum));
+ read_memory (get_frame_saved_regs (frame)[regnum], regs[regnum],
REGISTER_RAW_SIZE (regnum));
}
memcpy (bufferp, regs[regnum], REGISTER_RAW_SIZE (regnum));
#else
/* Read the value in from memory. */
- read_memory (frame->saved_regs[regnum], bufferp,
+ read_memory (get_frame_saved_regs (frame)[regnum], bufferp,
REGISTER_RAW_SIZE (regnum));
#endif
}
@@ -628,36 +666,32 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
}
/* No luck, assume this and the next frame have the same register
- value. If a value is needed, pass the request on down the chain;
- otherwise just return an indication that the value is in the same
- register as the next frame. */
- if (bufferp == NULL)
- {
- *optimizedp = 0;
- *lvalp = lval_register;
- *addrp = 0;
- *realnump = regnum;
- }
- else
- {
- frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
- realnump, bufferp);
- }
+ value. Pass the request down the frame chain to the next frame.
+ Hopefully that will find the register's location, either in a
+ register or in memory. */
+ frame_register (frame, regnum, optimizedp, lvalp, addrp, realnump,
+ bufferp);
}
static CORE_ADDR
frame_saved_regs_pc_unwind (struct frame_info *frame, void **cache)
{
+ gdb_assert (FRAME_SAVED_PC_P ());
return FRAME_SAVED_PC (frame);
}
-static struct frame_id
-frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache)
+static void
+frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache,
+ struct frame_id *id)
{
int fromleaf;
- struct frame_id id;
+ CORE_ADDR base;
+ CORE_ADDR pc;
+
+ /* Start out by assuming it's NULL. */
+ (*id) = null_frame_id;
- if (next_frame->next == NULL)
+ if (frame_relative_level (next_frame) <= 0)
/* FIXME: 2002-11-09: Frameless functions can occure anywhere in
the frame chain, not just the inner most frame! The generic,
per-architecture, frame code should handle this and the below
@@ -673,7 +707,7 @@ frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache)
/* FIXME: 2002-11-09: There isn't any reason to special case this
edge condition. Instead the per-architecture code should hande
it locally. */
- id.base = get_frame_base (next_frame);
+ base = get_frame_base (next_frame);
else
{
/* Two macros defined in tm.h specify the machine-dependent
@@ -691,28 +725,39 @@ frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache)
this to after the ffi test; I'd rather have backtraces from
start go curfluy than have an abort called from main not show
main. */
- id.base = FRAME_CHAIN (next_frame);
-
- /* FIXME: cagney/2002-06-08: There should be two tests here.
- The first would check for a valid frame chain based on a user
- selectable policy. The default being ``stop at main'' (as
- implemented by generic_func_frame_chain_valid()). Other
- policies would be available - stop at NULL, .... The second
- test, if provided by the target architecture, would check for
- more exotic cases - most target architectures wouldn't bother
- with this second case. */
- if (!FRAME_CHAIN_VALID (id.base, next_frame))
- return null_frame_id;
+ gdb_assert (FRAME_CHAIN_P ());
+ base = FRAME_CHAIN (next_frame);
+
+ if (!frame_chain_valid (base, next_frame))
+ return;
}
- if (id.base == 0)
- return null_frame_id;
+ if (base == 0)
+ return;
/* FIXME: cagney/2002-06-08: This should probably return the frame's
function and not the PC (a.k.a. resume address). */
- id.pc = frame_pc_unwind (next_frame);
- return id;
+ pc = frame_pc_unwind (next_frame);
+ id->pc = pc;
+ id->base = base;
}
+static void
+frame_saved_regs_pop (struct frame_info *fi, void **cache,
+ struct regcache *regcache)
+{
+ gdb_assert (POP_FRAME_P ());
+ POP_FRAME;
+}
+
+const struct frame_unwind trad_frame_unwinder = {
+ frame_saved_regs_pop,
+ frame_saved_regs_pc_unwind,
+ frame_saved_regs_id_unwind,
+ frame_saved_regs_register_unwind
+};
+const struct frame_unwind *trad_frame_unwind = &trad_frame_unwinder;
+
+
/* Function: get_saved_register
Find register number REGNUM relative to FRAME and put its (raw,
target format) contents in *RAW_BUFFER.
@@ -746,6 +791,8 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
if (!target_has_registers)
error ("No registers.");
+ gdb_assert (FRAME_INIT_SAVED_REGS_P ());
+
/* Normal systems don't optimize out things with register numbers. */
if (optimized != NULL)
*optimized = 0;
@@ -758,44 +805,50 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
the current frame itself: otherwise, we would be getting the
previous frame's registers which were saved by the current frame. */
- while (frame && ((frame = frame->next) != NULL))
+ if (frame != NULL)
{
- if (get_frame_type (frame) == DUMMY_FRAME)
- {
- if (lval) /* found it in a CALL_DUMMY frame */
- *lval = not_lval;
- if (raw_buffer)
- /* FIXME: cagney/2002-06-26: This should be via the
- gdbarch_register_read() method so that it, on the fly,
- constructs either a raw or pseudo register from the raw
- register cache. */
- regcache_raw_read (generic_find_dummy_frame (frame->pc,
- frame->frame),
- regnum, raw_buffer);
- return;
- }
-
- FRAME_INIT_SAVED_REGS (frame);
- if (frame->saved_regs != NULL
- && frame->saved_regs[regnum] != 0)
+ for (frame = get_next_frame (frame);
+ frame_relative_level (frame) >= 0;
+ frame = get_next_frame (frame))
{
- if (lval) /* found it saved on the stack */
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
+ if (get_frame_type (frame) == DUMMY_FRAME)
{
- if (raw_buffer) /* SP register treated specially */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- frame->saved_regs[regnum]);
+ if (lval) /* found it in a CALL_DUMMY frame */
+ *lval = not_lval;
+ if (raw_buffer)
+ /* FIXME: cagney/2002-06-26: This should be via the
+ gdbarch_register_read() method so that it, on the
+ fly, constructs either a raw or pseudo register
+ from the raw register cache. */
+ regcache_raw_read
+ (generic_find_dummy_frame (get_frame_pc (frame),
+ get_frame_base (frame)),
+ regnum, raw_buffer);
+ return;
}
- else
+
+ FRAME_INIT_SAVED_REGS (frame);
+ if (get_frame_saved_regs (frame) != NULL
+ && get_frame_saved_regs (frame)[regnum] != 0)
{
- if (addrp) /* any other register */
- *addrp = frame->saved_regs[regnum];
- if (raw_buffer)
- read_memory (frame->saved_regs[regnum], raw_buffer,
- REGISTER_RAW_SIZE (regnum));
+ if (lval) /* found it saved on the stack */
+ *lval = lval_memory;
+ if (regnum == SP_REGNUM)
+ {
+ if (raw_buffer) /* SP register treated specially */
+ store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
+ get_frame_saved_regs (frame)[regnum]);
+ }
+ else
+ {
+ if (addrp) /* any other register */
+ *addrp = get_frame_saved_regs (frame)[regnum];
+ if (raw_buffer)
+ read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer,
+ REGISTER_RAW_SIZE (regnum));
+ }
+ return;
}
- return;
}
}
@@ -810,39 +863,26 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
deprecated_read_register_gen (regnum, raw_buffer);
}
-/* Using the PC, select a mechanism for unwinding a frame returning
- the previous frame. The register unwind function should, on
- demand, initialize the ->context object. */
+/* Determine the frame's type based on its PC. */
-static void
-set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
- frame_register_unwind_ftype **unwind_register,
- frame_pc_unwind_ftype **unwind_pc,
- frame_id_unwind_ftype **unwind_id)
+static enum frame_type
+frame_type_from_pc (CORE_ADDR pc)
{
- if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
- {
- /* Still need to set this to something. The ``info frame'' code
- calls this function to find out where the saved registers are.
- Hopefully this is robust enough to stop any core dumps and
- return vaguely correct values.. */
- *unwind_register = frame_saved_regs_register_unwind;
- *unwind_pc = frame_saved_regs_pc_unwind;
- *unwind_id = frame_saved_regs_id_unwind;
- }
- else if (DEPRECATED_PC_IN_CALL_DUMMY_P ()
- ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
- : pc_in_dummy_frame (pc))
- {
- *unwind_register = dummy_frame_register_unwind;
- *unwind_pc = dummy_frame_pc_unwind;
- *unwind_id = dummy_frame_id_unwind;
- }
+ /* FIXME: cagney/2002-11-24: Can't yet directly call
+ pc_in_dummy_frame() as some architectures don't set
+ PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the
+ latter is implemented by simply calling pc_in_dummy_frame). */
+ if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
+ && DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
+ return DUMMY_FRAME;
else
{
- *unwind_register = frame_saved_regs_register_unwind;
- *unwind_pc = frame_saved_regs_pc_unwind;
- *unwind_id = frame_saved_regs_id_unwind;
+ char *name;
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return SIGTRAMP_FRAME;
+ else
+ return NORMAL_FRAME;
}
}
@@ -853,59 +893,34 @@ struct frame_info *
create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
{
struct frame_info *fi;
- enum frame_type type;
-
- fi = (struct frame_info *)
- obstack_alloc (&frame_cache_obstack,
- sizeof (struct frame_info));
- /* Zero all fields by default. */
- memset (fi, 0, sizeof (struct frame_info));
+ fi = frame_obstack_zalloc (sizeof (struct frame_info));
fi->frame = addr;
fi->pc = pc;
- /* NOTE: cagney/2002-11-18: The code segments, found in
- create_new_frame and get_prev_frame(), that initializes the
- frames type is subtly different. The latter only updates ->type
- when it encounters a SIGTRAMP_FRAME or DUMMY_FRAME. This stops
- get_prev_frame() overriding the frame's type when the INIT code
- has previously set it. This is really somewhat bogus. The
- initialization, as seen in create_new_frame(), should occur
- before the INIT function has been called. */
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
- && (DEPRECATED_PC_IN_CALL_DUMMY_P ()
- ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
- : pc_in_dummy_frame (pc)))
- /* NOTE: cagney/2002-11-11: Does this even occure? */
- type = DUMMY_FRAME;
- else
- {
- char *name;
- find_pc_partial_function (pc, &name, NULL, NULL);
- if (PC_IN_SIGTRAMP (fi->pc, name))
- type = SIGTRAMP_FRAME;
- else
- type = NORMAL_FRAME;
- }
- fi->type = type;
+ fi->next = create_sentinel_frame (current_regcache);
+ fi->type = frame_type_from_pc (pc);
if (INIT_EXTRA_FRAME_INFO_P ())
INIT_EXTRA_FRAME_INFO (0, fi);
/* Select/initialize an unwind function. */
- set_unwind_by_pc (fi->pc, fi->frame, &fi->register_unwind,
- &fi->pc_unwind, &fi->id_unwind);
+ fi->unwind = frame_unwind_find_by_pc (current_gdbarch, fi->pc);
return fi;
}
/* Return the frame that FRAME calls (NULL if FRAME is the innermost
- frame). */
+ frame). Be careful to not fall off the bottom of the frame chain
+ and onto the sentinel frame. */
struct frame_info *
get_next_frame (struct frame_info *frame)
{
- return frame->next;
+ if (frame->level > 0)
+ return frame->next;
+ else
+ return NULL;
}
/* Flush the entire frame cache. */
@@ -936,43 +951,19 @@ reinit_frame_cache (void)
}
}
-/* Return a structure containing various interesting information
- about the frame that called NEXT_FRAME. Returns NULL
- if there is no such frame. */
+/* Create the previous frame using the deprecated methods
+ INIT_EXTRA_INFO, INIT_FRAME_PC and INIT_FRAME_PC_FIRST. */
-struct frame_info *
-get_prev_frame (struct frame_info *next_frame)
+static struct frame_info *
+legacy_get_prev_frame (struct frame_info *next_frame)
{
CORE_ADDR address = 0;
struct frame_info *prev;
int fromleaf;
- /* Return the inner-most frame, when the caller passes in NULL. */
- /* NOTE: cagney/2002-11-09: Not sure how this would happen. The
- caller should have previously obtained a valid frame using
- get_selected_frame() and then called this code - only possibility
- I can think of is code behaving badly. */
- if (next_frame == NULL)
- {
- /* NOTE: cagney/2002-11-09: There was a code segment here that
- would error out when CURRENT_FRAME was NULL. The comment
- that went with it made the claim ...
-
- ``This screws value_of_variable, which just wants a nice
- clean NULL return from block_innermost_frame if there are no
- frames. I don't think I've ever seen this message happen
- otherwise. And returning NULL here is a perfectly legitimate
- thing to do.''
-
- Per the above, this code shouldn't even be called with a NULL
- NEXT_FRAME. */
- return current_frame;
- }
-
- /* Only try to do the unwind once. */
- if (next_frame->prev_p)
- return next_frame->prev;
- next_frame->prev_p = 1;
+ /* This code only works on normal frames. A sentinel frame, where
+ the level is -1, should never reach this code. */
+ gdb_assert (next_frame->level >= 0);
/* On some machines it is possible to call a function without
setting up a stack frame for it. On these machines, we
@@ -983,7 +974,7 @@ get_prev_frame (struct frame_info *next_frame)
/* Still don't want to worry about this except on the innermost
frame. This macro will set FROMLEAF if NEXT_FRAME is a frameless
function invocation. */
- if (next_frame->next == NULL)
+ if (next_frame->level == 0)
/* FIXME: 2002-11-09: Frameless functions can occure anywhere in
the frame chain, not just the inner most frame! The generic,
per-architecture, frame code should handle this and the below
@@ -1017,27 +1008,17 @@ get_prev_frame (struct frame_info *next_frame)
this to after the ffi test; I'd rather have backtraces from
start go curfluy than have an abort called from main not show
main. */
+ gdb_assert (FRAME_CHAIN_P ());
address = FRAME_CHAIN (next_frame);
- /* FIXME: cagney/2002-06-08: There should be two tests here.
- The first would check for a valid frame chain based on a user
- selectable policy. The default being ``stop at main'' (as
- implemented by generic_func_frame_chain_valid()). Other
- policies would be available - stop at NULL, .... The second
- test, if provided by the target architecture, would check for
- more exotic cases - most target architectures wouldn't bother
- with this second case. */
- if (!FRAME_CHAIN_VALID (address, next_frame))
+ if (!frame_chain_valid (address, next_frame))
return 0;
}
if (address == 0)
return 0;
/* Create an initially zero previous frame. */
- prev = (struct frame_info *)
- obstack_alloc (&frame_cache_obstack,
- sizeof (struct frame_info));
- memset (prev, 0, sizeof (struct frame_info));
+ prev = frame_obstack_zalloc (sizeof (struct frame_info));
/* Link it in. */
next_frame->prev = prev;
@@ -1148,8 +1129,7 @@ get_prev_frame (struct frame_info *next_frame)
(and probably other architectural information). The PC lets you
check things like the debug info at that point (dwarf2cfi?) and
use that to decide how the frame should be unwound. */
- set_unwind_by_pc (prev->pc, prev->frame, &prev->register_unwind,
- &prev->pc_unwind, &prev->id_unwind);
+ prev->unwind = frame_unwind_find_by_pc (current_gdbarch, prev->pc);
/* NOTE: cagney/2002-11-18: The code segments, found in
create_new_frame and get_prev_frame(), that initializes the
@@ -1187,6 +1167,163 @@ get_prev_frame (struct frame_info *next_frame)
return prev;
}
+/* Return a structure containing various interesting information
+ about the frame that called NEXT_FRAME. Returns NULL
+ if there is no such frame. */
+
+struct frame_info *
+get_prev_frame (struct frame_info *next_frame)
+{
+ struct frame_info *prev_frame;
+
+ /* Return the inner-most frame, when the caller passes in NULL. */
+ /* NOTE: cagney/2002-11-09: Not sure how this would happen. The
+ caller should have previously obtained a valid frame using
+ get_selected_frame() and then called this code - only possibility
+ I can think of is code behaving badly.
+
+ NOTE: cagney/2003-01-10: Talk about code behaving badly. Check
+ block_innermost_frame(). It does the sequence: frame = NULL;
+ while (1) { frame = get_prev_frame (frame); .... }. Ulgh! Why
+ it couldn't be written better, I don't know.
+
+ NOTE: cagney/2003-01-11: I suspect what is happening is
+ block_innermost_frame() is, when the target has no state
+ (registers, memory, ...), still calling this function. The
+ assumption being that this function will return NULL indicating
+ that a frame isn't possible, rather than checking that the target
+ has state and then calling get_current_frame() and
+ get_prev_frame(). This is a guess mind. */
+ if (next_frame == NULL)
+ {
+ /* NOTE: cagney/2002-11-09: There was a code segment here that
+ would error out when CURRENT_FRAME was NULL. The comment
+ that went with it made the claim ...
+
+ ``This screws value_of_variable, which just wants a nice
+ clean NULL return from block_innermost_frame if there are no
+ frames. I don't think I've ever seen this message happen
+ otherwise. And returning NULL here is a perfectly legitimate
+ thing to do.''
+
+ Per the above, this code shouldn't even be called with a NULL
+ NEXT_FRAME. */
+ return current_frame;
+ }
+
+ /* There is always a frame. If this assertion fails, suspect that
+ something should be calling get_selected_frame() or
+ get_current_frame(). */
+ gdb_assert (next_frame != NULL);
+
+ if (next_frame->level >= 0
+ && !backtrace_below_main
+ && inside_main_func (get_frame_pc (next_frame)))
+ /* Don't unwind past main(), bug always unwind the sentinel frame.
+ Note, this is done _before_ the frame has been marked as
+ previously unwound. That way if the user later decides to
+ allow unwinds past main(), that just happens. */
+ return NULL;
+
+ /* Only try to do the unwind once. */
+ if (next_frame->prev_p)
+ return next_frame->prev;
+ next_frame->prev_p = 1;
+
+ /* If we're inside the entry file, it isn't valid. */
+ /* NOTE: drow/2002-12-25: should there be a way to disable this
+ check? It assumes a single small entry file, and the way some
+ debug readers (e.g. dbxread) figure out which object is the
+ entry file is somewhat hokey. */
+ /* NOTE: cagney/2003-01-10: If there is a way of disabling this test
+ then it should probably be moved to before the ->prev_p test,
+ above. */
+ if (inside_entry_file (get_frame_pc (next_frame)))
+ return NULL;
+
+ /* If any of the old frame initialization methods are around, use
+ the legacy get_prev_frame method. Just don't try to unwind a
+ sentinel frame using that method - it doesn't work. All sentinal
+ frames use the new unwind code. */
+ if ((DEPRECATED_INIT_FRAME_PC_P ()
+ || DEPRECATED_INIT_FRAME_PC_FIRST_P ()
+ || INIT_EXTRA_FRAME_INFO_P ()
+ || FRAME_CHAIN_P ())
+ && next_frame->level >= 0)
+ return legacy_get_prev_frame (next_frame);
+
+ /* Allocate the new frame but do not wire it in to the frame chain.
+ Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along
+ frame->next to pull some fancy tricks (of course such code is, by
+ definition, recursive). Try to prevent it.
+
+ There is no reason to worry about memory leaks, should the
+ remainder of the function fail. The allocated memory will be
+ quickly reclaimed when the frame cache is flushed, and the `we've
+ been here before' check above will stop repeated memory
+ allocation calls. */
+ prev_frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
+ prev_frame->level = next_frame->level + 1;
+
+ /* Try to unwind the PC. If that doesn't work, assume we've reached
+ the oldest frame and simply return. Is there a better sentinal
+ value? The unwound PC value is then used to initialize the new
+ previous frame's type.
+
+ Note that the pc-unwind is intentionally performed before the
+ frame chain. This is ok since, for old targets, both
+ frame_pc_unwind (nee, FRAME_SAVED_PC) and FRAME_CHAIN()) assume
+ NEXT_FRAME's data structures have already been initialized (using
+ INIT_EXTRA_FRAME_INFO) and hence the call order doesn't matter.
+
+ By unwinding the PC first, it becomes possible to, in the case of
+ a dummy frame, avoid also unwinding the frame ID. This is
+ because (well ignoring the PPC) a dummy frame can be located
+ using NEXT_FRAME's frame ID. */
+
+ prev_frame->pc = frame_pc_unwind (next_frame);
+ if (prev_frame->pc == 0)
+ /* The allocated PREV_FRAME will be reclaimed when the frame
+ obstack is next purged. */
+ return NULL;
+ prev_frame->type = frame_type_from_pc (prev_frame->pc);
+
+ /* Set the unwind functions based on that identified PC. */
+ prev_frame->unwind = frame_unwind_find_by_pc (current_gdbarch,
+ prev_frame->pc);
+
+ /* FIXME: cagney/2003-01-13: A dummy frame doesn't need to unwind
+ the frame ID because the frame ID comes from the previous frame.
+ The other frames do though. True? */
+ {
+ /* FIXME: cagney/2002-12-18: Instead of this hack, should just
+ save the frame ID directly. */
+ struct frame_id id = frame_id_unwind (next_frame);
+ if (!frame_id_p (id))
+ return NULL;
+ prev_frame->frame = id.base;
+ }
+
+ /* Link it in. */
+ next_frame->prev = prev_frame;
+ prev_frame->next = next_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 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 INIT_EXTR_FRAME_INFO
+ to initialize the inner-most frame. */
+ if (INIT_EXTRA_FRAME_INFO_P ())
+ {
+ gdb_assert (prev_frame->level == 0);
+ INIT_EXTRA_FRAME_INFO (0, prev_frame);
+ }
+
+ return prev_frame;
+}
+
CORE_ADDR
get_frame_pc (struct frame_info *frame)
{
@@ -1266,7 +1403,7 @@ deprecated_get_frame_saved_regs (struct frame_info *frame,
if (frame->saved_regs == NULL)
{
frame->saved_regs = (CORE_ADDR *)
- frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
+ frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
}
if (saved_regs_addr == NULL)
{
@@ -1291,8 +1428,7 @@ get_frame_extra_info (struct frame_info *fi)
struct frame_extra_info *
frame_extra_info_zalloc (struct frame_info *fi, long size)
{
- fi->extra_info = frame_obstack_alloc (size);
- memset (fi->extra_info, 0, size);
+ fi->extra_info = frame_obstack_zalloc (size);
return fi->extra_info;
}
@@ -1300,6 +1436,7 @@ void
deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
{
/* See comment in "frame.h". */
+ gdb_assert (frame->next != NULL);
frame->pc = pc;
}
@@ -1311,7 +1448,92 @@ deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
}
void
+deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
+ CORE_ADDR *saved_regs)
+{
+ frame->saved_regs = saved_regs;
+}
+
+void
+deprecated_set_frame_extra_info_hack (struct frame_info *frame,
+ struct frame_extra_info *extra_info)
+{
+ frame->extra_info = extra_info;
+}
+
+void
+deprecated_set_frame_next_hack (struct frame_info *fi,
+ struct frame_info *next)
+{
+ fi->next = next;
+}
+
+void
+deprecated_set_frame_prev_hack (struct frame_info *fi,
+ struct frame_info *prev)
+{
+ fi->prev = prev;
+}
+
+struct context *
+deprecated_get_frame_context (struct frame_info *fi)
+{
+ return fi->context;
+}
+
+void
+deprecated_set_frame_context (struct frame_info *fi,
+ struct context *context)
+{
+ fi->context = context;
+}
+
+struct frame_info *
+deprecated_frame_xmalloc (void)
+{
+ struct frame_info *frame = XMALLOC (struct frame_info);
+ memset (frame, 0, sizeof (struct frame_info));
+ return frame;
+}
+
+struct frame_info *
+deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
+ long sizeof_extra_info)
+{
+ struct frame_info *frame = deprecated_frame_xmalloc ();
+ make_cleanup (xfree, frame);
+ if (sizeof_saved_regs > 0)
+ {
+ frame->saved_regs = xcalloc (1, sizeof_saved_regs);
+ make_cleanup (xfree, frame->saved_regs);
+ }
+ if (sizeof_extra_info > 0)
+ {
+ frame->extra_info = xcalloc (1, sizeof_extra_info);
+ make_cleanup (xfree, frame->extra_info);
+ }
+ return frame;
+}
+
+void
_initialize_frame (void)
{
obstack_init (&frame_cache_obstack);
+
+ /* FIXME: cagney/2003-01-19: This command needs a rename. Suggest
+ `set backtrace {past,beyond,...}-main'. Also suggest adding `set
+ backtrace ...-start' to control backtraces past start. The
+ problem with `below' is that it stops the `up' command. */
+
+ add_setshow_boolean_cmd ("backtrace-below-main", class_obscure,
+ &backtrace_below_main, "\
+Set whether backtraces should continue past \"main\".\n\
+Normally the caller of \"main\" is not of interest, so GDB will terminate\n\
+the backtrace at \"main\". Set this variable if you need to see the rest\n\
+of the stack trace.", "\
+Show whether backtraces should continue past \"main\".\n\
+Normally the caller of \"main\" is not of interest, so GDB will terminate\n\
+the backtrace at \"main\". Set this variable if you need to see the rest\n\
+of the stack trace.",
+ NULL, NULL, &setlist, &showlist);
}
diff --git a/gdb/frame.h b/gdb/frame.h
index 3d95ddaae46..2cdf9317712 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -1,7 +1,7 @@
/* Definitions for dealing with stack frames, for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,6 +24,10 @@
#define FRAME_H 1
struct symtab_and_line;
+struct frame_unwind;
+
+/* The traditional frame unwinder. */
+extern const struct frame_unwind *trad_frame_unwind;
/* The frame object. */
@@ -259,6 +263,9 @@ extern void frame_register_unwind (struct frame_info *frame, int regnum,
/* NOTE: cagney/2002-09-13: Return void as one day these functions may
be changed to return an indication that the read succeeded. */
+extern void frame_unwind_register (struct frame_info *frame,
+ int regnum, void *buf);
+
extern void frame_unwind_signed_register (struct frame_info *frame,
int regnum, LONGEST *val);
@@ -279,6 +286,9 @@ extern void frame_register (struct frame_info *frame, int regnum,
/* NOTE: cagney/2002-09-13: Return void as one day these functions may
be changed to return an indication that the read succeeded. */
+extern void frame_read_register (struct frame_info *frame, int regnum,
+ void *buf);
+
extern void frame_read_signed_register (struct frame_info *frame,
int regnum, LONGEST *val);
@@ -287,9 +297,10 @@ extern void frame_read_unsigned_register (struct frame_info *frame,
/* Map between a frame register number and its name. A frame register
space is a superset of the cooked register space --- it also
- includes builtin registers. */
+ includes builtin registers. If NAMELEN is negative, use the NAME's
+ length when doing the comparison. */
-extern int frame_map_name_to_regnum (const char *name, int strlen);
+extern int frame_map_name_to_regnum (const char *name, int namelen);
extern const char *frame_map_regnum_to_name (int regnum);
/* Unwind the PC. Strictly speaking return the resume address of the
@@ -302,41 +313,9 @@ extern CORE_ADDR frame_pc_unwind (struct frame_info *frame);
caller's frame. */
extern struct frame_id frame_id_unwind (struct frame_info *frame);
-
-/* Return the location (and possibly value) of REGNUM for the previous
- (older, up) frame. All parameters except VALUEP can be assumed to
- be non NULL. When VALUEP is NULL, just the location of the
- register should be returned.
-
- UNWIND_CACHE is provided as mechanism for implementing a per-frame
- local cache. It's initial value being NULL. Memory for that cache
- should be allocated using frame_obstack_alloc().
-
- Register window architectures (eg SPARC) should note that REGNUM
- identifies the register for the previous frame. For instance, a
- request for the value of "o1" for the previous frame would be found
- in the register "i1" in this FRAME. */
-
-typedef void (frame_register_unwind_ftype) (struct frame_info *frame,
- void **unwind_cache,
- int regnum,
- int *optimized,
- enum lval_type *lvalp,
- CORE_ADDR *addrp,
- int *realnump,
- void *valuep);
-
-/* Same as for registers above, but return the address at which the
- calling frame would resume. */
-
-typedef CORE_ADDR (frame_pc_unwind_ftype) (struct frame_info *frame,
- void **unwind_cache);
-
-/* Same as for registers above, but return the ID of the frame that
- called this one. */
-
-typedef struct frame_id (frame_id_unwind_ftype) (struct frame_info *frame,
- void **unwind_cache);
+/* Discard the specified frame. Restoring the registers to the state
+ of the caller. */
+extern void frame_pop (struct frame_info *frame);
/* Describe the saved registers of a frame. */
@@ -413,7 +392,7 @@ struct frame_info
/* Anything extra for this structure that may have been defined
in the machine dependent files. */
- /* Allocated by frame_obstack_alloc () which is called /
+ /* Allocated by frame_extra_info_zalloc () which is called /
initialized by INIT_EXTRA_FRAME_INFO */
struct frame_extra_info *extra_info;
@@ -425,18 +404,14 @@ struct frame_info
better all agree as to the contents. */
void *unwind_cache;
- /* See description above. The previous frame's registers. */
- frame_register_unwind_ftype *register_unwind;
+ /* The frame's unwinder. */
+ const struct frame_unwind *unwind;
- /* See description above. The previous frame's resume address.
- Save the previous PC in a local cache. */
- frame_pc_unwind_ftype *pc_unwind;
+ /* Cached copy of the previous frame's resume address. */
int pc_unwind_cache_p;
CORE_ADDR pc_unwind_cache;
- /* See description above. The previous frame's resume address.
- Save the previous PC in a local cache. */
- frame_id_unwind_ftype *id_unwind;
+ /* Cached copy of the previous frame's ID. */
int id_unwind_cache_p;
struct frame_id id_unwind_cache;
@@ -472,23 +447,19 @@ enum print_what
#define SIZEOF_FRAME_SAVED_REGS \
(sizeof (CORE_ADDR) * (NUM_REGS+NUM_PSEUDO_REGS))
-extern void *frame_obstack_alloc (unsigned long size);
+/* Allocate zero initialized memory from the frame cache obstack.
+ Appendices to the frame info (such as the unwind cache) should
+ allocate memory using this method. */
-/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for most
- targets. If FRAME_CHAIN_VALID returns zero it means that the given frame
- is the outermost one and has no caller.
+extern void *frame_obstack_zalloc (unsigned long size);
+#define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
- XXXX - both default and alternate frame_chain_valid functions are
- deprecated. New code should use dummy frames and one of the
- generic functions. */
+/* If FRAME_CHAIN_VALID returns zero it means that the given frame
+ is the outermost one and has no caller. */
-extern int file_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int func_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int nonnull_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int generic_file_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern int generic_func_frame_chain_valid (CORE_ADDR, struct frame_info *);
-extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
+extern int frame_chain_valid (CORE_ADDR, struct frame_info *);
+extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
#ifdef FRAME_FIND_SAVED_REGS
@@ -551,8 +522,6 @@ extern void show_and_print_stack_frame (struct frame_info *fi, int level,
extern void print_stack_frame (struct frame_info *, int, int);
-extern void print_only_stack_frame (struct frame_info *, int, int);
-
extern void show_stack_frame (struct frame_info *);
extern void print_frame_info (struct frame_info *, int, int, int);
@@ -600,6 +569,16 @@ extern void get_saved_register (char *raw_buffer, int *optimized,
struct frame_info *frame,
int regnum, enum lval_type *lval);
+/* 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
+ 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). */
+
extern int frame_register_read (struct frame_info *frame, int regnum,
void *buf);
@@ -674,4 +653,52 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
extern void deprecated_update_frame_base_hack (struct frame_info *frame,
CORE_ADDR base);
+/* FIXME: cagney/2003-01-04: Explicitly set the frame's saved_regs
+ and/or extra_info. Target code is allocating a fake frame and than
+ initializing that to get around the problem of, when creating the
+ inner most frame, there is no where to cache information such as
+ the prologue analysis. This is fixed by the new unwind mechanism -
+ even the inner most frame has somewhere to store things like the
+ prolog analysis (or at least will once the frame overhaul is
+ finished). */
+extern void deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
+ CORE_ADDR *saved_regs);
+extern void deprecated_set_frame_extra_info_hack (struct frame_info *frame,
+ struct frame_extra_info *extra_info);
+
+/* FIXME: cagney/2003-01-04: Allocate a frame from the heap (rather
+ than the frame obstack). Targets do this as a way of saving the
+ prologue analysis from the inner most frame before that frame has
+ been created. By always creating a frame, this problem goes away. */
+extern struct frame_info *deprecated_frame_xmalloc (void);
+
+/* FIXME: cagney/2003-01-05: Allocate a frame, along with the
+ saved_regs and extra_info. Set up cleanups for all three. Same as
+ for deprecated_frame_xmalloc, targets are calling this when
+ creating a scratch `struct frame_info'. The frame overhaul makes
+ this unnecessary since all frame queries are parameterized with a
+ common cache parameter and a frame. */
+extern struct frame_info *deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
+ long sizeof_extra_info);
+
+/* FIXME: cagney/2003-01-07: These are just nasty. Code shouldn't be
+ doing this. I suspect it dates back to the days when every field
+ of an allocated structure was explicitly initialized. */
+extern void deprecated_set_frame_next_hack (struct frame_info *fi,
+ struct frame_info *next);
+extern void deprecated_set_frame_prev_hack (struct frame_info *fi,
+ struct frame_info *prev);
+
+/* FIXME: cagney/2003-01-07: Instead of the dwarf2cfi having its own
+ dedicated `struct frame_info . context' field, the code should use
+ the per frame `unwind_cache' that is passed to the
+ frame_pc_unwind(), frame_register_unwind() and frame_id_unwind()
+ methods.
+
+ See "dummy-frame.c" for an example of how a cfi-frame object can be
+ implemented using this. */
+extern struct context *deprecated_get_frame_context (struct frame_info *fi);
+extern void deprecated_set_frame_context (struct frame_info *fi,
+ struct context *context);
+
#endif /* !defined (FRAME_H) */
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 0c14e53a007..b89e54e58ef 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -793,8 +793,7 @@ frv_saved_pc_after_call (struct frame_info *frame)
static void
frv_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
- frame->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
frame->extra_info->fp_to_callers_sp_offset = 0;
frame->extra_info->lr_saved_on_stack = 0;
}
@@ -1083,7 +1082,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, frv_saved_pc_after_call);
set_gdbarch_frame_chain (gdbarch, frv_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, frv_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, frv_frame_init_saved_regs);
@@ -1097,8 +1095,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Settings for calling functions in the inferior. */
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_coerce_float_to_double (gdbarch,
- standard_coerce_float_to_double);
set_gdbarch_push_arguments (gdbarch, frv_push_arguments);
set_gdbarch_push_return_address (gdbarch, frv_push_return_address);
set_gdbarch_pop_frame (gdbarch, frv_pop_frame);
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 155ebe09c8f..5ad17e83f83 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -1,5 +1,6 @@
/* Generate a core file for the inferior process.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -179,7 +180,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
return 0; /* Can't succeed without current frame. */
/* Save frame pointer of TOS frame. */
- *top = fi->frame;
+ *top = get_frame_base (fi);
/* If current stack pointer is more "inner", use that instead. */
if (INNER_THAN (read_sp (), *top))
*top = read_sp ();
@@ -189,7 +190,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
fi = tmp_fi;
/* Save frame pointer of prev-most frame. */
- *bottom = fi->frame;
+ *bottom = get_frame_base (fi);
/* Now canonicalize their order, so that 'bottom' is a lower address
(as opposed to a lower stack frame). */
diff --git a/gdb/gdb-stabs.h b/gdb/gdb-stabs.h
index d2da2d11d99..abe2d3365b6 100644
--- a/gdb/gdb-stabs.h
+++ b/gdb/gdb-stabs.h
@@ -70,6 +70,9 @@ struct dbx_symfile_info
asection *text_section;
asection *data_section;
asection *bss_section;
+
+ /* Pointer to the separate ".stab" section, if there is one. */
+ asection *stab_section;
};
#define DBX_SYMFILE_INFO(o) ((o)->sym_stab_info)
@@ -83,5 +86,6 @@ struct dbx_symfile_info
#define DBX_TEXT_SECTION(o) (DBX_SYMFILE_INFO(o)->text_section)
#define DBX_DATA_SECTION(o) (DBX_SYMFILE_INFO(o)->data_section)
#define DBX_BSS_SECTION(o) (DBX_SYMFILE_INFO(o)->bss_section)
+#define DBX_STAB_SECTION(o) (DBX_SYMFILE_INFO(o)->stab_section)
#endif /* GDBSTABS_H */
diff --git a/gdb/gdb_dirent.h b/gdb/gdb_dirent.h
index 9cb40061420..ba28ca55616 100644
--- a/gdb/gdb_dirent.h
+++ b/gdb/gdb_dirent.h
@@ -1,5 +1,5 @@
-/* Portable <dirent.h>
- Copyright 2000 Free Software Foundation, Inc.
+/* Portable <dirent.h>.
+ Copyright 2000, 2002 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,14 +18,16 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if !defined(GDB_DIRENT_H)
-#define GDB_DIRENT_H
-
-/* From bfd/hpux-core.c. */
+#ifndef GDB_DIRENT_H
+#define GDB_DIRENT_H 1
+/* See description of `AC_HEADER_DIRENT' in the Autoconf manual. */
#ifdef HAVE_DIRENT_H
-# include <dirent.h>
+# include <dirent.h> /* OK: dirent.h */
+# define NAMELEN(dirent) strlen ((dirent)->d_name) /* OK: strlen d_name */
#else
+# define dirent direct
+# define NAMELEN(dirent) (dirent)->d_namelen /* OK: d_namelen */
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
@@ -37,4 +39,4 @@
# endif
#endif
-#endif /* !defined(GDB_DIRENT_H) */
+#endif /* not GDB_DIRENT_H */
diff --git a/gdb/gdb_indent.sh b/gdb/gdb_indent.sh
index c47ef95828d..ee0d0fb9a8a 100755
--- a/gdb/gdb_indent.sh
+++ b/gdb/gdb_indent.sh
@@ -36,12 +36,29 @@ fi
# Check that the indent found is both GNU and a reasonable version.
# Different indent versions give different indentation.
-case `${indent} --version 2>/dev/null < /dev/null` in
- GNU*2.2* ) ;;
- *GNU* ) echo "Incorrect version of GNU indent" 1>&2 ;;
- * ) echo "Indent is not GNU" 1>&2 ;;
+m1=2
+m2=2
+m3=9
+
+version=`${indent} --version 2>/dev/null < /dev/null`
+case "${version}" in
+ *GNU* ) ;;
+ * ) echo "error: GNU indent $m1.$m2.$m3 expected" 1>&2 ; exit 1;;
esac
+v1=`echo "${version}" | sed 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)$/\1/'`
+v2=`echo "${version}" | sed 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)$/\2/'`
+v3=`echo "${version}" | sed 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)$/\3/'`
+
+if test $m1 -ne $v1 -o $m2 -ne $v2 -o $m3 -gt $v3
+then
+ echo "error: Must be GNU indent version $m1.$m2.$m3 or later" 1>&2
+ exit 1
+fi
+if test $m3 -ne $v3
+then
+ echo "warning: GNU indent version $m1.$m2.$m3 recommended" 1>&2
+fi
# Check that we're in the GDB source directory
@@ -56,6 +73,7 @@ esac
types="\
-T FILE \
+-T bfd -T asection \
-T prgregset_t -T fpregset_t -T gregset_t \
`cat *.h | sed -n \
-e 's/^.*[^a-z0-9_]\([a-z0-9_]*_ftype\).*$/-T \1/p' \
diff --git a/gdb/gdb_mbuild.sh b/gdb/gdb_mbuild.sh
index ae40b02c69a..a23ea5e12d3 100755
--- a/gdb/gdb_mbuild.sh
+++ b/gdb/gdb_mbuild.sh
@@ -1,7 +1,10 @@
#!/bin/sh
-# Multi-build script for testing compilation of all maintained configs of GDB.
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Multi-build script for testing compilation of all maintained
+# configs of GDB.
+
+# Copyright 2002, 2003 Free Software Foundation, Inc.
+
# Contributed by Richard Earnshaw (rearnsha@arm.com)
# This program is free software; you can redistribute it and/or modify
@@ -18,136 +21,312 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-usage() {
- echo "Usage: gdb_mbuild.sh <srcdir> <builddir> [<parjobs>]"
- echo " Environment variables examined (with default if not defined):"
- echo " AWK (awk) -- must be GNU awk"
- echo " MAKE (make)"
- echo
- echo " Note: Everything in <builddir>/gdb-allcross will be blown away."
+usage()
+{
+ cat <<EOF
+Usage: gdb_mbuild.sh [ <options> ... ] <srcdir> <builddir>
+ Options:
+ -j <makejobs> Run <makejobs> in parallel. Passed to make.
+ On a single cpu machine, 2 is recommended.
+ -k Keep going. Do not stop after the first build fails.
+ --keep Keep builds. Do not remove each build when finished.
+ -e <regexp> Regular expression for selecting the targets to build.
+ -f Force rebuild. Even rebuild previously built directories.
+ -v Be more (and more, and more) verbose.
+ Arguments:
+ <srcdir> Source code directory.
+ <builddir> Build directory.
+ Environment variables examined (with default if not defined):
+ MAKE (make)"
+EOF
exit 1;
+cat <<NOTYET
+ -b <maxbuilds> Run <maxbuild> builds in parallel.
+ On a single cpu machine, 1 is recommended.
+NOTYET
}
-if [ $# -ne 2 -a $# -ne 3 ] ; then
+### COMMAND LINE OPTIONS
+
+makejobs=
+maxbuilds=1
+keepgoing=
+force=false
+targexp=""
+verbose=0
+keep=false
+while test $# -gt 0
+do
+ case "$1" in
+ -j )
+ # Number of parallel make jobs.
+ shift
+ test $# -ge 1 || usage
+ makejobs="-j $1"
+ ;;
+ -b | -c )
+ # Number of builds to fire off in parallel.
+ shift
+ test $# -ge 1 || usage
+ maxbuilds=$1
+ ;;
+ -k )
+ # Should we soldier on after the first build fails?
+ keepgoing=-k
+ ;;
+ --keep )
+ keep=true
+ ;;
+ -e )
+ # A regular expression for selecting targets
+ shift
+ test $# -ge 1 || usage
+ targexp="${targexp} -e ${1}"
+ ;;
+ -f )
+ # Force a rebuild
+ force=true ; shift ;;
+ -v )
+ # Be more, and more, and more, verbose
+ verbose=`expr ${verbose} + 1`
+ ;;
+ -* ) usage ;;
+ *) break ;;
+ esac
+ shift
+done
+
+
+### COMMAND LINE PARAMETERS
+
+if test $# -ne 2
+then
usage
fi
-### COMMAND LINE PARAMETERS
+# Convert these to absolute directory paths.
# Where the sources live
-srcdir=$1
+srcdir=`cd $1 && /bin/pwd` || exit 1
# Where the builds occur
-buildbase=$2
-
-# Number of parallel make jobs (you probably want about 2 jobs per cpu for
-# maximum throughput)
-if [ $# -eq 3 ]; then
- par=$3
-else
- par="1"
-fi
+builddir=`cd $2 && /bin/pwd` || exit 1
### ENVIRONMENT PARAMETERS
-# Must be GNU awk
-awk=${AWK:-awk}
# Version of make to use
make=${MAKE:-make}
+MAKE=${make}
+export MAKE
-# Where builds will live
-builddir=${buildbase}/gdb-allcross
-
-# Where logs will go. NB. Must not be a sub-dir of builddir or you will loose
-# them.
-logdir=${buildbase}/gdb-logdir
-
# Where to look for the list of targets to test
maintainers=${srcdir}/gdb/MAINTAINERS
-
-# Get the list of targets and the build options
-alltarg=`${awk} < "${maintainers}" '
- $2 ~ /--target=.*/ {
- targets = gensub (/^.*--target=/, "", 1, $2)
- warnings = gensub (/[)]*$/, "", 1, $3)
- split (targets, targ, /,/)
- for (i in targ) {
- print targ[i], warnings
- }
- }'`
-
-# Back up the log files
-cd ${logdir}
-
-if [ -f build.out ]
-then
- mv build.out build.old
-fi
-if [ -f config.out ]
-then
- mv config.out config.old
-fi
-if [ -f fail.sum ]
+if [ ! -r ${maintainers} ]
then
- mv fail.sum fail.old
+ echo Maintainers file ${maintainers} not found
+ exit 1
fi
-if [ ! -d ${builddir} ]
+# Get the list of targets and the build options
+alltarg=`cat ${maintainers} | tr -s '[\t]' '[ ]' | sed -n '
+/^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
+s/^.*--target=//
+s/).*$//
+h
+:loop
+ g
+ /^[^ ]*,/ !b end
+ s/,[^ ]*//
+ p
+ g
+ s/^[^,]*,//
+ h
+b loop
+:end
+p
+' | if test "${targexp}" = ""
then
- echo ${builddir} does not exist
- exit 1
-fi
+ grep -v -e broken -e OBSOLETE
+else
+ grep ${targexp}
+fi`
-cd ${builddir}
-rm -rf *
-MAKE=${make}
-export MAKE
+# Usage: fail <message> <test-that-should-succeed>. Should the build
+# fail? If the test is true, and we don't want to keep going, print
+# the message and shoot everything in sight and abort the build.
-jobs=1
-# For each target, configure and build it.
-while read targ opts
-do
- if [ ${opts} != "broken" ]
+fail ()
+{
+ msg="$1" ; shift
+ if test "$@"
+ then
+ echo "${target}: ${msg}"
+ if test "${keepgoing}" != ""
then
- trap 'echo cleaning up ...; rm -rf ${builddir}/*; exit 1' 1 2 15
- echo ${targ}
- mkdir ${targ}
- cd ${targ}
- ${srcdir}/configure --target=$targ \
- --enable-gdb-build-warnings=$opts \
- >> ${logdir}/config.tout.$targ 2>&1 &
- cd ..
- jobs=`expr ${jobs} + 1`
- if [ ${jobs} -gt ${par} ]
- then
- wait
- jobs=1
- fi
+ #exit 1
+ continue
+ else
+ kill $$
+ exit 1
fi
-done << EOF
-$alltarg
-EOF
+ fi
+}
+
+
+# Usage: log <level> <logfile>. Write standard input to <logfile> and
+# stdout (if verbose >= level).
+
+log ()
+{
+ if test ${verbose} -ge $1
+ then
+ tee $2
+ else
+ cat > $2
+ fi
+}
+
+
-wait
+# Warn the user of what is comming, print the list of targets
-cat ${logdir}/config.tout.* > ${logdir}/config.out
-rm -f ${logdir}/config.tout.*
+echo "$alltarg"
+echo ""
-for targ in *
+
+# For each target, configure, build and test it.
+
+echo "$alltarg" | while read target gdbopts simopts
do
- cd $targ
- if ${make} -j ${par} all-gdb >> ${logdir}/build.out 2>&1
+
+ trap "exit 1" 1 2 15
+ dir=${builddir}/${target}
+
+ # Should a scratch rebuild be forced, for perhaphs the entire
+ # build be skipped?
+
+ if ${force}
+ then
+ echo forcing ${target} ...
+ rm -rf ${dir}
+ elif test -f ${dir}
+ then
+ echo "${target}"
+ continue
+ else
+ echo ${target} ...
+ fi
+
+ # Did the previous configure attempt fail? If it did
+ # restart from scratch.
+
+ if test -d ${dir} -a ! -r ${dir}/Makefile
+ then
+ echo ... removing partially configured ${target}
+ rm -rf ${dir}
+ if test -d ${dir}
then
- true
- else
- echo ">>>>>>>>>>>>>" >> ${logdir}/fail.sum
- echo "$targ (${opts})" >> ${logdir}/fail.sum
- tail -20 ${logdir}/build.out >> ${logdir}/fail.sum
- echo >> ${logdir}/fail.sum
- echo $targ build failed
+ echo "${target}: unable to remove directory ${dir}"
+ exit 1
fi
- rm -rf *
- cd ..
+ fi
+
+ # From now on, we're in this target's build directory
+
+ mkdir -p ${dir}
+ cd ${dir} || exit 1
+
+ # Configure, if not already. Should this go back to being
+ # separate and done in parallel?
+
+ if test ! -r Makefile
+ then
+ # Default SIMOPTS to GDBOPTS.
+ test -z "${simopts}" && simopts="${gdbopts}"
+ # The config options
+ __target="--target=${target}"
+ __enable_gdb_build_warnings=`test -z "${gdbopts}" \
+ || echo "--enable-gdb-build-warnings=${gdbopts}"`
+ __enable_sim_build_warnings=`test -z "${simopts}" \
+ || echo "--enable-sim-build-warnings=${simopts}"`
+ __configure="${srcdir}/configure \
+ ${__target} \
+ ${__enable_gdb_build_warnings} \
+ ${__enable_sim_build_warnings}"
+ echo ... ${__configure}
+ trap "echo Removing partially configured ${dir} directory ...; rm -rf ${dir}; exit 1" 1 2 15
+ ${__configure} 2>&1 | log 2 Config.log
+ trap "exit 1" 1 2 15
+ fi
+ fail "configure failed" ! -r Makefile
+
+ # Build, if not built.
+
+ if test ! -x gdb/gdb -a ! -x gdb/gdb.exe
+ then
+ # Iff the build fails remove the final build target so that
+ # the follow-on code knows things failed. Stops the follow-on
+ # code thinking that a failed rebuild succedded (executable
+ # left around from previous build).
+ echo ... ${make} ${keepgoing} ${makejobs} ${target}
+ ( ${make} ${keepgoing} ${makejobs} all-gdb || rm -f gdb/gdb gdb/gdb.exe
+ ) 2>&1 | log 1 Build.log
+ fi
+ fail "compile failed" ! -x gdb/gdb -a ! -x gdb/gdb.exe
+
+ # Check that the built GDB can at least print it's architecture.
+
+ echo ... run ${target}
+ rm -f core gdb.core ${dir}/gdb/x
+ cat <<EOF > x
+maint print architecture
+quit
+EOF
+ ./gdb/gdb -batch -nx -x x 2>&1 | log 1 Gdb.log
+ fail "gdb dumped core" -r core -o -r gdb.core
+ fail "gdb printed no output" ! -s Gdb.log
+ grep -e internal-error Gdb.log && fail "gdb panic" 1
+
+ echo ... cleanup ${target}
+
+ # Create a sed script that cleans up the output from GDB.
+ rm -f mbuild.sed
+ touch mbuild.sed || exit 1
+ # Rules to replace <0xNNNN> with the corresponding function's
+ # name.
+ sed -n -e '/<0x0*>/d' -e 's/^.*<0x\([0-9a-f]*\)>.*$/0x\1/p' Gdb.log \
+ | sort -u \
+ | while read addr
+ do
+ func="`addr2line -f -e ./gdb/gdb -s ${addr} | sed -n -e 1p`"
+ test ${verbose} -gt 0 && echo "${addr} ${func}" 1>&2
+ echo "s/<${addr}>/<${func}>/g"
+ done >> mbuild.sed
+ # Rules to strip the leading paths off of file names.
+ echo 's/"\/.*\/gdb\//"gdb\//g' >> mbuild.sed
+ # Run the script
+ sed -f mbuild.sed Gdb.log > Mbuild.log
+
+ # Replace the build directory with a file as semaphore that stops
+ # a rebuild. (should the logs be saved?)
+
+ cd ${builddir}
+
+ if ${keep}
+ then
+ :
+ else
+ rm -f ${target}.tmp
+ mv ${target}/Mbuild.log ${target}.tmp
+ rm -rf ${target}
+ mv ${target}.tmp ${target}
+ fi
+
+ # Success!
+ echo ... ${target} built
+
done
+
+exit 0
diff --git a/gdb/gdb_regex.h b/gdb/gdb_regex.h
index 27a570a1f40..7e270f4efe6 100644
--- a/gdb/gdb_regex.h
+++ b/gdb/gdb_regex.h
@@ -1,5 +1,5 @@
-/* Portable <regex.h>
- Copyright 2000, 2001 Free Software Foundation, Inc.
+/* Portable <regex.h>.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,12 +19,14 @@
Boston, MA 02111-1307, USA. */
#ifndef GDB_REGEX_H
-#define GDB_REGEX_H
+#define GDB_REGEX_H 1
#ifdef USE_INCLUDED_REGEX
-#include "xregex.h"
+# include "xregex.h"
#else
-#include <regex.h>
+/* Request 4.2 BSD regex functions. */
+# define _REGEX_RE_COMP
+# include <regex.h>
#endif
-#endif /* gdb_regex.h */
+#endif /* not GDB_REGEX_H */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 938d9faaed2..10f63970fb8 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1,7 +1,7 @@
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -65,6 +65,7 @@
#include "gdb_string.h"
#include "gdb-events.h"
#include "reggroups.h"
+#include "osabi.h"
/* Static function declarations */
@@ -93,6 +94,7 @@ struct gdbarch
/* basic architectural information */
const struct bfd_arch_info * bfd_arch_info;
int byte_order;
+ enum gdb_osabi osabi;
/* target specific vector. */
struct gdbarch_tdep *tdep;
@@ -199,7 +201,6 @@ struct gdbarch
gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
int believe_pcc_promotion;
int believe_pcc_promotion_type;
- gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
gdbarch_get_saved_register_ftype *get_saved_register;
gdbarch_register_convertible_ftype *register_convertible;
gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
@@ -290,6 +291,7 @@ struct gdbarch startup_gdbarch =
/* basic architecture information */
&bfd_default_arch_struct,
BFD_ENDIAN_BIG,
+ GDB_OSABI_UNKNOWN,
/* target specific vector and its dump routine */
NULL, NULL,
/*per-architecture data-pointers and swap regions */
@@ -427,7 +429,6 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
- 0,
generic_in_function_epilogue_p,
construct_inferior_arguments,
0,
@@ -480,6 +481,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->bfd_arch_info = info->bfd_arch_info;
current_gdbarch->byte_order = info->byte_order;
+ current_gdbarch->osabi = info->osabi;
/* Force the explicit initialization of these. */
current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
@@ -533,7 +535,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->call_dummy_words = legacy_call_dummy_words;
current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
current_gdbarch->call_dummy_stack_adjust_p = -1;
- current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
current_gdbarch->register_convertible = generic_register_convertible_not;
current_gdbarch->convert_register_p = legacy_convert_register_p;
current_gdbarch->register_to_value = legacy_register_to_value;
@@ -555,7 +556,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
current_gdbarch->frame_args_skip = -1;
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
- current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
current_gdbarch->frame_args_address = get_frame_base;
current_gdbarch->frame_locals_address = get_frame_base;
current_gdbarch->extra_stack_alignment_needed = 1;
@@ -712,7 +712,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
fprintf_unfiltered (log, "\n\tfix_call_dummy");
/* Skip verify of deprecated_init_frame_pc_first, has predicate */
/* Skip verify of deprecated_init_frame_pc, has predicate */
- /* Skip verify of coerce_float_to_double, invalid_p == 0 */
/* Skip verify of get_saved_register, has predicate */
/* Skip verify of register_convertible, invalid_p == 0 */
/* Skip verify of register_convert_to_virtual, invalid_p == 0 */
@@ -729,9 +728,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
&& (gdbarch->push_dummy_frame == 0))
fprintf_unfiltered (log, "\n\tpush_dummy_frame");
/* Skip verify of push_return_address, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->pop_frame == 0))
- fprintf_unfiltered (log, "\n\tpop_frame");
+ /* Skip verify of pop_frame, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->store_struct_return == 0))
fprintf_unfiltered (log, "\n\tstore_struct_return");
@@ -740,9 +737,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* 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 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_init_saved_regs == 0))
- fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
+ /* Skip verify of frame_init_saved_regs, has predicate */
/* Skip verify of init_extra_frame_info, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->skip_prologue == 0))
@@ -766,13 +761,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
&& (gdbarch->frame_args_skip == -1))
fprintf_unfiltered (log, "\n\tframe_args_skip");
/* Skip verify of frameless_function_invocation, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_chain == 0))
- fprintf_unfiltered (log, "\n\tframe_chain");
- /* Skip verify of frame_chain_valid, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_saved_pc == 0))
- fprintf_unfiltered (log, "\n\tframe_saved_pc");
+ /* Skip verify of frame_chain, has predicate */
+ /* Skip verify of frame_chain_valid, has predicate */
+ /* Skip verify of frame_saved_pc, has predicate */
/* Skip verify of frame_args_address, invalid_p == 0 */
/* Skip verify of frame_locals_address, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
@@ -991,7 +982,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
XSTRING (CALL_DUMMY_LENGTH));
- if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
+ if (gdbarch->call_dummy_length >= 0)
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
CALL_DUMMY_LENGTH);
@@ -1075,17 +1066,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->cannot_store_register
/*CANNOT_STORE_REGISTER ()*/);
#endif
-#ifdef COERCE_FLOAT_TO_DOUBLE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
- XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = <0x%08lx>\n",
- (long) current_gdbarch->coerce_float_to_double
- /*COERCE_FLOAT_TO_DOUBLE ()*/);
-#endif
#ifdef COFF_MAKE_MSYMBOL_SPECIAL
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1445,6 +1425,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
(long) FRAME_ARGS_SKIP);
#endif
+#ifdef FRAME_CHAIN_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_CHAIN_P()",
+ XSTRING (FRAME_CHAIN_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_CHAIN_P() = %d\n",
+ FRAME_CHAIN_P ());
+#endif
#ifdef FRAME_CHAIN
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1456,6 +1445,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_chain
/*FRAME_CHAIN ()*/);
#endif
+#ifdef FRAME_CHAIN_VALID_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_CHAIN_VALID_P()",
+ XSTRING (FRAME_CHAIN_VALID_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
+ FRAME_CHAIN_VALID_P ());
+#endif
#ifdef FRAME_CHAIN_VALID
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1467,6 +1465,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_chain_valid
/*FRAME_CHAIN_VALID ()*/);
#endif
+#ifdef FRAME_INIT_SAVED_REGS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_INIT_SAVED_REGS_P()",
+ XSTRING (FRAME_INIT_SAVED_REGS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_INIT_SAVED_REGS_P() = %d\n",
+ FRAME_INIT_SAVED_REGS_P ());
+#endif
#ifdef FRAME_INIT_SAVED_REGS
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1503,6 +1510,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_num_args
/*FRAME_NUM_ARGS ()*/);
#endif
+#ifdef FRAME_SAVED_PC_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_SAVED_PC_P()",
+ XSTRING (FRAME_SAVED_PC_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_SAVED_PC_P() = %d\n",
+ FRAME_SAVED_PC_P ());
+#endif
#ifdef FRAME_SAVED_PC
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1757,6 +1773,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->pointer_to_address
/*POINTER_TO_ADDRESS ()*/);
#endif
+#ifdef POP_FRAME_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "POP_FRAME_P()",
+ XSTRING (POP_FRAME_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: POP_FRAME_P() = %d\n",
+ POP_FRAME_P ());
+#endif
#ifdef POP_FRAME
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -2395,6 +2420,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
TARGET_LONG_LONG_BIT);
#endif
+#ifdef TARGET_OSABI
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_OSABI # %s\n",
+ XSTRING (TARGET_OSABI));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_OSABI = %ld\n",
+ (long) TARGET_OSABI);
+#endif
#ifdef TARGET_PRINT_INSN
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2553,6 +2586,15 @@ gdbarch_byte_order (struct gdbarch *gdbarch)
return gdbarch->byte_order;
}
+enum gdb_osabi
+gdbarch_osabi (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
+ return gdbarch->osabi;
+}
+
int
gdbarch_short_bit (struct gdbarch *gdbarch)
{
@@ -3871,25 +3913,6 @@ set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
}
int
-gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->coerce_float_to_double == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_coerce_float_to_double invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
- return gdbarch->coerce_float_to_double (formal, actual);
-}
-
-void
-set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
- gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
-{
- gdbarch->coerce_float_to_double = coerce_float_to_double;
-}
-
-int
gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4030,7 +4053,7 @@ set_gdbarch_value_to_register (struct gdbarch *gdbarch,
}
CORE_ADDR
-gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
+gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->pointer_to_address == 0)
@@ -4176,6 +4199,13 @@ set_gdbarch_push_return_address (struct gdbarch *gdbarch,
gdbarch->push_return_address = push_return_address;
}
+int
+gdbarch_pop_frame_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->pop_frame != 0;
+}
+
void
gdbarch_pop_frame (struct gdbarch *gdbarch)
{
@@ -4361,6 +4391,13 @@ set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
gdbarch->use_struct_convention = use_struct_convention;
}
+int
+gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_init_saved_regs != 0;
+}
+
void
gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
{
@@ -4634,6 +4671,13 @@ set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
gdbarch->frameless_function_invocation = frameless_function_invocation;
}
+int
+gdbarch_frame_chain_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_chain != 0;
+}
+
CORE_ADDR
gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
{
@@ -4654,6 +4698,13 @@ set_gdbarch_frame_chain (struct gdbarch *gdbarch,
}
int
+gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_chain_valid != 0;
+}
+
+int
gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
{
gdb_assert (gdbarch != NULL);
@@ -4672,6 +4723,13 @@ set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
gdbarch->frame_chain_valid = frame_chain_valid;
}
+int
+gdbarch_frame_saved_pc_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_saved_pc != 0;
+}
+
CORE_ADDR
gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
{
@@ -5779,6 +5837,8 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
continue;
if (info->byte_order != arches->gdbarch->byte_order)
continue;
+ if (info->osabi != arches->gdbarch->osabi)
+ continue;
return arches;
}
return NULL;
@@ -5824,6 +5884,12 @@ gdbarch_update_p (struct gdbarch_info info)
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;
+
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -5841,6 +5907,9 @@ gdbarch_update_p (struct gdbarch_info info)
: info.byte_order == BFD_ENDIAN_LITTLE ? "little"
: "default"));
fprintf_unfiltered (gdb_stdlog,
+ "gdbarch_update: info.osabi %d (%s)\n",
+ info.osabi, gdbarch_osabi_name (info.osabi));
+ fprintf_unfiltered (gdb_stdlog,
"gdbarch_update: info.abfd 0x%lx\n",
(long) info.abfd);
fprintf_unfiltered (gdb_stdlog,
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 0b2381f9984..06809165999 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1,7 +1,7 @@
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -38,7 +38,6 @@
#include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
#if !GDB_MULTI_ARCH
/* Pull in function declarations refered to, indirectly, via macros. */
-#include "value.h" /* For default_coerce_float_to_double which is referenced by a macro. */
#include "inferior.h" /* For unsigned_address_to_pointer(). */
#endif
@@ -96,12 +95,23 @@ extern int gdbarch_byte_order (struct gdbarch *gdbarch);
#endif
#endif
+extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
+/* set_gdbarch_osabi() - not applicable - pre-initialized. */
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
+#error "Non multi-arch definition of TARGET_OSABI"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_OSABI)
+#define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
+#endif
+#endif
+
/* The following are initialized by the target dependent code. */
/* Number of bits in a char or unsigned char for the target machine.
Just like CHAR_BIT in <limits.h> but describes the target machine.
- v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
+ v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
Number of bits in a short or unsigned short for the target machine. */
@@ -1268,28 +1278,9 @@ extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION_TYPE)
+#if !defined (BELIEVE_PCC_PROMOTION_TYPE)
#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
#endif
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (COERCE_FLOAT_TO_DOUBLE)
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (default_coerce_float_to_double (formal, actual))
-#endif
-
-typedef int (gdbarch_coerce_float_to_double_ftype) (struct type *formal, struct type *actual);
-extern int gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual);
-extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch_coerce_float_to_double_ftype *coerce_float_to_double);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COERCE_FLOAT_TO_DOUBLE)
-#error "Non multi-arch definition of COERCE_FLOAT_TO_DOUBLE"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COERCE_FLOAT_TO_DOUBLE)
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual))
-#endif
-#endif
#if defined (GET_SAVED_REGISTER)
/* Legacy for systems yet to multi-arch GET_SAVED_REGISTER */
@@ -1435,8 +1426,8 @@ extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_valu
#define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
#endif
-typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, void *buf);
-extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
+typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
+extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
#error "Non multi-arch definition of POINTER_TO_ADDRESS"
@@ -1584,6 +1575,32 @@ extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_pu
#endif
#endif
+#if defined (POP_FRAME)
+/* Legacy for systems yet to multi-arch POP_FRAME */
+#if !defined (POP_FRAME_P)
+#define POP_FRAME_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (POP_FRAME_P)
+#define POP_FRAME_P() (0)
+#endif
+
+extern int gdbarch_pop_frame_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME_P)
+#error "Non multi-arch definition of POP_FRAME"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME_P)
+#define POP_FRAME_P() (gdbarch_pop_frame_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (POP_FRAME)
+#define POP_FRAME (internal_error (__FILE__, __LINE__, "POP_FRAME"), 0)
+#define POP_FRAME (gdbarch_pop_frame (current_gdbarch))
+#endif
+
typedef void (gdbarch_pop_frame_ftype) (void);
extern void gdbarch_pop_frame (struct gdbarch *gdbarch);
extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ftype *pop_frame);
@@ -1757,6 +1774,31 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_
#endif
#endif
+#if defined (FRAME_INIT_SAVED_REGS)
+/* Legacy for systems yet to multi-arch FRAME_INIT_SAVED_REGS */
+#if !defined (FRAME_INIT_SAVED_REGS_P)
+#define FRAME_INIT_SAVED_REGS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_INIT_SAVED_REGS_P)
+#define FRAME_INIT_SAVED_REGS_P() (0)
+#endif
+
+extern int gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS_P)
+#error "Non multi-arch definition of FRAME_INIT_SAVED_REGS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS_P)
+#define FRAME_INIT_SAVED_REGS_P() (gdbarch_frame_init_saved_regs_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_INIT_SAVED_REGS)
+#define FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_INIT_SAVED_REGS"), 0)
+#endif
+
typedef void (gdbarch_frame_init_saved_regs_ftype) (struct frame_info *frame);
extern void gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs);
@@ -1982,6 +2024,31 @@ extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
#endif
#endif
+#if defined (FRAME_CHAIN)
+/* Legacy for systems yet to multi-arch FRAME_CHAIN */
+#if !defined (FRAME_CHAIN_P)
+#define FRAME_CHAIN_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_P)
+#define FRAME_CHAIN_P() (0)
+#endif
+
+extern int gdbarch_frame_chain_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_P)
+#error "Non multi-arch definition of FRAME_CHAIN"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_P)
+#define FRAME_CHAIN_P() (gdbarch_frame_chain_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN)
+#define FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN"), 0)
+#endif
+
typedef CORE_ADDR (gdbarch_frame_chain_ftype) (struct frame_info *frame);
extern CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chain_ftype *frame_chain);
@@ -1994,17 +2061,29 @@ extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chai
#endif
#endif
-/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for
- most targets. If FRAME_CHAIN_VALID returns zero it means that the
- given frame is the outermost one and has no caller.
-
- XXXX - both default and alternate frame_chain_valid functions are
- deprecated. New code should use dummy frames and one of the generic
- functions. */
+#if defined (FRAME_CHAIN_VALID)
+/* Legacy for systems yet to multi-arch FRAME_CHAIN_VALID */
+#if !defined (FRAME_CHAIN_VALID_P)
+#define FRAME_CHAIN_VALID_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID_P)
+#define FRAME_CHAIN_VALID_P() (0)
+#endif
+
+extern int gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID_P)
+#error "Non multi-arch definition of FRAME_CHAIN_VALID"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID_P)
+#define FRAME_CHAIN_VALID_P() (gdbarch_frame_chain_valid_p (current_gdbarch))
+#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
-#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
+#define FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN_VALID"), 0)
#endif
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
@@ -2019,6 +2098,31 @@ extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_fram
#endif
#endif
+#if defined (FRAME_SAVED_PC)
+/* Legacy for systems yet to multi-arch FRAME_SAVED_PC */
+#if !defined (FRAME_SAVED_PC_P)
+#define FRAME_SAVED_PC_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_SAVED_PC_P)
+#define FRAME_SAVED_PC_P() (0)
+#endif
+
+extern int gdbarch_frame_saved_pc_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC_P)
+#error "Non multi-arch definition of FRAME_SAVED_PC"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC_P)
+#define FRAME_SAVED_PC_P() (gdbarch_frame_saved_pc_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_SAVED_PC)
+#define FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "FRAME_SAVED_PC"), 0)
+#endif
+
typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype) (struct frame_info *fi);
extern CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
extern void set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_frame_saved_pc_ftype *frame_saved_pc);
@@ -2859,6 +2963,9 @@ struct gdbarch_info
/* Use default: NULL (ZERO). */
struct gdbarch_tdep_info *tdep_info;
+
+ /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
+ enum gdb_osabi osabi;
};
typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index e2da438173b..24082997854 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1,7 +1,7 @@
#!/bin/sh -u
# Architecture commands for GDB, the GNU debugger.
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
@@ -85,7 +85,7 @@ EOF
case "${level}" in
1 ) gt_level=">= GDB_MULTI_ARCH_PARTIAL" ;;
2 ) gt_level="> GDB_MULTI_ARCH_PARTIAL" ;;
- "" ) ;;
+ "" ) gt_level="> GDB_MULTI_ARCH_PARTIAL" ;;
* ) error "Error: bad level for ${function}" 1>&2 ; kill $$ ; exit 1 ;;
esac
@@ -387,25 +387,27 @@ function_list ()
i:2:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info::::&bfd_default_arch_struct::::%s:TARGET_ARCHITECTURE->printable_name:TARGET_ARCHITECTURE != NULL
#
i:2:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG
+#
+i:2:TARGET_OSABI:enum gdb_osabi:osabi::::GDB_OSABI_UNKNOWN
# Number of bits in a char or unsigned char for the target machine.
# Just like CHAR_BIT in <limits.h> but describes the target machine.
-# v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
+# v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
#
# Number of bits in a short or unsigned short for the target machine.
-v::TARGET_SHORT_BIT:int:short_bit::::8 * sizeof (short):2*TARGET_CHAR_BIT::0
+v:2:TARGET_SHORT_BIT:int:short_bit::::8 * sizeof (short):2*TARGET_CHAR_BIT::0
# Number of bits in an int or unsigned int for the target machine.
-v::TARGET_INT_BIT:int:int_bit::::8 * sizeof (int):4*TARGET_CHAR_BIT::0
+v:2:TARGET_INT_BIT:int:int_bit::::8 * sizeof (int):4*TARGET_CHAR_BIT::0
# Number of bits in a long or unsigned long for the target machine.
-v::TARGET_LONG_BIT:int:long_bit::::8 * sizeof (long):4*TARGET_CHAR_BIT::0
+v:2:TARGET_LONG_BIT:int:long_bit::::8 * sizeof (long):4*TARGET_CHAR_BIT::0
# Number of bits in a long long or unsigned long long for the target
# machine.
-v::TARGET_LONG_LONG_BIT:int:long_long_bit::::8 * sizeof (LONGEST):2*TARGET_LONG_BIT::0
+v:2:TARGET_LONG_LONG_BIT:int:long_long_bit::::8 * sizeof (LONGEST):2*TARGET_LONG_BIT::0
# Number of bits in a float for the target machine.
-v::TARGET_FLOAT_BIT:int:float_bit::::8 * sizeof (float):4*TARGET_CHAR_BIT::0
+v:2:TARGET_FLOAT_BIT:int:float_bit::::8 * sizeof (float):4*TARGET_CHAR_BIT::0
# Number of bits in a double for the target machine.
-v::TARGET_DOUBLE_BIT:int:double_bit::::8 * sizeof (double):8*TARGET_CHAR_BIT::0
+v:2:TARGET_DOUBLE_BIT:int:double_bit::::8 * sizeof (double):8*TARGET_CHAR_BIT::0
# Number of bits in a long double for the target machine.
-v::TARGET_LONG_DOUBLE_BIT:int:long_double_bit::::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
+v:2:TARGET_LONG_DOUBLE_BIT:int:long_double_bit::::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
# For most targets, a pointer on the target and its representation as an
# address in GDB have the same size and "look the same". For such a
# target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
@@ -415,24 +417,24 @@ v::TARGET_LONG_DOUBLE_BIT:int:long_double_bit::::8 * sizeof (long double):8*TARG
# also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
#
# ptr_bit is the size of a pointer on the target
-v::TARGET_PTR_BIT:int:ptr_bit::::8 * sizeof (void*):TARGET_INT_BIT::0
+v:2:TARGET_PTR_BIT:int:ptr_bit::::8 * sizeof (void*):TARGET_INT_BIT::0
# addr_bit is the size of a target address as represented in gdb
-v::TARGET_ADDR_BIT:int:addr_bit::::8 * sizeof (void*):0:TARGET_PTR_BIT:
+v:2:TARGET_ADDR_BIT:int:addr_bit::::8 * sizeof (void*):0:TARGET_PTR_BIT:
# Number of bits in a BFD_VMA for the target object file format.
-v::TARGET_BFD_VMA_BIT:int:bfd_vma_bit::::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
+v:2:TARGET_BFD_VMA_BIT:int:bfd_vma_bit::::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
#
# One if \`char' acts like \`signed char', zero if \`unsigned char'.
-v::TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1::::
+v:2:TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1::::
#
-f::TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc::0
-f::TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
-f::TARGET_READ_FP:CORE_ADDR:read_fp:void:::0:generic_target_read_fp::0
-f::TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
-f::TARGET_WRITE_SP:void:write_sp:CORE_ADDR val:val::0:generic_target_write_sp::0
+f:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc::0
+f:2:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
+f:2:TARGET_READ_FP:CORE_ADDR:read_fp:void:::0:generic_target_read_fp::0
+f:2:TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
+f:2:TARGET_WRITE_SP:void:write_sp:CORE_ADDR val:val::0:generic_target_write_sp::0
# Function for getting target's idea of a frame pointer. FIXME: GDB's
# whole scheme for dealing with "frames" and "frame pointers" needs a
# serious shakedown.
-f::TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset::0:legacy_virtual_frame_pointer::0
+f:2:TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset::0:legacy_virtual_frame_pointer::0
#
M:::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf:
M:::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf:
@@ -500,7 +502,7 @@ f:2:CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void:::0:0::gdbarch->call_du
v:2:CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset::::0:-1:::0x%08lx
v:2:CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset::::0:-1::gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1:0x%08lx::CALL_DUMMY_BREAKPOINT_OFFSET_P
v:1:CALL_DUMMY_BREAKPOINT_OFFSET_P:int:call_dummy_breakpoint_offset_p::::0:-1
-v:2:CALL_DUMMY_LENGTH:int:call_dummy_length::::0:-1:::::CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END
+v:2:CALL_DUMMY_LENGTH:int:call_dummy_length::::0:-1:::::gdbarch->call_dummy_length >= 0
# NOTE: cagney/2002-11-24: This function with predicate has a valid
# (callable) initial value. As a consequence, even when the predicate
# is false, the corresponding function works. This simplifies the
@@ -514,11 +516,10 @@ v:1:CALL_DUMMY_STACK_ADJUST_P:int:call_dummy_stack_adjust_p::::0:-1:::0x%08lx
v:2:CALL_DUMMY_STACK_ADJUST:int:call_dummy_stack_adjust::::0:::gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0:0x%08lx::CALL_DUMMY_STACK_ADJUST_P
f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0
F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
-F::DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
+F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
#
v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
-v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
-f:2:COERCE_FLOAT_TO_DOUBLE:int:coerce_float_to_double:struct type *formal, struct type *actual:formal, actual:::default_coerce_float_to_double::0
+v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
F:2:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
#
f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
@@ -529,7 +530,7 @@ f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_conver
f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
f:1:VALUE_TO_REGISTER:void:value_to_register:struct type *type, int regnum, char *from, char *to:type, regnum, from, to::0:legacy_value_to_register::0
#
-f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, void *buf:type, buf:::unsigned_pointer_to_address::0
+f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0
f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
#
@@ -537,20 +538,20 @@ f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::gen
f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr:::default_push_arguments::0
f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0
F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
-f:2:POP_FRAME:void:pop_frame:void:-:::0
+F:2:POP_FRAME:void:pop_frame:void:-:::0
#
f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
#
-f::EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0
-f::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::DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf
-f::DEPRECATED_STORE_RETURN_VALUE:void:deprecated_store_return_value:struct type *type, char *valbuf:type, valbuf
+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:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache:::0
F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf:::0
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:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0
+F:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame:::0
F:2:INIT_EXTRA_FRAME_INFO:void:init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame:::0
#
f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
@@ -560,23 +561,16 @@ f:2:BREAKPOINT_FROM_PC:const unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr
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
-f::PREPARE_TO_PROCEED:int:prepare_to_proceed:int select_it:select_it::0:default_prepare_to_proceed::0
+f:2:PREPARE_TO_PROCEED:int:prepare_to_proceed:int select_it:select_it::0:default_prepare_to_proceed::0
v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:-1
#
f:2:REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
#
v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
-f:2:FRAME_CHAIN:CORE_ADDR:frame_chain:struct frame_info *frame:frame::0:0
-# Define a default FRAME_CHAIN_VALID, in the form that is suitable for
-# most targets. If FRAME_CHAIN_VALID returns zero it means that the
-# given frame is the outermost one and has no caller.
-#
-# XXXX - both default and alternate frame_chain_valid functions are
-# deprecated. New code should use dummy frames and one of the generic
-# functions.
-f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
-f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
+F:2:FRAME_CHAIN:CORE_ADDR:frame_chain:struct frame_info *frame:frame::0:0
+F:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe::0:0
+F:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0
f:2:SAVED_PC_AFTER_CALL:CORE_ADDR:saved_pc_after_call:struct frame_info *frame:frame::0:0
@@ -649,7 +643,7 @@ f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char
# does not.
f:2:PC_IN_SIGTRAMP:int:pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp::0
F:2:SIGTRAMP_START:CORE_ADDR:sigtramp_start:CORE_ADDR pc:pc
-F::SIGTRAMP_END:CORE_ADDR:sigtramp_end:CORE_ADDR pc:pc
+F:2:SIGTRAMP_END:CORE_ADDR:sigtramp_end:CORE_ADDR pc:pc
# A target might have problems with watchpoints as soon as the stack
# frame of the current function has been destroyed. This mostly happens
# as the first action in a funtion's epilogue. in_function_epilogue_p()
@@ -672,9 +666,9 @@ m::CONSTRUCT_INFERIOR_ARGUMENTS:char *:construct_inferior_arguments:int argc, ch
F:2:DWARF2_BUILD_FRAME_INFO:void:dwarf2_build_frame_info:struct objfile *objfile:objfile:::0
f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
-v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0:%s:NAME_OF_MALLOC
-v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
-v::HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
+v:2:NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0:%s:NAME_OF_MALLOC
+v:2:CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
+v:2:HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_name:int type_flags:type_flags:
M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
@@ -732,7 +726,7 @@ cat <<EOF
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -779,7 +773,6 @@ cat <<EOF
#include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
#if !GDB_MULTI_ARCH
/* Pull in function declarations refered to, indirectly, via macros. */
-#include "value.h" /* For default_coerce_float_to_double which is referenced by a macro. */
#include "inferior.h" /* For unsigned_address_to_pointer(). */
#endif
@@ -898,11 +891,18 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
- printf "#endif\n"
+ if test "${level}" = ""
+ then
+ printf "#if !defined (${macro})\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ printf "#endif\n"
+ else
+ printf "#if GDB_MULTI_ARCH\n"
+ printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ printf "#endif\n"
+ printf "#endif\n"
+ fi
fi
if class_is_function_p
then
@@ -914,7 +914,13 @@ do
printf "#if (!GDB_MULTI_ARCH) && !defined (${macro})\n"
if [ "x${fallbackdefault}" = "x0" ]
then
- printf "#define ${macro}(${actual}) (internal_error (__FILE__, __LINE__, \"${macro}\"), 0)\n"
+ if [ "x${actual}" = "x-" ]
+ then
+ printf "#define ${macro} (internal_error (__FILE__, __LINE__, \"${macro}\"), 0)\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ else
+ printf "#define ${macro}(${actual}) (internal_error (__FILE__, __LINE__, \"${macro}\"), 0)\n"
+ fi
else
# FIXME: Should be passing current_gdbarch through!
echo "#define ${macro}(${actual}) (${fallbackdefault} (${actual}))" \
@@ -1045,6 +1051,9 @@ struct gdbarch_info
/* Use default: NULL (ZERO). */
struct gdbarch_tdep_info *tdep_info;
+
+ /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
+ enum gdb_osabi osabi;
};
typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
@@ -1265,6 +1274,7 @@ cat <<EOF
#include "gdb_string.h"
#include "gdb-events.h"
#include "reggroups.h"
+#include "osabi.h"
/* Static function declarations */
@@ -2135,6 +2145,8 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
continue;
if (info->byte_order != arches->gdbarch->byte_order)
continue;
+ if (info->osabi != arches->gdbarch->osabi)
+ continue;
return arches;
}
return NULL;
@@ -2180,6 +2192,12 @@ gdbarch_update_p (struct gdbarch_info info)
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;
+
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -2197,6 +2215,9 @@ gdbarch_update_p (struct gdbarch_info info)
: info.byte_order == BFD_ENDIAN_LITTLE ? "little"
: "default"));
fprintf_unfiltered (gdb_stdlog,
+ "gdbarch_update: info.osabi %d (%s)\n",
+ info.osabi, gdbarch_osabi_name (info.osabi));
+ fprintf_unfiltered (gdb_stdlog,
"gdbarch_update: info.abfd 0x%lx\n",
(long) info.abfd);
fprintf_unfiltered (gdb_stdlog,
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 5c10c589e50..e359b3dabbb 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -70,8 +70,7 @@ extern void read_memory_string (CORE_ADDR, char *, int);
/* Read the pointer of type TYPE at ADDR, and return the address it
represents. */
-CORE_ADDR
-read_memory_typed_address (CORE_ADDR addr, struct type *type);
+CORE_ADDR read_memory_typed_address (CORE_ADDR addr, struct type *type);
/* This takes a char *, not void *. This is probably right, because
passing in an int * or whatever is wrong with respect to
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 9a25c44be87..9a02977f35b 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2003-01-04 Andreas Schwab <schwab@suse.de>
+
+ * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
+
+2003-01-02 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in: Remove obsolete code.
+
2002-11-20 Daniel Jacobowitz <drow@mvista.com>
* linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 46168d61624..763c21ed7b2 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -228,11 +228,6 @@ version.c: Makefile
# will remove them.
MAKEOVERRIDES=
-## This is ugly, but I don't want GNU make to put these variables in
-## the environment. Older makes will see this as a set of targets
-## with no dependencies and no actions.
-# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
-
gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
regdat_sh = $(srcdir)/../regformats/regdat.sh
regdef_h = $(srcdir)/../regformats/regdef.h
diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c
index 760de6e0535..b49a8c9e286 100644
--- a/gdb/gdbserver/linux-m68k-low.c
+++ b/gdb/gdbserver/linux-m68k-low.c
@@ -1,5 +1,5 @@
/* GNU/Linux/m68k specific low level interface, for the remote server for GDB.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,7 +26,7 @@
#include <sys/reg.h>
#endif
-#define m68k_num_regs 31
+#define m68k_num_regs 29
/* This table must line up with REGISTER_NAMES in tm-m68k.h */
static int m68k_regmap[] =
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 87bcc2c3a05..983f55b7818 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1,5 +1,5 @@
/* Support routines for manipulating internal types for GDB.
- 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.
Contributed by Cygnus Support, using pieces from other GDB modules.
@@ -128,9 +128,9 @@ struct extra
static void add_name (struct extra *, const char *);
static void add_mangled_type (struct extra *, struct type *);
-#if 0
-static void cfront_mangle_name (struct type *, int, int);
-#endif
+#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);
@@ -1021,7 +1021,7 @@ lookup_primitive_typename (const char *name)
for (p = current_language->la_builtin_type_vector; *p != NULL; p++)
{
- if (STREQ (TYPE_NAME (**p), name))
+ if (strcmp (TYPE_NAME (**p), name) == 0)
{
return (**p);
}
@@ -1228,7 +1228,7 @@ lookup_struct_elt_type (struct type *type, char *name, int noerr)
char *typename;
typename = type_name_no_tag (type);
- if (typename != NULL && STREQ (typename, name))
+ if (typename != NULL && strcmp (typename, name) == 0)
return type;
}
#endif
@@ -1458,193 +1458,193 @@ check_typedef (struct type *type)
return type;
}
-/* New code added to support parsing of Cfront stabs strings */
-#define INIT_EXTRA { pextras->len=0; pextras->str[0]='\0'; }
-#define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; }
-
-static void
-add_name (struct extra *pextras, const char *n)
-{
- int nlen;
-
- if ((nlen = (n ? strlen (n) : 0)) == 0)
- return;
- sprintf (pextras->str + pextras->len, "%d%s", nlen, n);
- pextras->len = strlen (pextras->str);
-}
-
-static void
-add_mangled_type (struct extra *pextras, struct type *t)
-{
- enum type_code tcode;
- int tlen, tflags;
- const char *tname;
-
- tcode = TYPE_CODE (t);
- tlen = TYPE_LENGTH (t);
- tflags = TYPE_FLAGS (t);
- tname = TYPE_NAME (t);
- /* args of "..." seem to get mangled as "e" */
-
- switch (tcode)
- {
- case TYPE_CODE_INT:
- if (tflags == 1)
- ADD_EXTRA ('U');
- switch (tlen)
- {
- case 1:
- ADD_EXTRA ('c');
- break;
- case 2:
- ADD_EXTRA ('s');
- break;
- case 4:
- {
- char *pname;
- if ((pname = strrchr (tname, 'l'), pname) && !strcmp (pname, "long"))
- {
- ADD_EXTRA ('l');
- }
- else
- {
- ADD_EXTRA ('i');
- }
- }
- break;
- default:
- {
- complaint (&symfile_complaints, "Bad int type code length x%x",
- tlen);
- }
- }
- break;
- case TYPE_CODE_FLT:
- switch (tlen)
- {
- case 4:
- ADD_EXTRA ('f');
- break;
- case 8:
- ADD_EXTRA ('d');
- break;
- case 16:
- ADD_EXTRA ('r');
- break;
- default:
- {
- complaint (&symfile_complaints, "Bad float type code length x%x",
- tlen);
- }
- }
- break;
- case TYPE_CODE_REF:
- ADD_EXTRA ('R');
- /* followed by what it's a ref to */
- break;
- case TYPE_CODE_PTR:
- ADD_EXTRA ('P');
- /* followed by what it's a ptr to */
- break;
- case TYPE_CODE_TYPEDEF:
- {
- complaint (&symfile_complaints,
- "Typedefs in overloaded functions not yet supported");
- }
- /* followed by type bytes & name */
- break;
- case TYPE_CODE_FUNC:
- ADD_EXTRA ('F');
- /* followed by func's arg '_' & ret types */
- break;
- case TYPE_CODE_VOID:
- ADD_EXTRA ('v');
- break;
- case TYPE_CODE_METHOD:
- ADD_EXTRA ('M');
- /* followed by name of class and func's arg '_' & ret types */
- add_name (pextras, tname);
- ADD_EXTRA ('F'); /* then mangle function */
- break;
- case TYPE_CODE_STRUCT: /* C struct */
- case TYPE_CODE_UNION: /* C union */
- case TYPE_CODE_ENUM: /* Enumeration type */
- /* followed by name of type */
- add_name (pextras, tname);
- break;
-
- /* errors possible types/not supported */
- case TYPE_CODE_CHAR:
- case TYPE_CODE_ARRAY: /* Array type */
- case TYPE_CODE_MEMBER: /* Member type */
- case TYPE_CODE_BOOL:
- case TYPE_CODE_COMPLEX: /* Complex float */
- case TYPE_CODE_UNDEF:
- case TYPE_CODE_SET: /* Pascal sets */
- case TYPE_CODE_RANGE:
- case TYPE_CODE_STRING:
- case TYPE_CODE_BITSTRING:
- case TYPE_CODE_ERROR:
- default:
- {
- complaint (&symfile_complaints, "Unknown type code x%x", tcode);
- }
- }
- if (TYPE_TARGET_TYPE (t))
- add_mangled_type (pextras, TYPE_TARGET_TYPE (t));
-}
-
-#if 0
-void
-cfront_mangle_name (struct type *type, int i, int j)
-{
- struct fn_field *f;
- char *mangled_name = gdb_mangle_name (type, i, j);
-
- f = TYPE_FN_FIELDLIST1 (type, i); /* moved from below */
-
- /* kludge to support cfront methods - gdb expects to find "F" for
- ARM_mangled names, so when we mangle, we have to add it here */
- if (ARM_DEMANGLING)
- {
- int k;
- char *arm_mangled_name;
- struct fn_field *method = &f[j];
- char *field_name = TYPE_FN_FIELDLIST_NAME (type, i);
- char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
- const char *newname = type_name_no_tag (type);
-
- struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);
- int nargs = TYPE_NFIELDS (ftype); /* number of args */
- struct extra extras, *pextras = &extras;
- INIT_EXTRA
-
- if (TYPE_FN_FIELD_STATIC_P (f, j)) /* j for sublist within this list */
- ADD_EXTRA ('S')
- ADD_EXTRA ('F')
- /* add args here! */
- if (nargs <= 1) /* no args besides this */
- ADD_EXTRA ('v')
- else
- {
- for (k = 1; k < nargs; k++)
- {
- struct type *t;
- t = TYPE_FIELD_TYPE (ftype, k);
- add_mangled_type (pextras, t);
- }
- }
- ADD_EXTRA ('\0')
- printf ("add_mangled_type: %s\n", extras.str); /* FIXME */
- xasprintf (&arm_mangled_name, "%s%s", mangled_name, extras.str);
- xfree (mangled_name);
- mangled_name = arm_mangled_name;
- }
-}
-#endif /* 0 */
-
-#undef ADD_EXTRA
-/* End of new code added to support parsing of Cfront stabs strings */
+#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. */
@@ -1874,6 +1874,9 @@ init_type (enum type_code code, int length, int flags, char *name,
/* C++ fancies. */
+ if (name && strcmp (name, "char") == 0)
+ TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
+
if (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION
|| code == TYPE_CODE_NAMESPACE)
{
@@ -2004,24 +2007,6 @@ is_integral_type (struct type *t)
|| (TYPE_CODE (t) == TYPE_CODE_BOOL)));
}
-/* (OBSOLETE) Chill (OBSOLETE) varying string and arrays are
- represented as follows:
-
- struct { int __var_length; ELEMENT_TYPE[MAX_SIZE] __var_data};
-
- Return true if TYPE is such a (OBSOLETE) Chill (OBSOLETE) varying
- type. */
-
-/* OBSOLETE int */
-/* OBSOLETE chill_varying_type (struct type *type) */
-/* OBSOLETE { */
-/* OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_STRUCT */
-/* OBSOLETE || TYPE_NFIELDS (type) != 2 */
-/* OBSOLETE || strcmp (TYPE_FIELD_NAME (type, 0), "__var_length") != 0) */
-/* OBSOLETE return 0; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-
/* Check whether BASE is an ancestor or base class or DCLASS
Return 1 if so, and 0 if not.
Note: callers may want to check for identity of the types before
@@ -2460,6 +2445,43 @@ rank_function (struct type **parms, int nparms, struct type **args, int nargs)
return bv;
}
+/* Compare the names of two integer types, assuming that any sign
+ qualifiers have been checked already. We do it this way because
+ there may be an "int" in the name of one of the types. */
+
+static int
+integer_types_same_name_p (const char *first, const char *second)
+{
+ int first_p, second_p;
+
+ /* If both are shorts, return 1; if neither is a short, keep checking. */
+ first_p = (strstr (first, "short") != NULL);
+ second_p = (strstr (second, "short") != NULL);
+ if (first_p && second_p)
+ return 1;
+ if (first_p || second_p)
+ return 0;
+
+ /* Likewise for long. */
+ first_p = (strstr (first, "long") != NULL);
+ second_p = (strstr (second, "long") != NULL);
+ if (first_p && second_p)
+ return 1;
+ if (first_p || second_p)
+ return 0;
+
+ /* Likewise for char. */
+ first_p = (strstr (first, "char") != NULL);
+ second_p = (strstr (second, "char") != NULL);
+ if (first_p && second_p)
+ return 1;
+ if (first_p || second_p)
+ return 0;
+
+ /* They must both be ints. */
+ return 1;
+}
+
/* Compare one type (PARM) for compatibility with another (ARG).
* PARM is intended to be the parameter type of a function; and
* ARG is the supplied argument's type. This function tests if
@@ -2576,16 +2598,19 @@ rank_one_type (struct type *parm, struct type *arg)
{
if (TYPE_UNSIGNED (arg))
{
- if (!strcmp_iw (TYPE_NAME (parm), TYPE_NAME (arg)))
- return 0; /* unsigned int -> unsigned int, or unsigned long -> unsigned long */
- else if (!strcmp_iw (TYPE_NAME (arg), "int") && !strcmp_iw (TYPE_NAME (parm), "long"))
+ /* unsigned int -> unsigned int, or unsigned long -> unsigned long */
+ if (integer_types_same_name_p (TYPE_NAME (parm), TYPE_NAME (arg)))
+ return 0;
+ else if (integer_types_same_name_p (TYPE_NAME (arg), "int")
+ && integer_types_same_name_p (TYPE_NAME (parm), "long"))
return INTEGER_PROMOTION_BADNESS; /* unsigned int -> unsigned long */
else
return INTEGER_CONVERSION_BADNESS; /* unsigned long -> unsigned int */
}
else
{
- if (!strcmp_iw (TYPE_NAME (arg), "long") && !strcmp_iw (TYPE_NAME (parm), "int"))
+ if (integer_types_same_name_p (TYPE_NAME (arg), "long")
+ && integer_types_same_name_p (TYPE_NAME (parm), "int"))
return INTEGER_CONVERSION_BADNESS; /* signed long -> unsigned int */
else
return INTEGER_CONVERSION_BADNESS; /* signed int/long -> unsigned int/long */
@@ -2593,9 +2618,10 @@ rank_one_type (struct type *parm, struct type *arg)
}
else if (!TYPE_NOSIGN (arg) && !TYPE_UNSIGNED (arg))
{
- if (!strcmp_iw (TYPE_NAME (parm), TYPE_NAME (arg)))
+ if (integer_types_same_name_p (TYPE_NAME (parm), TYPE_NAME (arg)))
return 0;
- else if (!strcmp_iw (TYPE_NAME (arg), "int") && !strcmp_iw (TYPE_NAME (parm), "long"))
+ else if (integer_types_same_name_p (TYPE_NAME (arg), "int")
+ && integer_types_same_name_p (TYPE_NAME (parm), "long"))
return INTEGER_PROMOTION_BADNESS;
else
return INTEGER_CONVERSION_BADNESS;
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 525ffd7e2be..2766b17d96c 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1,6 +1,8 @@
/* Internal type definitions for GDB.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
@@ -101,14 +103,14 @@ enum type_code
TYPE_CODE_RANGE, /* Range (integers within spec'd bounds) */
/* A string type which is like an array of character but prints
- differently (at least for (OBSOLETE) CHILL (OBSOLETE)). It
- does not contain a length field as Pascal strings (for many
- Pascals, anyway) do; if we want to deal with such strings, we
- should use a new type code. */
+ differently (at least for (the deleted) CHILL). It does not
+ contain a length field as Pascal strings (for many Pascals,
+ anyway) do; if we want to deal with such strings, we should use
+ a new type code. */
TYPE_CODE_STRING,
/* String of bits; like TYPE_CODE_SET but prints differently (at
- least for (OBSOLETE) CHILL (OBSOLETE)). */
+ least for (the deleted) CHILL). */
TYPE_CODE_BITSTRING,
/* Unknown type. The length field is valid if we were able to
@@ -1021,14 +1023,6 @@ extern struct type *builtin_type_m2_card;
extern struct type *builtin_type_m2_real;
extern struct type *builtin_type_m2_bool;
-/* OBSOLETE Chill types */
-
-/* OBSOLETE extern struct type *builtin_type_chill_bool; */
-/* OBSOLETE extern struct type *builtin_type_chill_char; */
-/* OBSOLETE extern struct type *builtin_type_chill_long; */
-/* OBSOLETE extern struct type *builtin_type_chill_ulong; */
-/* OBSOLETE extern struct type *builtin_type_chill_real; */
-
/* Fortran (F77) types */
extern struct type *builtin_type_f_character;
@@ -1109,8 +1103,7 @@ smash_to_method_type (struct type *type, struct type *domain,
struct type *to_type, struct field *args,
int nargs, int varargs);
-extern void
-smash_to_member_type (struct type *, struct type *, struct type *);
+extern void smash_to_member_type (struct type *, struct type *, struct type *);
extern struct type *allocate_stub_method (struct type *);
@@ -1136,8 +1129,6 @@ extern struct type *create_string_type (struct type *, struct type *);
extern struct type *create_set_type (struct type *, struct type *);
-/* OBSOLETE extern int chill_varying_type (struct type *); */
-
extern struct type *lookup_unsigned_typename (const char *);
extern struct type *lookup_signed_typename (const char *);
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index fb31c44529f..cb80c95e9f6 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -1,6 +1,8 @@
/* Abstraction of GNU v2 abi.
+
+ Copyright 2001, 2003 Free Software Foundation, Inc.
+
Contributed by Daniel Berlin <dberlin@redhat.com>
- Copyright 2001 Free Software Foundation, Inc.
This file is part of GDB.
@@ -329,8 +331,8 @@ vb_match (struct type *type, int index, struct type *basetype)
if (TYPE_NAME (basetype) != NULL
&& TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
- && STREQ (TYPE_NAME (basetype),
- TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
+ && strcmp (TYPE_NAME (basetype),
+ TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))) == 0)
return 1;
return 0;
}
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 0fc9d86d69b..8119a2de5c5 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1,7 +1,7 @@
/* Target-machine dependent code for Hitachi H8/300, for GDB.
Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -440,11 +440,11 @@ h8300_examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
}
/* The args are always reffed based from the stack pointer */
- fi->extra_info->args_pointer = after_prolog_fp;
+ get_frame_extra_info (fi)->args_pointer = after_prolog_fp;
/* Locals are always reffed based from the fp */
- fi->extra_info->locals_pointer = after_prolog_fp;
+ get_frame_extra_info (fi)->locals_pointer = after_prolog_fp;
/* The PC is at a known place */
- fi->extra_info->from_pc =
+ get_frame_extra_info (fi)->from_pc =
read_memory_unsigned_integer (after_prolog_fp + BINWORD, BINWORD);
/* Rememeber any others too */
@@ -464,18 +464,19 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR func_addr, func_end;
- if (!fi->saved_regs)
+ if (!get_frame_saved_regs (fi))
{
frame_saved_regs_zalloc (fi);
/* Find the beginning of this function, so we can analyze its
prologue. */
- if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end))
+ if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
{
struct symtab_and_line sal = find_pc_line (func_addr, 0);
- CORE_ADDR limit = (sal.end && sal.end < fi->pc) ? sal.end : fi->pc;
+ CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi)) ? sal.end : get_frame_pc (fi);
/* This will fill in fields in fi. */
- h8300_examine_prologue (func_addr, limit, fi->frame, fi->saved_regs, fi);
+ h8300_examine_prologue (func_addr, limit, get_frame_base (fi),
+ get_frame_saved_regs (fi), fi);
}
/* Else we're out of luck (can't debug completely stripped code).
FIXME. */
@@ -493,14 +494,17 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
static CORE_ADDR
h8300_frame_chain (struct frame_info *thisframe)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe),
+ get_frame_base (thisframe),
+ get_frame_base (thisframe)))
{ /* initialize the from_pc now */
- thisframe->extra_info->from_pc =
- deprecated_read_register_dummy (thisframe->pc, thisframe->frame,
+ get_frame_extra_info (thisframe)->from_pc =
+ deprecated_read_register_dummy (get_frame_pc (thisframe),
+ get_frame_base (thisframe),
E_PC_REGNUM);
- return thisframe->frame;
+ return get_frame_base (thisframe);
}
- return thisframe->saved_regs[E_SP_REGNUM];
+ return get_frame_saved_regs (thisframe)[E_SP_REGNUM];
}
/* Return the saved PC from this frame.
@@ -511,28 +515,30 @@ h8300_frame_chain (struct frame_info *thisframe)
static CORE_ADDR
h8300_frame_saved_pc (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return deprecated_read_register_dummy (frame->pc, frame->frame,
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
+ return deprecated_read_register_dummy (get_frame_pc (frame),
+ get_frame_base (frame),
E_PC_REGNUM);
else
- return frame->extra_info->from_pc;
+ return get_frame_extra_info (frame)->from_pc;
}
static void
h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- if (!fi->extra_info)
+ if (!get_frame_extra_info (fi))
{
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
- fi->extra_info->from_pc = 0;
- fi->extra_info->args_pointer = 0; /* Unknown */
- fi->extra_info->locals_pointer = 0; /* Unknown */
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+ get_frame_extra_info (fi)->from_pc = 0;
+ get_frame_extra_info (fi)->args_pointer = 0; /* Unknown */
+ get_frame_extra_info (fi)->locals_pointer = 0; /* Unknown */
- if (!fi->pc)
+ if (!get_frame_pc (fi))
{
- if (fi->next)
- fi->pc = h8300_frame_saved_pc (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, h8300_frame_saved_pc (get_next_frame (fi)));
}
h8300_frame_init_saved_regs (fi);
}
@@ -541,9 +547,10 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
static CORE_ADDR
h8300_frame_locals_address (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
return (CORE_ADDR) 0; /* Not sure what else to do... */
- return fi->extra_info->locals_pointer;
+ return get_frame_extra_info (fi)->locals_pointer;
}
/* Return the address of the argument block for the frame
@@ -552,9 +559,10 @@ h8300_frame_locals_address (struct frame_info *fi)
static CORE_ADDR
h8300_frame_args_address (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
return (CORE_ADDR) 0; /* Not sure what else to do... */
- return fi->extra_info->args_pointer;
+ return get_frame_extra_info (fi)->args_pointer;
}
/* Round N up or down to the nearest multiple of UNIT.
@@ -747,7 +755,9 @@ h8300_pop_frame (void)
unsigned regno;
struct frame_info *frame = get_current_frame ();
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
{
generic_pop_dummy_frame ();
}
@@ -757,16 +767,16 @@ 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 (frame->saved_regs[regno] && regno != E_SP_REGNUM)
+ if (get_frame_saved_regs (frame)[regno] && regno != E_SP_REGNUM)
write_register (regno,
- read_memory_integer (frame->saved_regs[regno],
+ read_memory_integer (get_frame_saved_regs (frame)[regno],
BINWORD));
- else if (frame->saved_regs[regno] && regno == E_SP_REGNUM)
- write_register (regno, frame->frame + 2 * BINWORD);
+ else if (get_frame_saved_regs (frame)[regno] && regno == E_SP_REGNUM)
+ write_register (regno, get_frame_base (frame) + 2 * BINWORD);
}
/* Don't forget to update the PC too! */
- write_register (E_PC_REGNUM, frame->extra_info->from_pc);
+ write_register (E_PC_REGNUM, get_frame_extra_info (frame)->from_pc);
}
flush_cached_frames ();
}
@@ -1114,7 +1124,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, h8300_saved_pc_after_call);
set_gdbarch_frame_saved_pc (gdbarch, h8300_frame_saved_pc);
set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_args_address (gdbarch, h8300_frame_args_address);
set_gdbarch_frame_locals_address (gdbarch, h8300_frame_locals_address);
@@ -1135,9 +1144,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
- /* W/o prototype, coerce float args to double. */
- /* set_gdbarch_coerce_float_to_double (gdbarch, standard_coerce_float_to_double); */
-
/*
* Call Dummies
*
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
index 944a2976fd9..f30fbd030ed 100644
--- a/gdb/h8500-tdep.c
+++ b/gdb/h8500-tdep.c
@@ -1,739 +1,739 @@
-/* Target-dependent code for Hitachi H8/500, for GDB.
-
- Copyright 1993, 1994, 1995, 1998, 2000, 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. */
-
-/*
- Contributed by Steve Chamberlain
- sac@cygnus.com
- */
-
-#include "defs.h"
-#include "frame.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "gdbcmd.h"
-#include "value.h"
-#include "dis-asm.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#define UNSIGNED_SHORT(X) ((X) & 0xffff)
-
-static int code_size = 2;
-
-static int data_size = 2;
-
-/* Shape of an H8/500 frame :
-
- arg-n
- ..
- arg-2
- arg-1
- return address <2 or 4 bytes>
- old fp <2 bytes>
- auto-n
- ..
- auto-1
- saved registers
-
- */
-
-/* an easy to debug H8 stack frame looks like:
- 0x6df6 push r6
- 0x0d76 mov.w r7,r6
- 0x6dfn push reg
- 0x7905 nnnn mov.w #n,r5 or 0x1b87 subs #2,sp
- 0x1957 sub.w r5,sp
-
- */
-
-#define IS_PUSH(x) (((x) & 0xff00)==0x6d00)
-#define IS_LINK_8(x) ((x) == 0x17)
-#define IS_LINK_16(x) ((x) == 0x1f)
-#define IS_MOVE_FP(x) ((x) == 0x0d76)
-#define IS_MOV_SP_FP(x) ((x) == 0x0d76)
-#define IS_SUB2_SP(x) ((x) == 0x1b87)
-#define IS_MOVK_R5(x) ((x) == 0x7905)
-#define IS_SUB_R5SP(x) ((x) == 0x1957)
-
-#define LINK_8 0x17
-#define LINK_16 0x1f
-
-int minimum_mode = 1;
-
-CORE_ADDR
-h8500_skip_prologue (CORE_ADDR start_pc)
-{
- short int w;
-
- w = read_memory_integer (start_pc, 1);
- if (w == LINK_8)
- {
- start_pc += 2;
- w = read_memory_integer (start_pc, 1);
- }
-
- if (w == LINK_16)
- {
- start_pc += 3;
- w = read_memory_integer (start_pc, 2);
- }
-
- return start_pc;
-}
-
-CORE_ADDR
-h8500_addr_bits_remove (CORE_ADDR addr)
-{
- return ((addr) & 0xffffff);
-}
-
-/* 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 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. */
-
-CORE_ADDR
-h8500_frame_chain (struct frame_info *thisframe)
-{
- if (!inside_entry_file (thisframe->pc))
- return (read_memory_integer (get_frame_base (thisframe), PTR_SIZE));
- else
- return 0;
-}
-
-/* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
- is not the address of a valid instruction, the address of the next
- instruction beyond ADDR otherwise. *PWORD1 receives the first word
- of the instruction. */
-
-CORE_ADDR
-NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, char *pword1)
-{
- if (addr < lim + 8)
- {
- read_memory (addr, pword1, 1);
- read_memory (addr, pword1 + 1, 1);
- return 1;
- }
- return 0;
-}
-
-/* Examine the prologue of a function. `ip' points to the first
- instruction. `limit' is the limit of the prologue (e.g. the addr
- of the first linenumber, or perhaps the program counter if we're
- stepping through). `frame_sp' is the stack pointer value in use in
- this frame. `fsr' is a pointer to a frame_saved_regs structure
- into which we put info about the registers saved by this frame.
- `fi' is a struct frame_info pointer; we fill in various fields in
- it to reflect the offsets of the arg pointer and the locals
- pointer. */
-
-/* Return the saved PC from this frame. */
-
-CORE_ADDR
-frame_saved_pc (struct frame_info *frame)
-{
- return read_memory_integer (get_frame_base (frame) + 2, PTR_SIZE);
-}
-
-void
-h8500_pop_frame (void)
-{
- unsigned regnum;
- struct frame_saved_regs fsr;
- struct frame_info *frame = get_current_frame ();
-
- deprecated_get_frame_saved_regs (frame, &fsr);
-
- for (regnum = 0; regnum < 8; regnum++)
- {
- if (fsr.regs[regnum])
- write_register (regnum, read_memory_short (fsr.regs[regnum]));
-
- flush_cached_frames ();
- }
-}
-
-static void
-h8500_print_register_hook (int regno)
-{
- if (regno == CCR_REGNUM)
- {
- /* CCR register */
-
- int C, Z, N, V;
- unsigned char b[2];
- unsigned char l;
-
- frame_register_read (deprecated_selected_frame, regno, b);
- l = b[1];
- printf_unfiltered ("\t");
- printf_unfiltered ("I-%d - ", (l & 0x80) != 0);
- N = (l & 0x8) != 0;
- Z = (l & 0x4) != 0;
- V = (l & 0x2) != 0;
- C = (l & 0x1) != 0;
- printf_unfiltered ("N-%d ", N);
- printf_unfiltered ("Z-%d ", Z);
- printf_unfiltered ("V-%d ", V);
- printf_unfiltered ("C-%d ", C);
- if ((C | Z) == 0)
- printf_unfiltered ("u> ");
- if ((C | Z) == 1)
- printf_unfiltered ("u<= ");
- if ((C == 0))
- printf_unfiltered ("u>= ");
- if (C == 1)
- printf_unfiltered ("u< ");
- if (Z == 0)
- printf_unfiltered ("!= ");
- if (Z == 1)
- printf_unfiltered ("== ");
- if ((N ^ V) == 0)
- printf_unfiltered (">= ");
- if ((N ^ V) == 1)
- printf_unfiltered ("< ");
- if ((Z | (N ^ V)) == 0)
- printf_unfiltered ("> ");
- if ((Z | (N ^ V)) == 1)
- printf_unfiltered ("<= ");
- }
-}
-
-static void
-h8500_print_registers_info (struct gdbarch *gdbarch,
- struct ui_file *file,
- struct frame_info *frame,
- int regnum, int print_all)
-{
- int i;
- const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
- char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
- char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
-
- for (i = 0; i < numregs; i++)
- {
- /* Decide between printing all regs, non-float / vector regs, or
- specific reg. */
- if (regnum == -1)
- {
- if (!print_all)
- {
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
- continue;
- if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
- continue;
- }
- }
- else
- {
- if (i != regnum)
- continue;
- }
-
- /* If the register name is empty, it is undefined for this
- processor, so don't display anything. */
- if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
- continue;
-
- fputs_filtered (REGISTER_NAME (i), file);
- print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
-
- /* Get the data in raw format. */
- if (! frame_register_read (frame, i, raw_buffer))
- {
- fprintf_filtered (file, "*value not available*\n");
- continue;
- }
-
- /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
- The function frame_register_read() should have returned the
- pre-cooked register so no conversion is necessary. */
- /* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (i))
- {
- REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
- raw_buffer, virtual_buffer);
- }
- else
- {
- memcpy (virtual_buffer, raw_buffer,
- REGISTER_VIRTUAL_SIZE (i));
- }
-
- /* If virtual format is floating, print it that way, and in raw
- hex. */
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
- {
- int j;
-
- val_print (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++)
- {
- int idx;
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- idx = j;
- else
- idx = REGISTER_RAW_SIZE (i) - 1 - j;
- fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
- }
- fprintf_filtered (file, ")");
- }
- else
- {
- /* Print the register in hex. */
- val_print (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)
- {
- fprintf_filtered (file, "\t");
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
- file, 0, 1, 0, Val_pretty_default);
- }
- }
-
- /* Some h8500 specific info. */
- h8500_print_register_hook (i);
-
- fprintf_filtered (file, "\n");
- }
-}
-
-void
-h8500_do_registers_info (int regnum, int all)
-{
- h8500_print_registers_info (current_gdbarch, gdb_stdout, deprecated_selected_frame,
- regnum, all);
-}
-
-int
-h8500_register_size (int regno)
-{
- switch (regno)
- {
- case SEG_C_REGNUM:
- case SEG_D_REGNUM:
- case SEG_E_REGNUM:
- case SEG_T_REGNUM:
- return 1;
- case R0_REGNUM:
- case R1_REGNUM:
- case R2_REGNUM:
- case R3_REGNUM:
- case R4_REGNUM:
- case R5_REGNUM:
- case R6_REGNUM:
- case R7_REGNUM:
- case CCR_REGNUM:
- return 2;
-
- case PR0_REGNUM:
- case PR1_REGNUM:
- case PR2_REGNUM:
- case PR3_REGNUM:
- case PR4_REGNUM:
- case PR5_REGNUM:
- case PR6_REGNUM:
- case PR7_REGNUM:
- case PC_REGNUM:
- return 4;
- default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-}
-
-struct type *
-h8500_register_virtual_type (int regno)
-{
- switch (regno)
- {
- case SEG_C_REGNUM:
- case SEG_E_REGNUM:
- case SEG_D_REGNUM:
- case SEG_T_REGNUM:
- return builtin_type_unsigned_char;
- case R0_REGNUM:
- case R1_REGNUM:
- case R2_REGNUM:
- case R3_REGNUM:
- case R4_REGNUM:
- case R5_REGNUM:
- case R6_REGNUM:
- case R7_REGNUM:
- case CCR_REGNUM:
- return builtin_type_unsigned_short;
- case PR0_REGNUM:
- case PR1_REGNUM:
- case PR2_REGNUM:
- case PR3_REGNUM:
- case PR4_REGNUM:
- case PR5_REGNUM:
- case PR6_REGNUM:
- case PR7_REGNUM:
- case PC_REGNUM:
- return builtin_type_unsigned_long;
- default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-}
-
-/* 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. */
-
-void
-frame_find_saved_regs (struct frame_info *frame_info,
- struct frame_saved_regs *frame_saved_regs)
-{
- register int regnum;
- register int regmask;
- register CORE_ADDR next_addr;
- register CORE_ADDR pc;
- unsigned char thebyte;
-
- memset (frame_saved_regs, '\0', sizeof *frame_saved_regs);
-
- if ((frame_info)->pc >= (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4
- && (frame_info)->pc <= (frame_info)->frame)
- {
- next_addr = (frame_info)->frame;
- pc = (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4;
- }
- else
- {
- pc = get_pc_function_start ((frame_info)->pc);
- /* Verify we have a link a6 instruction next;
- if not we lose. If we win, find the address above the saved
- regs using the amount of storage from the link instruction.
- */
-
- thebyte = read_memory_integer (pc, 1);
- if (0x1f == thebyte)
- next_addr = (frame_info)->frame + read_memory_integer (pc += 1, 2), pc += 2;
- else if (0x17 == thebyte)
- next_addr = (frame_info)->frame + read_memory_integer (pc += 1, 1), pc += 1;
- else
- goto lose;
-#if 0
- /* FIXME steve */
- /* If have an add:g.waddal #-n, sp next, adjust next_addr. */
- if ((0x0c0177777 & read_memory_integer (pc, 2)) == 0157774)
- next_addr += read_memory_integer (pc += 2, 4), pc += 4;
-#endif
- }
-
- thebyte = read_memory_integer (pc, 1);
- if (thebyte == 0x12)
- {
- /* Got stm */
- pc++;
- regmask = read_memory_integer (pc, 1);
- pc++;
- for (regnum = 0; regnum < 8; regnum++, regmask >>= 1)
- {
- if (regmask & 1)
- {
- (frame_saved_regs)->regs[regnum] = (next_addr += 2) - 2;
- }
- }
- thebyte = read_memory_integer (pc, 1);
- }
- /* Maybe got a load of pushes */
- while (thebyte == 0xbf)
- {
- pc++;
- regnum = read_memory_integer (pc, 1) & 0x7;
- pc++;
- (frame_saved_regs)->regs[regnum] = (next_addr += 2) - 2;
- thebyte = read_memory_integer (pc, 1);
- }
-
-lose:;
-
- /* Remember the address of the frame pointer */
- (frame_saved_regs)->regs[FP_REGNUM] = (frame_info)->frame;
-
- /* This is where the old sp is hidden */
- (frame_saved_regs)->regs[SP_REGNUM] = (frame_info)->frame;
-
- /* And the PC - remember the pushed FP is always two bytes long */
- (frame_saved_regs)->regs[PC_REGNUM] = (frame_info)->frame + 2;
-}
-
-CORE_ADDR
-saved_pc_after_call (void)
-{
- int x;
- int a = read_register (SP_REGNUM);
-
- x = read_memory_integer (a, code_size);
- if (code_size == 2)
- {
- /* Stick current code segement onto top */
- x &= 0xffff;
- x |= read_register (SEG_C_REGNUM) << 16;
- }
- x &= 0xffffff;
- return x;
-}
-
-void
-h8500_set_pointer_size (int newsize)
-{
- static int oldsize = 0;
-
- if (oldsize != newsize)
- {
- printf_unfiltered ("pointer size set to %d bits\n", newsize);
- oldsize = newsize;
- if (newsize == 32)
- {
- minimum_mode = 0;
- }
- else
- {
- minimum_mode = 1;
- }
- _initialize_gdbtypes ();
- }
-}
-
-static void
-big_command (char *arg, int from_tty)
-{
- h8500_set_pointer_size (32);
- code_size = 4;
- data_size = 4;
-}
-
-static void
-medium_command (char *arg, int from_tty)
-{
- h8500_set_pointer_size (32);
- code_size = 4;
- data_size = 2;
-}
-
-static void
-compact_command (char *arg, int from_tty)
-{
- h8500_set_pointer_size (32);
- code_size = 2;
- data_size = 4;
-}
-
-static void
-small_command (char *arg, int from_tty)
-{
- h8500_set_pointer_size (16);
- code_size = 2;
- data_size = 2;
-}
-
-static struct cmd_list_element *setmemorylist;
-
-static void
-set_memory (char *args, int from_tty)
-{
- printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n");
- help_list (setmemorylist, "set memory ", -1, gdb_stdout);
-}
-
-/* See if variable name is ppc or pr[0-7] */
-
-int
-h8500_is_trapped_internalvar (char *name)
-{
- if (name[0] != 'p')
- return 0;
-
- if (strcmp (name + 1, "pc") == 0)
- return 1;
-
- if (name[1] == 'r'
- && name[2] >= '0'
- && name[2] <= '7'
- && name[3] == '\000')
- return 1;
- else
- return 0;
-}
-
-struct value *
-h8500_value_of_trapped_internalvar (struct internalvar *var)
-{
- LONGEST regval;
- unsigned char regbuf[4];
- int page_regnum, regnum;
-
- regnum = var->name[2] == 'c' ? PC_REGNUM : var->name[2] - '0';
-
- switch (var->name[2])
- {
- case 'c':
- page_regnum = SEG_C_REGNUM;
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- page_regnum = SEG_D_REGNUM;
- break;
- case '4':
- case '5':
- page_regnum = SEG_E_REGNUM;
- break;
- case '6':
- case '7':
- page_regnum = SEG_T_REGNUM;
- break;
- }
-
- get_saved_register (regbuf, NULL, NULL, deprecated_selected_frame, page_regnum, NULL);
- regval = regbuf[0] << 16;
-
- get_saved_register (regbuf, NULL, NULL, deprecated_selected_frame, regnum, NULL);
- regval |= regbuf[0] << 8 | regbuf[1]; /* XXX host/target byte order */
-
- xfree (var->value); /* Free up old value */
-
- var->value = value_from_longest (builtin_type_unsigned_long, regval);
- release_value (var->value); /* Unchain new value */
-
- VALUE_LVAL (var->value) = lval_internalvar;
- VALUE_INTERNALVAR (var->value) = var;
- return var->value;
-}
-
-void
-h8500_set_trapped_internalvar (struct internalvar *var, struct value *newval,
- int bitpos, int bitsize, int offset)
-{
- char *page_regnum, *regnum;
- char expression[100];
- unsigned new_regval;
- struct type *type;
- enum type_code newval_type_code;
-
- type = check_typedef (VALUE_TYPE (newval));
- newval_type_code = TYPE_CODE (type);
-
- if ((newval_type_code != TYPE_CODE_INT
- && newval_type_code != TYPE_CODE_PTR)
- || TYPE_LENGTH (type) != sizeof (new_regval))
- error ("Illegal type (%s) for assignment to $%s\n",
- TYPE_NAME (VALUE_TYPE (newval)), var->name);
-
- new_regval = *(long *) VALUE_CONTENTS_RAW (newval);
-
- regnum = var->name + 1;
-
- switch (var->name[2])
- {
- case 'c':
- page_regnum = "cp";
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- page_regnum = "dp";
- break;
- case '4':
- case '5':
- page_regnum = "ep";
- break;
- case '6':
- case '7':
- page_regnum = "tp";
- break;
- }
-
- sprintf (expression, "$%s=%d", page_regnum, new_regval >> 16);
- parse_and_eval (expression);
-
- sprintf (expression, "$%s=%d", regnum, new_regval & 0xffff);
- parse_and_eval (expression);
-}
-
-CORE_ADDR
-h8500_read_sp (void)
-{
- return read_register (PR7_REGNUM);
-}
-
-void
-h8500_write_sp (CORE_ADDR v)
-{
- write_register (PR7_REGNUM, v);
-}
-
-CORE_ADDR
-h8500_read_pc (ptid_t ptid)
-{
- return read_register (PC_REGNUM);
-}
-
-void
-h8500_write_pc (CORE_ADDR v, ptid_t ptid)
-{
- write_register (PC_REGNUM, v);
-}
-
-CORE_ADDR
-h8500_read_fp (void)
-{
- return read_register (PR6_REGNUM);
-}
-
-void
-_initialize_h8500_tdep (void)
-{
- tm_print_insn = print_insn_h8500;
-
- add_prefix_cmd ("memory", no_class, set_memory,
- "set the memory model", &setmemorylist, "set memory ", 0,
- &setlist);
-
- add_cmd ("small", class_support, small_command,
- "Set small memory model. (16 bit code, 16 bit data)", &setmemorylist);
-
- add_cmd ("big", class_support, big_command,
- "Set big memory model. (32 bit code, 32 bit data)", &setmemorylist);
-
- add_cmd ("medium", class_support, medium_command,
- "Set medium memory model. (32 bit code, 16 bit data)", &setmemorylist);
-
- add_cmd ("compact", class_support, compact_command,
- "Set compact memory model. (16 bit code, 32 bit data)", &setmemorylist);
-
-}
+// 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/hp300ux-nat.c b/gdb/hp300ux-nat.c
deleted file mode 100644
index 7ef3e34c9e9..00000000000
--- a/gdb/hp300ux-nat.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/* HP/UX native interface for HP 300's, for GDB when running under Unix.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1996, 1999, 2000,
- 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "regcache.h"
-
-/* Defining this means some system include files define some extra stuff. */
-#define WOPR
-#include <sys/param.h>
-#include <signal.h>
-#include <sys/user.h>
-#include <fcntl.h>
-
-#include <sys/ptrace.h>
-#include <sys/reg.h>
-#include <sys/trap.h>
-
-#include <sys/file.h>
-
-static void fetch_inferior_register (int, unsigned int);
-
-static void store_inferior_register_1 (int, unsigned int, int);
-
-static void store_inferior_register (int, unsigned int);
-
-/* Get kernel_u_addr using HPUX-style nlist(). */
-CORE_ADDR kernel_u_addr;
-
-struct hpnlist
- {
- char *n_name;
- long n_value;
- unsigned char n_type;
- unsigned char n_length;
- short n_almod;
- short n_unused;
- };
-static struct hpnlist nl[] =
-{
- {"_u", -1,},
- {(char *) 0,}};
-
-/* read the value of the u area from the hp-ux kernel */
-void
-_initialize_hp300ux_nat (void)
-{
-#ifndef HPUX_VERSION_5
- nlist ("/hp-ux", nl);
- kernel_u_addr = nl[0].n_value;
-#else /* HPUX version 5. */
- kernel_u_addr = (CORE_ADDR) 0x0097900;
-#endif
-}
-
-#define INFERIOR_AR0(u) \
- ((ptrace \
- (PT_RUAREA, PIDGET (inferior_ptid), \
- (PTRACE_ARG3_TYPE) ((char *) &u.u_ar0 - (char *) &u), 0, 0)) \
- - kernel_u_addr)
-
-static void
-fetch_inferior_register (register int regno, register unsigned int regaddr)
-{
-#ifndef HPUX_VERSION_5
- if (regno == PS_REGNUM)
- {
- union
- {
- int i;
- short s[2];
- }
- ps_val;
- int regval;
-
- ps_val.i = (ptrace (PT_RUAREA, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0, 0));
- regval = ps_val.s[0];
- supply_register (regno, (char *) &regval);
- }
- else
-#endif /* not HPUX_VERSION_5 */
- {
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (PT_RUAREA, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
- return;
-}
-
-static void
-store_inferior_register_1 (int regno, unsigned int regaddr, int val)
-{
- errno = 0;
- ptrace (PT_WUAREA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
- val, 0);
-#if 0
- /* HP-UX randomly sets errno to non-zero for regno == 25.
- However, the value is correctly written, so ignore errno. */
- if (errno != 0)
- {
- char string_buf[64];
-
- sprintf (string_buf, "writing register number %d", regno);
- perror_with_name (string_buf);
- }
-#endif
- return;
-}
-
-static void
-store_inferior_register (register int regno, register unsigned int regaddr)
-{
-#ifndef HPUX_VERSION_5
- if (regno == PS_REGNUM)
- {
- union
- {
- int i;
- short s[2];
- }
- ps_val;
-
- ps_val.i = (ptrace (PT_RUAREA, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0, 0));
- ps_val.s[0] = (read_register (regno));
- store_inferior_register_1 (regno, regaddr, ps_val.i);
- }
- else
-#endif /* not HPUX_VERSION_5 */
- {
- register int i;
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- store_inferior_register_1
- (regno, regaddr,
- (*(int *) &deprecated_registers[(REGISTER_BYTE (regno)) + i]));
- regaddr += sizeof (int);
- }
- }
- return;
-}
-
-void
-fetch_inferior_registers (int regno)
-{
- struct user u;
- register unsigned int ar0_offset;
-
- ar0_offset = (INFERIOR_AR0 (u));
- if (regno == -1)
- {
- for (regno = 0; (regno < FP0_REGNUM); regno++)
- fetch_inferior_register (regno, (REGISTER_ADDR (ar0_offset, regno)));
- for (; (regno < NUM_REGS); regno++)
- fetch_inferior_register (regno, (FP_REGISTER_ADDR (u, regno)));
- }
- else
- fetch_inferior_register (regno,
- (regno < FP0_REGNUM
- ? REGISTER_ADDR (ar0_offset, regno)
- : FP_REGISTER_ADDR (u, regno)));
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (register int regno)
-{
- struct user u;
- register unsigned int ar0_offset;
-
- if (regno >= FP0_REGNUM)
- {
- store_inferior_register (regno, (FP_REGISTER_ADDR (u, regno)));
- return;
- }
-
- ar0_offset = (INFERIOR_AR0 (u));
- if (regno >= 0)
- {
- store_inferior_register (regno, (REGISTER_ADDR (ar0_offset, regno)));
- return;
- }
-
- for (regno = 0; (regno < FP0_REGNUM); regno++)
- store_inferior_register (regno, (REGISTER_ADDR (ar0_offset, regno)));
- for (; (regno < NUM_REGS); regno++)
- store_inferior_register (regno, (FP_REGISTER_ADDR (u, regno)));
- return;
-}
-
-int
-getpagesize (void)
-{
- return 4096;
-}
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 37e6ccb17b0..66b7b611e61 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -19,12 +19,80 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "arch-utils.h"
+#include "gdbcore.h"
#include "osabi.h"
/* Forward declarations. */
extern void _initialize_hppa_hpux_tdep (void);
extern initialize_file_ftype _initialize_hppa_hpux_tdep;
+/* FIXME: brobecker 2002-12-25. The following functions will eventually
+ become static, after the multiarching conversion is done. */
+int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
+void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
+ CORE_ADDR *tmp);
+void hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
+ CORE_ADDR *tmp);
+void hppa_hpux_frame_find_saved_regs_in_sigtramp
+ (struct frame_info *fi, struct frame_saved_regs *fsr);
+
+int
+hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+ /* Actually, for a PA running HPUX the kernel calls the signal handler
+ without an intermediate trampoline. Luckily the kernel always sets
+ the return pointer for the signal handler to point to _sigreturn. */
+ return (name && (strcmp ("_sigreturn", name) == 0));
+}
+
+/* For hppa_hpux_frame_saved_pc_in_sigtramp,
+ hppa_hpux_frame_base_before_sigtramp and
+ hppa_hpux_frame_find_saved_regs_in_sigtramp:
+
+ The signal context structure pointer is always saved at the base
+ of the frame which "calls" the signal handler. We only want to find
+ the hardware save state structure, which lives 10 32bit words into
+ sigcontext structure.
+
+ Within the hardware save state structure, registers are found in the
+ same order as the register numbers in GDB.
+
+ At one time we peeked at %r31 rather than the PC queues to determine
+ what instruction took the fault. This was done on purpose, but I don't
+ remember why. Looking at the PC queues is really the right way, and
+ I don't remember why that didn't work when this code was originally
+ written. */
+
+void
+hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi, CORE_ADDR *tmp)
+{
+ *tmp = read_memory_integer (fi->frame + (43 * 4), 4);
+}
+
+void
+hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
+ CORE_ADDR *tmp)
+{
+ *tmp = read_memory_integer (fi->frame + (40 * 4), 4);
+}
+
+void
+hppa_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
+ struct frame_saved_regs *fsr)
+{
+ int i;
+ const CORE_ADDR tmp = (fi)->frame + (10 * 4);
+
+ for (i = 0; i < NUM_REGS; i++)
+ {
+ if (i == SP_REGNUM)
+ (fsr)->regs[SP_REGNUM] = read_memory_integer (tmp + SP_REGNUM * 4, 4);
+ else
+ (fsr)->regs[i] = tmp + i * 4;
+ }
+}
+
+
static void
hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index a9c6fc715f6..3eaefccc11f 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for the HP PA architecture, for GDB.
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -63,6 +63,9 @@
#include "symfile.h"
#include "objfiles.h"
+/* Some local constants. */
+static const int hppa_num_regs = 128;
+
/* To support detection of the pseudo-initial frame
that threads have. */
#define THREAD_INITIAL_FRAME_SYMBOL "__pthread_exit"
@@ -135,18 +138,43 @@ static void record_text_segment_lowaddr (bfd *, asection *, void *);
/* FIXME: brobecker 2002-11-07: We will likely be able to make the
following functions static, once we hppa is partially multiarched. */
int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
+CORE_ADDR hppa_skip_prologue (CORE_ADDR pc);
+CORE_ADDR hppa_skip_trampoline_code (CORE_ADDR pc);
+int hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name);
+int hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name);
+CORE_ADDR hppa_saved_pc_after_call (struct frame_info *frame);
int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
CORE_ADDR hppa_stack_align (CORE_ADDR sp);
int hppa_pc_requires_run_before_use (CORE_ADDR pc);
int hppa_instruction_nullified (void);
+int hppa_register_raw_size (int reg_nr);
int hppa_register_byte (int reg_nr);
struct type * hppa_register_virtual_type (int reg_nr);
void hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
+void hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf);
+int hppa_use_struct_convention (int gcc_p, struct type *type);
+void hppa_store_return_value (struct type *type, char *valbuf);
+CORE_ADDR hppa_extract_struct_value_address (char *regbuf);
int hppa_cannot_store_register (int regnum);
+void hppa_init_extra_frame_info (int fromleaf, struct frame_info *frame);
+CORE_ADDR hppa_frame_chain (struct frame_info *frame);
+int hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe);
+int hppa_frameless_function_invocation (struct frame_info *frame);
+CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
+int hppa_frame_num_args (struct frame_info *frame);
+void hppa_push_dummy_frame (struct inferior_status *inf_status);
+void hppa_pop_frame (void);
+CORE_ADDR hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
+ int nargs, struct value **args,
+ struct type *type, int gcc_p);
+CORE_ADDR hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr);
CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
-int hppa_coerce_float_to_double (struct type *formal, struct type *actual);
+CORE_ADDR hppa_target_read_pc (ptid_t ptid);
+void hppa_target_write_pc (CORE_ADDR v, ptid_t ptid);
+CORE_ADDR hppa_target_read_fp (void);
typedef struct
{
@@ -156,7 +184,7 @@ typedef struct
}
args_for_find_stub;
-static int cover_find_stub_with_shl_get (PTR);
+static int cover_find_stub_with_shl_get (void *);
static int is_pa_2 = 0; /* False */
@@ -345,7 +373,7 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
if (TARGET_PTR_BIT == 64 && text_offset == 0)
{
bfd_map_over_sections (objfile->obfd,
- record_text_segment_lowaddr, (PTR) NULL);
+ record_text_segment_lowaddr, NULL);
/* ?!? Mask off some low bits. Should this instead subtract
out the lowest section's filepos or something like that?
@@ -546,7 +574,7 @@ read_unwind_info (struct objfile *objfile)
obj_private->so_info = NULL;
obj_private->dp = 0;
- objfile->obj_private = (PTR) obj_private;
+ objfile->obj_private = obj_private;
}
obj_private = (obj_private_data_t *) objfile->obj_private;
obj_private->unwind_info = ui;
@@ -816,7 +844,7 @@ rp_saved (CORE_ADDR pc)
}
int
-frameless_function_invocation (struct frame_info *frame)
+hppa_frameless_function_invocation (struct frame_info *frame)
{
struct unwind_table_entry *u;
@@ -834,7 +862,7 @@ frameless_function_invocation (struct frame_info *frame)
some instructions. */
CORE_ADDR
-saved_pc_after_call (struct frame_info *frame)
+hppa_saved_pc_after_call (struct frame_info *frame)
{
int ret_regnum;
CORE_ADDR pc;
@@ -900,7 +928,7 @@ hppa_frame_saved_pc (struct frame_info *frame)
}
#endif
- if (frameless_function_invocation (frame))
+ if (hppa_frameless_function_invocation (frame))
{
int ret_regnum;
@@ -1032,7 +1060,7 @@ hppa_frame_saved_pc (struct frame_info *frame)
in a system call. */
void
-init_extra_frame_info (int fromleaf, struct frame_info *frame)
+hppa_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
int flags;
int framesize;
@@ -1090,7 +1118,7 @@ init_extra_frame_info (int fromleaf, struct frame_info *frame)
a frame pointer calls code without a frame pointer. */
CORE_ADDR
-frame_chain (struct frame_info *frame)
+hppa_frame_chain (struct frame_info *frame)
{
int my_framesize, caller_framesize;
struct unwind_table_entry *u;
@@ -1353,9 +1381,6 @@ hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
struct unwind_table_entry *u, *next_u = NULL;
struct frame_info *next;
- if (!chain)
- return 0;
-
u = find_unwind_entry (thisframe->pc);
if (u == NULL)
@@ -1407,7 +1432,7 @@ hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
to be aligned to a 64-byte boundary. */
void
-push_dummy_frame (struct inferior_status *inf_status)
+hppa_push_dummy_frame (struct inferior_status *inf_status)
{
CORE_ADDR sp, pc, pcspace;
register int regnum;
@@ -1423,7 +1448,7 @@ push_dummy_frame (struct inferior_status *inf_status)
We also need a number of horrid hacks to deal with lossage in the
PC queue registers (apparently they're not valid when the in syscall
bit is set). */
- pc = target_read_pc (inferior_ptid);
+ pc = hppa_target_read_pc (inferior_ptid);
int_buffer = read_register (FLAGS_REGNUM);
if (int_buffer & 0x2)
{
@@ -2006,7 +2031,7 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
/* Cover routine for find_stub_with_shl_get to pass to catch_errors */
static int
-cover_find_stub_with_shl_get (PTR args_untyped)
+cover_find_stub_with_shl_get (void *args_untyped)
{
args_for_find_stub *args = args_untyped;
args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle);
@@ -2399,7 +2424,7 @@ hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
if (flags & 2)
return pc;
#ifndef GDB_TARGET_IS_PA_ELF
- else if (som_solib_get_got_by_pc (target_read_pc (inferior_ptid)))
+ else if (som_solib_get_got_by_pc (hppa_target_read_pc (inferior_ptid)))
return pc;
#endif
else
@@ -2407,14 +2432,12 @@ hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
#endif
}
-
-
-
/* If the pid is in a syscall, then the FP register is not readable.
We'll return zero in that case, rather than attempting to read it
and cause a warning. */
+
CORE_ADDR
-target_read_fp (int pid)
+hppa_read_fp (int pid)
{
int flags = read_register (FLAGS_REGNUM);
@@ -2428,12 +2451,17 @@ target_read_fp (int pid)
return read_register (FP_REGNUM);
}
+CORE_ADDR
+hppa_target_read_fp (void)
+{
+ return hppa_read_fp (PIDGET (inferior_ptid));
+}
/* Get the PC from %r31 if currently in a syscall. Also mask out privilege
bits. */
CORE_ADDR
-target_read_pc (ptid_t ptid)
+hppa_target_read_pc (ptid_t ptid)
{
int flags = read_register_pid (FLAGS_REGNUM, ptid);
@@ -2450,7 +2478,7 @@ target_read_pc (ptid_t ptid)
PC value into %r31. */
void
-target_write_pc (CORE_ADDR v, ptid_t ptid)
+hppa_target_write_pc (CORE_ADDR v, ptid_t ptid)
{
int flags = read_register_pid (FLAGS_REGNUM, ptid);
@@ -2607,7 +2635,7 @@ pa_register_look_aside (char *raw_regs, int regnum, long *raw_val)
int start;
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
long long reg_val;
if (!know_which)
@@ -2804,8 +2832,8 @@ pa_strcat_registers (char *raw_regs, int regnum, int fpregs,
static void
pa_print_fp_reg (int i)
{
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
- char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
+ char *raw_buffer = alloca (max_register_size (current_gdbarch));
+ char *virtual_buffer = alloca (max_register_size (current_gdbarch));
/* Get 32bits of data. */
frame_register_read (deprecated_selected_frame, i, raw_buffer);
@@ -2847,8 +2875,8 @@ pa_print_fp_reg (int i)
static void
pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
{
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
- char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
+ char *raw_buffer = alloca (max_register_size (current_gdbarch));
+ char *virtual_buffer = alloca (max_register_size (current_gdbarch));
fputs_filtered (REGISTER_NAME (i), stream);
print_spaces_filtered (8 - strlen (REGISTER_NAME (i)), stream);
@@ -2862,7 +2890,7 @@ pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
if (precision == double_precision && (i % 2) == 0)
{
- char raw_buf[MAX_REGISTER_RAW_SIZE];
+ char *raw_buf = alloca (max_register_size (current_gdbarch));
/* Get the data in raw format for the 2nd half. */
frame_register_read (deprecated_selected_frame, i + 1, raw_buf);
@@ -2888,7 +2916,7 @@ pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
just shared library trampolines (import, export). */
int
-in_solib_call_trampoline (CORE_ADDR pc, char *name)
+hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name)
{
struct minimal_symbol *minsym;
struct unwind_table_entry *u;
@@ -3048,7 +3076,7 @@ in_solib_call_trampoline (CORE_ADDR pc, char *name)
just shared library trampolines (import, export). */
int
-in_solib_return_trampoline (CORE_ADDR pc, char *name)
+hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name)
{
struct unwind_table_entry *u;
@@ -3121,7 +3149,7 @@ in_solib_return_trampoline (CORE_ADDR pc, char *name)
used in dynamic executables. */
CORE_ADDR
-skip_trampoline_code (CORE_ADDR pc, char *name)
+hppa_skip_trampoline_code (CORE_ADDR pc)
{
long orig_pc = pc;
long prev_inst, curr_inst, loc;
@@ -4271,7 +4299,7 @@ initialize_hp_cxx_exception_support (void)
args.return_val = 0;
recurse++;
- catch_errors (cover_find_stub_with_shl_get, (PTR) &args, message,
+ catch_errors (cover_find_stub_with_shl_get, &args, message,
RETURN_MASK_ALL);
eh_notify_callback_addr = args.return_val;
recurse--;
@@ -4524,6 +4552,16 @@ child_get_current_exception_event (void)
return &current_ex_event;
}
+/* Instead of this nasty cast, add a method pvoid() that prints out a
+ host VOID data type (remember %p isn't portable). */
+
+static CORE_ADDR
+hppa_pointer_to_address_hack (void *ptr)
+{
+ gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
+ return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &ptr);
+}
+
static void
unwind_command (char *exp, int from_tty)
{
@@ -4546,7 +4584,7 @@ unwind_command (char *exp, int from_tty)
}
printf_unfiltered ("unwind_table_entry (0x%s):\n",
- paddr_nz (host_pointer_to_address (u)));
+ paddr_nz (hppa_pointer_to_address_hack (u)));
printf_unfiltered ("\tregion_start = ");
print_address (u->region_start, gdb_stdout);
@@ -4809,6 +4847,13 @@ hppa_instruction_nullified (void)
return ((ipsw & 0x00200000) && !(flags & 0x2));
}
+int
+hppa_register_raw_size (int reg_nr)
+{
+ /* All registers have the same size. */
+ return REGISTER_SIZE;
+}
+
/* Index within the register vector of the first byte of the space i
used for register REG_NR. */
@@ -4839,6 +4884,21 @@ hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
write_register (28, addr);
}
+CORE_ADDR
+hppa_extract_struct_value_address (char *regbuf)
+{
+ /* 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). */
+ /* FIXME: brobecker 2002-12-26.
+ The current implementation is historical, but we should eventually
+ implement it in a more robust manner as it relies on the fact that
+ 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. */
+ return (*(int *)(regbuf + REGISTER_BYTE (28)));
+}
+
/* Return True if REGNUM is not a register available to the user
through ptrace(). */
@@ -4864,6 +4924,14 @@ hppa_frame_locals_address (struct frame_info *fi)
return fi->frame;
}
+int
+hppa_frame_num_args (struct frame_info *frame)
+{
+ /* We can't tell how many args there are now that the C compiler delays
+ popping them. */
+ return -1;
+}
+
CORE_ADDR
hppa_smash_text_address (CORE_ADDR addr)
{
@@ -4877,36 +4945,17 @@ hppa_smash_text_address (CORE_ADDR addr)
return (addr &= ~0x3);
}
-int
-hppa_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- /* FIXME: For the pa, it appears that the debug info marks the
- parameters as floats regardless of whether the function is
- prototyped, but the actual values are passed as doubles for the
- non-prototyped case and floats for the prototyped case. Thus we
- choose to make the non-prototyped case work for C and break the
- prototyped case, since the non-prototyped case is probably much
- more common. */
- return (current_language -> la_language == language_c);
-}
-
static struct gdbarch *
hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
/* Try to determine the ABI of the object we are loading. */
-
- if (info.abfd != NULL)
+ if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
{
- osabi = gdbarch_lookup_osabi (info.abfd);
- if (osabi == GDB_OSABI_UNKNOWN)
- {
- /* If it's a SOM file, assume it's HP/UX SOM. */
- if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour)
- osabi = GDB_OSABI_HPUX_SOM;
- }
+ /* If it's a SOM file, assume it's HP/UX SOM. */
+ if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour)
+ info.osabi = GDB_OSABI_HPUX_SOM;
}
/* find a candidate among the list of pre-declared architectures. */
@@ -4918,7 +4967,63 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
gdbarch = gdbarch_alloc (&info, NULL);
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
+
+ set_gdbarch_reg_struct_has_addr (gdbarch, hppa_reg_struct_has_addr);
+ set_gdbarch_function_start_offset (gdbarch, 0);
+ set_gdbarch_skip_prologue (gdbarch, hppa_skip_prologue);
+ set_gdbarch_skip_trampoline_code (gdbarch, hppa_skip_trampoline_code);
+ set_gdbarch_in_solib_call_trampoline (gdbarch, hppa_in_solib_call_trampoline);
+ set_gdbarch_in_solib_return_trampoline (gdbarch,
+ hppa_in_solib_return_trampoline);
+ set_gdbarch_saved_pc_after_call (gdbarch, hppa_saved_pc_after_call);
+ set_gdbarch_inner_than (gdbarch, hppa_inner_than);
+ set_gdbarch_stack_align (gdbarch, hppa_stack_align);
+ set_gdbarch_extra_stack_alignment_needed (gdbarch, 0);
+ set_gdbarch_decr_pc_after_break (gdbarch, 0);
+ set_gdbarch_register_size (gdbarch, 4);
+ set_gdbarch_num_regs (gdbarch, hppa_num_regs);
+ set_gdbarch_fp_regnum (gdbarch, 3);
+ set_gdbarch_sp_regnum (gdbarch, 30);
+ set_gdbarch_fp0_regnum (gdbarch, 64);
+ set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM);
+ set_gdbarch_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
+ set_gdbarch_register_raw_size (gdbarch, hppa_register_raw_size);
+ set_gdbarch_register_bytes (gdbarch, hppa_num_regs * 4);
+ set_gdbarch_register_byte (gdbarch, hppa_register_byte);
+ set_gdbarch_register_virtual_size (gdbarch, hppa_register_raw_size);
+ set_gdbarch_max_register_raw_size (gdbarch, 4);
+ set_gdbarch_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
+ set_gdbarch_store_struct_return (gdbarch, hppa_store_struct_return);
+ set_gdbarch_deprecated_extract_return_value (gdbarch,
+ hppa_extract_return_value);
+ set_gdbarch_use_struct_convention (gdbarch, hppa_use_struct_convention);
+ set_gdbarch_deprecated_store_return_value (gdbarch, hppa_store_return_value);
+ set_gdbarch_deprecated_extract_struct_value_address
+ (gdbarch, hppa_extract_struct_value_address);
+ set_gdbarch_cannot_store_register (gdbarch, hppa_cannot_store_register);
+ set_gdbarch_init_extra_frame_info (gdbarch, hppa_init_extra_frame_info);
+ set_gdbarch_frame_chain (gdbarch, hppa_frame_chain);
+ set_gdbarch_frame_chain_valid (gdbarch, hppa_frame_chain_valid);
+ set_gdbarch_frameless_function_invocation
+ (gdbarch, hppa_frameless_function_invocation);
+ set_gdbarch_frame_saved_pc (gdbarch, hppa_frame_saved_pc);
+ set_gdbarch_frame_args_address (gdbarch, hppa_frame_args_address);
+ set_gdbarch_frame_locals_address (gdbarch, hppa_frame_locals_address);
+ set_gdbarch_frame_num_args (gdbarch, hppa_frame_num_args);
+ set_gdbarch_frame_args_skip (gdbarch, 0);
+ /* set_gdbarch_push_dummy_frame (gdbarch, hppa_push_dummy_frame); */
+ set_gdbarch_pop_frame (gdbarch, hppa_pop_frame);
+ set_gdbarch_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28);
+ set_gdbarch_call_dummy_start_offset (gdbarch, 0);
+ /* set_gdbarch_fix_call_dummy (gdbarch, hppa_fix_call_dummy); */
+ set_gdbarch_push_arguments (gdbarch, hppa_push_arguments);
+ set_gdbarch_smash_text_address (gdbarch, hppa_smash_text_address);
+ set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+ set_gdbarch_read_pc (gdbarch, hppa_target_read_pc);
+ set_gdbarch_write_pc (gdbarch, hppa_target_write_pc);
+ set_gdbarch_read_fp (gdbarch, hppa_target_read_fp);
return gdbarch;
}
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index d8595875c90..3ec3a57e9ac 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -55,7 +55,7 @@ static void
fetch_register (int regno)
{
register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
register int i;
/* Offset of registers within the u area. */
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 84d1f3fa5e4..51b74fc7ba0 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -189,7 +189,7 @@ store_inferior_registers (int regno)
static void
fetch_register (int regno)
{
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
unsigned int addr, len, offset;
int i;
@@ -1334,7 +1334,7 @@ child_pid_to_exec_file (int pid)
int name_index;
int i;
ptid_t saved_inferior_ptid;
- boolean done;
+ int done;
#ifdef PT_GET_PROCESS_PATHNAME
/* As of 10.x HP-UX, there's an explicit request to get the pathname. */
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 602a97ddbfb..6f8d8997203 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -1,5 +1,5 @@
/* Read hp debug symbols and convert to internal format, for GDB.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -87,23 +87,6 @@ struct hpread_symfile_info
#define WITHIN_FUNCTION(o) (HPUX_SYMFILE_INFO(o)->within_function)
#define CURRENT_FUNCTION_VALUE(o) (HPUX_SYMFILE_INFO(o)->current_function_value)
-/* Given the native debug symbol SYM, set NAMEP to the name associated
- with the debug symbol. Note we may be called with a debug symbol which
- has no associated name, in that case we return an empty string.
-
- Also note we "know" that the name for any symbol is always in the
- same place. Hence we don't have to conditionalize on the symbol type. */
-#define SET_NAMESTRING(SYM, NAMEP, OBJFILE) \
- if (! hpread_has_name ((SYM)->dblock.kind)) \
- *NAMEP = ""; \
- else if (((unsigned)(SYM)->dsfile.name) >= VT_SIZE (OBJFILE)) \
- { \
- complaint (&symfile_complaints, "bad string table offset in symbol %d", \
- (char *) symnum); \
- *NAMEP = ""; \
- } \
- else \
- *NAMEP = (SYM)->dsfile.name + VT (OBJFILE)
/* We put a pointer to this structure in the read_symtab_private field
of the psymtab. */
@@ -155,6 +138,9 @@ lbrac_mismatch_complaint (int arg1)
/* Forward procedure declarations */
+static void set_namestring (union dnttentry *sym, char **namep,
+ struct objfile *objfile);
+
void hpread_symfile_init (struct objfile *);
void do_pxdb (bfd *);
@@ -302,6 +288,28 @@ trans_lang (enum hp_language in_lang)
static char main_string[] = "main";
+
+/* Given the native debug symbol SYM, set NAMEP to the name associated
+ with the debug symbol. Note we may be called with a debug symbol which
+ has no associated name, in that case we return an empty string. */
+
+static void
+set_namestring (union dnttentry *sym, char **namep, struct objfile *objfile)
+{
+ /* Note that we "know" that the name for any symbol is always in the same
+ place. Hence we don't have to conditionalize on the symbol type. */
+ if (! hpread_has_name (sym->dblock.kind))
+ *namep = "";
+ else if ((unsigned) sym->dsfile.name >= VT_SIZE (objfile))
+ {
+ complaint (&symfile_complaints, "bad string table offset in symbol %d",
+ symnum);
+ *namep = "";
+ }
+ else
+ *namep = sym->dsfile.name + VT (objfile);
+}
+
/* Call PXDB to process our file.
Approach copied from DDE's "dbgk_run_pxdb". Note: we
@@ -1656,7 +1664,7 @@ hpread_symfile_init (struct objfile *objfile)
asection *vt_section, *slt_section, *lntt_section, *gntt_section;
/* Allocate struct to keep track of the symfile */
- objfile->sym_private = (PTR)
+ objfile->sym_private =
xmmalloc (objfile->md, sizeof (struct hpread_symfile_info));
memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info));
@@ -1917,7 +1925,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
/* A source file of some kind. Note this may simply
be an included file. */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ set_namestring (dn_bufp, &namestring, objfile);
/* Check if this is the source file we are already working
with. */
@@ -1951,7 +1959,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
@@ -2022,7 +2030,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
}
/* Now begin a new module and a new psymtab for it */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ set_namestring (dn_bufp, &namestring, objfile);
valu = hpread_get_textlow (i, hp_symnum, objfile, symcount);
valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
if (!pst)
@@ -2048,7 +2056,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
texthigh = valu;
valu = dn_bufp->dfunc.lowaddr +
ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ set_namestring (dn_bufp, &namestring, objfile);
if (dn_bufp->dfunc.global)
add_psymbol_to_list (namestring, strlen (namestring),
VAR_NAMESPACE, LOC_BLOCK,
@@ -2069,7 +2077,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
texthigh = valu;
valu = dn_bufp->ddocfunc.lowaddr +
ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ set_namestring (dn_bufp, &namestring, objfile);
if (dn_bufp->ddocfunc.global)
add_psymbol_to_list (namestring, strlen (namestring),
VAR_NAMESPACE, LOC_BLOCK,
@@ -2143,7 +2151,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
else
storage = LOC_UNDEF;
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ set_namestring (dn_bufp, &namestring, objfile);
if (!pst)
{
pst = hpread_start_psymtab (objfile,
@@ -2227,7 +2235,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
case DNTT_TYPE_MEMENUM:
case DNTT_TYPE_CONST:
/* Constants and members of enumerated types. */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ set_namestring (dn_bufp, &namestring, objfile);
if (!pst)
{
pst = hpread_start_psymtab (objfile,
@@ -2826,8 +2834,8 @@ hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
if (dn_bufp->dblock.extension)
continue;
- /* Yow! We call SET_NAMESTRING on things without names! */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
+ /* Yow! We call set_namestring on things without names! */
+ set_namestring (dn_bufp, &namestring, objfile);
hpread_process_one_debug_symbol (dn_bufp, namestring, section_offsets,
objfile, text_offset, text_size,
@@ -5232,7 +5240,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
/* Stack must be empty now. */
if (context_stack_depth != 0)
- lbrac_unmatched_complaint ((char *) symnum);
+ lbrac_unmatched_complaint (symnum);
new = push_context (0, valu);
/* Built a type for the function. This includes processing
@@ -5241,6 +5249,11 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
SYMBOL_CLASS (sym) = LOC_BLOCK;
SYMBOL_TYPE (sym) = hpread_read_function_type (hp_type, dn_bufp, objfile, 1);
+ /* All functions in C++ have prototypes. For C we don't have enough
+ information in the debug info. */
+ if (SYMBOL_LANGUAGE (sym) == language_cplus)
+ TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;
+
/* The "SYMBOL_NAME" field is expected to be the mangled name
* (if any), which we get from the "alias" field of the SOM record
* if that exists.
@@ -5350,7 +5363,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
CURRENT_FUNCTION_VALUE (objfile) = valu;
/* Stack must be empty now. */
if (context_stack_depth != 0)
- lbrac_unmatched_complaint ((char *) symnum);
+ lbrac_unmatched_complaint (symnum);
new = push_context (0, valu);
/* Built a type for the function. This includes processing
@@ -5578,7 +5591,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
new = pop_context ();
desc = dn_bufp->dend.beginscope.dnttp.index;
if (desc != new->depth)
- lbrac_mismatch_complaint ((char *) symnum);
+ lbrac_mismatch_complaint (symnum);
/* Make a block for the local symbols within. */
finish_block (new->name, &local_symbols, new->old_blocks,
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 26d57ba2586..b585ca540ce 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -41,7 +41,7 @@
#include "inferior.h"
#include "regcache.h"
#include <fcntl.h>
-#include <sys/stat.h>
+#include "gdb_stat.h"
#include "gdbcore.h"
extern int child_suppress_run;
@@ -285,7 +285,7 @@ hpux_thread_fetch_registers (int regno)
child_ops.to_fetch_registers (regno);
else
{
- unsigned char buf[MAX_REGISTER_RAW_SIZE];
+ unsigned char *buf = alloca (max_register_size (current_gdbarch));
CORE_ADDR sp;
sp = (CORE_ADDR) tcb_ptr->static_ctx.sp - 160;
@@ -347,7 +347,7 @@ hpux_thread_store_registers (int regno)
child_ops.to_store_registers (regno);
else
{
- unsigned char buf[MAX_REGISTER_RAW_SIZE];
+ unsigned char *buf = alloca (max_register_size (current_gdbarch));
CORE_ADDR sp;
sp = (CORE_ADDR) tcb_ptr->static_ctx.sp - 160;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 1ef14fcb900..9bf5a16e200 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for GNU/Linux running on i386's, for GDB.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,6 +34,8 @@
#include "solib-svr4.h" /* For struct link_map_offsets. */
+#include "osabi.h"
+
#include "i386-tdep.h"
#include "i386-linux-tdep.h"
@@ -245,16 +247,16 @@ i386_linux_sigcontext_addr (struct frame_info *frame)
{
CORE_ADDR pc;
- pc = i386_linux_sigtramp_start (frame->pc);
+ pc = i386_linux_sigtramp_start (get_frame_pc (frame));
if (pc)
{
CORE_ADDR sp;
- if (frame->next)
+ if (get_next_frame (frame))
/* If this isn't the top frame, the next frame must be for the
signal handler itself. The sigcontext structure lives on
the stack, right after the signum argument. */
- return frame->next->frame + 12;
+ return get_frame_base (get_next_frame (frame)) + 12;
/* This is the top frame. We'll have to find the address of the
sigcontext structure by looking at the stack pointer. Keep
@@ -262,20 +264,21 @@ i386_linux_sigcontext_addr (struct frame_info *frame)
"pop %eax". If the PC is at this instruction, adjust the
returned value accordingly. */
sp = read_register (SP_REGNUM);
- if (pc == frame->pc)
+ if (pc == get_frame_pc (frame))
return sp + 4;
return sp;
}
- pc = i386_linux_rt_sigtramp_start (frame->pc);
+ pc = i386_linux_rt_sigtramp_start (get_frame_pc (frame));
if (pc)
{
- if (frame->next)
+ if (get_next_frame (frame))
/* If this isn't the top frame, the next frame must be for the
signal handler itself. The sigcontext structure is part of
the user context. A pointer to the user context is passed
as the third argument to the signal handler. */
- return read_memory_integer (frame->next->frame + 16, 4) + 20;
+ return read_memory_integer (get_frame_base (get_next_frame (frame))
+ + 16, 4) + 20;
/* This is the top frame. Again, use the stack pointer to find
the address of the sigcontext structure. */
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index 792923cd44e..a52b18850fb 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Solaris x86.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,6 +20,7 @@
#include "defs.h"
#include "value.h"
+#include "osabi.h"
#include "i386-tdep.h"
@@ -47,10 +48,6 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigcontext_addr = i386bsd_sigcontext_addr;
tdep->sc_pc_offset = 36 + 14 * 4;
tdep->sc_sp_offset = 36 + 17 * 4;
-
- /* Assume that the prototype flag can be trusted. */
- set_gdbarch_coerce_float_to_double (gdbarch,
- standard_coerce_float_to_double);
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 9d508795e8b..d85073b4ef1 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1,7 +1,7 @@
/* Intel 386 target-dependent stuff.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -39,6 +39,7 @@
#include "gdb_assert.h"
#include "reggroups.h"
#include "dummy-frame.h"
+#include "osabi.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
@@ -498,9 +499,10 @@ i386_get_frame_setup (CORE_ADDR pc)
int
i386_frameless_signal_p (struct frame_info *frame)
{
- return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME
+ return (get_next_frame (frame)
+ && get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME
&& (frameless_look_for_prologue (frame)
- || frame->pc == get_pc_function_start (frame->pc)));
+ || get_frame_pc (frame) == get_pc_function_start (get_frame_pc (frame))));
}
/* Return the chain-pointer for FRAME. In the case of the i386, the
@@ -510,15 +512,15 @@ i386_frameless_signal_p (struct frame_info *frame)
static CORE_ADDR
i386_frame_chain (struct frame_info *frame)
{
- if (pc_in_dummy_frame (frame->pc))
- return frame->frame;
+ if (pc_in_dummy_frame (get_frame_pc (frame)))
+ return get_frame_base (frame);
if (get_frame_type (frame) == SIGTRAMP_FRAME
|| i386_frameless_signal_p (frame))
- return frame->frame;
+ return get_frame_base (frame);
- if (! inside_entry_file (frame->pc))
- return read_memory_unsigned_integer (frame->frame, 4);
+ if (! inside_entry_file (get_frame_pc (frame)))
+ return read_memory_unsigned_integer (get_frame_base (frame), 4);
return 0;
}
@@ -567,7 +569,7 @@ i386_sigtramp_saved_sp (struct frame_info *frame)
static CORE_ADDR
i386_frame_saved_pc (struct frame_info *frame)
{
- if (pc_in_dummy_frame (frame->pc))
+ if (pc_in_dummy_frame (get_frame_pc (frame)))
{
ULONGEST pc;
@@ -580,11 +582,11 @@ i386_frame_saved_pc (struct frame_info *frame)
if (i386_frameless_signal_p (frame))
{
- CORE_ADDR sp = i386_sigtramp_saved_sp (frame->next);
+ CORE_ADDR sp = i386_sigtramp_saved_sp (get_next_frame (frame));
return read_memory_unsigned_integer (sp, 4);
}
- return read_memory_unsigned_integer (frame->frame + 4, 4);
+ return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
}
/* Immediately after a function call, return the saved pc. */
@@ -707,18 +709,18 @@ i386_frame_init_saved_regs (struct frame_info *fip)
CORE_ADDR pc;
int i;
- if (fip->saved_regs)
+ if (get_frame_saved_regs (fip))
return;
frame_saved_regs_zalloc (fip);
- pc = get_pc_function_start (fip->pc);
+ pc = get_pc_function_start (get_frame_pc (fip));
if (pc != 0)
locals = i386_get_frame_setup (pc);
if (locals >= 0)
{
- addr = fip->frame - 4 - locals;
+ addr = get_frame_base (fip) - 4 - locals;
for (i = 0; i < 8; i++)
{
op = codestream_get ();
@@ -726,16 +728,16 @@ i386_frame_init_saved_regs (struct frame_info *fip)
break;
#ifdef I386_REGNO_TO_SYMMETRY
/* Dynix uses different internal numbering. Ick. */
- fip->saved_regs[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
+ get_frame_saved_regs (fip)[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
#else
- fip->saved_regs[op - 0x50] = addr;
+ get_frame_saved_regs (fip)[op - 0x50] = addr;
#endif
addr -= 4;
}
}
- fip->saved_regs[PC_REGNUM] = fip->frame + 4;
- fip->saved_regs[FP_REGNUM] = fip->frame;
+ get_frame_saved_regs (fip)[PC_REGNUM] = get_frame_base (fip) + 4;
+ get_frame_saved_regs (fip)[FP_REGNUM] = get_frame_base (fip);
}
/* Return PC of first real instruction. */
@@ -867,7 +869,7 @@ i386_do_pop_frame (struct frame_info *frame)
for (regnum = 0; regnum < NUM_REGS; regnum++)
{
CORE_ADDR addr;
- addr = frame->saved_regs[regnum];
+ addr = get_frame_saved_regs (frame)[regnum];
if (addr)
{
read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
@@ -890,15 +892,16 @@ i386_pop_frame (void)
/* Figure out where the longjmp will land. Slurp the args out of the
stack. We expect the first arg to be a pointer to the jmp_buf
structure from which we extract the address that we will land at.
- This address is copied into PC. This routine returns true on
+ This address is copied into PC. This routine returns non-zero on
success. */
static int
i386_get_longjmp_target (CORE_ADDR *pc)
{
- char buf[4];
+ char buf[8];
CORE_ADDR sp, jb_addr;
int jb_pc_offset = gdbarch_tdep (current_gdbarch)->jb_pc_offset;
+ int len = TARGET_PTR_BIT / TARGET_CHAR_BIT;
/* If JB_PC_OFFSET is -1, we have no way to find out where the
longjmp will land. */
@@ -906,14 +909,14 @@ i386_get_longjmp_target (CORE_ADDR *pc)
return 0;
sp = read_register (SP_REGNUM);
- if (target_read_memory (sp + 4, buf, 4))
+ if (target_read_memory (sp + len, buf, len))
return 0;
- jb_addr = extract_address (buf, 4);
- if (target_read_memory (jb_addr + jb_pc_offset, buf, 4))
+ jb_addr = extract_address (buf, len);
+ if (target_read_memory (jb_addr + jb_pc_offset, buf, len))
return 0;
- *pc = extract_address (buf, 4);
+ *pc = extract_address (buf, len);
return 1;
}
@@ -1355,7 +1358,7 @@ i386_svr4_sigcontext_addr (struct frame_info *frame)
int sigcontext_offset = -1;
char *name = NULL;
- find_pc_partial_function (frame->pc, &name, NULL, NULL);
+ find_pc_partial_function (get_frame_pc (frame), &name, NULL, NULL);
if (name)
{
if (strcmp (name, "_sigreturn") == 0)
@@ -1368,8 +1371,8 @@ i386_svr4_sigcontext_addr (struct frame_info *frame)
gdb_assert (sigcontext_offset != -1);
- if (frame->next)
- return frame->next->frame + sigcontext_offset;
+ if (get_next_frame (frame))
+ return get_frame_base (get_next_frame (frame)) + sigcontext_offset;
return read_register (SP_REGNUM) + sigcontext_offset;
}
@@ -1407,9 +1410,6 @@ i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- /* FIXME: kettenis/20020511: Why do we override this function here? */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
tdep->sc_pc_offset = 14 * 4;
@@ -1437,9 +1437,6 @@ i386_nw_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- /* FIXME: kettenis/20020511: Why do we override this function here? */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
tdep->jb_pc_offset = 24;
}
@@ -1499,22 +1496,11 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
- /* Try to determine the OS ABI of the object we're loading. */
- if (info.abfd != NULL)
- osabi = gdbarch_lookup_osabi (info.abfd);
-
- /* Find a candidate among extant architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the OS ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- 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;
/* Allocate space for the new architecture. */
tdep = XMALLOC (struct gdbarch_tdep);
@@ -1524,8 +1510,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
ready to unwind the PC first (see frame.c:get_prev_frame()). */
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
- tdep->osabi = osabi;
-
/* The i386 default settings don't include the SSE registers.
FIXME: kettenis/20020614: They do include the FPU registers for
now, which probably is not quite right. */
@@ -1634,7 +1618,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation (gdbarch,
i386_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
@@ -1652,7 +1635,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 627cb0a974e..25bf6b38ab6 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -1,5 +1,5 @@
/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2001, 2002
+ Copyright 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,8 +22,6 @@
#ifndef I386_TDEP_H
#define I386_TDEP_H
-#include "osabi.h"
-
/* GDB's i386 target supports both the 32-bit Intel Architecture
(IA-32) and the 64-bit AMD x86-64 architecture. Internally it uses
a similar register layout for both.
@@ -53,9 +51,6 @@ enum struct_return
/* i386 architecture specific information. */
struct gdbarch_tdep
{
- /* ABI. */
- enum gdb_osabi osabi;
-
/* Number of SSE registers. */
int num_xmm_regs;
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index 77a4eecd906..af30df11e26 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for i386 BSD's.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,6 +23,7 @@
#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
+#include "osabi.h"
#include "gdb_string.h"
diff --git a/gdb/i386gnu-tdep.c b/gdb/i386gnu-tdep.c
index 143ddc02420..297d566abcb 100644
--- a/gdb/i386gnu-tdep.c
+++ b/gdb/i386gnu-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for the GNU Hurd.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "osabi.h"
#include "i386-tdep.h"
diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c
index 22bab3a76e9..d0775b76437 100644
--- a/gdb/i386ly-tdep.c
+++ b/gdb/i386ly-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Intel 386 running LynxOS.
- Copyright 1993, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1996, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,6 +23,7 @@
#include "inferior.h"
#include "regcache.h"
#include "target.h"
+#include "osabi.h"
#include "i386-tdep.h"
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 69283f8e5f8..64b3dc0984e 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for NetBSD/i386, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
+ Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,6 +24,7 @@
#include "gdbcore.h"
#include "regcache.h"
#include "arch-utils.h"
+#include "osabi.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index 8bbce84fb29..be0c674493b 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for OpenBSD/i386.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
+ Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,6 +23,7 @@
#include "arch-utils.h"
#include "gdbcore.h"
#include "regcache.h"
+#include "osabi.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index a6dc505a9e1..678eabc346d 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -120,11 +120,11 @@ static int debug_control_mirror;
/* Record which address associates with which register. */
static CORE_ADDR address_lookup[DR_LASTADDR - DR_FIRSTADDR + 1];
-static int
-i386_insert_aligned_watchpoint (int, CORE_ADDR, CORE_ADDR, int, int);
+static int i386_insert_aligned_watchpoint (int, CORE_ADDR, CORE_ADDR, int,
+ int);
-static int
-i386_insert_nonaligned_watchpoint (int, CORE_ADDR, CORE_ADDR, int, int);
+static int i386_insert_nonaligned_watchpoint (int, CORE_ADDR, CORE_ADDR, int,
+ int);
/* Insert a watchpoint. */
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 492da0727ae..7d4cc43072a 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -1,7 +1,8 @@
/* Functions specific to running gdb native on IA-64 running
GNU/Linux.
- 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.
@@ -29,7 +30,7 @@
#include <signal.h>
#include <sys/ptrace.h>
-#include <sys/wait.h>
+#include "gdb_wait.h"
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index fab210aa860..b37da525580 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the IA-64 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.
@@ -335,7 +335,7 @@ read_sigcontext_register (struct frame_info *frame, int regnum)
internal_error (__FILE__, __LINE__,
"read_sigcontext_register: SIGCONTEXT_REGISTER_ADDRESS is 0");
- regaddr = SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regnum);
+ regaddr = SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regnum);
if (regaddr)
return read_memory_integer (regaddr, REGISTER_RAW_SIZE (regnum));
else
@@ -705,15 +705,18 @@ ia64_frame_chain (struct frame_info *frame)
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
return read_sigcontext_register (frame, sp_regnum);
- else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return frame->frame;
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
+ return get_frame_base (frame);
else
{
FRAME_INIT_SAVED_REGS (frame);
- if (frame->saved_regs[IA64_VFP_REGNUM])
- return read_memory_integer (frame->saved_regs[IA64_VFP_REGNUM], 8);
+ if (get_frame_saved_regs (frame)[IA64_VFP_REGNUM])
+ return read_memory_integer (get_frame_saved_regs (frame)[IA64_VFP_REGNUM], 8);
else
- return frame->frame + frame->extra_info->mem_stack_frame_size;
+ return (get_frame_base (frame)
+ + get_frame_extra_info (frame)->mem_stack_frame_size);
}
}
@@ -722,16 +725,20 @@ ia64_frame_saved_pc (struct frame_info *frame)
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
return read_sigcontext_register (frame, pc_regnum);
- else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return deprecated_read_register_dummy (frame->pc, frame->frame, pc_regnum);
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
+ return deprecated_read_register_dummy (get_frame_pc (frame),
+ get_frame_base (frame), pc_regnum);
else
{
FRAME_INIT_SAVED_REGS (frame);
- if (frame->saved_regs[IA64_VRAP_REGNUM])
- return read_memory_integer (frame->saved_regs[IA64_VRAP_REGNUM], 8);
- else if (frame->next && (get_frame_type (frame->next) == SIGTRAMP_FRAME))
- return read_sigcontext_register (frame->next, IA64_BR0_REGNUM);
+ if (get_frame_saved_regs (frame)[IA64_VRAP_REGNUM])
+ return read_memory_integer (get_frame_saved_regs (frame)[IA64_VRAP_REGNUM], 8);
+ else if (get_next_frame (frame)
+ && (get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME))
+ return read_sigcontext_register (get_next_frame (frame), IA64_BR0_REGNUM);
else /* either frameless, or not far enough along in the prologue... */
return ia64_saved_pc_after_call (frame);
}
@@ -832,7 +839,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
memset (instores, 0, sizeof instores);
memset (infpstores, 0, sizeof infpstores);
- if (frame && !frame->saved_regs)
+ if (frame && !get_frame_saved_regs (frame))
{
frame_saved_regs_zalloc (frame);
do_fsr_stuff = 1;
@@ -840,9 +847,9 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
if (frame
&& !do_fsr_stuff
- && frame->extra_info->after_prologue != 0
- && frame->extra_info->after_prologue <= lim_pc)
- return frame->extra_info->after_prologue;
+ && get_frame_extra_info (frame)->after_prologue != 0
+ && get_frame_extra_info (frame)->after_prologue <= lim_pc)
+ return get_frame_extra_info (frame)->after_prologue;
lim_pc = refine_prologue_limit (pc, lim_pc, &trust_limit);
@@ -937,7 +944,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
/* Hmm... whether or not this will work will depend on
where the pc is. If it's still early in the prologue
this'll be wrong. FIXME */
- spill_addr = (frame ? frame->frame : 0)
+ spill_addr = (frame ? get_frame_base (frame) : 0)
+ (rM == 12 ? 0 : mem_stack_frame_size)
+ imm;
spill_reg = rN;
@@ -960,7 +967,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
&& ((2 <= fM && fM <= 5) || (16 <= fM && fM <= 31)))
{
if (do_fsr_stuff)
- frame->saved_regs[IA64_FR0_REGNUM + fM] = spill_addr;
+ get_frame_saved_regs (frame)[IA64_FR0_REGNUM + fM] = spill_addr;
if ((instr & 0x1efc0000000) == 0x0eec0000000)
spill_addr += imm;
@@ -1019,14 +1026,14 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
{
/* Track UNAT register */
if (do_fsr_stuff)
- frame->saved_regs[IA64_UNAT_REGNUM] = spill_addr;
+ get_frame_saved_regs (frame)[IA64_UNAT_REGNUM] = spill_addr;
unat_save_reg = 0;
}
else
{
/* Track PR register */
if (do_fsr_stuff)
- frame->saved_regs[IA64_PR_REGNUM] = spill_addr;
+ get_frame_saved_regs (frame)[IA64_PR_REGNUM] = spill_addr;
pr_save_reg = 0;
}
if ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)
@@ -1095,7 +1102,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
regs. Record the spill address and advance the spill
register if appropriate. */
if (do_fsr_stuff)
- frame->saved_regs[IA64_GR0_REGNUM + rM] = spill_addr;
+ get_frame_saved_regs (frame)[IA64_GR0_REGNUM + rM] = spill_addr;
if ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)
/* st8.spill [rN] = rM, imm9 */
spill_addr += imm9(instr);
@@ -1116,11 +1123,11 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
/* Extract the size of the rotating portion of the stack
frame and the register rename base from the current
frame marker. */
- sor = ((frame->extra_info->cfm >> 14) & 0xf) * 8;
- rrb_gr = (frame->extra_info->cfm >> 18) & 0x7f;
+ sor = ((get_frame_extra_info (frame)->cfm >> 14) & 0xf) * 8;
+ rrb_gr = (get_frame_extra_info (frame)->cfm >> 18) & 0x7f;
- for (i = 0, addr = frame->extra_info->bsp;
- i < frame->extra_info->sof;
+ for (i = 0, addr = get_frame_extra_info (frame)->bsp;
+ i < get_frame_extra_info (frame)->sof;
i++, addr += 8)
{
if (IS_NaT_COLLECTION_ADDR (addr))
@@ -1128,25 +1135,26 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame)
addr += 8;
}
if (i < sor)
- frame->saved_regs[IA64_GR32_REGNUM + ((i + (sor - rrb_gr)) % sor)]
+ get_frame_saved_regs (frame)[IA64_GR32_REGNUM + ((i + (sor - rrb_gr)) % sor)]
= addr;
else
- frame->saved_regs[IA64_GR32_REGNUM + i] = addr;
+ get_frame_saved_regs (frame)[IA64_GR32_REGNUM + i] = addr;
if (i+32 == cfm_reg)
- frame->saved_regs[IA64_CFM_REGNUM] = addr;
+ get_frame_saved_regs (frame)[IA64_CFM_REGNUM] = addr;
if (i+32 == ret_reg)
- frame->saved_regs[IA64_VRAP_REGNUM] = addr;
+ get_frame_saved_regs (frame)[IA64_VRAP_REGNUM] = addr;
if (i+32 == fp_reg)
- frame->saved_regs[IA64_VFP_REGNUM] = addr;
+ get_frame_saved_regs (frame)[IA64_VFP_REGNUM] = addr;
}
}
- if (frame && frame->extra_info) {
- frame->extra_info->after_prologue = last_prologue_pc;
- frame->extra_info->mem_stack_frame_size = mem_stack_frame_size;
- frame->extra_info->fp_reg = fp_reg;
- }
+ if (frame && get_frame_extra_info (frame))
+ {
+ get_frame_extra_info (frame)->after_prologue = last_prologue_pc;
+ get_frame_extra_info (frame)->mem_stack_frame_size = mem_stack_frame_size;
+ get_frame_extra_info (frame)->fp_reg = fp_reg;
+ }
return last_prologue_pc;
}
@@ -1160,7 +1168,7 @@ ia64_skip_prologue (CORE_ADDR pc)
void
ia64_frame_init_saved_regs (struct frame_info *frame)
{
- if (frame->saved_regs)
+ if (get_frame_saved_regs (frame))
return;
if ((get_frame_type (frame) == SIGTRAMP_FRAME) && SIGCONTEXT_REGISTER_ADDRESS)
@@ -1169,45 +1177,45 @@ ia64_frame_init_saved_regs (struct frame_info *frame)
frame_saved_regs_zalloc (frame);
- frame->saved_regs[IA64_VRAP_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_IP_REGNUM);
- frame->saved_regs[IA64_CFM_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_CFM_REGNUM);
- frame->saved_regs[IA64_PSR_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_PSR_REGNUM);
+ get_frame_saved_regs (frame)[IA64_VRAP_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_IP_REGNUM);
+ get_frame_saved_regs (frame)[IA64_CFM_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_CFM_REGNUM);
+ get_frame_saved_regs (frame)[IA64_PSR_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_PSR_REGNUM);
#if 0
- frame->saved_regs[IA64_BSP_REGNUM] =
+ get_frame_saved_regs (frame)[IA64_BSP_REGNUM] =
SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_BSP_REGNUM);
#endif
- frame->saved_regs[IA64_RNAT_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_RNAT_REGNUM);
- frame->saved_regs[IA64_CCV_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_CCV_REGNUM);
- frame->saved_regs[IA64_UNAT_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_UNAT_REGNUM);
- frame->saved_regs[IA64_FPSR_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_FPSR_REGNUM);
- frame->saved_regs[IA64_PFS_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_PFS_REGNUM);
- frame->saved_regs[IA64_LC_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_LC_REGNUM);
+ get_frame_saved_regs (frame)[IA64_RNAT_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_RNAT_REGNUM);
+ get_frame_saved_regs (frame)[IA64_CCV_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_CCV_REGNUM);
+ get_frame_saved_regs (frame)[IA64_UNAT_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_UNAT_REGNUM);
+ get_frame_saved_regs (frame)[IA64_FPSR_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_FPSR_REGNUM);
+ get_frame_saved_regs (frame)[IA64_PFS_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_PFS_REGNUM);
+ get_frame_saved_regs (frame)[IA64_LC_REGNUM] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_LC_REGNUM);
for (regno = IA64_GR1_REGNUM; regno <= IA64_GR31_REGNUM; regno++)
if (regno != sp_regnum)
- frame->saved_regs[regno] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regno);
+ get_frame_saved_regs (frame)[regno] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regno);
for (regno = IA64_BR0_REGNUM; regno <= IA64_BR7_REGNUM; regno++)
- frame->saved_regs[regno] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regno);
+ get_frame_saved_regs (frame)[regno] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regno);
for (regno = IA64_FR2_REGNUM; regno <= IA64_BR7_REGNUM; regno++)
- frame->saved_regs[regno] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regno);
+ get_frame_saved_regs (frame)[regno] =
+ SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regno);
}
else
{
CORE_ADDR func_start;
- func_start = get_pc_function_start (frame->pc);
- examine_prologue (func_start, frame->pc, frame);
+ func_start = get_pc_function_start (get_frame_pc (frame));
+ examine_prologue (func_start, get_frame_pc (frame), frame);
}
}
@@ -1233,17 +1241,20 @@ ia64_get_saved_register (char *raw_buffer,
if (lval != NULL)
*lval = not_lval;
- is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame);
+ is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame));
- if (regnum == SP_REGNUM && frame->next)
+ if (regnum == SP_REGNUM && get_next_frame (frame))
{
/* Handle SP values for all frames but the topmost. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), frame->frame);
+ store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
+ get_frame_base (frame));
}
else if (regnum == IA64_BSP_REGNUM)
{
store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- frame->extra_info->bsp);
+ get_frame_extra_info (frame)->bsp);
}
else if (regnum == IA64_VFP_REGNUM)
{
@@ -1251,7 +1262,8 @@ ia64_get_saved_register (char *raw_buffer,
for the frame pointer, it'll be found by ia64_find_saved_register()
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 = frame->frame + frame->extra_info->mem_stack_frame_size;
+ CORE_ADDR vfp = (get_frame_base (frame)
+ + get_frame_extra_info (frame)->mem_stack_frame_size);
store_address (raw_buffer, REGISTER_RAW_SIZE (IA64_VFP_REGNUM), vfp);
}
else if (IA64_PR0_REGNUM <= regnum && regnum <= IA64_PR63_REGNUM)
@@ -1267,7 +1279,7 @@ ia64_get_saved_register (char *raw_buffer,
{
/* Fetch predicate register rename base from current frame
marker for this frame. */
- int rrb_pr = (frame->extra_info->cfm >> 32) & 0x3f;
+ int rrb_pr = (get_frame_extra_info (frame)->cfm >> 32) & 0x3f;
/* Adjust the register number to account for register rotation. */
regnum = IA64_PR16_REGNUM
@@ -1301,8 +1313,8 @@ ia64_get_saved_register (char *raw_buffer,
if (!is_dummy_frame)
{
FRAME_INIT_SAVED_REGS (frame);
- gr_addr = frame->saved_regs[ regnum - IA64_NAT0_REGNUM
- + IA64_GR0_REGNUM];
+ gr_addr = get_frame_saved_regs (frame)[ regnum - IA64_NAT0_REGNUM
+ + IA64_GR0_REGNUM];
}
if (gr_addr)
{
@@ -1326,10 +1338,10 @@ ia64_get_saved_register (char *raw_buffer,
else if (regnum == IA64_IP_REGNUM)
{
CORE_ADDR pc;
- if (frame->next)
+ if (get_next_frame (frame))
{
/* FIXME: Set *addrp, *lval when possible. */
- pc = ia64_frame_saved_pc (frame->next);
+ pc = ia64_frame_saved_pc (get_next_frame (frame));
}
else
{
@@ -1343,7 +1355,7 @@ ia64_get_saved_register (char *raw_buffer,
if (!is_dummy_frame)
{
FRAME_INIT_SAVED_REGS (frame);
- addr = frame->saved_regs[regnum];
+ addr = get_frame_saved_regs (frame)[regnum];
}
if (addr != 0)
@@ -1367,7 +1379,7 @@ ia64_get_saved_register (char *raw_buffer,
{
/* Fetch floating point register rename base from current
frame marker for this frame. */
- int rrb_fr = (frame->extra_info->cfm >> 25) & 0x7f;
+ int rrb_fr = (get_frame_extra_info (frame)->cfm >> 25) & 0x7f;
/* Adjust the floating point register number to account for
register rotation. */
@@ -1451,7 +1463,7 @@ int
ia64_frameless_function_invocation (struct frame_info *frame)
{
FRAME_INIT_SAVED_REGS (frame);
- return (frame->extra_info->mem_stack_frame_size == 0);
+ return (get_frame_extra_info (frame)->mem_stack_frame_size == 0);
}
CORE_ADDR
@@ -1480,66 +1492,70 @@ void
ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
CORE_ADDR bsp, cfm;
- int next_frame_is_call_dummy = ((frame->next != NULL)
- && DEPRECATED_PC_IN_CALL_DUMMY (frame->next->pc, frame->next->frame,
- frame->next->frame));
+ int next_frame_is_call_dummy = ((get_next_frame (frame) != NULL)
+ && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (frame)),
+ get_frame_base (get_next_frame (frame)),
+ get_frame_base (get_next_frame (frame))));
- frame->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
- if (frame->next == 0)
+ if (get_next_frame (frame) == 0)
{
bsp = read_register (IA64_BSP_REGNUM);
cfm = read_register (IA64_CFM_REGNUM);
}
- else if ((get_frame_type (frame->next) == SIGTRAMP_FRAME))
+ else if ((get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME))
{
- bsp = read_sigcontext_register (frame->next, IA64_BSP_REGNUM);
- cfm = read_sigcontext_register (frame->next, IA64_CFM_REGNUM);
+ bsp = read_sigcontext_register (get_next_frame (frame), IA64_BSP_REGNUM);
+ cfm = read_sigcontext_register (get_next_frame (frame), IA64_CFM_REGNUM);
}
else if (next_frame_is_call_dummy)
{
- bsp = deprecated_read_register_dummy (frame->next->pc,
- frame->next->frame,
+ bsp = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frame)),
+ get_frame_base (get_next_frame (frame)),
IA64_BSP_REGNUM);
- cfm = deprecated_read_register_dummy (frame->next->pc,
- frame->next->frame,
+ cfm = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frame)),
+ get_frame_base (get_next_frame (frame)),
IA64_CFM_REGNUM);
}
else
{
- struct frame_info *frn = frame->next;
+ struct frame_info *frn = get_next_frame (frame);
FRAME_INIT_SAVED_REGS (frn);
- if (frn->saved_regs[IA64_CFM_REGNUM] != 0)
- cfm = read_memory_integer (frn->saved_regs[IA64_CFM_REGNUM], 8);
- else if (frn->next && (get_frame_type (frn->next) == SIGTRAMP_FRAME))
- cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM);
- else if (frn->next
- && DEPRECATED_PC_IN_CALL_DUMMY (frn->next->pc, frn->next->frame,
- frn->next->frame))
- cfm = deprecated_read_register_dummy (frn->next->pc, frn->next->frame,
+ if (get_frame_saved_regs (frn)[IA64_CFM_REGNUM] != 0)
+ cfm = read_memory_integer (get_frame_saved_regs (frn)[IA64_CFM_REGNUM], 8);
+ else if (get_next_frame (frn) && (get_frame_type (get_next_frame (frn)) == SIGTRAMP_FRAME))
+ cfm = read_sigcontext_register (get_next_frame (frn), IA64_PFS_REGNUM);
+ else if (get_next_frame (frn)
+ && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (frn)),
+ get_frame_base (get_next_frame (frn)),
+ get_frame_base (get_next_frame (frn))))
+ cfm = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frn)),
+ get_frame_base (get_next_frame (frn)),
IA64_PFS_REGNUM);
else
cfm = read_register (IA64_PFS_REGNUM);
- bsp = frn->extra_info->bsp;
+ bsp = get_frame_extra_info (frn)->bsp;
}
- frame->extra_info->cfm = cfm;
- frame->extra_info->sof = cfm & 0x7f;
- frame->extra_info->sol = (cfm >> 7) & 0x7f;
- if (frame->next == 0
- || (get_frame_type (frame->next) == SIGTRAMP_FRAME)
+ get_frame_extra_info (frame)->cfm = cfm;
+ get_frame_extra_info (frame)->sof = cfm & 0x7f;
+ get_frame_extra_info (frame)->sol = (cfm >> 7) & 0x7f;
+ if (get_next_frame (frame) == 0
+ || (get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME)
|| next_frame_is_call_dummy)
- frame->extra_info->bsp = rse_address_add (bsp, -frame->extra_info->sof);
+ get_frame_extra_info (frame)->bsp =
+ rse_address_add (bsp, -get_frame_extra_info (frame)->sof);
else
- frame->extra_info->bsp = rse_address_add (bsp, -frame->extra_info->sol);
+ get_frame_extra_info (frame)->bsp =
+ rse_address_add (bsp, -get_frame_extra_info (frame)->sol);
- frame->extra_info->after_prologue = 0;
- frame->extra_info->mem_stack_frame_size = -1; /* Not yet determined */
- frame->extra_info->fp_reg = 0;
+ get_frame_extra_info (frame)->after_prologue = 0;
+ get_frame_extra_info (frame)->mem_stack_frame_size = -1; /* Not yet determined */
+ get_frame_extra_info (frame)->fp_reg = 0;
}
static int
@@ -1978,7 +1994,7 @@ ia64_pop_frame_regular (struct frame_info *frame)
for (regno = 0; regno < ia64_num_regs; regno++)
{
- if (frame->saved_regs[regno]
+ if (get_frame_saved_regs (frame)[regno]
&& (!(IA64_GR32_REGNUM <= regno && regno <= IA64_GR127_REGNUM))
&& regno != pc_regnum
&& regno != sp_regnum
@@ -1988,7 +2004,7 @@ ia64_pop_frame_regular (struct frame_info *frame)
&& regno != IA64_BSPSTORE_REGNUM)
{
write_register (regno,
- read_memory_integer (frame->saved_regs[regno],
+ read_memory_integer (get_frame_saved_regs (frame)[regno],
REGISTER_RAW_SIZE (regno)));
}
}
@@ -1998,9 +2014,9 @@ ia64_pop_frame_regular (struct frame_info *frame)
cfm = read_register (IA64_CFM_REGNUM);
- if (frame->saved_regs[IA64_PFS_REGNUM])
+ if (get_frame_saved_regs (frame)[IA64_PFS_REGNUM])
{
- pfs = read_memory_integer (frame->saved_regs[IA64_PFS_REGNUM],
+ pfs = read_memory_integer (get_frame_saved_regs (frame)[IA64_PFS_REGNUM],
REGISTER_RAW_SIZE (IA64_PFS_REGNUM));
}
else
@@ -2014,7 +2030,7 @@ ia64_pop_frame_regular (struct frame_info *frame)
wants bsp to be set at the end of all used registers. It's
likely that this code will need to be revised to accomodate
other operating systems. */
- bsp = rse_address_add (frame->extra_info->bsp,
+ bsp = rse_address_add (get_frame_extra_info (frame)->bsp,
(pfs & 0x7f) - ((pfs >> 7) & 0x7f));
write_register (IA64_BSP_REGNUM, bsp);
@@ -2183,7 +2199,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, ia64_saved_pc_after_call);
set_gdbarch_frame_chain (gdbarch, ia64_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, ia64_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 6775beb6f2d..baba6f38cac 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -115,7 +115,7 @@ void _initialize_infcmd (void);
#define GO_USAGE "Usage: go <location>\n"
-static void breakpoint_auto_delete_contents (PTR);
+static void breakpoint_auto_delete_contents (void *);
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error ("The program is not being run.");
@@ -954,7 +954,7 @@ signal_command (char *signum_exp, int from_tty)
pointed to by arg (which is really a bpstat *). */
static void
-breakpoint_auto_delete_contents (PTR arg)
+breakpoint_auto_delete_contents (void *arg)
{
breakpoint_auto_delete (*(bpstat *) arg);
}
@@ -1141,10 +1141,41 @@ until_command (char *arg, int from_tty)
}
if (arg)
- until_break_command (arg, from_tty);
+ until_break_command (arg, from_tty, 0);
else
until_next_command (from_tty);
}
+
+static void
+advance_command (char *arg, int from_tty)
+{
+ int async_exec = 0;
+
+ if (!target_has_execution)
+ error ("The program is not running.");
+
+ if (arg == NULL)
+ error_no_arg ("a location");
+
+ /* Find out whether we must run in the background. */
+ if (arg != NULL)
+ async_exec = strip_bg_char (&arg);
+
+ /* If we must run in the background, but the target can't do it,
+ error out. */
+ if (event_loop_p && async_exec && !target_can_async_p ())
+ error ("Asynchronous execution not supported on this target.");
+
+ /* If we are not asked to run in the bg, then prepare to run in the
+ foreground, synchronously. */
+ if (event_loop_p && !async_exec && target_can_async_p ())
+ {
+ /* Simulate synchronous execution. */
+ async_disable_stdin ();
+ }
+
+ until_break_command (arg, from_tty, 1);
+}
/* Print the result of a function at the end of a 'finish' command. */
@@ -1978,12 +2009,6 @@ print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
gdbarch_print_float_info (gdbarch, file, frame, args);
else
{
-#ifdef FLOAT_INFO
-#if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
-#error "FLOAT_INFO defined in multi-arch"
-#endif
- FLOAT_INFO;
-#else
int regnum;
int printed_something = 0;
@@ -1998,7 +2023,6 @@ print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
if (!printed_something)
fprintf_filtered (file, "\
No floating-point info available for this processor.\n");
-#endif
}
}
@@ -2131,11 +2155,15 @@ Argument N means do this N times (or till program stops for another reason).");
c = add_com ("until", class_run, until_command,
"Execute until the program reaches a source line greater than the current\n\
-or a specified line or address or function (same args as break command).\n\
-Execution will also stop upon exit from the current stack frame.");
+or a specified location (same args as break command) within the current frame.");
set_cmd_completer (c, location_completer);
add_com_alias ("u", "until", class_run, 1);
+ c = add_com ("advance", class_run, advance_command,
+ "Continue the program up to the given location (same form as args for break command).\n\
+Execution will also stop upon exit from the current stack frame.");
+ set_cmd_completer (c, location_completer);
+
c = add_com ("jump", class_run, jump_command,
"Continue program being debugged at specified line or address.\n\
Give as argument either LINENUM or *ADDR, where ADDR is an expression\n\
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 09cd7ff4c9d..4616a1f3da7 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -1,7 +1,8 @@
/* Variables that describe the inferior process running under GDB:
Where it is, why it stopped, and how to step it.
- Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+ 1996, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -185,11 +186,12 @@ extern CORE_ADDR read_fp (void);
extern CORE_ADDR generic_target_read_fp (void);
-extern CORE_ADDR unsigned_pointer_to_address (struct type *type, void *buf);
+extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf);
extern void unsigned_address_to_pointer (struct type *type, void *buf,
CORE_ADDR addr);
-extern CORE_ADDR signed_pointer_to_address (struct type *type, void *buf);
+extern CORE_ADDR signed_pointer_to_address (struct type *type,
+ const void *buf);
extern void address_to_signed_pointer (struct type *type, void *buf,
CORE_ADDR addr);
@@ -416,8 +418,6 @@ extern int attach_flag;
/* Possible values for CALL_DUMMY_LOCATION. */
#define ON_STACK 1
-#define BEFORE_TEXT_END 2
-#define AFTER_TEXT_END 3
#define AT_ENTRY_POINT 4
#if !defined (CALL_DUMMY_ADDRESS)
@@ -480,24 +480,6 @@ extern int attach_flag;
version should be able to handle all cases since that code works by
saving the address of the dummy's breakpoint (where ever it is). */
-extern int deprecated_pc_in_call_dummy_before_text_end (CORE_ADDR pc,
- CORE_ADDR sp,
- CORE_ADDR frame_address);
-
-/* NOTE: cagney/2002-11-24: Targets need to both switch to generic
- dummy frames, and use generic_pc_in_call_dummy(). The generic
- version should be able to handle all cases since that code works by
- saving the address of the dummy's breakpoint (where ever it is). */
-
-extern int deprecated_pc_in_call_dummy_after_text_end (CORE_ADDR pc,
- CORE_ADDR sp,
- CORE_ADDR frame_address);
-
-/* NOTE: cagney/2002-11-24: Targets need to both switch to generic
- dummy frames, and use generic_pc_in_call_dummy(). The generic
- version should be able to handle all cases since that code works by
- saving the address of the dummy's breakpoint (where ever it is). */
-
extern int deprecated_pc_in_call_dummy_on_stack (CORE_ADDR pc,
CORE_ADDR sp,
CORE_ADDR frame_address);
diff --git a/gdb/inflow.c b/gdb/inflow.c
index c8df106fe9a..2a41f57982f 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -35,22 +35,7 @@
#include <sys/select.h>
#endif
-#ifdef HAVE_TERMIOS
-#define PROCESS_GROUP_TYPE pid_t
-#endif
-
-#ifdef HAVE_TERMIO
-#define PROCESS_GROUP_TYPE int
-#endif
-
-#ifdef HAVE_SGTTY
-#ifdef SHORT_PGRP
-/* This is only used for the ultra. Does it have pid_t? */
-#define PROCESS_GROUP_TYPE short
-#else
-#define PROCESS_GROUP_TYPE int
-#endif
-#endif /* sgtty */
+#include "inflow.h"
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
diff --git a/gdb/inflow.h b/gdb/inflow.h
new file mode 100644
index 00000000000..1cbfa71b484
--- /dev/null
+++ b/gdb/inflow.h
@@ -0,0 +1,51 @@
+/* Low level interface to ptrace, for GDB when running under Unix.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef INFLOW_H
+#define INFLOW_H
+
+#include "terminal.h" /* For HAVE_TERMIOS et.al. */
+
+#ifdef HAVE_TERMIOS
+#define PROCESS_GROUP_TYPE pid_t
+#endif
+
+#ifdef HAVE_TERMIO
+#define PROCESS_GROUP_TYPE int
+#endif
+
+#ifdef HAVE_SGTTY
+#ifdef SHORT_PGRP
+/* This is only used for the ultra. Does it have pid_t? */
+#define PROCESS_GROUP_TYPE short
+#else
+#define PROCESS_GROUP_TYPE int
+#endif
+#endif /* sgtty */
+
+#ifdef PROCESS_GROUP_TYPE
+/* Process group for us and the inferior. Saved and restored just like
+ {our,inferior}_ttystate. */
+extern PROCESS_GROUP_TYPE our_process_group;
+extern PROCESS_GROUP_TYPE inferior_process_group;
+#endif
+
+#endif
diff --git a/gdb/infrun.c b/gdb/infrun.c
index aa404cfcd14..f8644420e14 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2,7 +2,7 @@
process.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -66,7 +66,7 @@ static int restore_selected_frame (void *);
static void build_infrun (void);
-static int follow_fork ();
+static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
@@ -377,7 +377,7 @@ static const char *follow_fork_mode_string = follow_fork_mode_parent;
static int
-follow_fork ()
+follow_fork (void)
{
const char *follow_mode = follow_fork_mode_string;
int follow_child = (follow_mode == follow_fork_mode_child);
@@ -1172,7 +1172,7 @@ context_switch (struct execution_control_state *ecs)
void
handle_inferior_event (struct execution_control_state *ecs)
{
- CORE_ADDR tmp;
+ CORE_ADDR real_stop_pc;
int stepped_after_stopped_by_watchpoint;
int sw_single_step_trap_p = 0;
@@ -2407,19 +2407,19 @@ process_event_stop_test:
function. That's what tells us (a) whether we want to step
into it at all, and (b) what prologue we want to run to
the end of, if we do step into it. */
- tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
- if (tmp != 0)
- ecs->stop_func_start = tmp;
+ real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+ if (real_stop_pc != 0)
+ ecs->stop_func_start = real_stop_pc;
else
{
- tmp = DYNAMIC_TRAMPOLINE_NEXTPC (stop_pc);
- if (tmp)
+ real_stop_pc = DYNAMIC_TRAMPOLINE_NEXTPC (stop_pc);
+ if (real_stop_pc)
{
struct symtab_and_line xxx;
/* Why isn't this s_a_l called "sr_sal", like all of the
other s_a_l's where this code is duplicated? */
init_sal (&xxx); /* initialize to zeroes */
- xxx.pc = tmp;
+ xxx.pc = real_stop_pc;
xxx.section = find_pc_overlay (xxx.pc);
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
@@ -2482,19 +2482,17 @@ process_event_stop_test:
we want to proceed through the trampoline when stepping. */
if (IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
{
- CORE_ADDR tmp;
-
/* Determine where this trampoline returns. */
- tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
+ real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
/* Only proceed through if we know where it's going. */
- if (tmp)
+ if (real_stop_pc)
{
/* And put the step-breakpoint there and go until there. */
struct symtab_and_line sr_sal;
init_sal (&sr_sal); /* initialize to zeroes */
- sr_sal.pc = tmp;
+ sr_sal.pc = real_stop_pc;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* Do not specify what the fp should be when we stop
since on some machines the prologue
@@ -3093,7 +3091,7 @@ normal_stop (void)
LOCATION: Print only location
SRC_AND_LOC: Print location and source line */
if (do_frame_printing)
- show_and_print_stack_frame (deprecated_selected_frame, -1, source_flag);
+ print_stack_frame (deprecated_selected_frame, -1, source_flag);
/* Display the auto-display expressions. */
do_displays ();
@@ -3109,10 +3107,10 @@ normal_stop (void)
if (stop_stack_dummy)
{
- /* Pop the empty frame that contains the stack dummy.
- POP_FRAME ends with a setting of the current frame, so we
- can use that next. */
- POP_FRAME;
+ /* Pop the empty frame that contains the stack dummy. POP_FRAME
+ ends with a setting of the current frame, so we can use that
+ next. */
+ frame_pop (get_current_frame ());
/* Set stop_pc to what it was before we called the function.
Can't rely on restore_inferior_status because that only gets
called if we don't stop in the called function. */
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 471eb3cc7b5..7786579d406 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -1,7 +1,8 @@
/* Target-vector operations for controlling Unix child processes, for GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+ 2000, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
## Contains temporary hacks..
@@ -35,6 +36,7 @@
#include <fcntl.h>
#include "gdb_wait.h"
+#include "inflow.h"
extern struct symtab_and_line *child_enable_exception_callback (enum
exception_event_kind,
@@ -511,8 +513,6 @@ child_can_run (void)
static void
child_stop (void)
{
- extern pid_t inferior_process_group;
-
kill (-inferior_process_group, SIGINT);
}
@@ -649,7 +649,8 @@ _initialize_inftarg (void)
#define PROC_NAME_FMT "/proc/%05d"
#endif
sprintf (procname, PROC_NAME_FMT, getpid ());
- if ((fd = open (procname, O_RDONLY)) >= 0)
+ fd = open (procname, O_RDONLY);
+ if (fd >= 0)
{
close (fd);
return;
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index 589a0e237bc..02a55762cd9 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -1,6 +1,6 @@
/* Low level Unix child interface to ttrace, for GDB when running under HP-UX.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001
+ 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -3951,7 +3951,7 @@ threads_continue_all_but_one (lwpid_t gdb_tid, int signal)
* state.tts_flags & TTS_STATEMASK == TTS_WASSUSPENDED
*/
if (debug_on)
- if (state.tts_flags & TTS_STATEMASK != TTS_WASSUSPENDED)
+ if ((state.tts_flags & TTS_STATEMASK) != TTS_WASSUSPENDED)
printf ("About to continue non-stopped thread %d\n", scan_tid);
#endif
@@ -4085,7 +4085,7 @@ threads_continue_all_with_signals (lwpid_t gdb_tid, int signal)
#ifdef THREAD_DEBUG
if (debug_on)
- if (state.tts_flags & TTS_STATEMASK != TTS_WASSUSPENDED)
+ if ((state.tts_flags & TTS_STATEMASK) != TTS_WASSUSPENDED)
warning ("About to continue non-stopped thread %d\n", scan_tid);
#endif
diff --git a/gdb/interps.c b/gdb/interps.c
new file mode 100644
index 00000000000..551f416bb0f
--- /dev/null
+++ b/gdb/interps.c
@@ -0,0 +1,484 @@
+/* Manages interpreters for GDB, the GNU debugger.
+
+ Copyright 2000, 2002, 2003 Free Software Foundation, Inc.
+
+ Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This is just a first cut at separating out the "interpreter"
+ functions of gdb into self-contained modules. There are a couple
+ of open areas that need to be sorted out:
+
+ 1) The interpreter explicitly contains a UI_OUT, and can insert itself
+ into the event loop, but it doesn't explicitly contain hooks for readline.
+ I did this because it seems to me many interpreters won't want to use
+ the readline command interface, and it is probably simpler to just let
+ them take over the input in their resume proc. */
+
+#include "defs.h"
+#include "gdbcmd.h"
+#include "ui-out.h"
+#include "event-loop.h"
+#include "event-top.h"
+#include "interps.h"
+#include "completer.h"
+#include "gdb_string.h"
+#include "gdb-events.h"
+#include "gdb_assert.h"
+#include "top.h" /* For command_loop. */
+
+struct interp
+{
+ /* This is the name in "-i=" and set interpreter. */
+ const char *name;
+
+ /* Interpreters are stored in a linked list, this is the next
+ one... */
+ struct interp *next;
+
+ /* This is a cookie that an instance of the interpreter can use.
+ This is a bit confused right now as the exact initialization
+ sequence for it, and how it relates to the interpreter's uiout
+ object is a bit confused. */
+ void *data;
+
+ /* Has the init_proc been run? */
+ int inited;
+
+ /* This is the ui_out used to collect results for this interpreter.
+ It can be a formatter for stdout, as is the case for the console
+ & mi outputs, or it might be a result formatter. */
+ struct ui_out *interpreter_out;
+
+ const struct interp_procs *procs;
+ int quiet_p;
+};
+
+/* Functions local to this file. */
+static void initialize_interps (void);
+static char **interpreter_completer (char *text, char *word);
+
+/* The magic initialization routine for this module. */
+
+void _initialize_interpreter (void);
+
+/* Variables local to this file: */
+
+static struct interp *interp_list = NULL;
+static struct interp *current_interpreter = NULL;
+
+static int interpreter_initialized = 0;
+
+/* interp_new - This allocates space for a new interpreter,
+ fills the fields from the inputs, and returns a pointer to the
+ interpreter. */
+struct interp *
+interp_new (const char *name, void *data, struct ui_out *uiout,
+ const struct interp_procs *procs)
+{
+ struct interp *new_interp;
+
+ new_interp = XMALLOC (struct interp);
+
+ new_interp->name = xstrdup (name);
+ new_interp->data = data;
+ new_interp->interpreter_out = uiout;
+ new_interp->quiet_p = 0;
+ new_interp->procs = procs;
+ new_interp->inited = 0;
+
+ return new_interp;
+}
+
+/* Add interpreter INTERP to the gdb interpreter list. The
+ interpreter must not have previously been added. */
+void
+interp_add (struct interp *interp)
+{
+ if (!interpreter_initialized)
+ initialize_interps ();
+
+ gdb_assert (interp_lookup (interp->name) == NULL);
+
+ interp->next = interp_list;
+ interp_list = interp;
+}
+
+/* This sets the current interpreter to be INTERP. If INTERP has not
+ been initialized, then this will also run the init proc. If the
+ init proc is successful, return 1, if it fails, set the old
+ interpreter back in place and return 0. If we can't restore the
+ old interpreter, then raise an internal error, since we are in
+ pretty bad shape at this point. */
+int
+interp_set (struct interp *interp)
+{
+ struct interp *old_interp = current_interpreter;
+ int first_time = 0;
+
+
+ char buffer[64];
+
+ if (current_interpreter != NULL)
+ {
+ do_all_continuations ();
+ ui_out_flush (uiout);
+ if (current_interpreter->procs->suspend_proc
+ && !current_interpreter->procs->suspend_proc (current_interpreter->
+ data))
+ {
+ error ("Could not suspend interpreter \"%s\"\n",
+ current_interpreter->name);
+ }
+ }
+ else
+ {
+ first_time = 1;
+ }
+
+ current_interpreter = interp;
+
+ /* We use interpreter_p for the "set interpreter" variable, so we need
+ to make sure we have a malloc'ed copy for the set command to free. */
+ if (interpreter_p != NULL
+ && strcmp (current_interpreter->name, interpreter_p) != 0)
+ {
+ xfree (interpreter_p);
+
+ interpreter_p = xstrdup (current_interpreter->name);
+ }
+
+ uiout = interp->interpreter_out;
+
+ /* Run the init proc. If it fails, try to restore the old interp. */
+
+ if (!interp->inited)
+ {
+ if (interp->procs->init_proc != NULL)
+ {
+ interp->data = interp->procs->init_proc ();
+ }
+ interp->inited = 1;
+ }
+
+ /* Clear out any installed interpreter hooks/event handlers. */
+ clear_interpreter_hooks ();
+
+ if (interp->procs->resume_proc != NULL
+ && (!interp->procs->resume_proc (interp->data)))
+ {
+ if (!interp_set (old_interp))
+ internal_error (__FILE__, __LINE__,
+ "Failed to initialize new interp \"%s\" %s",
+ interp->name, "and could not restore old interp!\n");
+ return 0;
+ }
+
+ /* Finally, put up the new prompt to show that we are indeed here.
+ Also, display_gdb_prompt for the console does some readline magic
+ which is needed for the console interpreter, at least... */
+
+ if (!first_time)
+ {
+ if (!interp_quiet_p (interp))
+ {
+ sprintf (buffer, "Switching to interpreter \"%.24s\".\n",
+ interp->name);
+ ui_out_text (uiout, buffer);
+ }
+ display_gdb_prompt (NULL);
+ }
+
+ return 1;
+}
+
+/* interp_lookup - Looks up the interpreter for NAME. If no such
+ interpreter exists, return NULL, otherwise return a pointer to the
+ interpreter. */
+struct interp *
+interp_lookup (const char *name)
+{
+ struct interp *interp;
+
+ if (name == NULL || strlen (name) == 0)
+ return NULL;
+
+ for (interp = interp_list; interp != NULL; interp = interp->next)
+ {
+ if (strcmp (interp->name, name) == 0)
+ return interp;
+ }
+
+ return NULL;
+}
+
+/* Returns the current interpreter. */
+
+struct ui_out *
+interp_ui_out (struct interp *interp)
+{
+ if (interp != NULL)
+ return interp->interpreter_out;
+
+ return current_interpreter->interpreter_out;
+}
+
+/* Returns true if the current interp is the passed in name. */
+int
+current_interp_named_p (const char *interp_name)
+{
+ if (current_interpreter)
+ return (strcmp (current_interpreter->name, interp_name) == 0);
+
+ return 0;
+}
+
+/* This is called in display_gdb_prompt. If the proc returns a zero
+ value, display_gdb_prompt will return without displaying the
+ prompt. */
+int
+current_interp_display_prompt_p (void)
+{
+ if (current_interpreter == NULL
+ || current_interpreter->procs->prompt_proc_p == NULL)
+ return 0;
+ else
+ return current_interpreter->procs->prompt_proc_p (current_interpreter->
+ data);
+}
+
+/* Run the current command interpreter's main loop. */
+void
+current_interp_command_loop (void)
+{
+ /* Somewhat messy. For the moment prop up all the old ways of
+ selecting the command loop. `command_loop_hook' should be
+ deprecated. */
+ if (command_loop_hook != NULL)
+ command_loop_hook ();
+ else if (current_interpreter != NULL
+ && current_interpreter->procs->command_loop_proc != NULL)
+ current_interpreter->procs->command_loop_proc (current_interpreter->data);
+ else
+ command_loop ();
+}
+
+int
+interp_quiet_p (struct interp *interp)
+{
+ if (interp != NULL)
+ return interp->quiet_p;
+ else
+ return current_interpreter->quiet_p;
+}
+
+int
+interp_set_quiet (struct interp *interp, int quiet)
+{
+ int old_val = interp->quiet_p;
+ interp->quiet_p = quiet;
+ return old_val;
+}
+
+/* interp_exec - This executes COMMAND_STR in the current
+ interpreter. */
+int
+interp_exec_p (struct interp *interp)
+{
+ return interp->procs->exec_proc != NULL;
+}
+
+int
+interp_exec (struct interp *interp, const char *command_str)
+{
+ if (interp->procs->exec_proc != NULL)
+ {
+ return interp->procs->exec_proc (interp->data, command_str);
+ }
+ return 0;
+}
+
+/* A convenience routine that nulls out all the
+ common command hooks. Use it when removing your interpreter in its
+ suspend proc. */
+void
+clear_interpreter_hooks ()
+{
+ init_ui_hook = 0;
+ print_frame_info_listing_hook = 0;
+ /*print_frame_more_info_hook = 0; */
+ query_hook = 0;
+ warning_hook = 0;
+ create_breakpoint_hook = 0;
+ delete_breakpoint_hook = 0;
+ modify_breakpoint_hook = 0;
+ interactive_hook = 0;
+ registers_changed_hook = 0;
+ readline_begin_hook = 0;
+ readline_hook = 0;
+ readline_end_hook = 0;
+ register_changed_hook = 0;
+ memory_changed_hook = 0;
+ context_hook = 0;
+ target_wait_hook = 0;
+ call_command_hook = 0;
+ error_hook = 0;
+ error_begin_hook = 0;
+ command_loop_hook = 0;
+ clear_gdb_event_hooks ();
+}
+
+/* This is a lazy init routine, called the first time
+ the interpreter module is used. I put it here just in case, but I haven't
+ thought of a use for it yet. I will probably bag it soon, since I don't
+ think it will be necessary. */
+static void
+initialize_interps (void)
+{
+ interpreter_initialized = 1;
+ /* Don't know if anything needs to be done here... */
+}
+
+void
+interpreter_exec_cmd (char *args, int from_tty)
+{
+ struct interp *old_interp, *interp_to_use;
+ char **prules = NULL;
+ char **trule = NULL;
+ unsigned int nrules;
+ unsigned int i;
+ int old_quiet, use_quiet;
+
+ prules = buildargv (args);
+ if (prules == NULL)
+ {
+ error ("unable to parse arguments");
+ }
+
+ nrules = 0;
+ if (prules != NULL)
+ {
+ for (trule = prules; *trule != NULL; trule++)
+ {
+ nrules++;
+ }
+ }
+
+ if (nrules < 2)
+ error ("usage: interpreter-exec <interpreter> [ <command> ... ]");
+
+ old_interp = current_interpreter;
+
+ interp_to_use = interp_lookup (prules[0]);
+ if (interp_to_use == NULL)
+ error ("Could not find interpreter \"%s\".", prules[0]);
+
+ /* Temporarily set interpreters quiet */
+ old_quiet = interp_set_quiet (old_interp, 1);
+ use_quiet = interp_set_quiet (interp_to_use, 1);
+
+ if (!interp_set (interp_to_use))
+ error ("Could not switch to interpreter \"%s\".", prules[0]);
+
+ for (i = 1; i < nrules; i++)
+ {
+ if (!interp_exec (interp_to_use, prules[i]))
+ {
+ interp_set (old_interp);
+ interp_set_quiet (interp_to_use, old_quiet);
+ error ("error in command: \"%s\".", prules[i]);
+ break;
+ }
+ }
+
+ interp_set (old_interp);
+ interp_set_quiet (interp_to_use, use_quiet);
+ interp_set_quiet (old_interp, old_quiet);
+}
+
+/* List the possible interpreters which could complete the given text. */
+static char **
+interpreter_completer (char *text, char *word)
+{
+ int alloced = 0;
+ int textlen;
+ int num_matches;
+ char **matches;
+ struct interp *interp;
+
+ /* We expect only a very limited number of interpreters, so just
+ allocate room for all of them. */
+ for (interp = interp_list; interp != NULL; interp = interp->next)
+ ++alloced;
+ matches = (char **) xmalloc (alloced * sizeof (char *));
+
+ num_matches = 0;
+ textlen = strlen (text);
+ for (interp = interp_list; interp != NULL; interp = interp->next)
+ {
+ if (strncmp (interp->name, text, textlen) == 0)
+ {
+ matches[num_matches] =
+ (char *) xmalloc (strlen (word) + strlen (interp->name) + 1);
+ if (word == text)
+ strcpy (matches[num_matches], interp->name);
+ else if (word > text)
+ {
+ /* Return some portion of interp->name */
+ strcpy (matches[num_matches], interp->name + (word - text));
+ }
+ else
+ {
+ /* Return some of text plus interp->name */
+ strncpy (matches[num_matches], word, text - word);
+ matches[num_matches][text - word] = '\0';
+ strcat (matches[num_matches], interp->name);
+ }
+ ++num_matches;
+ }
+ }
+
+ if (num_matches == 0)
+ {
+ xfree (matches);
+ matches = NULL;
+ }
+ else if (num_matches < alloced)
+ {
+ matches = (char **) xrealloc ((char *) matches, ((num_matches + 1)
+ * sizeof (char *)));
+ matches[num_matches] = NULL;
+ }
+
+ return matches;
+}
+
+/* This just adds the "interpreter-exec" command. */
+void
+_initialize_interpreter (void)
+{
+ struct cmd_list_element *c;
+
+ c = add_cmd ("interpreter-exec", class_support,
+ interpreter_exec_cmd,
+ "Execute a command in an interpreter. It takes two arguments:\n\
+The first argument is the name of the interpreter to use.\n\
+The second argument is the command to execute.\n", &cmdlist);
+ set_cmd_completer (c, interpreter_completer);
+}
diff --git a/gdb/interps.h b/gdb/interps.h
new file mode 100644
index 00000000000..21362f4ddec
--- /dev/null
+++ b/gdb/interps.h
@@ -0,0 +1,73 @@
+/* Manages interpreters for GDB, the GNU debugger.
+
+ Copyright 2000, 2002, 2003 Free Software Foundation, Inc.
+
+ Written by Jim Ingham <jingham@apple.com> of Apple Computer, 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 INTERPS_H
+#define INTERPS_H
+
+struct ui_out;
+struct interp;
+
+extern int interp_resume (struct interp *interp);
+extern int interp_suspend (struct interp *interp);
+extern int interp_prompt_p (struct interp *interp);
+extern int interp_exec_p (struct interp *interp);
+extern int interp_exec (struct interp *interp, const char *command);
+extern int interp_quiet_p (struct interp *interp);
+
+typedef void *(interp_init_ftype) (void);
+typedef int (interp_resume_ftype) (void *data);
+typedef int (interp_suspend_ftype) (void *data);
+typedef int (interp_prompt_p_ftype) (void *data);
+typedef int (interp_exec_ftype) (void *data, const char *command);
+typedef int (interp_command_loop_ftype) (void *data);
+
+struct interp_procs
+{
+ interp_init_ftype *init_proc;
+ interp_resume_ftype *resume_proc;
+ interp_suspend_ftype *suspend_proc;
+ interp_exec_ftype *exec_proc;
+ interp_prompt_p_ftype *prompt_proc_p;
+ interp_command_loop_ftype *command_loop_proc;
+};
+
+extern struct interp *interp_new (const char *name, void *data,
+ struct ui_out *uiout,
+ const struct interp_procs *procs);
+extern void interp_add (struct interp *interp);
+extern int interp_set (struct interp *interp);
+extern struct interp *interp_lookup (const char *name);
+extern struct ui_out *interp_ui_out (struct interp *interp);
+
+extern int current_interp_named_p (const char *name);
+extern int current_interp_display_prompt_p (void);
+extern void current_interp_command_loop (void);
+
+extern void clear_interpreter_hooks ();
+
+/* well-known interpreters */
+#define INTERP_CONSOLE "console"
+#define INTERP_MI1 "mi1"
+#define INTERP_MI "mi"
+
+#endif
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 2283887a6f9..b44c5bbba49 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -51,8 +51,8 @@ supply_gregset (gregset_t *gregsetp)
{
register int regi;
register greg_t *regp = (greg_t *) (gregsetp->gp_regs);
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
/* FIXME: somewhere, there should be a #define for the meaning
of this magic number 32; we should use that. */
@@ -104,8 +104,8 @@ void
supply_fpregset (fpregset_t *fpregsetp)
{
register int regi;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
for (regi = 0; regi < 32; regi++)
supply_register (FP0_REGNUM + regi,
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index f6d3192ee85..fd74ced401f 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -70,6 +70,12 @@ static struct objfile *dynamics_objfile = NULL;
static struct type *java_link_class_type (struct type *, struct value *);
+/* FIXME: carlton/2003-02-04: This is the main or only caller of
+ allocate_objfile with first argument NULL; as a result, this code
+ breaks every so often. Somebody should write a test case that
+ exercises GDB in various ways (e.g. something involving loading a
+ dynamic library) after this code has been called. */
+
static struct objfile *
get_dynamics_objfile (void)
{
diff --git a/gdb/jv-typeprint.c b/gdb/jv-typeprint.c
index ab15f46c076..4aded1f7bfd 100644
--- a/gdb/jv-typeprint.c
+++ b/gdb/jv-typeprint.c
@@ -166,12 +166,12 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show,
{
QUIT;
/* Don't print out virtual function table. */
- 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;
/* Don't print the dummy field "class". */
- if (STREQN (TYPE_FIELD_NAME (type, i), "class", 5))
+ if (strncmp (TYPE_FIELD_NAME (type, i), "class", 5) == 0)
continue;
print_spaces_filtered (level + 4, stream);
@@ -216,7 +216,7 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show,
n_overloads = TYPE_FN_FIELDLIST_LENGTH (type, i);
method_name = TYPE_FN_FIELDLIST_NAME (type, i);
name = type_name_no_tag (type);
- is_constructor = name && STREQ (method_name, name);
+ is_constructor = name && strcmp (method_name, name) == 0;
for (j = 0; j < n_overloads; j++)
{
diff --git a/gdb/language.c b/gdb/language.c
index 6d5d9611ee7..1a24b39bc8f 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -1,6 +1,8 @@
/* Multiple source language support for GDB.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+ 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
@@ -568,8 +570,6 @@ binop_result_type (struct value *v1, struct value *v2)
not needed. */
return l1 > l2 ? VALUE_TYPE (v1) : VALUE_TYPE (v2);
break;
- /* OBSOLETE case language_chill: */
- /* OBSOLETE error ("Missing Chill support in function binop_result_check."); */ /*FIXME */
}
internal_error (__FILE__, __LINE__, "failed internal consistency check");
return (struct type *) 0; /* For lint */
@@ -793,8 +793,6 @@ integral_type (struct type *type)
case language_m2:
case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1;
- /* OBSOLETE case language_chill: */
- /* OBSOLETE error ("Missing Chill support in function integral_type."); *//*FIXME */
default:
error ("Language not supported.");
}
@@ -823,7 +821,6 @@ character_type (struct type *type)
CHECK_TYPEDEF (type);
switch (current_language->la_language)
{
- /* OBSOLETE case language_chill: */
case language_m2:
case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
@@ -846,7 +843,6 @@ string_type (struct type *type)
CHECK_TYPEDEF (type);
switch (current_language->la_language)
{
- /* OBSOLETE case language_chill: */
case language_m2:
case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
@@ -874,7 +870,7 @@ boolean_type (struct type *type)
case language_cplus:
case language_objc:
/* Might be more cleanly handled by having a
- TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
+ TYPE_CODE_INT_NOT_BOOL for (the deleted) CHILL and such
languages, or a TYPE_CODE_INT_OR_BOOL for C. */
if (TYPE_CODE (type) == TYPE_CODE_INT)
return 1;
@@ -923,8 +919,6 @@ structured_type (struct type *type)
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (type) == TYPE_CODE_SET) ||
(TYPE_CODE (type) == TYPE_CODE_ARRAY);
- /* OBSOLETE case language_chill: */
- /* OBSOLETE error ("Missing Chill support in function structured_type."); *//*FIXME */
default:
return (0);
}
@@ -938,10 +932,6 @@ lang_bool_type (void)
struct type *type;
switch (current_language->la_language)
{
-#if 0
- /* OBSOLETE case language_chill: */
- /* OBSOLETE return builtin_type_chill_bool; */
-#endif
case language_fortran:
sym = lookup_symbol ("logical", NULL, VAR_NAMESPACE, NULL, NULL);
if (sym)
@@ -1172,11 +1162,6 @@ binop_type_check (struct value *arg1, struct value *arg2, int op)
}
#endif
-#ifdef _LANG_chill /* OBSOLETE */
- /* OBSOLETE case language_chill: */
- /* OBSOLETE error ("Missing Chill support in function binop_type_check."); *//*FIXME */
-#endif
-
}
}
}
diff --git a/gdb/language.h b/gdb/language.h
index 683d90dd45b..ab5e5d23458 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -1,6 +1,8 @@
/* Source-language-related definitions for GDB.
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2003 Free
+ Software Foundation, Inc.
+
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
@@ -35,7 +37,6 @@ struct expression;
/* #include "lang_def.h" */
#define _LANG_c
#define _LANG_m2
-/* OBSOLETE #define _LANG_chill */
#define _LANG_fortran
#define _LANG_pascal
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index 0b30ceac484..9f9dd81d8c3 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -1,5 +1,5 @@
/* Multi-threaded debugging support for GNU/Linux (LWP layer).
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -379,6 +379,11 @@ lin_lwp_attach_lwp (ptid_t ptid, int verbose)
error ("Can't attach %s: %s", target_pid_to_str (ptid),
safe_strerror (errno));
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n",
+ target_pid_to_str (ptid));
+
pid = waitpid (GET_LWP (ptid), &status, 0);
if (pid == -1 && errno == ECHILD)
{
@@ -391,6 +396,14 @@ lin_lwp_attach_lwp (ptid_t ptid, int verbose)
&& WIFSTOPPED (status) && WSTOPSIG (status));
lp->stopped = 1;
+
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "LLAL: waitpid %s received %s\n",
+ target_pid_to_str (ptid),
+ status_to_str (status));
+ }
}
else
{
@@ -439,6 +452,12 @@ lin_lwp_attach (char *args, int from_tty)
/* Fake the SIGSTOP that core GDB expects. */
lp->status = W_STOPCODE (SIGSTOP);
lp->resumed = 1;
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "LLA: waitpid %ld, faking SIGSTOP\n",
+ (long) pid);
+ }
}
static int
@@ -447,16 +466,24 @@ detach_callback (struct lwp_info *lp, void *data)
gdb_assert (lp->status == 0 || WIFSTOPPED (lp->status));
if (debug_lin_lwp && lp->status)
- fprintf_unfiltered (gdb_stdlog, "Pending %s for LWP %ld on detach.\n",
- strsignal (WSTOPSIG (lp->status)), GET_LWP (lp->ptid));
+ fprintf_unfiltered (gdb_stdlog, "DC: Pending %s for %s on detach.\n",
+ strsignal (WSTOPSIG (lp->status)),
+ target_pid_to_str (lp->ptid));
while (lp->signalled && lp->stopped)
{
+ errno = 0;
if (ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
WSTOPSIG (lp->status)) < 0)
error ("Can't continue %s: %s", target_pid_to_str (lp->ptid),
safe_strerror (errno));
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "DC: PTRACE_CONTINUE (%s, 0, %s) (OK)\n",
+ target_pid_to_str (lp->ptid),
+ status_to_str (lp->status));
+
lp->stopped = 0;
lp->signalled = 0;
lp->status = 0;
@@ -469,11 +496,18 @@ detach_callback (struct lwp_info *lp, void *data)
overall process id just yet. */
if (GET_LWP (lp->ptid) != GET_PID (lp->ptid))
{
+ errno = 0;
if (ptrace (PTRACE_DETACH, GET_LWP (lp->ptid), 0,
WSTOPSIG (lp->status)) < 0)
error ("Can't detach %s: %s", target_pid_to_str (lp->ptid),
safe_strerror (errno));
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "PTRACE_DETACH (%s, %s, 0) (OK)\n",
+ target_pid_to_str (lp->ptid),
+ strsignal (WSTOPSIG (lp->status)));
+
delete_lwp (lp->ptid);
}
@@ -502,25 +536,6 @@ lin_lwp_detach (char *args, int from_tty)
}
-struct private_thread_info
-{
- int lwpid;
-};
-
-/* Return non-zero if TP corresponds to the LWP specified by DATA
- (which is assumed to be a pointer to a `struct lwp_info'. */
-
-static int
-find_lwp_callback (struct thread_info *tp, void *data)
-{
- struct lwp_info *lp = data;
-
- if (tp->private->lwpid == GET_LWP (lp->ptid))
- return 1;
-
- return 0;
-}
-
/* Resume LP. */
static int
@@ -530,28 +545,11 @@ resume_callback (struct lwp_info *lp, void *data)
{
struct thread_info *tp;
-#if 0
- /* FIXME: kettenis/2000-08-26: This should really be handled
- properly by core GDB. */
-
- tp = find_thread_pid (lp->ptid);
- if (tp == NULL)
- tp = iterate_over_threads (find_lwp_callback, lp);
- gdb_assert (tp);
-
- /* If we were previously stepping the thread, and now continue
- the thread we must invalidate the stepping range. However,
- if there is a step_resume breakpoint for this thread, we must
- preserve the stepping range to make it possible to continue
- stepping once we hit it. */
- if (tp->step_range_end && tp->step_resume_breakpoint == NULL)
- {
- gdb_assert (lp->step);
- tp->step_range_start = tp->step_range_end = 0;
- }
-#endif
-
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), 0, TARGET_SIGNAL_0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "RC: PTRACE_CONT %s, 0, 0 (resume sibling)\n",
+ target_pid_to_str (lp->ptid));
lp->stopped = 0;
lp->step = 0;
}
@@ -622,6 +620,12 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
iterate_over_lwps (resume_callback, NULL);
child_resume (ptid, step, signo);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLR: %s %s, %s (resume event thread)\n",
+ step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
+ target_pid_to_str (ptid),
+ signo ? strsignal (signo) : "0");
}
@@ -634,6 +638,12 @@ stop_callback (struct lwp_info *lp, void *data)
{
int ret;
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SC: kill %s **<SIGSTOP>**\n",
+ target_pid_to_str (lp->ptid));
+ }
ret = kill (GET_LWP (lp->ptid), SIGSTOP);
gdb_assert (ret == 0);
@@ -667,6 +677,14 @@ stop_wait_callback (struct lwp_info *lp, void *data)
gdb_assert (pid == GET_LWP (lp->ptid));
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: waitpid %s received %s\n",
+ target_pid_to_str (lp->ptid),
+ status_to_str (status));
+ }
+
if (WIFEXITED (status) || WIFSIGNALED (status))
{
gdb_assert (num_lwps > 1);
@@ -681,8 +699,8 @@ stop_wait_callback (struct lwp_info *lp, void *data)
target_pid_to_str (lp->ptid));
}
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
- "%s exited.\n", target_pid_to_str (lp->ptid));
+ fprintf_unfiltered (gdb_stdlog, "SWC: %s exited.\n",
+ target_pid_to_str (lp->ptid));
delete_lwp (lp->ptid);
return 0;
@@ -693,7 +711,14 @@ stop_wait_callback (struct lwp_info *lp, void *data)
/* Ignore any signals in FLUSH_MASK. */
if (flush_mask && sigismember (flush_mask, WSTOPSIG (status)))
{
+ errno = 0;
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "PTRACE_CONT %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno) : "OK");
+
return stop_wait_callback (lp, flush_mask);
}
@@ -715,18 +740,26 @@ stop_wait_callback (struct lwp_info *lp, void *data)
thread will have already tripped on it. */
/* Now resume this LWP and get the SIGSTOP event. */
+ errno = 0;
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
if (debug_lin_lwp)
{
- fprintf_unfiltered (gdb_stderr,
- "SWC: Candidate SIGTRAP event in %ld\n",
- GET_LWP (lp->ptid));
+ fprintf_unfiltered (gdb_stdlog,
+ "PTRACE_CONT %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno) : "OK");
+
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: Candidate SIGTRAP event in %s\n",
+ target_pid_to_str (lp->ptid));
}
/* Hold the SIGTRAP for handling by lin_lwp_wait. */
stop_wait_callback (lp, data);
/* If there's another event, throw it back into the queue. */
if (lp->status)
- kill (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
+ {
+ kill (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
+ }
/* Save the sigtrap event. */
lp->status = status;
return 0;
@@ -738,12 +771,19 @@ stop_wait_callback (struct lwp_info *lp, void *data)
if (debug_lin_lwp)
{
- fprintf_unfiltered (gdb_stderr,
- "SWC: Pending event %d in %ld\n",
- WSTOPSIG (status), GET_LWP (lp->ptid));
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: Pending event %s in %s\n",
+ status_to_str ((int) status),
+ target_pid_to_str (lp->ptid));
}
/* Now resume this LWP and get the SIGSTOP event. */
+ errno = 0;
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: PTRACE_CONT %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno) : "OK");
/* Hold this event/waitstatus while we check to see if
there are any more (we still want to get that SIGSTOP). */
@@ -754,7 +794,16 @@ stop_wait_callback (struct lwp_info *lp, void *data)
if (lp->status == 0)
lp->status = status;
else
- kill (GET_LWP (lp->ptid), WSTOPSIG (status));
+ {
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: kill %s, %s\n",
+ target_pid_to_str (lp->ptid),
+ status_to_str ((int) status));
+ }
+ kill (GET_LWP (lp->ptid), WSTOPSIG (status));
+ }
return 0;
}
}
@@ -861,8 +910,8 @@ cancel_breakpoints_callback (struct lwp_info *lp, void *data)
{
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
- "Push back breakpoint for LWP %ld\n",
- GET_LWP (lp->ptid));
+ "CBC: Push back breakpoint for %s\n",
+ target_pid_to_str (lp->ptid));
/* Back up the PC if necessary. */
if (DECR_PC_AFTER_BREAK)
@@ -893,8 +942,8 @@ select_event_lwp (struct lwp_info **orig_lp, int *status)
{
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
- "Select single-step LWP %ld\n",
- GET_LWP (event_lp->ptid));
+ "SEL: Select single-step %s\n",
+ target_pid_to_str (event_lp->ptid));
}
else
{
@@ -910,7 +959,7 @@ select_event_lwp (struct lwp_info **orig_lp, int *status)
if (debug_lin_lwp && num_events > 1)
fprintf_unfiltered (gdb_stdlog,
- "Found %d SIGTRAP events, selecting #%d\n",
+ "SEL: Found %d SIGTRAP events, selecting #%d\n",
num_events, random_selector);
event_lp = iterate_over_lwps (select_event_lwp_callback,
@@ -962,8 +1011,25 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (pid == -1 && errno == ECHILD)
/* Try again with __WCLONE to check cloned processes. */
pid = waitpid (GET_PID (ptid), &status, __WCLONE);
+
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "CW: waitpid %ld received %s\n",
+ (long) pid,
+ status_to_str (status));
+ }
+
save_errno = errno;
+ /* Make sure we don't report an event for the exit of the
+ original program, if we've detached from it. */
+ if (pid != -1 && ! WIFSTOPPED (status) && pid != GET_PID (inferior_ptid))
+ {
+ pid = -1;
+ save_errno = EINTR;
+ }
+
clear_sigio_trap ();
clear_sigint_trap ();
}
@@ -971,7 +1037,8 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (pid == -1)
{
- warning ("Child process unexpectedly missing: %s", safe_strerror (errno));
+ warning ("Child process unexpectedly missing: %s",
+ safe_strerror (errno));
/* Claim it exited with unknown signal. */
ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
@@ -1021,8 +1088,9 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (debug_lin_lwp && status)
fprintf_unfiltered (gdb_stdlog,
- "Using pending wait status %s for LWP %ld.\n",
- status_to_str (status), GET_LWP (lp->ptid));
+ "LLW: Using pending wait status %s for %s.\n",
+ status_to_str (status),
+ target_pid_to_str (lp->ptid));
}
/* But if we don't fine one, we'll have to wait, and check both
@@ -1034,8 +1102,8 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
- "Waiting for specific LWP %ld.\n",
- GET_LWP (ptid));
+ "LLW: Waiting for specific LWP %s.\n",
+ target_pid_to_str (ptid));
/* We have a specific LWP to check. */
lp = find_lwp_pid (ptid);
@@ -1045,8 +1113,9 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (debug_lin_lwp && status)
fprintf_unfiltered (gdb_stdlog,
- "Using pending wait status %s for LWP %ld.\n",
- status_to_str (status), GET_LWP (lp->ptid));
+ "LLW: Using pending wait status %s for %s.\n",
+ status_to_str (status),
+ target_pid_to_str (lp->ptid));
/* If we have to wait, take into account whether PID is a cloned
process or not. And we have to convert it to something that
@@ -1068,8 +1137,14 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
/* Resume the thread. It should halt immediately returning the
pending SIGSTOP. */
+ registers_changed ();
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
TARGET_SIGNAL_0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: %s %s, 0, 0 (expect SIGSTOP)\n",
+ lp->step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
+ target_pid_to_str (lp->ptid));
lp->stopped = 0;
gdb_assert (lp->resumed);
@@ -1090,7 +1165,26 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
gdb_assert (pid == -1 || lwpid == pid);
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: waitpid %ld received %s\n",
+ (long) lwpid,
+ status_to_str (status));
+ }
+
lp = find_lwp_pid (pid_to_ptid (lwpid));
+
+ /* Make sure we don't report an event for the exit of an LWP not in
+ our list, i.e. not part of the current process. This can happen
+ if we detach from a program we original forked and then it
+ exits. */
+ if (! WIFSTOPPED (status) && ! lp)
+ {
+ status = 0;
+ continue;
+ }
+
if (! lp)
{
lp = add_lwp (BUILD_LWP (lwpid, GET_PID (inferior_ptid)));
@@ -1132,7 +1226,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
- "%s exited.\n",
+ "LLW: %s exited.\n",
target_pid_to_str (lp->ptid));
delete_lwp (lp->ptid);
@@ -1147,19 +1241,28 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
/* Make sure we don't report a SIGSTOP that we sent
ourselves in an attempt to stop an LWP. */
- if (lp->signalled && WIFSTOPPED (status)
+ if (lp->signalled
+ && WIFSTOPPED (status)
&& WSTOPSIG (status) == SIGSTOP)
{
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
- "Delayed SIGSTOP caught for %s.\n",
+ "LLW: Delayed SIGSTOP caught for %s.\n",
target_pid_to_str (lp->ptid));
/* This is a delayed SIGSTOP. */
lp->signalled = 0;
+ registers_changed ();
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
TARGET_SIGNAL_0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: %s %s, 0, 0 (discard SIGSTOP)\n",
+ lp->step ?
+ "PTRACE_SINGLESTEP" : "PTRACE_CONT",
+ target_pid_to_str (lp->ptid));
+
lp->stopped = 0;
gdb_assert (lp->resumed);
@@ -1210,7 +1313,14 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
other threads to run. On the other hand, not resuming
newly attached threads may cause an unwanted delay in
getting them running. */
+ registers_changed ();
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step, signo);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: %s %s, %s (preempt 'handle')\n",
+ lp->step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
+ target_pid_to_str (lp->ptid),
+ signo ? strsignal (signo) : "0");
lp->stopped = 0;
status = 0;
goto retry;
@@ -1231,8 +1341,9 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
lp->stopped = 1;
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog, "Candidate event %s in LWP %ld.\n",
- status_to_str (status), GET_LWP (lp->ptid));
+ fprintf_unfiltered (gdb_stdlog, "LLW: Candidate event %s in %s.\n",
+ status_to_str (status),
+ target_pid_to_str (lp->ptid));
/* Now stop all other LWP's ... */
iterate_over_lwps (stop_callback, NULL);
@@ -1260,8 +1371,8 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
trap_ptid = (threaded ? lp->ptid : pid_to_ptid (GET_LWP (lp->ptid)));
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
- "LLW: trap_ptid is %ld\n",
- GET_LWP (trap_ptid));
+ "LLW: trap_ptid is %s.\n",
+ target_pid_to_str (trap_ptid));
}
else
trap_ptid = null_ptid;
@@ -1273,7 +1384,14 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
static int
kill_callback (struct lwp_info *lp, void *data)
{
+ errno = 0;
ptrace (PTRACE_KILL, GET_LWP (lp->ptid), 0, 0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "KC: PTRACE_KILL %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno) : "OK");
+
return 0;
}
@@ -1294,6 +1412,12 @@ kill_wait_callback (struct lwp_info *lp, void *data)
do
{
pid = waitpid (GET_LWP (lp->ptid), NULL, __WCLONE);
+ if (pid != (pid_t) -1 && debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "KWC: wait %s received unknown.\n",
+ target_pid_to_str (lp->ptid));
+ }
}
while (pid == GET_LWP (lp->ptid));
@@ -1303,6 +1427,12 @@ kill_wait_callback (struct lwp_info *lp, void *data)
do
{
pid = waitpid (GET_LWP (lp->ptid), NULL, 0);
+ if (pid != (pid_t) -1 && debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "KWC: wait %s received unk.\n",
+ target_pid_to_str (lp->ptid));
+ }
}
while (pid == GET_LWP (lp->ptid));
@@ -1369,6 +1499,11 @@ lin_lwp_thread_alive (ptid_t ptid)
errno = 0;
ptrace (PTRACE_PEEKUSER, GET_LWP (ptid), 0, 0);
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLTA: PTRACE_PEEKUSER %s, 0, 0 (%s)\n",
+ target_pid_to_str (ptid),
+ errno ? safe_strerror (errno) : "OK");
if (errno)
return 0;
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index 2f43ae61f97..00383e9a6ee 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -23,7 +23,7 @@
#include "inferior.h"
#include <sys/param.h> /* for MAXPATHLEN */
#include <sys/procfs.h> /* for elf_gregset etc. */
-#include <sys/stat.h> /* for struct stat */
+#include "gdb_stat.h" /* for struct stat */
#include <ctype.h> /* for isdigit */
#include <unistd.h> /* for open, pread64 */
#include <fcntl.h> /* for O_RDONLY */
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 37edc2bcb5c..4be7fb8e1ab 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -1,6 +1,7 @@
/* Native-dependent code for LynxOS.
- Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2003 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -27,7 +28,7 @@
#include "regcache.h"
#include <sys/ptrace.h>
-#include <sys/wait.h>
+#Include "gdb_wait.h"
#include <sys/fpp.h>
static unsigned long registers_addr (int pid);
@@ -282,7 +283,7 @@ fetch_inferior_registers (int regno)
if (whatregs & WHATREGS_GEN)
{
struct econtext ec; /* general regs */
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
int retval;
int i;
@@ -510,29 +511,31 @@ fetch_inferior_registers (int regno)
ecp = registers_addr (PIDGET (inferior_ptid));
- for (regno = reglo; regno <= reghi; regno++)
- {
- char buf[MAX_REGISTER_RAW_SIZE];
- int ptrace_fun = PTRACE_PEEKTHREAD;
-
+ {
+ char *buf = alloca (max_register_size (current_gdbarch));
+ for (regno = reglo; regno <= reghi; regno++)
+ {
+ int ptrace_fun = PTRACE_PEEKTHREAD;
+
#ifdef M68K
- ptrace_fun = regno == SP_REGNUM ? PTRACE_PEEKUSP : PTRACE_PEEKTHREAD;
+ ptrace_fun = regno == SP_REGNUM ? PTRACE_PEEKUSP : PTRACE_PEEKTHREAD;
#endif
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- unsigned int reg;
-
- errno = 0;
- reg = ptrace (ptrace_fun, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (ecp + regmap[regno] + i), 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_PEEKUSP)");
-
- *(int *) &buf[i] = reg;
- }
- supply_register (regno, buf);
- }
+
+ for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ {
+ unsigned int reg;
+
+ errno = 0;
+ reg = ptrace (ptrace_fun, PIDGET (inferior_ptid),
+ (PTRACE_ARG3_TYPE) (ecp + regmap[regno] + i), 0);
+ if (errno)
+ perror_with_name ("ptrace(PTRACE_PEEKUSP)");
+
+ *(int *) &buf[i] = reg;
+ }
+ supply_register (regno, buf);
+ }
+ }
}
/* Store our register values back into the inferior.
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index b4bfefdf210..f8ac1542409 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -1,626 +1,626 @@
-/* Remote debugging interface to m32r and mon2000 ROM monitors for GDB,
- the GNU debugger.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- Adapted by Michael Snyder of 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. */
-
-/* This module defines communication with the Mitsubishi m32r monitor */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "symtab.h"
-#include "command.h"
-#include "gdbcmd.h"
-#include "symfile.h" /* for generic load */
-#include <time.h> /* for time_t */
-#include "gdb_string.h"
-#include "objfiles.h" /* for ALL_OBJFILES etc. */
-#include "inferior.h" /* for write_pc() */
-#include <ctype.h>
-#include "regcache.h"
-
-extern void report_transfer_performance (unsigned long, time_t, time_t);
-
-/*
- * All this stuff just to get my host computer's IP address!
- */
-#include <sys/types.h>
-#include <netdb.h> /* for hostent */
-#include <netinet/in.h> /* for struct in_addr */
-#if 1
-#include <arpa/inet.h> /* for inet_ntoa */
-#endif
-
-static char *board_addr; /* user-settable IP address for M32R-EVA */
-static char *server_addr; /* user-settable IP address for gdb host */
-static char *download_path; /* user-settable path for SREC files */
-
-
-/*
- * Function: m32r_load_1 (helper function)
- */
-
-static void
-m32r_load_section (bfd *abfd, asection *s, void *obj)
-{
- unsigned int *data_count = obj;
- if (s->flags & SEC_LOAD)
- {
- bfd_size_type section_size = bfd_section_size (abfd, s);
- bfd_vma section_base = bfd_section_lma (abfd, s);
- unsigned int buffer, i;
-
- *data_count += section_size;
-
- printf_filtered ("Loading section %s, size 0x%lx lma ",
- bfd_section_name (abfd, s), section_size);
- print_address_numeric (section_base, 1, gdb_stdout);
- printf_filtered ("\n");
- gdb_flush (gdb_stdout);
- monitor_printf ("%s mw\r", paddr_nz (section_base));
- for (i = 0; i < section_size; i += 4)
- {
- QUIT;
- monitor_expect (" -> ", NULL, 0);
- bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
- monitor_printf ("%x\n", buffer);
- }
- monitor_expect (" -> ", NULL, 0);
- monitor_printf ("q\n");
- monitor_expect_prompt (NULL, 0);
- }
-}
-
-static int
-m32r_load_1 (void *dummy)
-{
- int data_count = 0;
-
- bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count);
- return data_count;
-}
-
-/*
- * Function: m32r_load (an alternate way to load)
- */
-
-static void
-m32r_load (char *filename, int from_tty)
-{
- bfd *abfd;
- asection *s;
- unsigned int i, data_count = 0;
- time_t start_time, end_time; /* for timing of download */
-
- if (filename == NULL || filename[0] == 0)
- filename = get_exec_file (1);
-
- abfd = bfd_openr (filename, 0);
- if (!abfd)
- error ("Unable to open file %s\n", filename);
- if (bfd_check_format (abfd, bfd_object) == 0)
- error ("File is not an object file\n");
- start_time = time (NULL);
-#if 0
- for (s = abfd->sections; s; s = s->next)
- if (s->flags & SEC_LOAD)
- {
- bfd_size_type section_size = bfd_section_size (abfd, s);
- bfd_vma section_base = bfd_section_vma (abfd, s);
- unsigned int buffer;
-
- data_count += section_size;
-
- printf_filtered ("Loading section %s, size 0x%lx vma ",
- bfd_section_name (abfd, s), section_size);
- print_address_numeric (section_base, 1, gdb_stdout);
- printf_filtered ("\n");
- gdb_flush (gdb_stdout);
- monitor_printf ("%x mw\r", section_base);
- for (i = 0; i < section_size; i += 4)
- {
- monitor_expect (" -> ", NULL, 0);
- bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
- monitor_printf ("%x\n", buffer);
- }
- monitor_expect (" -> ", NULL, 0);
- monitor_printf ("q\n");
- monitor_expect_prompt (NULL, 0);
- }
-#else
- if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL)))
- {
- monitor_printf ("q\n");
- return;
- }
-#endif
- end_time = time (NULL);
- printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
- report_transfer_performance (data_count, start_time, end_time);
-
- /* Finally, make the PC point at the start address */
- if (exec_bfd)
- write_pc (bfd_get_start_address (exec_bfd));
-
- inferior_ptid = null_ptid; /* No process now */
-
- /* This is necessary because many things were based on the PC at the
- time that we attached to the monitor, which is no longer valid
- now that we have loaded new code (and just changed the PC).
- Another way to do this might be to call normal_stop, except that
- the stack may not be valid, and things would get horribly
- confused... */
-
- clear_symtab_users ();
-}
-
-static void
-m32r_load_gen (char *filename, int from_tty)
-{
- generic_load (filename, from_tty);
-}
-
-static void m32r_open (char *args, int from_tty);
-static void mon2000_open (char *args, int from_tty);
-
-/* This array of registers needs to match the indexes used by GDB. The
- whole reason this exists is because the various ROM monitors use
- different names than GDB does, and don't support all the registers
- either. So, typing "info reg sp" becomes an "A7". */
-
-static char *m32r_regnames[] =
-{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
-};
-
-static void
-m32r_supply_register (char *regname, int regnamelen, char *val, int vallen)
-{
- int regno;
- int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]);
-
- for (regno = 0; regno < num_regs; regno++)
- if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0)
- break;
-
- if (regno >= num_regs)
- return; /* no match */
-
- if (regno == ACCL_REGNUM)
- { /* special handling for 64-bit acc reg */
- monitor_supply_register (ACCH_REGNUM, val);
- val = strchr (val, ':'); /* skip past ':' to get 2nd word */
- if (val != NULL)
- monitor_supply_register (ACCL_REGNUM, val + 1);
- }
- else
- {
- monitor_supply_register (regno, val);
- if (regno == PSW_REGNUM)
- {
- unsigned long psw = strtoul (val, NULL, 16);
- char *zero = "00000000", *one = "00000001";
-
-#ifdef SM_REGNUM
- /* Stack mode bit */
- monitor_supply_register (SM_REGNUM, (psw & 0x80) ? one : zero);
-#endif
-#ifdef BSM_REGNUM
- /* Backup stack mode bit */
- monitor_supply_register (BSM_REGNUM, (psw & 0x8000) ? one : zero);
-#endif
-#ifdef IE_REGNUM
- /* Interrupt enable bit */
- monitor_supply_register (IE_REGNUM, (psw & 0x40) ? one : zero);
-#endif
-#ifdef BIE_REGNUM
- /* Backup interrupt enable bit */
- monitor_supply_register (BIE_REGNUM, (psw & 0x4000) ? one : zero);
-#endif
-#ifdef COND_REGNUM
- /* Condition bit (carry etc.) */
- monitor_supply_register (COND_REGNUM, (psw & 0x1) ? one : zero);
-#endif
-#ifdef CBR_REGNUM
- monitor_supply_register (CBR_REGNUM, (psw & 0x1) ? one : zero);
-#endif
-#ifdef BPC_REGNUM
- monitor_supply_register (BPC_REGNUM, zero); /* KLUDGE: (???????) */
-#endif
-#ifdef BCARRY_REGNUM
- monitor_supply_register (BCARRY_REGNUM, zero); /* KLUDGE: (??????) */
-#endif
- }
-
- if (regno == SPI_REGNUM || regno == SPU_REGNUM)
- { /* special handling for stack pointer (spu or spi) */
- unsigned long stackmode = read_register (PSW_REGNUM) & 0x80;
-
- if (regno == SPI_REGNUM && !stackmode) /* SP == SPI */
- monitor_supply_register (SP_REGNUM, val);
- else if (regno == SPU_REGNUM && stackmode) /* SP == SPU */
- monitor_supply_register (SP_REGNUM, val);
- }
- }
-}
-
-/* m32r RevC board monitor */
-
-static struct target_ops m32r_ops;
-
-static char *m32r_inits[] =
-{"\r", NULL};
-
-static struct monitor_ops m32r_cmds;
-
-static void
-init_m32r_cmds (void)
-{
- m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
- m32r_cmds.init = m32r_inits; /* Init strings */
- m32r_cmds.cont = "go\r"; /* continue command */
- m32r_cmds.step = "step\r"; /* single step */
- m32r_cmds.stop = NULL; /* interrupt command */
- m32r_cmds.set_break = "%x +bp\r"; /* set a breakpoint */
- m32r_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */
- m32r_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */
- m32r_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */
- m32r_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
- m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */
- m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */
- m32r_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- m32r_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
- m32r_cmds.setmem.term = NULL; /* setmem.term */
- m32r_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
- m32r_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */
- m32r_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
- m32r_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
- m32r_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
- m32r_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
- m32r_cmds.getmem.term = NULL; /* getmem.term */
- m32r_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
- m32r_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */
- m32r_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- m32r_cmds.setreg.term = NULL; /* setreg.term */
- m32r_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
- m32r_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */
- m32r_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */
- m32r_cmds.getreg.term = NULL; /* getreg.term */
- m32r_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
- m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */
- m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- m32r_cmds.supply_register = m32r_supply_register; /* supply_register */
- m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
- m32r_cmds.load = NULL; /* download command */
- m32r_cmds.loadresp = NULL; /* load response */
- m32r_cmds.prompt = "ok "; /* monitor command prompt */
- m32r_cmds.line_term = "\r"; /* end-of-line terminator */
- m32r_cmds.cmd_end = NULL; /* optional command terminator */
- m32r_cmds.target = &m32r_ops; /* target operations */
- m32r_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- m32r_cmds.regnames = m32r_regnames; /* registers names */
- m32r_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-} /* init_m32r_cmds */
-
-static void
-m32r_open (char *args, int from_tty)
-{
- monitor_open (args, &m32r_cmds, from_tty);
-}
-
-/* Mon2000 monitor (MSA2000 board) */
-
-static struct target_ops mon2000_ops;
-static struct monitor_ops mon2000_cmds;
-
-static void
-init_mon2000_cmds (void)
-{
- mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
- mon2000_cmds.init = m32r_inits; /* Init strings */
- mon2000_cmds.cont = "go\r"; /* continue command */
- mon2000_cmds.step = "step\r"; /* single step */
- mon2000_cmds.stop = NULL; /* interrupt command */
- mon2000_cmds.set_break = "%x +bp\r"; /* set a breakpoint */
- mon2000_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */
- mon2000_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */
- mon2000_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */
- mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
- mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */
- mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */
- mon2000_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- mon2000_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
- mon2000_cmds.setmem.term = NULL; /* setmem.term */
- mon2000_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
- mon2000_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */
- mon2000_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
- mon2000_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
- mon2000_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
- mon2000_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
- mon2000_cmds.getmem.term = NULL; /* getmem.term */
- mon2000_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
- mon2000_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */
- mon2000_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- mon2000_cmds.setreg.term = NULL; /* setreg.term */
- mon2000_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
- mon2000_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */
- mon2000_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */
- mon2000_cmds.getreg.term = NULL; /* getreg.term */
- mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
- mon2000_cmds.dump_registers = ".reg\r"; /* dump_registers */
- mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */
- mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
- mon2000_cmds.load = NULL; /* download command */
- mon2000_cmds.loadresp = NULL; /* load response */
- mon2000_cmds.prompt = "Mon2000>"; /* monitor command prompt */
- mon2000_cmds.line_term = "\r"; /* end-of-line terminator */
- mon2000_cmds.cmd_end = NULL; /* optional command terminator */
- mon2000_cmds.target = &mon2000_ops; /* target operations */
- mon2000_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- mon2000_cmds.regnames = m32r_regnames; /* registers names */
- mon2000_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-} /* init_mon2000_cmds */
-
-static void
-mon2000_open (char *args, int from_tty)
-{
- monitor_open (args, &mon2000_cmds, from_tty);
-}
-
-/* Function: set_board_address
- Tell the BootOne monitor what it's ethernet IP address is. */
-
-static void
-m32r_set_board_address (char *args, int from_tty)
-{
- int resp_len;
- char buf[1024];
-
- if (args && *args)
- {
- monitor_printf ("ulip %s\n", args);
- resp_len = monitor_expect_prompt (buf, sizeof (buf));
- /* now parse the result for success */
- }
- else
- error ("Requires argument (IP address for M32R-EVA board)");
-}
-
-/* Function: set_server_address
- Tell the BootOne monitor what gdb's ethernet IP address is. */
-
-static void
-m32r_set_server_address (char *args, int from_tty)
-{
- int resp_len;
- char buf[1024];
-
- if (args && *args)
- {
- monitor_printf ("uhip %s\n", args);
- resp_len = monitor_expect_prompt (buf, sizeof (buf));
- /* now parse the result for success */
- }
- else
- error ("Requires argument (IP address of GDB's host computer)");
-}
-
-/* Function: set_download_path
- Tell the BootOne monitor the default path for downloadable SREC files. */
-
-static void
-m32r_set_download_path (char *args, int from_tty)
-{
- int resp_len;
- char buf[1024];
-
- if (args && *args)
- {
- monitor_printf ("up %s\n", args);
- resp_len = monitor_expect_prompt (buf, sizeof (buf));
- /* now parse the result for success */
- }
- else
- error ("Requires argument (default path for downloadable SREC files)");
-}
-
-static void
-m32r_upload_command (char *args, int from_tty)
-{
- bfd *abfd;
- asection *s;
- time_t start_time, end_time; /* for timing of download */
- int resp_len, data_count = 0;
- char buf[1024];
- struct hostent *hostent;
- struct in_addr inet_addr;
-
- /* first check to see if there's an ethernet port! */
- monitor_printf ("ust\r");
- resp_len = monitor_expect_prompt (buf, sizeof (buf));
- if (!strchr (buf, ':'))
- error ("No ethernet connection!");
-
- if (board_addr == 0)
- {
- /* scan second colon in the output from the "ust" command */
- char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1;
-
- while (isspace (*myIPaddress))
- myIPaddress++;
-
- if (!strncmp (myIPaddress, "0.0.", 4)) /* empty */
- error ("Please use 'set board-address' to set the M32R-EVA board's IP address.");
- if (strchr (myIPaddress, '('))
- *(strchr (myIPaddress, '(')) = '\0'; /* delete trailing junk */
- board_addr = xstrdup (myIPaddress);
- }
- if (server_addr == 0)
- {
- buf[0] = 0;
- gethostname (buf, sizeof (buf));
- if (buf[0] != 0)
- hostent = gethostbyname (buf);
- if (hostent != 0)
- {
-#if 1
- memcpy (&inet_addr.s_addr, hostent->h_addr,
- sizeof (inet_addr.s_addr));
- server_addr = (char *) inet_ntoa (inet_addr);
-#else
- server_addr = (char *) inet_ntoa (hostent->h_addr);
-#endif
- }
- if (server_addr == 0) /* failed? */
- error ("Need to know gdb host computer's IP address (use 'set server-address')");
- }
-
- if (args == 0 || args[0] == 0) /* no args: upload the current file */
- args = get_exec_file (1);
-
- if (args[0] != '/' && download_path == 0)
- {
- if (current_directory)
- download_path = xstrdup (current_directory);
- else
- error ("Need to know default download path (use 'set download-path')");
- }
-
- start_time = time (NULL);
- monitor_printf ("uhip %s\r", server_addr);
- resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
- monitor_printf ("ulip %s\r", board_addr);
- resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
- if (args[0] != '/')
- monitor_printf ("up %s\r", download_path); /* use default path */
- else
- monitor_printf ("up\r"); /* rooted filename/path */
- resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
-
- if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec"))
- monitor_printf ("ul %s\r", args);
- else /* add ".srec" suffix */
- monitor_printf ("ul %s.srec\r", args);
- resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
-
- if (buf[0] == 0 || strstr (buf, "complete") == 0)
- error ("Upload file not found: %s.srec\nCheck IP addresses and download path.", args);
- else
- printf_filtered (" -- Ethernet load complete.\n");
-
- end_time = time (NULL);
- abfd = bfd_openr (args, 0);
- if (abfd != NULL)
- { /* Download is done -- print section statistics */
- if (bfd_check_format (abfd, bfd_object) == 0)
- {
- printf_filtered ("File is not an object file\n");
- }
- for (s = abfd->sections; s; s = s->next)
- if (s->flags & SEC_LOAD)
- {
- bfd_size_type section_size = bfd_section_size (abfd, s);
- bfd_vma section_base = bfd_section_lma (abfd, s);
- unsigned int buffer;
-
- data_count += section_size;
-
- printf_filtered ("Loading section %s, size 0x%lx lma ",
- bfd_section_name (abfd, s), section_size);
- print_address_numeric (section_base, 1, gdb_stdout);
- printf_filtered ("\n");
- gdb_flush (gdb_stdout);
- }
- /* Finally, make the PC point at the start address */
- write_pc (bfd_get_start_address (abfd));
- report_transfer_performance (data_count, start_time, end_time);
- printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
- }
- inferior_ptid = null_ptid; /* No process now */
-
- /* This is necessary because many things were based on the PC at the
- time that we attached to the monitor, which is no longer valid
- now that we have loaded new code (and just changed the PC).
- Another way to do this might be to call normal_stop, except that
- the stack may not be valid, and things would get horribly
- confused... */
-
- clear_symtab_users ();
-}
-
-void
-_initialize_m32r_rom (void)
-{
- /* Initialize m32r RevC monitor target */
- init_m32r_cmds ();
- init_monitor_ops (&m32r_ops);
-
- m32r_ops.to_shortname = "m32r";
- m32r_ops.to_longname = "m32r monitor";
- m32r_ops.to_load = m32r_load_gen; /* monitor lacks a download command */
- m32r_ops.to_doc = "Debug via the m32r monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- m32r_ops.to_open = m32r_open;
- add_target (&m32r_ops);
-
- /* Initialize mon2000 monitor target */
- init_mon2000_cmds ();
- init_monitor_ops (&mon2000_ops);
-
- mon2000_ops.to_shortname = "mon2000";
- mon2000_ops.to_longname = "Mon2000 monitor";
- mon2000_ops.to_load = m32r_load_gen; /* monitor lacks a download command */
- mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- mon2000_ops.to_open = mon2000_open;
- add_target (&mon2000_ops);
-
- add_show_from_set
- (add_set_cmd ("download-path", class_obscure, var_string,
- (char *) &download_path,
- "Set the default path for downloadable SREC files.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("board-address", class_obscure, var_string,
- (char *) &board_addr,
- "Set IP address for M32R-EVA target board.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("server-address", class_obscure, var_string,
- (char *) &server_addr,
- "Set IP address for download server (GDB's host computer).",
- &setlist),
- &showlist);
-
- add_com ("upload", class_obscure, m32r_upload_command,
- "Upload the srec file via the monitor's Ethernet upload capability.");
-
- add_com ("tload", class_obscure, m32r_load, "test upload command.");
-}
+// OBSOLETE /* Remote debugging interface to m32r and mon2000 ROM monitors for GDB,
+// OBSOLETE the GNU debugger.
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE Adapted by Michael Snyder of Cygnus Support.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* This module defines communication with the Mitsubishi m32r monitor */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "monitor.h"
+// OBSOLETE #include "serial.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "command.h"
+// OBSOLETE #include "gdbcmd.h"
+// OBSOLETE #include "symfile.h" /* for generic load */
+// OBSOLETE #include <time.h> /* for time_t */
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include "objfiles.h" /* for ALL_OBJFILES etc. */
+// OBSOLETE #include "inferior.h" /* for write_pc() */
+// OBSOLETE #include <ctype.h>
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE extern void report_transfer_performance (unsigned long, time_t, time_t);
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * All this stuff just to get my host computer's IP address!
+// OBSOLETE */
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <netdb.h> /* for hostent */
+// OBSOLETE #include <netinet/in.h> /* for struct in_addr */
+// OBSOLETE #if 1
+// OBSOLETE #include <arpa/inet.h> /* for inet_ntoa */
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE static char *board_addr; /* user-settable IP address for M32R-EVA */
+// OBSOLETE static char *server_addr; /* user-settable IP address for gdb host */
+// OBSOLETE static char *download_path; /* user-settable path for SREC files */
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * Function: m32r_load_1 (helper function)
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_load_section (bfd *abfd, asection *s, void *obj)
+// OBSOLETE {
+// OBSOLETE unsigned int *data_count = obj;
+// OBSOLETE if (s->flags & SEC_LOAD)
+// OBSOLETE {
+// OBSOLETE bfd_size_type section_size = bfd_section_size (abfd, s);
+// OBSOLETE bfd_vma section_base = bfd_section_lma (abfd, s);
+// OBSOLETE unsigned int buffer, i;
+// OBSOLETE
+// OBSOLETE *data_count += section_size;
+// OBSOLETE
+// OBSOLETE printf_filtered ("Loading section %s, size 0x%lx lma ",
+// OBSOLETE bfd_section_name (abfd, s), section_size);
+// OBSOLETE print_address_numeric (section_base, 1, gdb_stdout);
+// OBSOLETE printf_filtered ("\n");
+// OBSOLETE gdb_flush (gdb_stdout);
+// OBSOLETE monitor_printf ("%s mw\r", paddr_nz (section_base));
+// OBSOLETE for (i = 0; i < section_size; i += 4)
+// OBSOLETE {
+// OBSOLETE QUIT;
+// OBSOLETE monitor_expect (" -> ", NULL, 0);
+// OBSOLETE bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
+// OBSOLETE monitor_printf ("%x\n", buffer);
+// OBSOLETE }
+// OBSOLETE monitor_expect (" -> ", NULL, 0);
+// OBSOLETE monitor_printf ("q\n");
+// OBSOLETE monitor_expect_prompt (NULL, 0);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE m32r_load_1 (void *dummy)
+// OBSOLETE {
+// OBSOLETE int data_count = 0;
+// OBSOLETE
+// OBSOLETE bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count);
+// OBSOLETE return data_count;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * Function: m32r_load (an alternate way to load)
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_load (char *filename, int from_tty)
+// OBSOLETE {
+// OBSOLETE bfd *abfd;
+// OBSOLETE asection *s;
+// OBSOLETE unsigned int i, data_count = 0;
+// OBSOLETE time_t start_time, end_time; /* for timing of download */
+// OBSOLETE
+// OBSOLETE if (filename == NULL || filename[0] == 0)
+// OBSOLETE filename = get_exec_file (1);
+// OBSOLETE
+// OBSOLETE abfd = bfd_openr (filename, 0);
+// OBSOLETE if (!abfd)
+// OBSOLETE error ("Unable to open file %s\n", filename);
+// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0)
+// OBSOLETE error ("File is not an object file\n");
+// OBSOLETE start_time = time (NULL);
+// OBSOLETE #if 0
+// OBSOLETE for (s = abfd->sections; s; s = s->next)
+// OBSOLETE if (s->flags & SEC_LOAD)
+// OBSOLETE {
+// OBSOLETE bfd_size_type section_size = bfd_section_size (abfd, s);
+// OBSOLETE bfd_vma section_base = bfd_section_vma (abfd, s);
+// OBSOLETE unsigned int buffer;
+// OBSOLETE
+// OBSOLETE data_count += section_size;
+// OBSOLETE
+// OBSOLETE printf_filtered ("Loading section %s, size 0x%lx vma ",
+// OBSOLETE bfd_section_name (abfd, s), section_size);
+// OBSOLETE print_address_numeric (section_base, 1, gdb_stdout);
+// OBSOLETE printf_filtered ("\n");
+// OBSOLETE gdb_flush (gdb_stdout);
+// OBSOLETE monitor_printf ("%x mw\r", section_base);
+// OBSOLETE for (i = 0; i < section_size; i += 4)
+// OBSOLETE {
+// OBSOLETE monitor_expect (" -> ", NULL, 0);
+// OBSOLETE bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
+// OBSOLETE monitor_printf ("%x\n", buffer);
+// OBSOLETE }
+// OBSOLETE monitor_expect (" -> ", NULL, 0);
+// OBSOLETE monitor_printf ("q\n");
+// OBSOLETE monitor_expect_prompt (NULL, 0);
+// OBSOLETE }
+// OBSOLETE #else
+// OBSOLETE if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL)))
+// OBSOLETE {
+// OBSOLETE monitor_printf ("q\n");
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE end_time = time (NULL);
+// OBSOLETE printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
+// OBSOLETE report_transfer_performance (data_count, start_time, end_time);
+// OBSOLETE
+// OBSOLETE /* Finally, make the PC point at the start address */
+// OBSOLETE if (exec_bfd)
+// OBSOLETE write_pc (bfd_get_start_address (exec_bfd));
+// OBSOLETE
+// OBSOLETE inferior_ptid = null_ptid; /* No process now */
+// OBSOLETE
+// OBSOLETE /* This is necessary because many things were based on the PC at the
+// OBSOLETE time that we attached to the monitor, which is no longer valid
+// OBSOLETE now that we have loaded new code (and just changed the PC).
+// OBSOLETE Another way to do this might be to call normal_stop, except that
+// OBSOLETE the stack may not be valid, and things would get horribly
+// OBSOLETE confused... */
+// OBSOLETE
+// OBSOLETE clear_symtab_users ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_load_gen (char *filename, int from_tty)
+// OBSOLETE {
+// OBSOLETE generic_load (filename, from_tty);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void m32r_open (char *args, int from_tty);
+// OBSOLETE static void mon2000_open (char *args, int from_tty);
+// OBSOLETE
+// OBSOLETE /* This array of registers needs to match the indexes used by GDB. The
+// OBSOLETE whole reason this exists is because the various ROM monitors use
+// OBSOLETE different names than GDB does, and don't support all the registers
+// OBSOLETE either. So, typing "info reg sp" becomes an "A7". */
+// OBSOLETE
+// OBSOLETE static char *m32r_regnames[] =
+// OBSOLETE {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+// OBSOLETE "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+// OBSOLETE "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_supply_register (char *regname, int regnamelen, char *val, int vallen)
+// OBSOLETE {
+// OBSOLETE int regno;
+// OBSOLETE int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]);
+// OBSOLETE
+// OBSOLETE for (regno = 0; regno < num_regs; regno++)
+// OBSOLETE if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0)
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE if (regno >= num_regs)
+// OBSOLETE return; /* no match */
+// OBSOLETE
+// OBSOLETE if (regno == ACCL_REGNUM)
+// OBSOLETE { /* special handling for 64-bit acc reg */
+// OBSOLETE monitor_supply_register (ACCH_REGNUM, val);
+// OBSOLETE val = strchr (val, ':'); /* skip past ':' to get 2nd word */
+// OBSOLETE if (val != NULL)
+// OBSOLETE monitor_supply_register (ACCL_REGNUM, val + 1);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE monitor_supply_register (regno, val);
+// OBSOLETE if (regno == PSW_REGNUM)
+// OBSOLETE {
+// OBSOLETE unsigned long psw = strtoul (val, NULL, 16);
+// OBSOLETE char *zero = "00000000", *one = "00000001";
+// OBSOLETE
+// OBSOLETE #ifdef SM_REGNUM
+// OBSOLETE /* Stack mode bit */
+// OBSOLETE monitor_supply_register (SM_REGNUM, (psw & 0x80) ? one : zero);
+// OBSOLETE #endif
+// OBSOLETE #ifdef BSM_REGNUM
+// OBSOLETE /* Backup stack mode bit */
+// OBSOLETE monitor_supply_register (BSM_REGNUM, (psw & 0x8000) ? one : zero);
+// OBSOLETE #endif
+// OBSOLETE #ifdef IE_REGNUM
+// OBSOLETE /* Interrupt enable bit */
+// OBSOLETE monitor_supply_register (IE_REGNUM, (psw & 0x40) ? one : zero);
+// OBSOLETE #endif
+// OBSOLETE #ifdef BIE_REGNUM
+// OBSOLETE /* Backup interrupt enable bit */
+// OBSOLETE monitor_supply_register (BIE_REGNUM, (psw & 0x4000) ? one : zero);
+// OBSOLETE #endif
+// OBSOLETE #ifdef COND_REGNUM
+// OBSOLETE /* Condition bit (carry etc.) */
+// OBSOLETE monitor_supply_register (COND_REGNUM, (psw & 0x1) ? one : zero);
+// OBSOLETE #endif
+// OBSOLETE #ifdef CBR_REGNUM
+// OBSOLETE monitor_supply_register (CBR_REGNUM, (psw & 0x1) ? one : zero);
+// OBSOLETE #endif
+// OBSOLETE #ifdef BPC_REGNUM
+// OBSOLETE monitor_supply_register (BPC_REGNUM, zero); /* KLUDGE: (???????) */
+// OBSOLETE #endif
+// OBSOLETE #ifdef BCARRY_REGNUM
+// OBSOLETE monitor_supply_register (BCARRY_REGNUM, zero); /* KLUDGE: (??????) */
+// OBSOLETE #endif
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (regno == SPI_REGNUM || regno == SPU_REGNUM)
+// OBSOLETE { /* special handling for stack pointer (spu or spi) */
+// OBSOLETE unsigned long stackmode = read_register (PSW_REGNUM) & 0x80;
+// OBSOLETE
+// OBSOLETE if (regno == SPI_REGNUM && !stackmode) /* SP == SPI */
+// OBSOLETE monitor_supply_register (SP_REGNUM, val);
+// OBSOLETE else if (regno == SPU_REGNUM && stackmode) /* SP == SPU */
+// OBSOLETE monitor_supply_register (SP_REGNUM, val);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* m32r RevC board monitor */
+// OBSOLETE
+// OBSOLETE static struct target_ops m32r_ops;
+// OBSOLETE
+// OBSOLETE static char *m32r_inits[] =
+// OBSOLETE {"\r", NULL};
+// OBSOLETE
+// OBSOLETE static struct monitor_ops m32r_cmds;
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE init_m32r_cmds (void)
+// OBSOLETE {
+// OBSOLETE m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
+// OBSOLETE m32r_cmds.init = m32r_inits; /* Init strings */
+// OBSOLETE m32r_cmds.cont = "go\r"; /* continue command */
+// OBSOLETE m32r_cmds.step = "step\r"; /* single step */
+// OBSOLETE m32r_cmds.stop = NULL; /* interrupt command */
+// OBSOLETE m32r_cmds.set_break = "%x +bp\r"; /* set a breakpoint */
+// OBSOLETE m32r_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */
+// OBSOLETE m32r_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */
+// OBSOLETE m32r_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */
+// OBSOLETE m32r_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
+// OBSOLETE m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */
+// OBSOLETE m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */
+// OBSOLETE m32r_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
+// OBSOLETE m32r_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
+// OBSOLETE m32r_cmds.setmem.term = NULL; /* setmem.term */
+// OBSOLETE m32r_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
+// OBSOLETE m32r_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */
+// OBSOLETE m32r_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
+// OBSOLETE m32r_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
+// OBSOLETE m32r_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
+// OBSOLETE m32r_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
+// OBSOLETE m32r_cmds.getmem.term = NULL; /* getmem.term */
+// OBSOLETE m32r_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
+// OBSOLETE m32r_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */
+// OBSOLETE m32r_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
+// OBSOLETE m32r_cmds.setreg.term = NULL; /* setreg.term */
+// OBSOLETE m32r_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
+// OBSOLETE m32r_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */
+// OBSOLETE m32r_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */
+// OBSOLETE m32r_cmds.getreg.term = NULL; /* getreg.term */
+// OBSOLETE m32r_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
+// OBSOLETE m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */
+// OBSOLETE m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
+// OBSOLETE m32r_cmds.supply_register = m32r_supply_register; /* supply_register */
+// OBSOLETE m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
+// OBSOLETE m32r_cmds.load = NULL; /* download command */
+// OBSOLETE m32r_cmds.loadresp = NULL; /* load response */
+// OBSOLETE m32r_cmds.prompt = "ok "; /* monitor command prompt */
+// OBSOLETE m32r_cmds.line_term = "\r"; /* end-of-line terminator */
+// OBSOLETE m32r_cmds.cmd_end = NULL; /* optional command terminator */
+// OBSOLETE m32r_cmds.target = &m32r_ops; /* target operations */
+// OBSOLETE m32r_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
+// OBSOLETE m32r_cmds.regnames = m32r_regnames; /* registers names */
+// OBSOLETE m32r_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
+// OBSOLETE } /* init_m32r_cmds */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_open (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE monitor_open (args, &m32r_cmds, from_tty);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Mon2000 monitor (MSA2000 board) */
+// OBSOLETE
+// OBSOLETE static struct target_ops mon2000_ops;
+// OBSOLETE static struct monitor_ops mon2000_cmds;
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE init_mon2000_cmds (void)
+// OBSOLETE {
+// OBSOLETE mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
+// OBSOLETE mon2000_cmds.init = m32r_inits; /* Init strings */
+// OBSOLETE mon2000_cmds.cont = "go\r"; /* continue command */
+// OBSOLETE mon2000_cmds.step = "step\r"; /* single step */
+// OBSOLETE mon2000_cmds.stop = NULL; /* interrupt command */
+// OBSOLETE mon2000_cmds.set_break = "%x +bp\r"; /* set a breakpoint */
+// OBSOLETE mon2000_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */
+// OBSOLETE mon2000_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */
+// OBSOLETE mon2000_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */
+// OBSOLETE mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
+// OBSOLETE mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */
+// OBSOLETE mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */
+// OBSOLETE mon2000_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
+// OBSOLETE mon2000_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
+// OBSOLETE mon2000_cmds.setmem.term = NULL; /* setmem.term */
+// OBSOLETE mon2000_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
+// OBSOLETE mon2000_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */
+// OBSOLETE mon2000_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
+// OBSOLETE mon2000_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
+// OBSOLETE mon2000_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
+// OBSOLETE mon2000_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
+// OBSOLETE mon2000_cmds.getmem.term = NULL; /* getmem.term */
+// OBSOLETE mon2000_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
+// OBSOLETE mon2000_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */
+// OBSOLETE mon2000_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
+// OBSOLETE mon2000_cmds.setreg.term = NULL; /* setreg.term */
+// OBSOLETE mon2000_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
+// OBSOLETE mon2000_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */
+// OBSOLETE mon2000_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */
+// OBSOLETE mon2000_cmds.getreg.term = NULL; /* getreg.term */
+// OBSOLETE mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
+// OBSOLETE mon2000_cmds.dump_registers = ".reg\r"; /* dump_registers */
+// OBSOLETE mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
+// OBSOLETE mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */
+// OBSOLETE mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
+// OBSOLETE mon2000_cmds.load = NULL; /* download command */
+// OBSOLETE mon2000_cmds.loadresp = NULL; /* load response */
+// OBSOLETE mon2000_cmds.prompt = "Mon2000>"; /* monitor command prompt */
+// OBSOLETE mon2000_cmds.line_term = "\r"; /* end-of-line terminator */
+// OBSOLETE mon2000_cmds.cmd_end = NULL; /* optional command terminator */
+// OBSOLETE mon2000_cmds.target = &mon2000_ops; /* target operations */
+// OBSOLETE mon2000_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
+// OBSOLETE mon2000_cmds.regnames = m32r_regnames; /* registers names */
+// OBSOLETE mon2000_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
+// OBSOLETE } /* init_mon2000_cmds */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE mon2000_open (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE monitor_open (args, &mon2000_cmds, from_tty);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: set_board_address
+// OBSOLETE Tell the BootOne monitor what it's ethernet IP address is. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_set_board_address (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE int resp_len;
+// OBSOLETE char buf[1024];
+// OBSOLETE
+// OBSOLETE if (args && *args)
+// OBSOLETE {
+// OBSOLETE monitor_printf ("ulip %s\n", args);
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf));
+// OBSOLETE /* now parse the result for success */
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("Requires argument (IP address for M32R-EVA board)");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: set_server_address
+// OBSOLETE Tell the BootOne monitor what gdb's ethernet IP address is. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_set_server_address (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE int resp_len;
+// OBSOLETE char buf[1024];
+// OBSOLETE
+// OBSOLETE if (args && *args)
+// OBSOLETE {
+// OBSOLETE monitor_printf ("uhip %s\n", args);
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf));
+// OBSOLETE /* now parse the result for success */
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("Requires argument (IP address of GDB's host computer)");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: set_download_path
+// OBSOLETE Tell the BootOne monitor the default path for downloadable SREC files. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_set_download_path (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE int resp_len;
+// OBSOLETE char buf[1024];
+// OBSOLETE
+// OBSOLETE if (args && *args)
+// OBSOLETE {
+// OBSOLETE monitor_printf ("up %s\n", args);
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf));
+// OBSOLETE /* now parse the result for success */
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("Requires argument (default path for downloadable SREC files)");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE m32r_upload_command (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE bfd *abfd;
+// OBSOLETE asection *s;
+// OBSOLETE time_t start_time, end_time; /* for timing of download */
+// OBSOLETE int resp_len, data_count = 0;
+// OBSOLETE char buf[1024];
+// OBSOLETE struct hostent *hostent;
+// OBSOLETE struct in_addr inet_addr;
+// OBSOLETE
+// OBSOLETE /* first check to see if there's an ethernet port! */
+// OBSOLETE monitor_printf ("ust\r");
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf));
+// OBSOLETE if (!strchr (buf, ':'))
+// OBSOLETE error ("No ethernet connection!");
+// OBSOLETE
+// OBSOLETE if (board_addr == 0)
+// OBSOLETE {
+// OBSOLETE /* scan second colon in the output from the "ust" command */
+// OBSOLETE char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1;
+// OBSOLETE
+// OBSOLETE while (isspace (*myIPaddress))
+// OBSOLETE myIPaddress++;
+// OBSOLETE
+// OBSOLETE if (!strncmp (myIPaddress, "0.0.", 4)) /* empty */
+// OBSOLETE error ("Please use 'set board-address' to set the M32R-EVA board's IP address.");
+// OBSOLETE if (strchr (myIPaddress, '('))
+// OBSOLETE *(strchr (myIPaddress, '(')) = '\0'; /* delete trailing junk */
+// OBSOLETE board_addr = xstrdup (myIPaddress);
+// OBSOLETE }
+// OBSOLETE if (server_addr == 0)
+// OBSOLETE {
+// OBSOLETE buf[0] = 0;
+// OBSOLETE gethostname (buf, sizeof (buf));
+// OBSOLETE if (buf[0] != 0)
+// OBSOLETE hostent = gethostbyname (buf);
+// OBSOLETE if (hostent != 0)
+// OBSOLETE {
+// OBSOLETE #if 1
+// OBSOLETE memcpy (&inet_addr.s_addr, hostent->h_addr,
+// OBSOLETE sizeof (inet_addr.s_addr));
+// OBSOLETE server_addr = (char *) inet_ntoa (inet_addr);
+// OBSOLETE #else
+// OBSOLETE server_addr = (char *) inet_ntoa (hostent->h_addr);
+// OBSOLETE #endif
+// OBSOLETE }
+// OBSOLETE if (server_addr == 0) /* failed? */
+// OBSOLETE error ("Need to know gdb host computer's IP address (use 'set server-address')");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (args == 0 || args[0] == 0) /* no args: upload the current file */
+// OBSOLETE args = get_exec_file (1);
+// OBSOLETE
+// OBSOLETE if (args[0] != '/' && download_path == 0)
+// OBSOLETE {
+// OBSOLETE if (current_directory)
+// OBSOLETE download_path = xstrdup (current_directory);
+// OBSOLETE else
+// OBSOLETE error ("Need to know default download path (use 'set download-path')");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE start_time = time (NULL);
+// OBSOLETE monitor_printf ("uhip %s\r", server_addr);
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
+// OBSOLETE monitor_printf ("ulip %s\r", board_addr);
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
+// OBSOLETE if (args[0] != '/')
+// OBSOLETE monitor_printf ("up %s\r", download_path); /* use default path */
+// OBSOLETE else
+// OBSOLETE monitor_printf ("up\r"); /* rooted filename/path */
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
+// OBSOLETE
+// OBSOLETE if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec"))
+// OBSOLETE monitor_printf ("ul %s\r", args);
+// OBSOLETE else /* add ".srec" suffix */
+// OBSOLETE monitor_printf ("ul %s.srec\r", args);
+// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */
+// OBSOLETE
+// OBSOLETE if (buf[0] == 0 || strstr (buf, "complete") == 0)
+// OBSOLETE error ("Upload file not found: %s.srec\nCheck IP addresses and download path.", args);
+// OBSOLETE else
+// OBSOLETE printf_filtered (" -- Ethernet load complete.\n");
+// OBSOLETE
+// OBSOLETE end_time = time (NULL);
+// OBSOLETE abfd = bfd_openr (args, 0);
+// OBSOLETE if (abfd != NULL)
+// OBSOLETE { /* Download is done -- print section statistics */
+// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0)
+// OBSOLETE {
+// OBSOLETE printf_filtered ("File is not an object file\n");
+// OBSOLETE }
+// OBSOLETE for (s = abfd->sections; s; s = s->next)
+// OBSOLETE if (s->flags & SEC_LOAD)
+// OBSOLETE {
+// OBSOLETE bfd_size_type section_size = bfd_section_size (abfd, s);
+// OBSOLETE bfd_vma section_base = bfd_section_lma (abfd, s);
+// OBSOLETE unsigned int buffer;
+// OBSOLETE
+// OBSOLETE data_count += section_size;
+// OBSOLETE
+// OBSOLETE printf_filtered ("Loading section %s, size 0x%lx lma ",
+// OBSOLETE bfd_section_name (abfd, s), section_size);
+// OBSOLETE print_address_numeric (section_base, 1, gdb_stdout);
+// OBSOLETE printf_filtered ("\n");
+// OBSOLETE gdb_flush (gdb_stdout);
+// OBSOLETE }
+// OBSOLETE /* Finally, make the PC point at the start address */
+// OBSOLETE write_pc (bfd_get_start_address (abfd));
+// OBSOLETE report_transfer_performance (data_count, start_time, end_time);
+// OBSOLETE printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
+// OBSOLETE }
+// OBSOLETE inferior_ptid = null_ptid; /* No process now */
+// OBSOLETE
+// OBSOLETE /* This is necessary because many things were based on the PC at the
+// OBSOLETE time that we attached to the monitor, which is no longer valid
+// OBSOLETE now that we have loaded new code (and just changed the PC).
+// OBSOLETE Another way to do this might be to call normal_stop, except that
+// OBSOLETE the stack may not be valid, and things would get horribly
+// OBSOLETE confused... */
+// OBSOLETE
+// OBSOLETE clear_symtab_users ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_m32r_rom (void)
+// OBSOLETE {
+// OBSOLETE /* Initialize m32r RevC monitor target */
+// OBSOLETE init_m32r_cmds ();
+// OBSOLETE init_monitor_ops (&m32r_ops);
+// OBSOLETE
+// OBSOLETE m32r_ops.to_shortname = "m32r";
+// OBSOLETE m32r_ops.to_longname = "m32r monitor";
+// OBSOLETE m32r_ops.to_load = m32r_load_gen; /* monitor lacks a download command */
+// OBSOLETE m32r_ops.to_doc = "Debug via the m32r monitor.\n\
+// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).";
+// OBSOLETE m32r_ops.to_open = m32r_open;
+// OBSOLETE add_target (&m32r_ops);
+// OBSOLETE
+// OBSOLETE /* Initialize mon2000 monitor target */
+// OBSOLETE init_mon2000_cmds ();
+// OBSOLETE init_monitor_ops (&mon2000_ops);
+// OBSOLETE
+// OBSOLETE mon2000_ops.to_shortname = "mon2000";
+// OBSOLETE mon2000_ops.to_longname = "Mon2000 monitor";
+// OBSOLETE mon2000_ops.to_load = m32r_load_gen; /* monitor lacks a download command */
+// OBSOLETE mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\
+// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).";
+// OBSOLETE mon2000_ops.to_open = mon2000_open;
+// OBSOLETE add_target (&mon2000_ops);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("download-path", class_obscure, var_string,
+// OBSOLETE (char *) &download_path,
+// OBSOLETE "Set the default path for downloadable SREC files.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("board-address", class_obscure, var_string,
+// OBSOLETE (char *) &board_addr,
+// OBSOLETE "Set IP address for M32R-EVA target board.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("server-address", class_obscure, var_string,
+// OBSOLETE (char *) &server_addr,
+// OBSOLETE "Set IP address for download server (GDB's host computer).",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE add_com ("upload", class_obscure, m32r_upload_command,
+// OBSOLETE "Upload the srec file via the monitor's Ethernet upload capability.");
+// OBSOLETE
+// OBSOLETE add_com ("tload", class_obscure, m32r_load, "test upload command.");
+// OBSOLETE }
diff --git a/gdb/m32r-stub.c b/gdb/m32r-stub.c
index 2e69b4403ea..d9be3eb84e6 100644
--- a/gdb/m32r-stub.c
+++ b/gdb/m32r-stub.c
@@ -1,1718 +1,1718 @@
-/****************************************************************************
-
- THIS SOFTWARE IS NOT COPYRIGHTED
-
- HP offers the following for use in the public domain. HP makes no
- warranty with regard to the software or it's performance and the
- user accepts the software "AS IS" with all faults.
-
- HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
- TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-****************************************************************************/
-
-/****************************************************************************
- * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
- *
- * Module name: remcom.c $
- * Revision: 1.34 $
- * Date: 91/03/09 12:29:49 $
- * Contributor: Lake Stevens Instrument Division$
- *
- * Description: low level support for gdb debugger. $
- *
- * Considerations: only works on target hardware $
- *
- * Written by: Glenn Engel $
- * ModuleState: Experimental $
- *
- * NOTES: See Below $
- *
- * Modified for M32R by Michael Snyder, Cygnus Support.
- *
- * To enable debugger support, two things need to happen. One, a
- * call to set_debug_traps() is necessary in order to allow any breakpoints
- * or error conditions to be properly intercepted and reported to gdb.
- * Two, a breakpoint needs to be generated to begin communication. This
- * is most easily accomplished by a call to breakpoint(). Breakpoint()
- * simulates a breakpoint by executing a trap #1.
- *
- * The external function exceptionHandler() is
- * used to attach a specific handler to a specific M32R vector number.
- * It should use the same privilege level it runs at. It should
- * install it as an interrupt gate so that interrupts are masked
- * while the handler runs.
- *
- * Because gdb will sometimes write to the stack area to execute function
- * calls, this program cannot rely on using the supervisor stack so it
- * uses it's own stack area reserved in the int array remcomStack.
- *
- *************
- *
- * The following gdb commands are supported:
- *
- * command function Return value
- *
- * g return the value of the CPU registers hex data or ENN
- * G set the value of the CPU registers OK or ENN
- *
- * mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN
- * MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN
- * XAA..AA,LLLL: Write LLLL binary bytes at address OK or ENN
- * AA..AA
- *
- * c Resume at current address SNN ( signal NN)
- * cAA..AA Continue at address AA..AA SNN
- *
- * s Step one instruction SNN
- * sAA..AA Step one instruction from AA..AA SNN
- *
- * k kill
- *
- * ? What was the last sigval ? SNN (signal NN)
- *
- * All commands and responses are sent with a packet which includes a
- * checksum. A packet consists of
- *
- * $<packet info>#<checksum>.
- *
- * where
- * <packet info> :: <characters representing the command or response>
- * <checksum> :: <two hex digits computed as modulo 256 sum of <packetinfo>>
- *
- * When a packet is received, it is first acknowledged with either '+' or '-'.
- * '+' indicates a successful transfer. '-' indicates a failed transfer.
- *
- * Example:
- *
- * Host: Reply:
- * $m0,10#2a +$00010203040506070809101112131415#42
- *
- ****************************************************************************/
-
-
-/************************************************************************
- *
- * external low-level support routines
- */
-extern void putDebugChar(); /* write a single character */
-extern int getDebugChar(); /* read and return a single char */
-extern void exceptionHandler(); /* assign an exception handler */
-
-/*****************************************************************************
- * BUFMAX defines the maximum number of characters in inbound/outbound buffers
- * at least NUMREGBYTES*2 are needed for register packets
- */
-#define BUFMAX 400
-
-static char initialized; /* boolean flag. != 0 means we've been initialized */
-
-int remote_debug;
-/* debug > 0 prints ill-formed commands in valid packets & checksum errors */
-
-static const unsigned char hexchars[]="0123456789abcdef";
-
-#define NUMREGS 24
-
-/* Number of bytes of registers. */
-#define NUMREGBYTES (NUMREGS * 4)
-enum regnames { R0, R1, R2, R3, R4, R5, R6, R7,
- R8, R9, R10, R11, R12, R13, R14, R15,
- PSW, CBR, SPI, SPU, BPC, PC, ACCL, ACCH };
-
-enum SYS_calls {
- SYS_null,
- SYS_exit,
- SYS_open,
- SYS_close,
- SYS_read,
- SYS_write,
- SYS_lseek,
- SYS_unlink,
- SYS_getpid,
- SYS_kill,
- SYS_fstat,
- SYS_sbrk,
- SYS_fork,
- SYS_execve,
- SYS_wait4,
- SYS_link,
- SYS_chdir,
- SYS_stat,
- SYS_utime,
- SYS_chown,
- SYS_chmod,
- SYS_time,
- SYS_pipe };
-
-static int registers[NUMREGS];
-
-#define STACKSIZE 8096
-static unsigned char remcomInBuffer[BUFMAX];
-static unsigned char remcomOutBuffer[BUFMAX];
-static int remcomStack[STACKSIZE/sizeof(int)];
-static int* stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
-
-static unsigned int save_vectors[18]; /* previous exception vectors */
-
-/* Indicate to caller of mem2hex or hex2mem that there has been an error. */
-static volatile int mem_err = 0;
-
-/* Store the vector number here (since GDB only gets the signal
- number through the usual means, and that's not very specific). */
-int gdb_m32r_vector = -1;
-
-#if 0
-#include "syscall.h" /* for SYS_exit, SYS_write etc. */
-#endif
-
-/* Global entry points:
- */
-
-extern void handle_exception(int);
-extern void set_debug_traps(void);
-extern void breakpoint(void);
-
-/* Local functions:
- */
-
-static int computeSignal(int);
-static void putpacket(unsigned char *);
-static unsigned char *getpacket(void);
-
-static unsigned char *mem2hex(unsigned char *, unsigned char *, int, int);
-static unsigned char *hex2mem(unsigned char *, unsigned char *, int, int);
-static int hexToInt(unsigned char **, int *);
-static unsigned char *bin2mem(unsigned char *, unsigned char *, int, int);
-static void stash_registers(void);
-static void restore_registers(void);
-static int prepare_to_step(int);
-static int finish_from_step(void);
-static unsigned long crc32 (unsigned char *, int, unsigned long);
-
-static void gdb_error(char *, char *);
-static int gdb_putchar(int), gdb_puts(char *), gdb_write(char *, int);
-
-static unsigned char *strcpy (unsigned char *, const unsigned char *);
-static int strlen (const unsigned char *);
-
-/*
- * This function does all command procesing for interfacing to gdb.
- */
-
-void
-handle_exception(int exceptionVector)
-{
- int sigval, stepping;
- int addr, length, i;
- unsigned char * ptr;
- unsigned char buf[16];
- int binary;
-
- /* Do not call finish_from_step() if this is not a trap #1
- * (breakpoint trap). Without this check, the finish_from_step()
- * might interpret a system call trap as a single step trap. This
- * can happen if: the stub receives 's' and exits, but an interrupt
- * was pending; the interrupt is now handled and causes the stub to
- * be reentered because some function makes a system call.
- */
- if (exceptionVector == 1) /* Trap exception? */
- if (!finish_from_step()) /* Go see if stepping state needs update. */
- return; /* "false step": let the target continue */
-
- gdb_m32r_vector = exceptionVector;
-
- if (remote_debug)
- {
- mem2hex((unsigned char *) &exceptionVector, buf, 4, 0);
- gdb_error("Handle exception %s, ", buf);
- mem2hex((unsigned char *) &registers[PC], buf, 4, 0);
- gdb_error("PC == 0x%s\n", buf);
- }
-
- /* reply to host that an exception has occurred */
- sigval = computeSignal( exceptionVector );
-
- ptr = remcomOutBuffer;
-
- *ptr++ = 'T'; /* notify gdb with signo, PC, FP and SP */
- *ptr++ = hexchars[sigval >> 4];
- *ptr++ = hexchars[sigval & 0xf];
-
- *ptr++ = hexchars[PC >> 4];
- *ptr++ = hexchars[PC & 0xf];
- *ptr++ = ':';
- ptr = mem2hex((unsigned char *)&registers[PC], ptr, 4, 0); /* PC */
- *ptr++ = ';';
-
- *ptr++ = hexchars[R13 >> 4];
- *ptr++ = hexchars[R13 & 0xf];
- *ptr++ = ':';
- ptr = mem2hex((unsigned char *)&registers[R13], ptr, 4, 0); /* FP */
- *ptr++ = ';';
-
- *ptr++ = hexchars[R15 >> 4];
- *ptr++ = hexchars[R15 & 0xf];
- *ptr++ = ':';
- ptr = mem2hex((unsigned char *)&registers[R15], ptr, 4, 0); /* SP */
- *ptr++ = ';';
- *ptr++ = 0;
-
- if (exceptionVector == 0) /* simulated SYS call stuff */
- {
- mem2hex((unsigned char *) &registers[PC], buf, 4, 0);
- switch (registers[R0]) {
- case SYS_exit:
- gdb_error("Target program has exited at %s\n", buf);
- ptr = remcomOutBuffer;
- *ptr++ = 'W';
- sigval = registers[R1] & 0xff;
- *ptr++ = hexchars[sigval >> 4];
- *ptr++ = hexchars[sigval & 0xf];
- *ptr++ = 0;
- break;
- case SYS_open:
- gdb_error("Target attempts SYS_open call at %s\n", buf);
- break;
- case SYS_close:
- gdb_error("Target attempts SYS_close call at %s\n", buf);
- break;
- case SYS_read:
- gdb_error("Target attempts SYS_read call at %s\n", buf);
- break;
- case SYS_write:
- if (registers[R1] == 1 || /* write to stdout */
- registers[R1] == 2) /* write to stderr */
- { /* (we can do that) */
- registers[R0] = gdb_write((void *) registers[R2], registers[R3]);
- return;
- }
- else
- gdb_error("Target attempts SYS_write call at %s\n", buf);
- break;
- case SYS_lseek:
- gdb_error("Target attempts SYS_lseek call at %s\n", buf);
- break;
- case SYS_unlink:
- gdb_error("Target attempts SYS_unlink call at %s\n", buf);
- break;
- case SYS_getpid:
- gdb_error("Target attempts SYS_getpid call at %s\n", buf);
- break;
- case SYS_kill:
- gdb_error("Target attempts SYS_kill call at %s\n", buf);
- break;
- case SYS_fstat:
- gdb_error("Target attempts SYS_fstat call at %s\n", buf);
- break;
- default:
- gdb_error("Target attempts unknown SYS call at %s\n", buf);
- break;
- }
- }
-
- putpacket(remcomOutBuffer);
-
- stepping = 0;
-
- while (1==1) {
- remcomOutBuffer[0] = 0;
- ptr = getpacket();
- binary = 0;
- switch (*ptr++) {
- default: /* Unknown code. Return an empty reply message. */
- break;
- case 'R':
- if (hexToInt (&ptr, &addr))
- registers[PC] = addr;
- strcpy(remcomOutBuffer, "OK");
- break;
- case '!':
- strcpy(remcomOutBuffer, "OK");
- break;
- case 'X': /* XAA..AA,LLLL:<binary data>#cs */
- binary = 1;
- case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
- /* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
- {
- if (hexToInt(&ptr,&addr))
- if (*(ptr++) == ',')
- if (hexToInt(&ptr,&length))
- if (*(ptr++) == ':')
- {
- mem_err = 0;
- if (binary)
- bin2mem (ptr, (unsigned char *) addr, length, 1);
- else
- hex2mem(ptr, (unsigned char*) addr, length, 1);
- if (mem_err) {
- strcpy (remcomOutBuffer, "E03");
- gdb_error ("memory fault", "");
- } else {
- strcpy(remcomOutBuffer,"OK");
- }
- ptr = 0;
- }
- if (ptr)
- {
- strcpy(remcomOutBuffer,"E02");
- }
- }
- break;
- case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
- /* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
- if (hexToInt(&ptr,&addr))
- if (*(ptr++) == ',')
- if (hexToInt(&ptr,&length))
- {
- ptr = 0;
- mem_err = 0;
- mem2hex((unsigned char*) addr, remcomOutBuffer, length, 1);
- if (mem_err) {
- strcpy (remcomOutBuffer, "E03");
- gdb_error ("memory fault", "");
- }
- }
- if (ptr)
- {
- strcpy(remcomOutBuffer,"E01");
- }
- break;
- case '?':
- remcomOutBuffer[0] = 'S';
- remcomOutBuffer[1] = hexchars[sigval >> 4];
- remcomOutBuffer[2] = hexchars[sigval % 16];
- remcomOutBuffer[3] = 0;
- break;
- case 'd':
- remote_debug = !(remote_debug); /* toggle debug flag */
- break;
- case 'g': /* return the value of the CPU registers */
- mem2hex((unsigned char*) registers, remcomOutBuffer, NUMREGBYTES, 0);
- break;
- case 'P': /* set the value of a single CPU register - return OK */
- {
- int regno;
-
- if (hexToInt (&ptr, &regno) && *ptr++ == '=')
- if (regno >= 0 && regno < NUMREGS)
- {
- int stackmode;
-
- hex2mem (ptr, (unsigned char *) &registers[regno], 4, 0);
- /*
- * Since we just changed a single CPU register, let's
- * make sure to keep the several stack pointers consistant.
- */
- stackmode = registers[PSW] & 0x80;
- if (regno == R15) /* stack pointer changed */
- { /* need to change SPI or SPU */
- if (stackmode == 0)
- registers[SPI] = registers[R15];
- else
- registers[SPU] = registers[R15];
- }
- else if (regno == SPU) /* "user" stack pointer changed */
- {
- if (stackmode != 0) /* stack in user mode: copy SP */
- registers[R15] = registers[SPU];
- }
- else if (regno == SPI) /* "interrupt" stack pointer changed */
- {
- if (stackmode == 0) /* stack in interrupt mode: copy SP */
- registers[R15] = registers[SPI];
- }
- else if (regno == PSW) /* stack mode may have changed! */
- { /* force SP to either SPU or SPI */
- if (stackmode == 0) /* stack in user mode */
- registers[R15] = registers[SPI];
- else /* stack in interrupt mode */
- registers[R15] = registers[SPU];
- }
- strcpy (remcomOutBuffer, "OK");
- break;
- }
- strcpy (remcomOutBuffer, "E01");
- break;
- }
- case 'G': /* set the value of the CPU registers - return OK */
- hex2mem(ptr, (unsigned char*) registers, NUMREGBYTES, 0);
- strcpy(remcomOutBuffer,"OK");
- break;
- case 's': /* sAA..AA Step one instruction from AA..AA(optional) */
- stepping = 1;
- case 'c': /* cAA..AA Continue from address AA..AA(optional) */
- /* try to read optional parameter, pc unchanged if no parm */
- if (hexToInt(&ptr,&addr))
- registers[ PC ] = addr;
-
- if (stepping) /* single-stepping */
- {
- if (!prepare_to_step(0)) /* set up for single-step */
- {
- /* prepare_to_step has already emulated the target insn:
- Send SIGTRAP to gdb, don't resume the target at all. */
- ptr = remcomOutBuffer;
- *ptr++ = 'T'; /* Simulate stopping with SIGTRAP */
- *ptr++ = '0';
- *ptr++ = '5';
-
- *ptr++ = hexchars[PC >> 4]; /* send PC */
- *ptr++ = hexchars[PC & 0xf];
- *ptr++ = ':';
- ptr = mem2hex((unsigned char *)&registers[PC], ptr, 4, 0);
- *ptr++ = ';';
-
- *ptr++ = hexchars[R13 >> 4]; /* send FP */
- *ptr++ = hexchars[R13 & 0xf];
- *ptr++ = ':';
- ptr = mem2hex((unsigned char *)&registers[R13], ptr, 4, 0);
- *ptr++ = ';';
-
- *ptr++ = hexchars[R15 >> 4]; /* send SP */
- *ptr++ = hexchars[R15 & 0xf];
- *ptr++ = ':';
- ptr = mem2hex((unsigned char *)&registers[R15], ptr, 4, 0);
- *ptr++ = ';';
- *ptr++ = 0;
-
- break;
- }
- }
- else /* continuing, not single-stepping */
- {
- /* OK, about to do a "continue". First check to see if the
- target pc is on an odd boundary (second instruction in the
- word). If so, we must do a single-step first, because
- ya can't jump or return back to an odd boundary! */
- if ((registers[PC] & 2) != 0)
- prepare_to_step(1);
- }
-
- return;
-
- case 'D': /* Detach */
-#if 0
- /* I am interpreting this to mean, release the board from control
- by the remote stub. To do this, I am restoring the original
- (or at least previous) exception vectors.
- */
- for (i = 0; i < 18; i++)
- exceptionHandler (i, save_vectors[i]);
- putpacket ("OK");
- return; /* continue the inferior */
-#else
- strcpy(remcomOutBuffer,"OK");
- break;
-#endif
- case 'q':
- if (*ptr++ == 'C' &&
- *ptr++ == 'R' &&
- *ptr++ == 'C' &&
- *ptr++ == ':')
- {
- unsigned long start, len, our_crc;
-
- if (hexToInt (&ptr, (int *) &start) &&
- *ptr++ == ',' &&
- hexToInt (&ptr, (int *) &len))
- {
- remcomOutBuffer[0] = 'C';
- our_crc = crc32 ((unsigned char *) start, len, 0xffffffff);
- mem2hex ((char *) &our_crc,
- &remcomOutBuffer[1],
- sizeof (long),
- 0);
- } /* else do nothing */
- } /* else do nothing */
- break;
-
- case 'k': /* kill the program */
- continue;
- } /* switch */
-
- /* reply to the request */
- putpacket(remcomOutBuffer);
- }
-}
-
-/* qCRC support */
-
-/* Table used by the crc32 function to calcuate the checksum. */
-static unsigned long crc32_table[256] = {0, 0};
-
-static unsigned long
-crc32 (unsigned char *buf, int len, unsigned long crc)
-{
- if (! crc32_table[1])
- {
- /* Initialize the CRC table and the decoding table. */
- int i, j;
- unsigned long c;
-
- for (i = 0; i < 256; i++)
- {
- for (c = i << 24, j = 8; j > 0; --j)
- c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
- crc32_table[i] = c;
- }
- }
-
- while (len--)
- {
- crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
- buf++;
- }
- return crc;
-}
-
-static int
-hex (unsigned char ch)
-{
- if ((ch >= 'a') && (ch <= 'f')) return (ch-'a'+10);
- if ((ch >= '0') && (ch <= '9')) return (ch-'0');
- if ((ch >= 'A') && (ch <= 'F')) return (ch-'A'+10);
- return (-1);
-}
-
-/* scan for the sequence $<data>#<checksum> */
-
-unsigned char *
-getpacket (void)
-{
- unsigned char *buffer = &remcomInBuffer[0];
- unsigned char checksum;
- unsigned char xmitcsum;
- int count;
- char ch;
-
- while (1)
- {
- /* wait around for the start character, ignore all other characters */
- while ((ch = getDebugChar ()) != '$')
- ;
-
-retry:
- checksum = 0;
- xmitcsum = -1;
- count = 0;
-
- /* now, read until a # or end of buffer is found */
- while (count < BUFMAX)
- {
- ch = getDebugChar ();
- if (ch == '$')
- goto retry;
- if (ch == '#')
- break;
- checksum = checksum + ch;
- buffer[count] = ch;
- count = count + 1;
- }
- buffer[count] = 0;
-
- if (ch == '#')
- {
- ch = getDebugChar ();
- xmitcsum = hex (ch) << 4;
- ch = getDebugChar ();
- xmitcsum += hex (ch);
-
- if (checksum != xmitcsum)
- {
- if (remote_debug)
- {
- unsigned char buf[16];
-
- mem2hex((unsigned char *) &checksum, buf, 4, 0);
- gdb_error("Bad checksum: my count = %s, ", buf);
- mem2hex((unsigned char *) &xmitcsum, buf, 4, 0);
- gdb_error("sent count = %s\n", buf);
- gdb_error(" -- Bad buffer: \"%s\"\n", buffer);
- }
- putDebugChar ('-'); /* failed checksum */
- }
- else
- {
- putDebugChar ('+'); /* successful transfer */
-
- /* if a sequence char is present, reply the sequence ID */
- if (buffer[2] == ':')
- {
- putDebugChar (buffer[0]);
- putDebugChar (buffer[1]);
-
- return &buffer[3];
- }
-
- return &buffer[0];
- }
- }
- }
-}
-
-/* send the packet in buffer. */
-
-static void
-putpacket (unsigned char *buffer)
-{
- unsigned char checksum;
- int count;
- char ch;
-
- /* $<packet info>#<checksum>. */
- do {
- putDebugChar('$');
- checksum = 0;
- count = 0;
-
- while (ch=buffer[count]) {
- putDebugChar(ch);
- checksum += ch;
- count += 1;
- }
- putDebugChar('#');
- putDebugChar(hexchars[checksum >> 4]);
- putDebugChar(hexchars[checksum % 16]);
- } while (getDebugChar() != '+');
-}
-
-/* Address of a routine to RTE to if we get a memory fault. */
-
-static void (*volatile mem_fault_routine)() = 0;
-
-static void
-set_mem_err (void)
-{
- mem_err = 1;
-}
-
-/* Check the address for safe access ranges. As currently defined,
- this routine will reject the "expansion bus" address range(s).
- To make those ranges useable, someone must implement code to detect
- whether there's anything connected to the expansion bus. */
-
-static int
-mem_safe (unsigned char *addr)
-{
-#define BAD_RANGE_ONE_START ((unsigned char *) 0x600000)
-#define BAD_RANGE_ONE_END ((unsigned char *) 0xa00000)
-#define BAD_RANGE_TWO_START ((unsigned char *) 0xff680000)
-#define BAD_RANGE_TWO_END ((unsigned char *) 0xff800000)
-
- if (addr < BAD_RANGE_ONE_START) return 1; /* safe */
- if (addr < BAD_RANGE_ONE_END) return 0; /* unsafe */
- if (addr < BAD_RANGE_TWO_START) return 1; /* safe */
- if (addr < BAD_RANGE_TWO_END) return 0; /* unsafe */
-}
-
-/* These are separate functions so that they are so short and sweet
- that the compiler won't save any registers (if there is a fault
- to mem_fault, they won't get restored, so there better not be any
- saved). */
-static int
-get_char (unsigned char *addr)
-{
-#if 1
- if (mem_fault_routine && !mem_safe(addr))
- {
- mem_fault_routine ();
- return 0;
- }
-#endif
- return *addr;
-}
-
-static void
-set_char (unsigned char *addr, unsigned char val)
-{
-#if 1
- if (mem_fault_routine && !mem_safe (addr))
- {
- mem_fault_routine ();
- return;
- }
-#endif
- *addr = val;
-}
-
-/* Convert the memory pointed to by mem into hex, placing result in buf.
- Return a pointer to the last char put in buf (null).
- If MAY_FAULT is non-zero, then we should set mem_err in response to
- a fault; if zero treat a fault like any other fault in the stub. */
-
-static unsigned char *
-mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
-{
- int i;
- unsigned char ch;
-
- if (may_fault)
- mem_fault_routine = set_mem_err;
- for (i=0;i<count;i++) {
- ch = get_char (mem++);
- if (may_fault && mem_err)
- return (buf);
- *buf++ = hexchars[ch >> 4];
- *buf++ = hexchars[ch % 16];
- }
- *buf = 0;
- if (may_fault)
- mem_fault_routine = 0;
- return(buf);
-}
-
-/* Convert the hex array pointed to by buf into binary to be placed in mem.
- Return a pointer to the character AFTER the last byte written. */
-
-static unsigned char*
-hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
-{
- int i;
- unsigned char ch;
-
- if (may_fault)
- mem_fault_routine = set_mem_err;
- for (i=0;i<count;i++) {
- ch = hex(*buf++) << 4;
- ch = ch + hex(*buf++);
- set_char (mem++, ch);
- if (may_fault && mem_err)
- return (mem);
- }
- if (may_fault)
- mem_fault_routine = 0;
- return(mem);
-}
-
-/* Convert the binary stream in BUF to memory.
-
- Gdb will escape $, #, and the escape char (0x7d).
- COUNT is the total number of bytes to write into
- memory. */
-static unsigned char *
-bin2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
-{
- int i;
- unsigned char ch;
-
- if (may_fault)
- mem_fault_routine = set_mem_err;
- for (i = 0; i < count; i++)
- {
- /* Check for any escaped characters. Be paranoid and
- only unescape chars that should be escaped. */
- if (*buf == 0x7d)
- {
- switch (*(buf+1))
- {
- case 0x3: /* # */
- case 0x4: /* $ */
- case 0x5d: /* escape char */
- buf++;
- *buf |= 0x20;
- break;
- default:
- /* nothing */
- break;
- }
- }
-
- set_char (mem++, *buf++);
-
- if (may_fault && mem_err)
- return mem;
- }
-
- if (may_fault)
- mem_fault_routine = 0;
- return mem;
-}
-
-/* this function takes the m32r exception vector and attempts to
- translate this number into a unix compatible signal value */
-
-static int
-computeSignal (int exceptionVector)
-{
- int sigval;
- switch (exceptionVector) {
- case 0 : sigval = 23; break; /* I/O trap */
- case 1 : sigval = 5; break; /* breakpoint */
- case 2 : sigval = 5; break; /* breakpoint */
- case 3 : sigval = 5; break; /* breakpoint */
- case 4 : sigval = 5; break; /* breakpoint */
- case 5 : sigval = 5; break; /* breakpoint */
- case 6 : sigval = 5; break; /* breakpoint */
- case 7 : sigval = 5; break; /* breakpoint */
- case 8 : sigval = 5; break; /* breakpoint */
- case 9 : sigval = 5; break; /* breakpoint */
- case 10 : sigval = 5; break; /* breakpoint */
- case 11 : sigval = 5; break; /* breakpoint */
- case 12 : sigval = 5; break; /* breakpoint */
- case 13 : sigval = 5; break; /* breakpoint */
- case 14 : sigval = 5; break; /* breakpoint */
- case 15 : sigval = 5; break; /* breakpoint */
- case 16 : sigval = 10; break; /* BUS ERROR (alignment) */
- case 17 : sigval = 2; break; /* INTerrupt */
- default : sigval = 7; break; /* "software generated" */
- }
- return (sigval);
-}
-
-/**********************************************/
-/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
-/* RETURN NUMBER OF CHARS PROCESSED */
-/**********************************************/
-static int
-hexToInt (unsigned char **ptr, int *intValue)
-{
- int numChars = 0;
- int hexValue;
-
- *intValue = 0;
- while (**ptr)
- {
- hexValue = hex(**ptr);
- if (hexValue >=0)
- {
- *intValue = (*intValue <<4) | hexValue;
- numChars ++;
- }
- else
- break;
- (*ptr)++;
- }
- return (numChars);
-}
-
-/*
- Table of branch instructions:
-
- 10B6 RTE return from trap or exception
- 1FCr JMP jump
- 1ECr JL jump and link
- 7Fxx BRA branch
- FFxxxxxx BRA branch (long)
- B09rxxxx BNEZ branch not-equal-zero
- Br1rxxxx BNE branch not-equal
- 7Dxx BNC branch not-condition
- FDxxxxxx BNC branch not-condition (long)
- B0Arxxxx BLTZ branch less-than-zero
- B0Crxxxx BLEZ branch less-equal-zero
- 7Exx BL branch and link
- FExxxxxx BL branch and link (long)
- B0Drxxxx BGTZ branch greater-than-zero
- B0Brxxxx BGEZ branch greater-equal-zero
- B08rxxxx BEQZ branch equal-zero
- Br0rxxxx BEQ branch equal
- 7Cxx BC branch condition
- FCxxxxxx BC branch condition (long)
- */
-
-static int
-isShortBranch (unsigned char *instr)
-{
- unsigned char instr0 = instr[0] & 0x7F; /* mask off high bit */
-
- if (instr0 == 0x10 && instr[1] == 0xB6) /* RTE */
- return 1; /* return from trap or exception */
-
- if (instr0 == 0x1E || instr0 == 0x1F) /* JL or JMP */
- if ((instr[1] & 0xF0) == 0xC0)
- return 2; /* jump thru a register */
-
- if (instr0 == 0x7C || instr0 == 0x7D || /* BC, BNC, BL, BRA */
- instr0 == 0x7E || instr0 == 0x7F)
- return 3; /* eight bit PC offset */
-
- return 0;
-}
-
-static int
-isLongBranch (unsigned char *instr)
-{
- if (instr[0] == 0xFC || instr[0] == 0xFD || /* BRA, BNC, BL, BC */
- instr[0] == 0xFE || instr[0] == 0xFF) /* 24 bit relative */
- return 4;
- if ((instr[0] & 0xF0) == 0xB0) /* 16 bit relative */
- {
- if ((instr[1] & 0xF0) == 0x00 || /* BNE, BEQ */
- (instr[1] & 0xF0) == 0x10)
- return 5;
- if (instr[0] == 0xB0) /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ, BEQZ */
- if ((instr[1] & 0xF0) == 0x80 || (instr[1] & 0xF0) == 0x90 ||
- (instr[1] & 0xF0) == 0xA0 || (instr[1] & 0xF0) == 0xB0 ||
- (instr[1] & 0xF0) == 0xC0 || (instr[1] & 0xF0) == 0xD0)
- return 6;
- }
- return 0;
-}
-
-/* if address is NOT on a 4-byte boundary, or high-bit of instr is zero,
- then it's a 2-byte instruction, else it's a 4-byte instruction. */
-
-#define INSTRUCTION_SIZE(addr) \
- ((((int) addr & 2) || (((unsigned char *) addr)[0] & 0x80) == 0) ? 2 : 4)
-
-static int
-isBranch (unsigned char *instr)
-{
- if (INSTRUCTION_SIZE(instr) == 2)
- return isShortBranch(instr);
- else
- return isLongBranch(instr);
-}
-
-static int
-willBranch (unsigned char *instr, int branchCode)
-{
- switch (branchCode)
- {
- case 0: return 0; /* not a branch */
- case 1: return 1; /* RTE */
- case 2: return 1; /* JL or JMP */
- case 3: /* BC, BNC, BL, BRA (short) */
- case 4: /* BC, BNC, BL, BRA (long) */
- switch (instr[0] & 0x0F)
- {
- case 0xC: /* Branch if Condition Register */
- return (registers[CBR] != 0);
- case 0xD: /* Branch if NOT Condition Register */
- return (registers[CBR] == 0);
- case 0xE: /* Branch and Link */
- case 0xF: /* Branch (unconditional) */
- return 1;
- default: /* oops? */
- return 0;
- }
- case 5: /* BNE, BEQ */
- switch (instr[1] & 0xF0)
- {
- case 0x00: /* Branch if r1 equal to r2 */
- return (registers[instr[0] & 0x0F] == registers[instr[1] & 0x0F]);
- case 0x10: /* Branch if r1 NOT equal to r2 */
- return (registers[instr[0] & 0x0F] != registers[instr[1] & 0x0F]);
- default: /* oops? */
- return 0;
- }
- case 6: /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ */
- switch (instr[1] & 0xF0)
- {
- case 0x80: /* Branch if reg equal to zero */
- return (registers[instr[1] & 0x0F] == 0);
- case 0x90: /* Branch if reg NOT equal to zero */
- return (registers[instr[1] & 0x0F] != 0);
- case 0xA0: /* Branch if reg less than zero */
- return (registers[instr[1] & 0x0F] < 0);
- case 0xB0: /* Branch if reg greater or equal to zero */
- return (registers[instr[1] & 0x0F] >= 0);
- case 0xC0: /* Branch if reg less than or equal to zero */
- return (registers[instr[1] & 0x0F] <= 0);
- case 0xD0: /* Branch if reg greater than zero */
- return (registers[instr[1] & 0x0F] > 0);
- default: /* oops? */
- return 0;
- }
- default: /* oops? */
- return 0;
- }
-}
-
-static int
-branchDestination (unsigned char *instr, int branchCode)
-{
- switch (branchCode) {
- default:
- case 0: /* not a branch */
- return 0;
- case 1: /* RTE */
- return registers[BPC] & ~3; /* pop BPC into PC */
- case 2: /* JL or JMP */
- return registers[instr[1] & 0x0F] & ~3; /* jump thru a register */
- case 3: /* BC, BNC, BL, BRA (short, 8-bit relative offset) */
- return (((int) instr) & ~3) + ((char) instr[1] << 2);
- case 4: /* BC, BNC, BL, BRA (long, 24-bit relative offset) */
- return ((int) instr +
- ((((char) instr[1] << 16) | (instr[2] << 8) | (instr[3])) << 2));
- case 5: /* BNE, BEQ (16-bit relative offset) */
- case 6: /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ (ditto) */
- return ((int) instr + ((((char) instr[2] << 8) | (instr[3])) << 2));
- }
-
- /* An explanatory note: in the last three return expressions, I have
- cast the most-significant byte of the return offset to char.
- What this accomplishes is sign extension. If the other
- less-significant bytes were signed as well, they would get sign
- extended too and, if negative, their leading bits would clobber
- the bits of the more-significant bytes ahead of them. There are
- other ways I could have done this, but sign extension from
- odd-sized integers is always a pain. */
-}
-
-static void
-branchSideEffects (unsigned char *instr, int branchCode)
-{
- switch (branchCode)
- {
- case 1: /* RTE */
- return; /* I <THINK> this is already handled... */
- case 2: /* JL (or JMP) */
- case 3: /* BL (or BC, BNC, BRA) */
- case 4:
- if ((instr[0] & 0x0F) == 0x0E) /* branch/jump and link */
- registers[R14] = (registers[PC] & ~3) + 4;
- return;
- default: /* any other branch has no side effects */
- return;
- }
-}
-
-static struct STEPPING_CONTEXT {
- int stepping; /* true when we've started a single-step */
- unsigned long target_addr; /* the instr we're trying to execute */
- unsigned long target_size; /* the size of the target instr */
- unsigned long noop_addr; /* where we've inserted a no-op, if any */
- unsigned long trap1_addr; /* the trap following the target instr */
- unsigned long trap2_addr; /* the trap at a branch destination, if any */
- unsigned short noop_save; /* instruction overwritten by our no-op */
- unsigned short trap1_save; /* instruction overwritten by trap1 */
- unsigned short trap2_save; /* instruction overwritten by trap2 */
- unsigned short continue_p; /* true if NOT returning to gdb after step */
-} stepping;
-
-/* Function: prepare_to_step
- Called from handle_exception to prepare the user program to single-step.
- Places a trap instruction after the target instruction, with special
- extra handling for branch instructions and for instructions in the
- second half-word of a word.
-
- Returns: True if we should actually execute the instruction;
- False if we are going to emulate executing the instruction,
- in which case we simply report to GDB that the instruction
- has already been executed. */
-
-#define TRAP1 0x10f1; /* trap #1 instruction */
-#define NOOP 0x7000; /* noop instruction */
-
-static unsigned short trap1 = TRAP1;
-static unsigned short noop = NOOP;
-
-static int
-prepare_to_step(continue_p)
- int continue_p; /* if this isn't REALLY a single-step (see below) */
-{
- unsigned long pc = registers[PC];
- int branchCode = isBranch((unsigned char *) pc);
- unsigned char *p;
-
- /* zero out the stepping context
- (paranoia -- it should already be zeroed) */
- for (p = (unsigned char *) &stepping;
- p < ((unsigned char *) &stepping) + sizeof(stepping);
- p++)
- *p = 0;
-
- if (branchCode != 0) /* next instruction is a branch */
- {
- branchSideEffects((unsigned char *) pc, branchCode);
- if (willBranch((unsigned char *)pc, branchCode))
- registers[PC] = branchDestination((unsigned char *) pc, branchCode);
- else
- registers[PC] = pc + INSTRUCTION_SIZE(pc);
- return 0; /* branch "executed" -- just notify GDB */
- }
- else if (((int) pc & 2) != 0) /* "second-slot" instruction */
- {
- /* insert no-op before pc */
- stepping.noop_addr = pc - 2;
- stepping.noop_save = *(unsigned short *) stepping.noop_addr;
- *(unsigned short *) stepping.noop_addr = noop;
- /* insert trap after pc */
- stepping.trap1_addr = pc + 2;
- stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
- *(unsigned short *) stepping.trap1_addr = trap1;
- }
- else /* "first-slot" instruction */
- {
- /* insert trap after pc */
- stepping.trap1_addr = pc + INSTRUCTION_SIZE(pc);
- stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
- *(unsigned short *) stepping.trap1_addr = trap1;
- }
- /* "continue_p" means that we are actually doing a continue, and not
- being requested to single-step by GDB. Sometimes we have to do
- one single-step before continuing, because the PC is on a half-word
- boundary. There's no way to simply resume at such an address. */
- stepping.continue_p = continue_p;
- stepping.stepping = 1; /* starting a single-step */
- return 1;
-}
-
-/* Function: finish_from_step
- Called from handle_exception to finish up when the user program
- returns from a single-step. Replaces the instructions that had
- been overwritten by traps or no-ops,
-
- Returns: True if we should notify GDB that the target stopped.
- False if we only single-stepped because we had to before we
- could continue (ie. we were trying to continue at a
- half-word boundary). In that case don't notify GDB:
- just "continue continuing". */
-
-static int
-finish_from_step (void)
-{
- if (stepping.stepping) /* anything to do? */
- {
- int continue_p = stepping.continue_p;
- unsigned char *p;
-
- if (stepping.noop_addr) /* replace instr "under" our no-op */
- *(unsigned short *) stepping.noop_addr = stepping.noop_save;
- if (stepping.trap1_addr) /* replace instr "under" our trap */
- *(unsigned short *) stepping.trap1_addr = stepping.trap1_save;
- if (stepping.trap2_addr) /* ditto our other trap, if any */
- *(unsigned short *) stepping.trap2_addr = stepping.trap2_save;
-
- for (p = (unsigned char *) &stepping; /* zero out the stepping context */
- p < ((unsigned char *) &stepping) + sizeof(stepping);
- p++)
- *p = 0;
-
- return !(continue_p);
- }
- else /* we didn't single-step, therefore this must be a legitimate stop */
- return 1;
-}
-
-struct PSWreg { /* separate out the bit flags in the PSW register */
- int pad1 : 16;
- int bsm : 1;
- int bie : 1;
- int pad2 : 5;
- int bc : 1;
- int sm : 1;
- int ie : 1;
- int pad3 : 5;
- int c : 1;
-} *psw;
-
-/* Upon entry the value for LR to save has been pushed.
- We unpush that so that the value for the stack pointer saved is correct.
- Upon entry, all other registers are assumed to have not been modified
- since the interrupt/trap occured. */
-
-asm ("
-stash_registers:
- push r0
- push r1
- seth r1, #shigh(registers)
- add3 r1, r1, #low(registers)
- pop r0 ; r1
- st r0, @(4,r1)
- pop r0 ; r0
- st r0, @r1
- addi r1, #4 ; only add 4 as subsequent saves are `pre inc'
- st r2, @+r1
- st r3, @+r1
- st r4, @+r1
- st r5, @+r1
- st r6, @+r1
- st r7, @+r1
- st r8, @+r1
- st r9, @+r1
- st r10, @+r1
- st r11, @+r1
- st r12, @+r1
- st r13, @+r1 ; fp
- pop r0 ; lr (r14)
- st r0, @+r1
- st sp, @+r1 ; sp contains right value at this point
- mvfc r0, cr0
- st r0, @+r1 ; cr0 == PSW
- mvfc r0, cr1
- st r0, @+r1 ; cr1 == CBR
- mvfc r0, cr2
- st r0, @+r1 ; cr2 == SPI
- mvfc r0, cr3
- st r0, @+r1 ; cr3 == SPU
- mvfc r0, cr6
- st r0, @+r1 ; cr6 == BPC
- st r0, @+r1 ; PC == BPC
- mvfaclo r0
- st r0, @+r1 ; ACCL
- mvfachi r0
- st r0, @+r1 ; ACCH
- jmp lr");
-
-/* C routine to clean up what stash_registers did.
- It is called after calling stash_registers.
- This is separate from stash_registers as we want to do this in C
- but doing stash_registers in C isn't straightforward. */
-
-static void
-cleanup_stash (void)
-{
- psw = (struct PSWreg *) &registers[PSW]; /* fields of PSW register */
- psw->sm = psw->bsm; /* fix up pre-trap values of psw fields */
- psw->ie = psw->bie;
- psw->c = psw->bc;
- registers[CBR] = psw->bc; /* fix up pre-trap "C" register */
-
-#if 0 /* FIXME: Was in previous version. Necessary?
- (Remember that we use the "rte" insn to return from the
- trap/interrupt so the values of bsm, bie, bc are important. */
- psw->bsm = psw->bie = psw->bc = 0; /* zero post-trap values */
-#endif
-
- /* FIXME: Copied from previous version. This can probably be deleted
- since methinks stash_registers has already done this. */
- registers[PC] = registers[BPC]; /* pre-trap PC */
-
- /* FIXME: Copied from previous version. Necessary? */
- if (psw->sm) /* copy R15 into (psw->sm ? SPU : SPI) */
- registers[SPU] = registers[R15];
- else
- registers[SPI] = registers[R15];
-}
-
-asm ("
-restore_and_return:
- seth r0, #shigh(registers+8)
- add3 r0, r0, #low(registers+8)
- ld r2, @r0+ ; restore r2
- ld r3, @r0+ ; restore r3
- ld r4, @r0+ ; restore r4
- ld r5, @r0+ ; restore r5
- ld r6, @r0+ ; restore r6
- ld r7, @r0+ ; restore r7
- ld r8, @r0+ ; restore r8
- ld r9, @r0+ ; restore r9
- ld r10, @r0+ ; restore r10
- ld r11, @r0+ ; restore r11
- ld r12, @r0+ ; restore r12
- ld r13, @r0+ ; restore r13
- ld r14, @r0+ ; restore r14
- ld r15, @r0+ ; restore r15
- addi r0, #4 ; don't restore PSW (rte will do it)
- ld r1, @r0+ ; restore cr1 == CBR (no-op, because it's read only)
- mvtc r1, cr1
- ld r1, @r0+ ; restore cr2 == SPI
- mvtc r1, cr2
- ld r1, @r0+ ; restore cr3 == SPU
- mvtc r1, cr3
- addi r0, #4 ; skip BPC
- ld r1, @r0+ ; restore cr6 (BPC) == PC
- mvtc r1, cr6
- ld r1, @r0+ ; restore ACCL
- mvtaclo r1
- ld r1, @r0+ ; restore ACCH
- mvtachi r1
- seth r0, #shigh(registers)
- add3 r0, r0, #low(registers)
- ld r1, @(4,r0) ; restore r1
- ld r0, @r0 ; restore r0
- rte");
-
-/* General trap handler, called after the registers have been stashed.
- NUM is the trap/exception number. */
-
-static void
-process_exception (int num)
-{
- cleanup_stash ();
- asm volatile ("
- seth r1, #shigh(stackPtr)
- add3 r1, r1, #low(stackPtr)
- ld r15, @r1 ; setup local stack (protect user stack)
- mv r0, %0
- bl handle_exception
- bl restore_and_return"
- : : "r" (num) : "r0", "r1");
-}
-
-void _catchException0 ();
-
-asm ("
-_catchException0:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #0
- bl process_exception");
-
-void _catchException1 ();
-
-asm ("
-_catchException1:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- bl cleanup_stash
- seth r1, #shigh(stackPtr)
- add3 r1, r1, #low(stackPtr)
- ld r15, @r1 ; setup local stack (protect user stack)
- seth r1, #shigh(registers + 21*4) ; PC
- add3 r1, r1, #low(registers + 21*4)
- ld r0, @r1
- addi r0, #-4 ; back up PC for breakpoint trap.
- st r0, @r1 ; FIXME: what about bp in right slot?
- ldi r0, #1
- bl handle_exception
- bl restore_and_return");
-
-void _catchException2 ();
-
-asm ("
-_catchException2:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #2
- bl process_exception");
-
-void _catchException3 ();
-
-asm ("
-_catchException3:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #3
- bl process_exception");
-
-void _catchException4 ();
-
-asm ("
-_catchException4:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #4
- bl process_exception");
-
-void _catchException5 ();
-
-asm ("
-_catchException5:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #5
- bl process_exception");
-
-void _catchException6 ();
-
-asm ("
-_catchException6:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #6
- bl process_exception");
-
-void _catchException7 ();
-
-asm ("
-_catchException7:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #7
- bl process_exception");
-
-void _catchException8 ();
-
-asm ("
-_catchException8:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #8
- bl process_exception");
-
-void _catchException9 ();
-
-asm ("
-_catchException9:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #9
- bl process_exception");
-
-void _catchException10 ();
-
-asm ("
-_catchException10:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #10
- bl process_exception");
-
-void _catchException11 ();
-
-asm ("
-_catchException11:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #11
- bl process_exception");
-
-void _catchException12 ();
-
-asm ("
-_catchException12:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #12
- bl process_exception");
-
-void _catchException13 ();
-
-asm ("
-_catchException13:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #13
- bl process_exception");
-
-void _catchException14 ();
-
-asm ("
-_catchException14:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #14
- bl process_exception");
-
-void _catchException15 ();
-
-asm ("
-_catchException15:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #15
- bl process_exception");
-
-void _catchException16 ();
-
-asm ("
-_catchException16:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #16
- bl process_exception");
-
-void _catchException17 ();
-
-asm ("
-_catchException17:
- push lr
- bl stash_registers
- ; Note that at this point the pushed value of `lr' has been popped
- ldi r0, #17
- bl process_exception");
-
-
-/* this function is used to set up exception handlers for tracing and
- breakpoints */
-void
-set_debug_traps (void)
-{
- /* extern void remcomHandler(); */
- int i;
-
- for (i = 0; i < 18; i++) /* keep a copy of old vectors */
- if (save_vectors[i] == 0) /* only copy them the first time */
- save_vectors[i] = getExceptionHandler (i);
-
- stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
-
- exceptionHandler (0, _catchException0);
- exceptionHandler (1, _catchException1);
- exceptionHandler (2, _catchException2);
- exceptionHandler (3, _catchException3);
- exceptionHandler (4, _catchException4);
- exceptionHandler (5, _catchException5);
- exceptionHandler (6, _catchException6);
- exceptionHandler (7, _catchException7);
- exceptionHandler (8, _catchException8);
- exceptionHandler (9, _catchException9);
- exceptionHandler (10, _catchException10);
- exceptionHandler (11, _catchException11);
- exceptionHandler (12, _catchException12);
- exceptionHandler (13, _catchException13);
- exceptionHandler (14, _catchException14);
- exceptionHandler (15, _catchException15);
- exceptionHandler (16, _catchException16);
- /* exceptionHandler (17, _catchException17); */
-
- initialized = 1;
-}
-
-/* This function will generate a breakpoint exception. It is used at the
- beginning of a program to sync up with a debugger and can be used
- otherwise as a quick means to stop program execution and "break" into
- the debugger. */
-
-#define BREAKPOINT() asm volatile (" trap #2");
-
-void
-breakpoint (void)
-{
- if (initialized)
- BREAKPOINT();
-}
-
-/* STDOUT section:
- Stuff pertaining to simulating stdout by sending chars to gdb to be echoed.
- Functions: gdb_putchar(char ch)
- gdb_puts(char *str)
- gdb_write(char *str, int len)
- gdb_error(char *format, char *parm)
- */
-
-/* Function: gdb_putchar(int)
- Make gdb write a char to stdout.
- Returns: the char */
-
-static int
-gdb_putchar (int ch)
-{
- char buf[4];
-
- buf[0] = 'O';
- buf[1] = hexchars[ch >> 4];
- buf[2] = hexchars[ch & 0x0F];
- buf[3] = 0;
- putpacket(buf);
- return ch;
-}
-
-/* Function: gdb_write(char *, int)
- Make gdb write n bytes to stdout (not assumed to be null-terminated).
- Returns: number of bytes written */
-
-static int
-gdb_write (char *data, int len)
-{
- char *buf, *cpy;
- int i;
-
- buf = remcomOutBuffer;
- buf[0] = 'O';
- i = 0;
- while (i < len)
- {
- for (cpy = buf+1;
- i < len && cpy < buf + sizeof(remcomOutBuffer) - 3;
- i++)
- {
- *cpy++ = hexchars[data[i] >> 4];
- *cpy++ = hexchars[data[i] & 0x0F];
- }
- *cpy = 0;
- putpacket(buf);
- }
- return len;
-}
-
-/* Function: gdb_puts(char *)
- Make gdb write a null-terminated string to stdout.
- Returns: the length of the string */
-
-static int
-gdb_puts (char *str)
-{
- return gdb_write(str, strlen(str));
-}
-
-/* Function: gdb_error(char *, char *)
- Send an error message to gdb's stdout.
- First string may have 1 (one) optional "%s" in it, which
- will cause the optional second string to be inserted. */
-
-static void
-gdb_error (char *format, char *parm)
-{
- char buf[400], *cpy;
- int len;
-
- if (remote_debug)
- {
- if (format && *format)
- len = strlen(format);
- else
- return; /* empty input */
-
- if (parm && *parm)
- len += strlen(parm);
-
- for (cpy = buf; *format; )
- {
- if (format[0] == '%' && format[1] == 's') /* include second string */
- {
- format += 2; /* advance two chars instead of just one */
- while (parm && *parm)
- *cpy++ = *parm++;
- }
- else
- *cpy++ = *format++;
- }
- *cpy = '\0';
- gdb_puts(buf);
- }
-}
-
-static unsigned char *
-strcpy (unsigned char *dest, const unsigned char *src)
-{
- unsigned char *ret = dest;
-
- if (dest && src)
- {
- while (*src)
- *dest++ = *src++;
- *dest = 0;
- }
- return ret;
-}
-
-static int
-strlen (const unsigned char *src)
-{
- int ret;
-
- for (ret = 0; *src; src++)
- ret++;
-
- return ret;
-}
-
-#if 0
-void exit (code)
- int code;
-{
- _exit (code);
-}
-
-int atexit (void *p)
-{
- return 0;
-}
-
-void abort (void)
-{
- _exit (1);
-}
-#endif
+// 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 M32R by Michael Snyder, Cygnus Support.
+// 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 * The external function exceptionHandler() is
+// OBSOLETE * used to attach a specific handler to a specific M32R vector number.
+// OBSOLETE * It should use the same privilege level it runs at. It should
+// OBSOLETE * install it as an interrupt gate so that interrupts are masked
+// OBSOLETE * while the handler runs.
+// OBSOLETE *
+// OBSOLETE * Because gdb will sometimes write to the stack area to execute function
+// OBSOLETE * calls, this program cannot rely on using the supervisor stack so it
+// OBSOLETE * uses it's own stack area reserved in the int array remcomStack.
+// 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 *
+// 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 * XAA..AA,LLLL: Write LLLL binary bytes at address OK or ENN
+// OBSOLETE * AA..AA
+// 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
+// OBSOLETE /************************************************************************
+// OBSOLETE *
+// OBSOLETE * external low-level support routines
+// OBSOLETE */
+// OBSOLETE extern void putDebugChar(); /* write a single character */
+// OBSOLETE extern int getDebugChar(); /* read and return a single char */
+// OBSOLETE extern void exceptionHandler(); /* assign an exception handler */
+// 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 */
+// OBSOLETE #define BUFMAX 400
+// OBSOLETE
+// OBSOLETE static char initialized; /* boolean flag. != 0 means we've been initialized */
+// OBSOLETE
+// OBSOLETE int remote_debug;
+// OBSOLETE /* debug > 0 prints ill-formed commands in valid packets & checksum errors */
+// OBSOLETE
+// OBSOLETE static const unsigned char hexchars[]="0123456789abcdef";
+// OBSOLETE
+// OBSOLETE #define NUMREGS 24
+// OBSOLETE
+// OBSOLETE /* Number of bytes of registers. */
+// OBSOLETE #define NUMREGBYTES (NUMREGS * 4)
+// OBSOLETE enum regnames { R0, R1, R2, R3, R4, R5, R6, R7,
+// OBSOLETE R8, R9, R10, R11, R12, R13, R14, R15,
+// OBSOLETE PSW, CBR, SPI, SPU, BPC, PC, ACCL, ACCH };
+// OBSOLETE
+// OBSOLETE enum SYS_calls {
+// OBSOLETE SYS_null,
+// OBSOLETE SYS_exit,
+// OBSOLETE SYS_open,
+// OBSOLETE SYS_close,
+// OBSOLETE SYS_read,
+// OBSOLETE SYS_write,
+// OBSOLETE SYS_lseek,
+// OBSOLETE SYS_unlink,
+// OBSOLETE SYS_getpid,
+// OBSOLETE SYS_kill,
+// OBSOLETE SYS_fstat,
+// OBSOLETE SYS_sbrk,
+// OBSOLETE SYS_fork,
+// OBSOLETE SYS_execve,
+// OBSOLETE SYS_wait4,
+// OBSOLETE SYS_link,
+// OBSOLETE SYS_chdir,
+// OBSOLETE SYS_stat,
+// OBSOLETE SYS_utime,
+// OBSOLETE SYS_chown,
+// OBSOLETE SYS_chmod,
+// OBSOLETE SYS_time,
+// OBSOLETE SYS_pipe };
+// OBSOLETE
+// OBSOLETE static int registers[NUMREGS];
+// OBSOLETE
+// OBSOLETE #define STACKSIZE 8096
+// OBSOLETE static unsigned char remcomInBuffer[BUFMAX];
+// OBSOLETE static unsigned char remcomOutBuffer[BUFMAX];
+// OBSOLETE static int remcomStack[STACKSIZE/sizeof(int)];
+// OBSOLETE static int* stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
+// OBSOLETE
+// OBSOLETE static unsigned int save_vectors[18]; /* previous exception vectors */
+// OBSOLETE
+// OBSOLETE /* Indicate to caller of mem2hex or hex2mem that there has been an error. */
+// OBSOLETE static volatile int mem_err = 0;
+// OBSOLETE
+// OBSOLETE /* Store the vector number here (since GDB only gets the signal
+// OBSOLETE number through the usual means, and that's not very specific). */
+// OBSOLETE int gdb_m32r_vector = -1;
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE #include "syscall.h" /* for SYS_exit, SYS_write etc. */
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE /* Global entry points:
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE extern void handle_exception(int);
+// OBSOLETE extern void set_debug_traps(void);
+// OBSOLETE extern void breakpoint(void);
+// OBSOLETE
+// OBSOLETE /* Local functions:
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static int computeSignal(int);
+// OBSOLETE static void putpacket(unsigned char *);
+// OBSOLETE static unsigned char *getpacket(void);
+// OBSOLETE
+// OBSOLETE static unsigned char *mem2hex(unsigned char *, unsigned char *, int, int);
+// OBSOLETE static unsigned char *hex2mem(unsigned char *, unsigned char *, int, int);
+// OBSOLETE static int hexToInt(unsigned char **, int *);
+// OBSOLETE static unsigned char *bin2mem(unsigned char *, unsigned char *, int, int);
+// OBSOLETE static void stash_registers(void);
+// OBSOLETE static void restore_registers(void);
+// OBSOLETE static int prepare_to_step(int);
+// OBSOLETE static int finish_from_step(void);
+// OBSOLETE static unsigned long crc32 (unsigned char *, int, unsigned long);
+// OBSOLETE
+// OBSOLETE static void gdb_error(char *, char *);
+// OBSOLETE static int gdb_putchar(int), gdb_puts(char *), gdb_write(char *, int);
+// OBSOLETE
+// OBSOLETE static unsigned char *strcpy (unsigned char *, const unsigned char *);
+// OBSOLETE static int strlen (const unsigned char *);
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * This function does all command procesing for interfacing to gdb.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE handle_exception(int exceptionVector)
+// OBSOLETE {
+// OBSOLETE int sigval, stepping;
+// OBSOLETE int addr, length, i;
+// OBSOLETE unsigned char * ptr;
+// OBSOLETE unsigned char buf[16];
+// OBSOLETE int binary;
+// OBSOLETE
+// OBSOLETE /* Do not call finish_from_step() if this is not a trap #1
+// OBSOLETE * (breakpoint trap). Without this check, the finish_from_step()
+// OBSOLETE * might interpret a system call trap as a single step trap. This
+// OBSOLETE * can happen if: the stub receives 's' and exits, but an interrupt
+// OBSOLETE * was pending; the interrupt is now handled and causes the stub to
+// OBSOLETE * be reentered because some function makes a system call.
+// OBSOLETE */
+// OBSOLETE if (exceptionVector == 1) /* Trap exception? */
+// OBSOLETE if (!finish_from_step()) /* Go see if stepping state needs update. */
+// OBSOLETE return; /* "false step": let the target continue */
+// OBSOLETE
+// OBSOLETE gdb_m32r_vector = exceptionVector;
+// OBSOLETE
+// OBSOLETE if (remote_debug)
+// OBSOLETE {
+// OBSOLETE mem2hex((unsigned char *) &exceptionVector, buf, 4, 0);
+// OBSOLETE gdb_error("Handle exception %s, ", buf);
+// OBSOLETE mem2hex((unsigned char *) &registers[PC], buf, 4, 0);
+// OBSOLETE gdb_error("PC == 0x%s\n", buf);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* reply to host that an exception has occurred */
+// OBSOLETE sigval = computeSignal( exceptionVector );
+// OBSOLETE
+// OBSOLETE ptr = remcomOutBuffer;
+// OBSOLETE
+// OBSOLETE *ptr++ = 'T'; /* notify gdb with signo, PC, FP and SP */
+// 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((unsigned char *)&registers[PC], ptr, 4, 0); /* PC */
+// OBSOLETE *ptr++ = ';';
+// OBSOLETE
+// OBSOLETE *ptr++ = hexchars[R13 >> 4];
+// OBSOLETE *ptr++ = hexchars[R13 & 0xf];
+// OBSOLETE *ptr++ = ':';
+// OBSOLETE ptr = mem2hex((unsigned char *)&registers[R13], ptr, 4, 0); /* FP */
+// OBSOLETE *ptr++ = ';';
+// OBSOLETE
+// OBSOLETE *ptr++ = hexchars[R15 >> 4];
+// OBSOLETE *ptr++ = hexchars[R15 & 0xf];
+// OBSOLETE *ptr++ = ':';
+// OBSOLETE ptr = mem2hex((unsigned char *)&registers[R15], ptr, 4, 0); /* SP */
+// OBSOLETE *ptr++ = ';';
+// OBSOLETE *ptr++ = 0;
+// OBSOLETE
+// OBSOLETE if (exceptionVector == 0) /* simulated SYS call stuff */
+// OBSOLETE {
+// OBSOLETE mem2hex((unsigned char *) &registers[PC], buf, 4, 0);
+// OBSOLETE switch (registers[R0]) {
+// OBSOLETE case SYS_exit:
+// OBSOLETE gdb_error("Target program has exited at %s\n", buf);
+// OBSOLETE ptr = remcomOutBuffer;
+// OBSOLETE *ptr++ = 'W';
+// OBSOLETE sigval = registers[R1] & 0xff;
+// OBSOLETE *ptr++ = hexchars[sigval >> 4];
+// OBSOLETE *ptr++ = hexchars[sigval & 0xf];
+// OBSOLETE *ptr++ = 0;
+// OBSOLETE break;
+// OBSOLETE case SYS_open:
+// OBSOLETE gdb_error("Target attempts SYS_open call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_close:
+// OBSOLETE gdb_error("Target attempts SYS_close call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_read:
+// OBSOLETE gdb_error("Target attempts SYS_read call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_write:
+// OBSOLETE if (registers[R1] == 1 || /* write to stdout */
+// OBSOLETE registers[R1] == 2) /* write to stderr */
+// OBSOLETE { /* (we can do that) */
+// OBSOLETE registers[R0] = gdb_write((void *) registers[R2], registers[R3]);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE gdb_error("Target attempts SYS_write call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_lseek:
+// OBSOLETE gdb_error("Target attempts SYS_lseek call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_unlink:
+// OBSOLETE gdb_error("Target attempts SYS_unlink call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_getpid:
+// OBSOLETE gdb_error("Target attempts SYS_getpid call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_kill:
+// OBSOLETE gdb_error("Target attempts SYS_kill call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE case SYS_fstat:
+// OBSOLETE gdb_error("Target attempts SYS_fstat call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE gdb_error("Target attempts unknown SYS call at %s\n", buf);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE putpacket(remcomOutBuffer);
+// OBSOLETE
+// OBSOLETE stepping = 0;
+// OBSOLETE
+// OBSOLETE while (1==1) {
+// OBSOLETE remcomOutBuffer[0] = 0;
+// OBSOLETE ptr = getpacket();
+// OBSOLETE binary = 0;
+// OBSOLETE switch (*ptr++) {
+// OBSOLETE default: /* Unknown code. Return an empty reply message. */
+// OBSOLETE break;
+// OBSOLETE case 'R':
+// OBSOLETE if (hexToInt (&ptr, &addr))
+// OBSOLETE registers[PC] = addr;
+// OBSOLETE strcpy(remcomOutBuffer, "OK");
+// OBSOLETE break;
+// OBSOLETE case '!':
+// OBSOLETE strcpy(remcomOutBuffer, "OK");
+// OBSOLETE break;
+// OBSOLETE case 'X': /* XAA..AA,LLLL:<binary data>#cs */
+// OBSOLETE binary = 1;
+// OBSOLETE case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
+// OBSOLETE /* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
+// OBSOLETE {
+// OBSOLETE if (hexToInt(&ptr,&addr))
+// OBSOLETE if (*(ptr++) == ',')
+// OBSOLETE if (hexToInt(&ptr,&length))
+// OBSOLETE if (*(ptr++) == ':')
+// OBSOLETE {
+// OBSOLETE mem_err = 0;
+// OBSOLETE if (binary)
+// OBSOLETE bin2mem (ptr, (unsigned char *) addr, length, 1);
+// OBSOLETE else
+// OBSOLETE hex2mem(ptr, (unsigned char*) addr, length, 1);
+// OBSOLETE if (mem_err) {
+// OBSOLETE strcpy (remcomOutBuffer, "E03");
+// OBSOLETE gdb_error ("memory fault", "");
+// OBSOLETE } else {
+// OBSOLETE strcpy(remcomOutBuffer,"OK");
+// OBSOLETE }
+// OBSOLETE ptr = 0;
+// OBSOLETE }
+// OBSOLETE if (ptr)
+// OBSOLETE {
+// OBSOLETE strcpy(remcomOutBuffer,"E02");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
+// OBSOLETE /* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
+// OBSOLETE if (hexToInt(&ptr,&addr))
+// OBSOLETE if (*(ptr++) == ',')
+// OBSOLETE if (hexToInt(&ptr,&length))
+// OBSOLETE {
+// OBSOLETE ptr = 0;
+// OBSOLETE mem_err = 0;
+// OBSOLETE mem2hex((unsigned char*) addr, remcomOutBuffer, length, 1);
+// OBSOLETE if (mem_err) {
+// OBSOLETE strcpy (remcomOutBuffer, "E03");
+// OBSOLETE gdb_error ("memory fault", "");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ptr)
+// OBSOLETE {
+// OBSOLETE strcpy(remcomOutBuffer,"E01");
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case '?':
+// OBSOLETE remcomOutBuffer[0] = 'S';
+// OBSOLETE remcomOutBuffer[1] = hexchars[sigval >> 4];
+// OBSOLETE remcomOutBuffer[2] = hexchars[sigval % 16];
+// OBSOLETE remcomOutBuffer[3] = 0;
+// OBSOLETE break;
+// OBSOLETE case 'd':
+// OBSOLETE remote_debug = !(remote_debug); /* toggle debug flag */
+// OBSOLETE break;
+// OBSOLETE case 'g': /* return the value of the CPU registers */
+// OBSOLETE mem2hex((unsigned char*) registers, remcomOutBuffer, NUMREGBYTES, 0);
+// OBSOLETE break;
+// OBSOLETE case 'P': /* set the value of a single CPU register - return OK */
+// OBSOLETE {
+// OBSOLETE int regno;
+// OBSOLETE
+// OBSOLETE if (hexToInt (&ptr, &regno) && *ptr++ == '=')
+// OBSOLETE if (regno >= 0 && regno < NUMREGS)
+// OBSOLETE {
+// OBSOLETE int stackmode;
+// OBSOLETE
+// OBSOLETE hex2mem (ptr, (unsigned char *) &registers[regno], 4, 0);
+// OBSOLETE /*
+// OBSOLETE * Since we just changed a single CPU register, let's
+// OBSOLETE * make sure to keep the several stack pointers consistant.
+// OBSOLETE */
+// OBSOLETE stackmode = registers[PSW] & 0x80;
+// OBSOLETE if (regno == R15) /* stack pointer changed */
+// OBSOLETE { /* need to change SPI or SPU */
+// OBSOLETE if (stackmode == 0)
+// OBSOLETE registers[SPI] = registers[R15];
+// OBSOLETE else
+// OBSOLETE registers[SPU] = registers[R15];
+// OBSOLETE }
+// OBSOLETE else if (regno == SPU) /* "user" stack pointer changed */
+// OBSOLETE {
+// OBSOLETE if (stackmode != 0) /* stack in user mode: copy SP */
+// OBSOLETE registers[R15] = registers[SPU];
+// OBSOLETE }
+// OBSOLETE else if (regno == SPI) /* "interrupt" stack pointer changed */
+// OBSOLETE {
+// OBSOLETE if (stackmode == 0) /* stack in interrupt mode: copy SP */
+// OBSOLETE registers[R15] = registers[SPI];
+// OBSOLETE }
+// OBSOLETE else if (regno == PSW) /* stack mode may have changed! */
+// OBSOLETE { /* force SP to either SPU or SPI */
+// OBSOLETE if (stackmode == 0) /* stack in user mode */
+// OBSOLETE registers[R15] = registers[SPI];
+// OBSOLETE else /* stack in interrupt mode */
+// OBSOLETE registers[R15] = registers[SPU];
+// OBSOLETE }
+// OBSOLETE strcpy (remcomOutBuffer, "OK");
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE strcpy (remcomOutBuffer, "E01");
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE case 'G': /* set the value of the CPU registers - return OK */
+// OBSOLETE hex2mem(ptr, (unsigned char*) registers, NUMREGBYTES, 0);
+// OBSOLETE strcpy(remcomOutBuffer,"OK");
+// OBSOLETE break;
+// OBSOLETE case 's': /* sAA..AA Step one instruction from AA..AA(optional) */
+// OBSOLETE stepping = 1;
+// OBSOLETE case 'c': /* cAA..AA Continue from address AA..AA(optional) */
+// OBSOLETE /* try to read optional parameter, pc unchanged if no parm */
+// OBSOLETE if (hexToInt(&ptr,&addr))
+// OBSOLETE registers[ PC ] = addr;
+// OBSOLETE
+// OBSOLETE if (stepping) /* single-stepping */
+// OBSOLETE {
+// OBSOLETE if (!prepare_to_step(0)) /* set up for single-step */
+// OBSOLETE {
+// OBSOLETE /* prepare_to_step has already emulated the target insn:
+// OBSOLETE Send SIGTRAP to gdb, don't resume the target at all. */
+// OBSOLETE ptr = remcomOutBuffer;
+// OBSOLETE *ptr++ = 'T'; /* Simulate stopping with SIGTRAP */
+// OBSOLETE *ptr++ = '0';
+// OBSOLETE *ptr++ = '5';
+// OBSOLETE
+// OBSOLETE *ptr++ = hexchars[PC >> 4]; /* send PC */
+// OBSOLETE *ptr++ = hexchars[PC & 0xf];
+// OBSOLETE *ptr++ = ':';
+// OBSOLETE ptr = mem2hex((unsigned char *)&registers[PC], ptr, 4, 0);
+// OBSOLETE *ptr++ = ';';
+// OBSOLETE
+// OBSOLETE *ptr++ = hexchars[R13 >> 4]; /* send FP */
+// OBSOLETE *ptr++ = hexchars[R13 & 0xf];
+// OBSOLETE *ptr++ = ':';
+// OBSOLETE ptr = mem2hex((unsigned char *)&registers[R13], ptr, 4, 0);
+// OBSOLETE *ptr++ = ';';
+// OBSOLETE
+// OBSOLETE *ptr++ = hexchars[R15 >> 4]; /* send SP */
+// OBSOLETE *ptr++ = hexchars[R15 & 0xf];
+// OBSOLETE *ptr++ = ':';
+// OBSOLETE ptr = mem2hex((unsigned char *)&registers[R15], ptr, 4, 0);
+// OBSOLETE *ptr++ = ';';
+// OBSOLETE *ptr++ = 0;
+// OBSOLETE
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else /* continuing, not single-stepping */
+// OBSOLETE {
+// OBSOLETE /* OK, about to do a "continue". First check to see if the
+// OBSOLETE target pc is on an odd boundary (second instruction in the
+// OBSOLETE word). If so, we must do a single-step first, because
+// OBSOLETE ya can't jump or return back to an odd boundary! */
+// OBSOLETE if ((registers[PC] & 2) != 0)
+// OBSOLETE prepare_to_step(1);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return;
+// OBSOLETE
+// OBSOLETE case 'D': /* Detach */
+// OBSOLETE #if 0
+// OBSOLETE /* I am interpreting this to mean, release the board from control
+// OBSOLETE by the remote stub. To do this, I am restoring the original
+// OBSOLETE (or at least previous) exception vectors.
+// OBSOLETE */
+// OBSOLETE for (i = 0; i < 18; i++)
+// OBSOLETE exceptionHandler (i, save_vectors[i]);
+// OBSOLETE putpacket ("OK");
+// OBSOLETE return; /* continue the inferior */
+// OBSOLETE #else
+// OBSOLETE strcpy(remcomOutBuffer,"OK");
+// OBSOLETE break;
+// OBSOLETE #endif
+// OBSOLETE case 'q':
+// OBSOLETE if (*ptr++ == 'C' &&
+// OBSOLETE *ptr++ == 'R' &&
+// OBSOLETE *ptr++ == 'C' &&
+// OBSOLETE *ptr++ == ':')
+// OBSOLETE {
+// OBSOLETE unsigned long start, len, our_crc;
+// OBSOLETE
+// OBSOLETE if (hexToInt (&ptr, (int *) &start) &&
+// OBSOLETE *ptr++ == ',' &&
+// OBSOLETE hexToInt (&ptr, (int *) &len))
+// OBSOLETE {
+// OBSOLETE remcomOutBuffer[0] = 'C';
+// OBSOLETE our_crc = crc32 ((unsigned char *) start, len, 0xffffffff);
+// OBSOLETE mem2hex ((char *) &our_crc,
+// OBSOLETE &remcomOutBuffer[1],
+// OBSOLETE sizeof (long),
+// OBSOLETE 0);
+// OBSOLETE } /* else do nothing */
+// OBSOLETE } /* else do nothing */
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case 'k': /* kill the program */
+// OBSOLETE continue;
+// OBSOLETE } /* switch */
+// OBSOLETE
+// OBSOLETE /* reply to the request */
+// OBSOLETE putpacket(remcomOutBuffer);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* qCRC support */
+// OBSOLETE
+// OBSOLETE /* Table used by the crc32 function to calcuate the checksum. */
+// OBSOLETE static unsigned long crc32_table[256] = {0, 0};
+// OBSOLETE
+// OBSOLETE static unsigned long
+// OBSOLETE crc32 (unsigned char *buf, int len, unsigned long crc)
+// OBSOLETE {
+// OBSOLETE if (! crc32_table[1])
+// OBSOLETE {
+// OBSOLETE /* Initialize the CRC table and the decoding table. */
+// OBSOLETE int i, j;
+// OBSOLETE unsigned long c;
+// OBSOLETE
+// OBSOLETE for (i = 0; i < 256; i++)
+// OBSOLETE {
+// OBSOLETE for (c = i << 24, j = 8; j > 0; --j)
+// OBSOLETE c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
+// OBSOLETE crc32_table[i] = c;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE while (len--)
+// OBSOLETE {
+// OBSOLETE crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
+// OBSOLETE buf++;
+// OBSOLETE }
+// OBSOLETE return crc;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE hex (unsigned char ch)
+// OBSOLETE {
+// OBSOLETE if ((ch >= 'a') && (ch <= 'f')) return (ch-'a'+10);
+// OBSOLETE if ((ch >= '0') && (ch <= '9')) return (ch-'0');
+// OBSOLETE if ((ch >= 'A') && (ch <= 'F')) return (ch-'A'+10);
+// OBSOLETE return (-1);
+// OBSOLETE }
+// 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 if (remote_debug)
+// OBSOLETE {
+// OBSOLETE unsigned char buf[16];
+// OBSOLETE
+// OBSOLETE mem2hex((unsigned char *) &checksum, buf, 4, 0);
+// OBSOLETE gdb_error("Bad checksum: my count = %s, ", buf);
+// OBSOLETE mem2hex((unsigned char *) &xmitcsum, buf, 4, 0);
+// OBSOLETE gdb_error("sent count = %s\n", buf);
+// OBSOLETE gdb_error(" -- Bad buffer: \"%s\"\n", buffer);
+// 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 char ch;
+// OBSOLETE
+// OBSOLETE /* $<packet info>#<checksum>. */
+// OBSOLETE do {
+// OBSOLETE putDebugChar('$');
+// OBSOLETE checksum = 0;
+// OBSOLETE count = 0;
+// OBSOLETE
+// OBSOLETE while (ch=buffer[count]) {
+// OBSOLETE putDebugChar(ch);
+// OBSOLETE checksum += ch;
+// OBSOLETE count += 1;
+// OBSOLETE }
+// OBSOLETE putDebugChar('#');
+// OBSOLETE putDebugChar(hexchars[checksum >> 4]);
+// OBSOLETE putDebugChar(hexchars[checksum % 16]);
+// OBSOLETE } while (getDebugChar() != '+');
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Address of a routine to RTE to if we get a memory fault. */
+// OBSOLETE
+// OBSOLETE static void (*volatile mem_fault_routine)() = 0;
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE set_mem_err (void)
+// OBSOLETE {
+// OBSOLETE mem_err = 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Check the address for safe access ranges. As currently defined,
+// OBSOLETE this routine will reject the "expansion bus" address range(s).
+// OBSOLETE To make those ranges useable, someone must implement code to detect
+// OBSOLETE whether there's anything connected to the expansion bus. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE mem_safe (unsigned char *addr)
+// OBSOLETE {
+// OBSOLETE #define BAD_RANGE_ONE_START ((unsigned char *) 0x600000)
+// OBSOLETE #define BAD_RANGE_ONE_END ((unsigned char *) 0xa00000)
+// OBSOLETE #define BAD_RANGE_TWO_START ((unsigned char *) 0xff680000)
+// OBSOLETE #define BAD_RANGE_TWO_END ((unsigned char *) 0xff800000)
+// OBSOLETE
+// OBSOLETE if (addr < BAD_RANGE_ONE_START) return 1; /* safe */
+// OBSOLETE if (addr < BAD_RANGE_ONE_END) return 0; /* unsafe */
+// OBSOLETE if (addr < BAD_RANGE_TWO_START) return 1; /* safe */
+// OBSOLETE if (addr < BAD_RANGE_TWO_END) return 0; /* unsafe */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* These are separate functions so that they are so short and sweet
+// OBSOLETE that the compiler won't save any registers (if there is a fault
+// OBSOLETE to mem_fault, they won't get restored, so there better not be any
+// OBSOLETE saved). */
+// OBSOLETE static int
+// OBSOLETE get_char (unsigned char *addr)
+// OBSOLETE {
+// OBSOLETE #if 1
+// OBSOLETE if (mem_fault_routine && !mem_safe(addr))
+// OBSOLETE {
+// OBSOLETE mem_fault_routine ();
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE return *addr;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE set_char (unsigned char *addr, unsigned char val)
+// OBSOLETE {
+// OBSOLETE #if 1
+// OBSOLETE if (mem_fault_routine && !mem_safe (addr))
+// OBSOLETE {
+// OBSOLETE mem_fault_routine ();
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE *addr = val;
+// OBSOLETE }
+// 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).
+// OBSOLETE If MAY_FAULT is non-zero, then we should set mem_err in response to
+// OBSOLETE a fault; if zero treat a fault like any other fault in the stub. */
+// OBSOLETE
+// OBSOLETE static unsigned char *
+// OBSOLETE mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE unsigned char ch;
+// OBSOLETE
+// OBSOLETE if (may_fault)
+// OBSOLETE mem_fault_routine = set_mem_err;
+// OBSOLETE for (i=0;i<count;i++) {
+// OBSOLETE ch = get_char (mem++);
+// OBSOLETE if (may_fault && mem_err)
+// OBSOLETE return (buf);
+// OBSOLETE *buf++ = hexchars[ch >> 4];
+// OBSOLETE *buf++ = hexchars[ch % 16];
+// OBSOLETE }
+// OBSOLETE *buf = 0;
+// OBSOLETE if (may_fault)
+// OBSOLETE mem_fault_routine = 0;
+// 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 unsigned char*
+// OBSOLETE hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE unsigned char ch;
+// OBSOLETE
+// OBSOLETE if (may_fault)
+// OBSOLETE mem_fault_routine = set_mem_err;
+// OBSOLETE for (i=0;i<count;i++) {
+// OBSOLETE ch = hex(*buf++) << 4;
+// OBSOLETE ch = ch + hex(*buf++);
+// OBSOLETE set_char (mem++, ch);
+// OBSOLETE if (may_fault && mem_err)
+// OBSOLETE return (mem);
+// OBSOLETE }
+// OBSOLETE if (may_fault)
+// OBSOLETE mem_fault_routine = 0;
+// OBSOLETE return(mem);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Convert the binary stream in BUF to memory.
+// OBSOLETE
+// OBSOLETE Gdb will escape $, #, and the escape char (0x7d).
+// OBSOLETE COUNT is the total number of bytes to write into
+// OBSOLETE memory. */
+// OBSOLETE static unsigned char *
+// OBSOLETE bin2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE unsigned char ch;
+// OBSOLETE
+// OBSOLETE if (may_fault)
+// OBSOLETE mem_fault_routine = set_mem_err;
+// OBSOLETE for (i = 0; i < count; i++)
+// OBSOLETE {
+// OBSOLETE /* Check for any escaped characters. Be paranoid and
+// OBSOLETE only unescape chars that should be escaped. */
+// OBSOLETE if (*buf == 0x7d)
+// OBSOLETE {
+// OBSOLETE switch (*(buf+1))
+// OBSOLETE {
+// OBSOLETE case 0x3: /* # */
+// OBSOLETE case 0x4: /* $ */
+// OBSOLETE case 0x5d: /* escape char */
+// OBSOLETE buf++;
+// OBSOLETE *buf |= 0x20;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE /* nothing */
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE set_char (mem++, *buf++);
+// OBSOLETE
+// OBSOLETE if (may_fault && mem_err)
+// OBSOLETE return mem;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (may_fault)
+// OBSOLETE mem_fault_routine = 0;
+// OBSOLETE return mem;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* this function takes the m32r exception vector and attempts to
+// OBSOLETE translate this number into a unix compatible signal value */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE computeSignal (int exceptionVector)
+// OBSOLETE {
+// OBSOLETE int sigval;
+// OBSOLETE switch (exceptionVector) {
+// OBSOLETE case 0 : sigval = 23; break; /* I/O trap */
+// OBSOLETE case 1 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 2 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 3 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 4 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 5 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 6 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 7 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 8 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 9 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 10 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 11 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 12 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 13 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 14 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 15 : sigval = 5; break; /* breakpoint */
+// OBSOLETE case 16 : sigval = 10; break; /* BUS ERROR (alignment) */
+// OBSOLETE case 17 : sigval = 2; break; /* INTerrupt */
+// OBSOLETE default : sigval = 7; break; /* "software generated" */
+// OBSOLETE }
+// OBSOLETE return (sigval);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /**********************************************/
+// OBSOLETE /* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
+// OBSOLETE /* RETURN NUMBER OF CHARS PROCESSED */
+// OBSOLETE /**********************************************/
+// OBSOLETE static int
+// OBSOLETE hexToInt (unsigned char **ptr, int *intValue)
+// OBSOLETE {
+// OBSOLETE int numChars = 0;
+// OBSOLETE int hexValue;
+// OBSOLETE
+// OBSOLETE *intValue = 0;
+// OBSOLETE while (**ptr)
+// OBSOLETE {
+// OBSOLETE hexValue = hex(**ptr);
+// OBSOLETE if (hexValue >=0)
+// OBSOLETE {
+// OBSOLETE *intValue = (*intValue <<4) | hexValue;
+// OBSOLETE numChars ++;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE break;
+// OBSOLETE (*ptr)++;
+// OBSOLETE }
+// OBSOLETE return (numChars);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE Table of branch instructions:
+// OBSOLETE
+// OBSOLETE 10B6 RTE return from trap or exception
+// OBSOLETE 1FCr JMP jump
+// OBSOLETE 1ECr JL jump and link
+// OBSOLETE 7Fxx BRA branch
+// OBSOLETE FFxxxxxx BRA branch (long)
+// OBSOLETE B09rxxxx BNEZ branch not-equal-zero
+// OBSOLETE Br1rxxxx BNE branch not-equal
+// OBSOLETE 7Dxx BNC branch not-condition
+// OBSOLETE FDxxxxxx BNC branch not-condition (long)
+// OBSOLETE B0Arxxxx BLTZ branch less-than-zero
+// OBSOLETE B0Crxxxx BLEZ branch less-equal-zero
+// OBSOLETE 7Exx BL branch and link
+// OBSOLETE FExxxxxx BL branch and link (long)
+// OBSOLETE B0Drxxxx BGTZ branch greater-than-zero
+// OBSOLETE B0Brxxxx BGEZ branch greater-equal-zero
+// OBSOLETE B08rxxxx BEQZ branch equal-zero
+// OBSOLETE Br0rxxxx BEQ branch equal
+// OBSOLETE 7Cxx BC branch condition
+// OBSOLETE FCxxxxxx BC branch condition (long)
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE isShortBranch (unsigned char *instr)
+// OBSOLETE {
+// OBSOLETE unsigned char instr0 = instr[0] & 0x7F; /* mask off high bit */
+// OBSOLETE
+// OBSOLETE if (instr0 == 0x10 && instr[1] == 0xB6) /* RTE */
+// OBSOLETE return 1; /* return from trap or exception */
+// OBSOLETE
+// OBSOLETE if (instr0 == 0x1E || instr0 == 0x1F) /* JL or JMP */
+// OBSOLETE if ((instr[1] & 0xF0) == 0xC0)
+// OBSOLETE return 2; /* jump thru a register */
+// OBSOLETE
+// OBSOLETE if (instr0 == 0x7C || instr0 == 0x7D || /* BC, BNC, BL, BRA */
+// OBSOLETE instr0 == 0x7E || instr0 == 0x7F)
+// OBSOLETE return 3; /* eight bit PC offset */
+// OBSOLETE
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE isLongBranch (unsigned char *instr)
+// OBSOLETE {
+// OBSOLETE if (instr[0] == 0xFC || instr[0] == 0xFD || /* BRA, BNC, BL, BC */
+// OBSOLETE instr[0] == 0xFE || instr[0] == 0xFF) /* 24 bit relative */
+// OBSOLETE return 4;
+// OBSOLETE if ((instr[0] & 0xF0) == 0xB0) /* 16 bit relative */
+// OBSOLETE {
+// OBSOLETE if ((instr[1] & 0xF0) == 0x00 || /* BNE, BEQ */
+// OBSOLETE (instr[1] & 0xF0) == 0x10)
+// OBSOLETE return 5;
+// OBSOLETE if (instr[0] == 0xB0) /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ, BEQZ */
+// OBSOLETE if ((instr[1] & 0xF0) == 0x80 || (instr[1] & 0xF0) == 0x90 ||
+// OBSOLETE (instr[1] & 0xF0) == 0xA0 || (instr[1] & 0xF0) == 0xB0 ||
+// OBSOLETE (instr[1] & 0xF0) == 0xC0 || (instr[1] & 0xF0) == 0xD0)
+// OBSOLETE return 6;
+// OBSOLETE }
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* if address is NOT on a 4-byte boundary, or high-bit of instr is zero,
+// OBSOLETE then it's a 2-byte instruction, else it's a 4-byte instruction. */
+// OBSOLETE
+// OBSOLETE #define INSTRUCTION_SIZE(addr) \
+// OBSOLETE ((((int) addr & 2) || (((unsigned char *) addr)[0] & 0x80) == 0) ? 2 : 4)
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE isBranch (unsigned char *instr)
+// OBSOLETE {
+// OBSOLETE if (INSTRUCTION_SIZE(instr) == 2)
+// OBSOLETE return isShortBranch(instr);
+// OBSOLETE else
+// OBSOLETE return isLongBranch(instr);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE willBranch (unsigned char *instr, int branchCode)
+// OBSOLETE {
+// OBSOLETE switch (branchCode)
+// OBSOLETE {
+// OBSOLETE case 0: return 0; /* not a branch */
+// OBSOLETE case 1: return 1; /* RTE */
+// OBSOLETE case 2: return 1; /* JL or JMP */
+// OBSOLETE case 3: /* BC, BNC, BL, BRA (short) */
+// OBSOLETE case 4: /* BC, BNC, BL, BRA (long) */
+// OBSOLETE switch (instr[0] & 0x0F)
+// OBSOLETE {
+// OBSOLETE case 0xC: /* Branch if Condition Register */
+// OBSOLETE return (registers[CBR] != 0);
+// OBSOLETE case 0xD: /* Branch if NOT Condition Register */
+// OBSOLETE return (registers[CBR] == 0);
+// OBSOLETE case 0xE: /* Branch and Link */
+// OBSOLETE case 0xF: /* Branch (unconditional) */
+// OBSOLETE return 1;
+// OBSOLETE default: /* oops? */
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE case 5: /* BNE, BEQ */
+// OBSOLETE switch (instr[1] & 0xF0)
+// OBSOLETE {
+// OBSOLETE case 0x00: /* Branch if r1 equal to r2 */
+// OBSOLETE return (registers[instr[0] & 0x0F] == registers[instr[1] & 0x0F]);
+// OBSOLETE case 0x10: /* Branch if r1 NOT equal to r2 */
+// OBSOLETE return (registers[instr[0] & 0x0F] != registers[instr[1] & 0x0F]);
+// OBSOLETE default: /* oops? */
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE case 6: /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ */
+// OBSOLETE switch (instr[1] & 0xF0)
+// OBSOLETE {
+// OBSOLETE case 0x80: /* Branch if reg equal to zero */
+// OBSOLETE return (registers[instr[1] & 0x0F] == 0);
+// OBSOLETE case 0x90: /* Branch if reg NOT equal to zero */
+// OBSOLETE return (registers[instr[1] & 0x0F] != 0);
+// OBSOLETE case 0xA0: /* Branch if reg less than zero */
+// OBSOLETE return (registers[instr[1] & 0x0F] < 0);
+// OBSOLETE case 0xB0: /* Branch if reg greater or equal to zero */
+// OBSOLETE return (registers[instr[1] & 0x0F] >= 0);
+// OBSOLETE case 0xC0: /* Branch if reg less than or equal to zero */
+// OBSOLETE return (registers[instr[1] & 0x0F] <= 0);
+// OBSOLETE case 0xD0: /* Branch if reg greater than zero */
+// OBSOLETE return (registers[instr[1] & 0x0F] > 0);
+// OBSOLETE default: /* oops? */
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE default: /* oops? */
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE branchDestination (unsigned char *instr, int branchCode)
+// OBSOLETE {
+// OBSOLETE switch (branchCode) {
+// OBSOLETE default:
+// OBSOLETE case 0: /* not a branch */
+// OBSOLETE return 0;
+// OBSOLETE case 1: /* RTE */
+// OBSOLETE return registers[BPC] & ~3; /* pop BPC into PC */
+// OBSOLETE case 2: /* JL or JMP */
+// OBSOLETE return registers[instr[1] & 0x0F] & ~3; /* jump thru a register */
+// OBSOLETE case 3: /* BC, BNC, BL, BRA (short, 8-bit relative offset) */
+// OBSOLETE return (((int) instr) & ~3) + ((char) instr[1] << 2);
+// OBSOLETE case 4: /* BC, BNC, BL, BRA (long, 24-bit relative offset) */
+// OBSOLETE return ((int) instr +
+// OBSOLETE ((((char) instr[1] << 16) | (instr[2] << 8) | (instr[3])) << 2));
+// OBSOLETE case 5: /* BNE, BEQ (16-bit relative offset) */
+// OBSOLETE case 6: /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ (ditto) */
+// OBSOLETE return ((int) instr + ((((char) instr[2] << 8) | (instr[3])) << 2));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* An explanatory note: in the last three return expressions, I have
+// OBSOLETE cast the most-significant byte of the return offset to char.
+// OBSOLETE What this accomplishes is sign extension. If the other
+// OBSOLETE less-significant bytes were signed as well, they would get sign
+// OBSOLETE extended too and, if negative, their leading bits would clobber
+// OBSOLETE the bits of the more-significant bytes ahead of them. There are
+// OBSOLETE other ways I could have done this, but sign extension from
+// OBSOLETE odd-sized integers is always a pain. */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE branchSideEffects (unsigned char *instr, int branchCode)
+// OBSOLETE {
+// OBSOLETE switch (branchCode)
+// OBSOLETE {
+// OBSOLETE case 1: /* RTE */
+// OBSOLETE return; /* I <THINK> this is already handled... */
+// OBSOLETE case 2: /* JL (or JMP) */
+// OBSOLETE case 3: /* BL (or BC, BNC, BRA) */
+// OBSOLETE case 4:
+// OBSOLETE if ((instr[0] & 0x0F) == 0x0E) /* branch/jump and link */
+// OBSOLETE registers[R14] = (registers[PC] & ~3) + 4;
+// OBSOLETE return;
+// OBSOLETE default: /* any other branch has no side effects */
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct STEPPING_CONTEXT {
+// OBSOLETE int stepping; /* true when we've started a single-step */
+// OBSOLETE unsigned long target_addr; /* the instr we're trying to execute */
+// OBSOLETE unsigned long target_size; /* the size of the target instr */
+// OBSOLETE unsigned long noop_addr; /* where we've inserted a no-op, if any */
+// OBSOLETE unsigned long trap1_addr; /* the trap following the target instr */
+// OBSOLETE unsigned long trap2_addr; /* the trap at a branch destination, if any */
+// OBSOLETE unsigned short noop_save; /* instruction overwritten by our no-op */
+// OBSOLETE unsigned short trap1_save; /* instruction overwritten by trap1 */
+// OBSOLETE unsigned short trap2_save; /* instruction overwritten by trap2 */
+// OBSOLETE unsigned short continue_p; /* true if NOT returning to gdb after step */
+// OBSOLETE } stepping;
+// OBSOLETE
+// OBSOLETE /* Function: prepare_to_step
+// OBSOLETE Called from handle_exception to prepare the user program to single-step.
+// OBSOLETE Places a trap instruction after the target instruction, with special
+// OBSOLETE extra handling for branch instructions and for instructions in the
+// OBSOLETE second half-word of a word.
+// OBSOLETE
+// OBSOLETE Returns: True if we should actually execute the instruction;
+// OBSOLETE False if we are going to emulate executing the instruction,
+// OBSOLETE in which case we simply report to GDB that the instruction
+// OBSOLETE has already been executed. */
+// OBSOLETE
+// OBSOLETE #define TRAP1 0x10f1; /* trap #1 instruction */
+// OBSOLETE #define NOOP 0x7000; /* noop instruction */
+// OBSOLETE
+// OBSOLETE static unsigned short trap1 = TRAP1;
+// OBSOLETE static unsigned short noop = NOOP;
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE prepare_to_step(continue_p)
+// OBSOLETE int continue_p; /* if this isn't REALLY a single-step (see below) */
+// OBSOLETE {
+// OBSOLETE unsigned long pc = registers[PC];
+// OBSOLETE int branchCode = isBranch((unsigned char *) pc);
+// OBSOLETE unsigned char *p;
+// OBSOLETE
+// OBSOLETE /* zero out the stepping context
+// OBSOLETE (paranoia -- it should already be zeroed) */
+// OBSOLETE for (p = (unsigned char *) &stepping;
+// OBSOLETE p < ((unsigned char *) &stepping) + sizeof(stepping);
+// OBSOLETE p++)
+// OBSOLETE *p = 0;
+// OBSOLETE
+// OBSOLETE if (branchCode != 0) /* next instruction is a branch */
+// OBSOLETE {
+// OBSOLETE branchSideEffects((unsigned char *) pc, branchCode);
+// OBSOLETE if (willBranch((unsigned char *)pc, branchCode))
+// OBSOLETE registers[PC] = branchDestination((unsigned char *) pc, branchCode);
+// OBSOLETE else
+// OBSOLETE registers[PC] = pc + INSTRUCTION_SIZE(pc);
+// OBSOLETE return 0; /* branch "executed" -- just notify GDB */
+// OBSOLETE }
+// OBSOLETE else if (((int) pc & 2) != 0) /* "second-slot" instruction */
+// OBSOLETE {
+// OBSOLETE /* insert no-op before pc */
+// OBSOLETE stepping.noop_addr = pc - 2;
+// OBSOLETE stepping.noop_save = *(unsigned short *) stepping.noop_addr;
+// OBSOLETE *(unsigned short *) stepping.noop_addr = noop;
+// OBSOLETE /* insert trap after pc */
+// OBSOLETE stepping.trap1_addr = pc + 2;
+// OBSOLETE stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
+// OBSOLETE *(unsigned short *) stepping.trap1_addr = trap1;
+// OBSOLETE }
+// OBSOLETE else /* "first-slot" instruction */
+// OBSOLETE {
+// OBSOLETE /* insert trap after pc */
+// OBSOLETE stepping.trap1_addr = pc + INSTRUCTION_SIZE(pc);
+// OBSOLETE stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
+// OBSOLETE *(unsigned short *) stepping.trap1_addr = trap1;
+// OBSOLETE }
+// OBSOLETE /* "continue_p" means that we are actually doing a continue, and not
+// OBSOLETE being requested to single-step by GDB. Sometimes we have to do
+// OBSOLETE one single-step before continuing, because the PC is on a half-word
+// OBSOLETE boundary. There's no way to simply resume at such an address. */
+// OBSOLETE stepping.continue_p = continue_p;
+// OBSOLETE stepping.stepping = 1; /* starting a single-step */
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: finish_from_step
+// OBSOLETE Called from handle_exception to finish up when the user program
+// OBSOLETE returns from a single-step. Replaces the instructions that had
+// OBSOLETE been overwritten by traps or no-ops,
+// OBSOLETE
+// OBSOLETE Returns: True if we should notify GDB that the target stopped.
+// OBSOLETE False if we only single-stepped because we had to before we
+// OBSOLETE could continue (ie. we were trying to continue at a
+// OBSOLETE half-word boundary). In that case don't notify GDB:
+// OBSOLETE just "continue continuing". */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE finish_from_step (void)
+// OBSOLETE {
+// OBSOLETE if (stepping.stepping) /* anything to do? */
+// OBSOLETE {
+// OBSOLETE int continue_p = stepping.continue_p;
+// OBSOLETE unsigned char *p;
+// OBSOLETE
+// OBSOLETE if (stepping.noop_addr) /* replace instr "under" our no-op */
+// OBSOLETE *(unsigned short *) stepping.noop_addr = stepping.noop_save;
+// OBSOLETE if (stepping.trap1_addr) /* replace instr "under" our trap */
+// OBSOLETE *(unsigned short *) stepping.trap1_addr = stepping.trap1_save;
+// OBSOLETE if (stepping.trap2_addr) /* ditto our other trap, if any */
+// OBSOLETE *(unsigned short *) stepping.trap2_addr = stepping.trap2_save;
+// OBSOLETE
+// OBSOLETE for (p = (unsigned char *) &stepping; /* zero out the stepping context */
+// OBSOLETE p < ((unsigned char *) &stepping) + sizeof(stepping);
+// OBSOLETE p++)
+// OBSOLETE *p = 0;
+// OBSOLETE
+// OBSOLETE return !(continue_p);
+// OBSOLETE }
+// OBSOLETE else /* we didn't single-step, therefore this must be a legitimate stop */
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE struct PSWreg { /* separate out the bit flags in the PSW register */
+// OBSOLETE int pad1 : 16;
+// OBSOLETE int bsm : 1;
+// OBSOLETE int bie : 1;
+// OBSOLETE int pad2 : 5;
+// OBSOLETE int bc : 1;
+// OBSOLETE int sm : 1;
+// OBSOLETE int ie : 1;
+// OBSOLETE int pad3 : 5;
+// OBSOLETE int c : 1;
+// OBSOLETE } *psw;
+// OBSOLETE
+// OBSOLETE /* Upon entry the value for LR to save has been pushed.
+// OBSOLETE We unpush that so that the value for the stack pointer saved is correct.
+// OBSOLETE Upon entry, all other registers are assumed to have not been modified
+// OBSOLETE since the interrupt/trap occured. */
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE stash_registers:
+// OBSOLETE push r0
+// OBSOLETE push r1
+// OBSOLETE seth r1, #shigh(registers)
+// OBSOLETE add3 r1, r1, #low(registers)
+// OBSOLETE pop r0 ; r1
+// OBSOLETE st r0, @(4,r1)
+// OBSOLETE pop r0 ; r0
+// OBSOLETE st r0, @r1
+// OBSOLETE addi r1, #4 ; only add 4 as subsequent saves are `pre inc'
+// OBSOLETE st r2, @+r1
+// OBSOLETE st r3, @+r1
+// OBSOLETE st r4, @+r1
+// OBSOLETE st r5, @+r1
+// OBSOLETE st r6, @+r1
+// OBSOLETE st r7, @+r1
+// OBSOLETE st r8, @+r1
+// OBSOLETE st r9, @+r1
+// OBSOLETE st r10, @+r1
+// OBSOLETE st r11, @+r1
+// OBSOLETE st r12, @+r1
+// OBSOLETE st r13, @+r1 ; fp
+// OBSOLETE pop r0 ; lr (r14)
+// OBSOLETE st r0, @+r1
+// OBSOLETE st sp, @+r1 ; sp contains right value at this point
+// OBSOLETE mvfc r0, cr0
+// OBSOLETE st r0, @+r1 ; cr0 == PSW
+// OBSOLETE mvfc r0, cr1
+// OBSOLETE st r0, @+r1 ; cr1 == CBR
+// OBSOLETE mvfc r0, cr2
+// OBSOLETE st r0, @+r1 ; cr2 == SPI
+// OBSOLETE mvfc r0, cr3
+// OBSOLETE st r0, @+r1 ; cr3 == SPU
+// OBSOLETE mvfc r0, cr6
+// OBSOLETE st r0, @+r1 ; cr6 == BPC
+// OBSOLETE st r0, @+r1 ; PC == BPC
+// OBSOLETE mvfaclo r0
+// OBSOLETE st r0, @+r1 ; ACCL
+// OBSOLETE mvfachi r0
+// OBSOLETE st r0, @+r1 ; ACCH
+// OBSOLETE jmp lr");
+// OBSOLETE
+// OBSOLETE /* C routine to clean up what stash_registers did.
+// OBSOLETE It is called after calling stash_registers.
+// OBSOLETE This is separate from stash_registers as we want to do this in C
+// OBSOLETE but doing stash_registers in C isn't straightforward. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE cleanup_stash (void)
+// OBSOLETE {
+// OBSOLETE psw = (struct PSWreg *) &registers[PSW]; /* fields of PSW register */
+// OBSOLETE psw->sm = psw->bsm; /* fix up pre-trap values of psw fields */
+// OBSOLETE psw->ie = psw->bie;
+// OBSOLETE psw->c = psw->bc;
+// OBSOLETE registers[CBR] = psw->bc; /* fix up pre-trap "C" register */
+// OBSOLETE
+// OBSOLETE #if 0 /* FIXME: Was in previous version. Necessary?
+// OBSOLETE (Remember that we use the "rte" insn to return from the
+// OBSOLETE trap/interrupt so the values of bsm, bie, bc are important. */
+// OBSOLETE psw->bsm = psw->bie = psw->bc = 0; /* zero post-trap values */
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE /* FIXME: Copied from previous version. This can probably be deleted
+// OBSOLETE since methinks stash_registers has already done this. */
+// OBSOLETE registers[PC] = registers[BPC]; /* pre-trap PC */
+// OBSOLETE
+// OBSOLETE /* FIXME: Copied from previous version. Necessary? */
+// OBSOLETE if (psw->sm) /* copy R15 into (psw->sm ? SPU : SPI) */
+// OBSOLETE registers[SPU] = registers[R15];
+// OBSOLETE else
+// OBSOLETE registers[SPI] = registers[R15];
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE restore_and_return:
+// OBSOLETE seth r0, #shigh(registers+8)
+// OBSOLETE add3 r0, r0, #low(registers+8)
+// OBSOLETE ld r2, @r0+ ; restore r2
+// OBSOLETE ld r3, @r0+ ; restore r3
+// OBSOLETE ld r4, @r0+ ; restore r4
+// OBSOLETE ld r5, @r0+ ; restore r5
+// OBSOLETE ld r6, @r0+ ; restore r6
+// OBSOLETE ld r7, @r0+ ; restore r7
+// OBSOLETE ld r8, @r0+ ; restore r8
+// OBSOLETE ld r9, @r0+ ; restore r9
+// OBSOLETE ld r10, @r0+ ; restore r10
+// OBSOLETE ld r11, @r0+ ; restore r11
+// OBSOLETE ld r12, @r0+ ; restore r12
+// OBSOLETE ld r13, @r0+ ; restore r13
+// OBSOLETE ld r14, @r0+ ; restore r14
+// OBSOLETE ld r15, @r0+ ; restore r15
+// OBSOLETE addi r0, #4 ; don't restore PSW (rte will do it)
+// OBSOLETE ld r1, @r0+ ; restore cr1 == CBR (no-op, because it's read only)
+// OBSOLETE mvtc r1, cr1
+// OBSOLETE ld r1, @r0+ ; restore cr2 == SPI
+// OBSOLETE mvtc r1, cr2
+// OBSOLETE ld r1, @r0+ ; restore cr3 == SPU
+// OBSOLETE mvtc r1, cr3
+// OBSOLETE addi r0, #4 ; skip BPC
+// OBSOLETE ld r1, @r0+ ; restore cr6 (BPC) == PC
+// OBSOLETE mvtc r1, cr6
+// OBSOLETE ld r1, @r0+ ; restore ACCL
+// OBSOLETE mvtaclo r1
+// OBSOLETE ld r1, @r0+ ; restore ACCH
+// OBSOLETE mvtachi r1
+// OBSOLETE seth r0, #shigh(registers)
+// OBSOLETE add3 r0, r0, #low(registers)
+// OBSOLETE ld r1, @(4,r0) ; restore r1
+// OBSOLETE ld r0, @r0 ; restore r0
+// OBSOLETE rte");
+// OBSOLETE
+// OBSOLETE /* General trap handler, called after the registers have been stashed.
+// OBSOLETE NUM is the trap/exception number. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE process_exception (int num)
+// OBSOLETE {
+// OBSOLETE cleanup_stash ();
+// OBSOLETE asm volatile ("
+// OBSOLETE seth r1, #shigh(stackPtr)
+// OBSOLETE add3 r1, r1, #low(stackPtr)
+// OBSOLETE ld r15, @r1 ; setup local stack (protect user stack)
+// OBSOLETE mv r0, %0
+// OBSOLETE bl handle_exception
+// OBSOLETE bl restore_and_return"
+// OBSOLETE : : "r" (num) : "r0", "r1");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void _catchException0 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException0:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #0
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException1 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException1:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE bl cleanup_stash
+// OBSOLETE seth r1, #shigh(stackPtr)
+// OBSOLETE add3 r1, r1, #low(stackPtr)
+// OBSOLETE ld r15, @r1 ; setup local stack (protect user stack)
+// OBSOLETE seth r1, #shigh(registers + 21*4) ; PC
+// OBSOLETE add3 r1, r1, #low(registers + 21*4)
+// OBSOLETE ld r0, @r1
+// OBSOLETE addi r0, #-4 ; back up PC for breakpoint trap.
+// OBSOLETE st r0, @r1 ; FIXME: what about bp in right slot?
+// OBSOLETE ldi r0, #1
+// OBSOLETE bl handle_exception
+// OBSOLETE bl restore_and_return");
+// OBSOLETE
+// OBSOLETE void _catchException2 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException2:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #2
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException3 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException3:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #3
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException4 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException4:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #4
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException5 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException5:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #5
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException6 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException6:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #6
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException7 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException7:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #7
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException8 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException8:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #8
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException9 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException9:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #9
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException10 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException10:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #10
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException11 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException11:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #11
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException12 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException12:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #12
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException13 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException13:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #13
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException14 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException14:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #14
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException15 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException15:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #15
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException16 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException16:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #16
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE void _catchException17 ();
+// OBSOLETE
+// OBSOLETE asm ("
+// OBSOLETE _catchException17:
+// OBSOLETE push lr
+// OBSOLETE bl stash_registers
+// OBSOLETE ; Note that at this point the pushed value of `lr' has been popped
+// OBSOLETE ldi r0, #17
+// OBSOLETE bl process_exception");
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* this function is used to set up exception handlers for tracing and
+// OBSOLETE breakpoints */
+// OBSOLETE void
+// OBSOLETE set_debug_traps (void)
+// OBSOLETE {
+// OBSOLETE /* extern void remcomHandler(); */
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE for (i = 0; i < 18; i++) /* keep a copy of old vectors */
+// OBSOLETE if (save_vectors[i] == 0) /* only copy them the first time */
+// OBSOLETE save_vectors[i] = getExceptionHandler (i);
+// OBSOLETE
+// OBSOLETE stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
+// OBSOLETE
+// OBSOLETE exceptionHandler (0, _catchException0);
+// OBSOLETE exceptionHandler (1, _catchException1);
+// OBSOLETE exceptionHandler (2, _catchException2);
+// OBSOLETE exceptionHandler (3, _catchException3);
+// OBSOLETE exceptionHandler (4, _catchException4);
+// OBSOLETE exceptionHandler (5, _catchException5);
+// OBSOLETE exceptionHandler (6, _catchException6);
+// OBSOLETE exceptionHandler (7, _catchException7);
+// OBSOLETE exceptionHandler (8, _catchException8);
+// OBSOLETE exceptionHandler (9, _catchException9);
+// OBSOLETE exceptionHandler (10, _catchException10);
+// OBSOLETE exceptionHandler (11, _catchException11);
+// OBSOLETE exceptionHandler (12, _catchException12);
+// OBSOLETE exceptionHandler (13, _catchException13);
+// OBSOLETE exceptionHandler (14, _catchException14);
+// OBSOLETE exceptionHandler (15, _catchException15);
+// OBSOLETE exceptionHandler (16, _catchException16);
+// OBSOLETE /* exceptionHandler (17, _catchException17); */
+// OBSOLETE
+// OBSOLETE initialized = 1;
+// 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 #define BREAKPOINT() asm volatile (" trap #2");
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE breakpoint (void)
+// OBSOLETE {
+// OBSOLETE if (initialized)
+// OBSOLETE BREAKPOINT();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* STDOUT section:
+// OBSOLETE Stuff pertaining to simulating stdout by sending chars to gdb to be echoed.
+// OBSOLETE Functions: gdb_putchar(char ch)
+// OBSOLETE gdb_puts(char *str)
+// OBSOLETE gdb_write(char *str, int len)
+// OBSOLETE gdb_error(char *format, char *parm)
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Function: gdb_putchar(int)
+// OBSOLETE Make gdb write a char to stdout.
+// OBSOLETE Returns: the char */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE gdb_putchar (int ch)
+// OBSOLETE {
+// OBSOLETE char buf[4];
+// OBSOLETE
+// OBSOLETE buf[0] = 'O';
+// OBSOLETE buf[1] = hexchars[ch >> 4];
+// OBSOLETE buf[2] = hexchars[ch & 0x0F];
+// OBSOLETE buf[3] = 0;
+// OBSOLETE putpacket(buf);
+// OBSOLETE return ch;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: gdb_write(char *, int)
+// OBSOLETE Make gdb write n bytes to stdout (not assumed to be null-terminated).
+// OBSOLETE Returns: number of bytes written */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE gdb_write (char *data, int len)
+// OBSOLETE {
+// OBSOLETE char *buf, *cpy;
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE buf = remcomOutBuffer;
+// OBSOLETE buf[0] = 'O';
+// OBSOLETE i = 0;
+// OBSOLETE while (i < len)
+// OBSOLETE {
+// OBSOLETE for (cpy = buf+1;
+// OBSOLETE i < len && cpy < buf + sizeof(remcomOutBuffer) - 3;
+// OBSOLETE i++)
+// OBSOLETE {
+// OBSOLETE *cpy++ = hexchars[data[i] >> 4];
+// OBSOLETE *cpy++ = hexchars[data[i] & 0x0F];
+// OBSOLETE }
+// OBSOLETE *cpy = 0;
+// OBSOLETE putpacket(buf);
+// OBSOLETE }
+// OBSOLETE return len;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: gdb_puts(char *)
+// OBSOLETE Make gdb write a null-terminated string to stdout.
+// OBSOLETE Returns: the length of the string */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE gdb_puts (char *str)
+// OBSOLETE {
+// OBSOLETE return gdb_write(str, strlen(str));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: gdb_error(char *, char *)
+// OBSOLETE Send an error message to gdb's stdout.
+// OBSOLETE First string may have 1 (one) optional "%s" in it, which
+// OBSOLETE will cause the optional second string to be inserted. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE gdb_error (char *format, char *parm)
+// OBSOLETE {
+// OBSOLETE char buf[400], *cpy;
+// OBSOLETE int len;
+// OBSOLETE
+// OBSOLETE if (remote_debug)
+// OBSOLETE {
+// OBSOLETE if (format && *format)
+// OBSOLETE len = strlen(format);
+// OBSOLETE else
+// OBSOLETE return; /* empty input */
+// OBSOLETE
+// OBSOLETE if (parm && *parm)
+// OBSOLETE len += strlen(parm);
+// OBSOLETE
+// OBSOLETE for (cpy = buf; *format; )
+// OBSOLETE {
+// OBSOLETE if (format[0] == '%' && format[1] == 's') /* include second string */
+// OBSOLETE {
+// OBSOLETE format += 2; /* advance two chars instead of just one */
+// OBSOLETE while (parm && *parm)
+// OBSOLETE *cpy++ = *parm++;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE *cpy++ = *format++;
+// OBSOLETE }
+// OBSOLETE *cpy = '\0';
+// OBSOLETE gdb_puts(buf);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static unsigned char *
+// OBSOLETE strcpy (unsigned char *dest, const unsigned char *src)
+// OBSOLETE {
+// OBSOLETE unsigned char *ret = dest;
+// OBSOLETE
+// OBSOLETE if (dest && src)
+// OBSOLETE {
+// OBSOLETE while (*src)
+// OBSOLETE *dest++ = *src++;
+// OBSOLETE *dest = 0;
+// OBSOLETE }
+// OBSOLETE return ret;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE strlen (const unsigned char *src)
+// OBSOLETE {
+// OBSOLETE int ret;
+// OBSOLETE
+// OBSOLETE for (ret = 0; *src; src++)
+// OBSOLETE ret++;
+// OBSOLETE
+// OBSOLETE return ret;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE void exit (code)
+// OBSOLETE int code;
+// OBSOLETE {
+// OBSOLETE _exit (code);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE int atexit (void *p)
+// OBSOLETE {
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void abort (void)
+// OBSOLETE {
+// OBSOLETE _exit (1);
+// OBSOLETE }
+// OBSOLETE #endif
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index eeb6335131b..93edbf99a2d 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -1,705 +1,708 @@
-/* Target-dependent code for the Mitsubishi m32r for GDB, the GNU debugger.
- Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "value.h"
-#include "bfd.h"
-#include "gdb_string.h"
-#include "gdbcore.h"
-#include "symfile.h"
-#include "regcache.h"
-
-/* Function: m32r_use_struct_convention
- Return nonzero if call_function should allocate stack space for a
- struct return? */
-int
-m32r_use_struct_convention (int gcc_p, struct type *type)
-{
- return (TYPE_LENGTH (type) > 8);
-}
-
-/* Function: frame_find_saved_regs
- Return the frame_saved_regs structure for the frame.
- Doesn't really work for dummy frames, but it does pass back
- an empty frame_saved_regs, so I guess that's better than total failure */
-
-void
-m32r_frame_find_saved_regs (struct frame_info *fi,
- struct frame_saved_regs *regaddr)
-{
- memcpy (regaddr, &fi->fsr, sizeof (struct frame_saved_regs));
-}
-
-/* Turn this on if you want to see just how much instruction decoding
- if being done, its quite a lot
- */
-#if 0
-static void
-dump_insn (char *commnt, CORE_ADDR pc, int insn)
-{
- printf_filtered (" %s %08x %08x ",
- commnt, (unsigned int) pc, (unsigned int) insn);
- TARGET_PRINT_INSN (pc, &tm_print_insn_info);
- printf_filtered ("\n");
-}
-#define insn_debug(args) { printf_filtered args; }
-#else
-#define dump_insn(a,b,c) {}
-#define insn_debug(args) {}
-#endif
-
-#define DEFAULT_SEARCH_LIMIT 44
-
-/* Function: scan_prologue
- This function decodes the target function prologue to determine
- 1) the size of the stack frame, and 2) which registers are saved on it.
- It saves the offsets of saved regs in the frame_saved_regs argument,
- and returns the frame size. */
-
-/*
- The sequence it currently generates is:
-
- if (varargs function) { ddi sp,#n }
- push registers
- if (additional stack <= 256) { addi sp,#-stack }
- else if (additional stack < 65k) { add3 sp,sp,#-stack
-
- } else if (additional stack) {
- seth sp,#(stack & 0xffff0000)
- or3 sp,sp,#(stack & 0x0000ffff)
- sub sp,r4
- }
- if (frame pointer) {
- mv sp,fp
- }
-
- These instructions are scheduled like everything else, so you should stop at
- the first branch instruction.
-
- */
-
-/* This is required by skip prologue and by m32r_init_extra_frame_info.
- The results of decoding a prologue should be cached because this
- thrashing is getting nuts.
- I am thinking of making a container class with two indexes, name and
- address. It may be better to extend the symbol table.
- */
-
-static void
-decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit, CORE_ADDR *pl_endptr, /* var parameter */
- unsigned long *framelength, struct frame_info *fi,
- struct frame_saved_regs *fsr)
-{
- unsigned long framesize;
- int insn;
- int op1;
- int maybe_one_more = 0;
- CORE_ADDR after_prologue = 0;
- CORE_ADDR after_stack_adjust = 0;
- CORE_ADDR current_pc;
-
-
- framesize = 0;
- after_prologue = 0;
- insn_debug (("rd prolog l(%d)\n", scan_limit - current_pc));
-
- for (current_pc = start_pc; current_pc < scan_limit; current_pc += 2)
- {
-
- insn = read_memory_unsigned_integer (current_pc, 2);
- dump_insn ("insn-1", current_pc, insn); /* MTZ */
-
- /* If this is a 32 bit instruction, we dont want to examine its
- immediate data as though it were an instruction */
- if (current_pc & 0x02)
- { /* Clear the parallel execution bit from 16 bit instruction */
- if (maybe_one_more)
- { /* The last instruction was a branch, usually terminates
- the series, but if this is a parallel instruction,
- it may be a stack framing instruction */
- if (!(insn & 0x8000))
- {
- insn_debug (("Really done"));
- break; /* nope, we are really done */
- }
- }
- insn &= 0x7fff; /* decode this instruction further */
- }
- else
- {
- if (maybe_one_more)
- break; /* This isnt the one more */
- if (insn & 0x8000)
- {
- insn_debug (("32 bit insn\n"));
- if (current_pc == scan_limit)
- scan_limit += 2; /* extend the search */
- current_pc += 2; /* skip the immediate data */
- if (insn == 0x8faf) /* add3 sp, sp, xxxx */
- /* add 16 bit sign-extended offset */
- {
- insn_debug (("stack increment\n"));
- framesize += -((short) read_memory_unsigned_integer (current_pc, 2));
- }
- else
- {
- if (((insn >> 8) == 0xe4) && /* ld24 r4, xxxxxx; sub sp, r4 */
- read_memory_unsigned_integer (current_pc + 2, 2) == 0x0f24)
- { /* subtract 24 bit sign-extended negative-offset */
- dump_insn ("insn-2", current_pc + 2, insn);
- insn = read_memory_unsigned_integer (current_pc - 2, 4);
- dump_insn ("insn-3(l4)", current_pc - 2, insn);
- if (insn & 0x00800000) /* sign extend */
- insn |= 0xff000000; /* negative */
- else
- insn &= 0x00ffffff; /* positive */
- framesize += insn;
- }
- }
- after_prologue = current_pc;
- continue;
- }
- }
- op1 = insn & 0xf000; /* isolate just the first nibble */
-
- if ((insn & 0xf0ff) == 0x207f)
- { /* st reg, @-sp */
- int regno;
- insn_debug (("push\n"));
-#if 0 /* No, PUSH FP is not an indication that we will use a frame pointer. */
- if (((insn & 0xffff) == 0x2d7f) && fi)
- fi->using_frame_pointer = 1;
-#endif
- framesize += 4;
-#if 0
-/* Why should we increase the scan limit, just because we did a push?
- And if there is a reason, surely we would only want to do it if we
- had already reached the scan limit... */
- if (current_pc == scan_limit)
- scan_limit += 2;
-#endif
- regno = ((insn >> 8) & 0xf);
- if (fsr) /* save_regs offset */
- fsr->regs[regno] = framesize;
- after_prologue = 0;
- continue;
- }
- if ((insn >> 8) == 0x4f) /* addi sp, xx */
- /* add 8 bit sign-extended offset */
- {
- int stack_adjust = (char) (insn & 0xff);
-
- /* there are probably two of these stack adjustments:
- 1) A negative one in the prologue, and
- 2) A positive one in the epilogue.
- We are only interested in the first one. */
-
- if (stack_adjust < 0)
- {
- framesize -= stack_adjust;
- after_prologue = 0;
- /* A frameless function may have no "mv fp, sp".
- In that case, this is the end of the prologue. */
- after_stack_adjust = current_pc + 2;
- }
- continue;
- }
- if (insn == 0x1d8f)
- { /* mv fp, sp */
- if (fi)
- fi->using_frame_pointer = 1; /* fp is now valid */
- insn_debug (("done fp found\n"));
- after_prologue = current_pc + 2;
- break; /* end of stack adjustments */
- }
- if (insn == 0x7000) /* Nop looks like a branch, continue explicitly */
- {
- insn_debug (("nop\n"));
- after_prologue = current_pc + 2;
- continue; /* nop occurs between pushes */
- }
- /* End of prolog if any of these are branch instructions */
- if ((op1 == 0x7000)
- || (op1 == 0xb000)
- || (op1 == 0xf000))
- {
- after_prologue = current_pc;
- insn_debug (("Done: branch\n"));
- maybe_one_more = 1;
- continue;
- }
- /* Some of the branch instructions are mixed with other types */
- if (op1 == 0x1000)
- {
- int subop = insn & 0x0ff0;
- if ((subop == 0x0ec0) || (subop == 0x0fc0))
- {
- insn_debug (("done: jmp\n"));
- after_prologue = current_pc;
- maybe_one_more = 1;
- continue; /* jmp , jl */
- }
- }
- }
-
- if (current_pc >= scan_limit)
- {
- if (pl_endptr)
- {
-#if 1
- if (after_stack_adjust != 0)
- /* We did not find a "mv fp,sp", but we DID find
- a stack_adjust. Is it safe to use that as the
- end of the prologue? I just don't know. */
- {
- *pl_endptr = after_stack_adjust;
- if (framelength)
- *framelength = framesize;
- }
- else
-#endif
- /* We reached the end of the loop without finding the end
- of the prologue. No way to win -- we should report failure.
- The way we do that is to return the original start_pc.
- GDB will set a breakpoint at the start of the function (etc.) */
- *pl_endptr = start_pc;
- }
- return;
- }
- if (after_prologue == 0)
- after_prologue = current_pc;
-
- insn_debug ((" framesize %d, firstline %08x\n", framesize, after_prologue));
- if (framelength)
- *framelength = framesize;
- if (pl_endptr)
- *pl_endptr = after_prologue;
-} /* decode_prologue */
-
-/* Function: skip_prologue
- Find end of function prologue */
-
-CORE_ADDR
-m32r_skip_prologue (CORE_ADDR pc)
-{
- CORE_ADDR func_addr, func_end;
- struct symtab_and_line sal;
-
- /* See what the symbol table says */
-
- if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- {
- sal = find_pc_line (func_addr, 0);
-
- if (sal.line != 0 && sal.end <= func_end)
- {
-
- insn_debug (("BP after prologue %08x\n", sal.end));
- func_end = sal.end;
- }
- else
- /* Either there's no line info, or the line after the prologue is after
- the end of the function. In this case, there probably isn't a
- prologue. */
- {
- insn_debug (("No line info, line(%x) sal_end(%x) funcend(%x)\n",
- sal.line, sal.end, func_end));
- func_end = min (func_end, func_addr + DEFAULT_SEARCH_LIMIT);
- }
- }
- else
- func_end = pc + DEFAULT_SEARCH_LIMIT;
- decode_prologue (pc, func_end, &sal.end, 0, 0, 0);
- return sal.end;
-}
-
-static unsigned long
-m32r_scan_prologue (struct frame_info *fi, struct frame_saved_regs *fsr)
-{
- struct symtab_and_line sal;
- CORE_ADDR prologue_start, prologue_end, current_pc;
- unsigned long framesize = 0;
-
- /* this code essentially duplicates skip_prologue,
- but we need the start address below. */
-
- if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
- {
- sal = find_pc_line (prologue_start, 0);
-
- if (sal.line == 0) /* no line info, use current PC */
- if (prologue_start == entry_point_address ())
- return 0;
- }
- else
- {
- prologue_start = fi->pc;
- prologue_end = prologue_start + 48; /* We're in the boondocks:
- allow for 16 pushes, an add,
- and "mv fp,sp" */
- }
-#if 0
- prologue_end = min (prologue_end, fi->pc);
-#endif
- insn_debug (("fipc(%08x) start(%08x) end(%08x)\n",
- fi->pc, prologue_start, prologue_end));
- prologue_end = min (prologue_end, prologue_start + DEFAULT_SEARCH_LIMIT);
- decode_prologue (prologue_start, prologue_end, &prologue_end, &framesize,
- fi, fsr);
- return framesize;
-}
-
-/* Function: init_extra_frame_info
- This function actually figures out the frame address for a given pc and
- sp. This is tricky on the m32r because we sometimes don't use an explicit
- frame pointer, and the previous stack pointer isn't necessarily recorded
- on the stack. The only reliable way to get this info is to
- examine the prologue. */
-
-void
-m32r_init_extra_frame_info (struct frame_info *fi)
-{
- int reg;
-
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
-
- memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- {
- /* We need to setup fi->frame here because run_stack_dummy gets it wrong
- by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
- SP_REGNUM);
- fi->framesize = 0;
- return;
- }
- else
- {
- fi->using_frame_pointer = 0;
- fi->framesize = m32r_scan_prologue (fi, &fi->fsr);
-
- if (!fi->next)
- if (fi->using_frame_pointer)
- {
- fi->frame = read_register (FP_REGNUM);
- }
- else
- fi->frame = read_register (SP_REGNUM);
- else
- /* fi->next means this is not the innermost frame */ if (fi->using_frame_pointer)
- /* we have an FP */
- if (fi->next->fsr.regs[FP_REGNUM] != 0) /* caller saved our FP */
- fi->frame = read_memory_integer (fi->next->fsr.regs[FP_REGNUM], 4);
- for (reg = 0; reg < NUM_REGS; reg++)
- if (fi->fsr.regs[reg] != 0)
- fi->fsr.regs[reg] = fi->frame + fi->framesize - fi->fsr.regs[reg];
- }
-}
-
-/* Function: m32r_virtual_frame_pointer
- Return the register that the function uses for a frame pointer,
- plus any necessary offset to be applied to the register before
- any frame pointer offsets. */
-
-void
-m32r_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset)
-{
- struct frame_info fi;
-
- /* Set up a dummy frame_info. */
- fi.next = NULL;
- fi.prev = NULL;
- fi.frame = 0;
- fi.pc = pc;
-
- /* Analyze the prolog and fill in the extra info. */
- m32r_init_extra_frame_info (&fi);
-
-
- /* Results will tell us which type of frame it uses. */
- if (fi.using_frame_pointer)
- {
- *reg = FP_REGNUM;
- *offset = 0;
- }
- else
- {
- *reg = SP_REGNUM;
- *offset = 0;
- }
-}
-
-/* Function: find_callers_reg
- 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. */
-
-CORE_ADDR
-m32r_find_callers_reg (struct frame_info *fi, int regnum)
-{
- for (; fi; fi = fi->next)
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
- else if (fi->fsr.regs[regnum] != 0)
- return read_memory_integer (fi->fsr.regs[regnum],
- REGISTER_RAW_SIZE (regnum));
- return read_register (regnum);
-}
-
-/* Function: frame_chain 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 INIT_EXTRA_FRAME_INFO and
- DEPRECATED_INIT_FRAME_PC will be called for the new frame. For
- m32r, we save the frame size when we initialize the frame_info. */
-
-CORE_ADDR
-m32r_frame_chain (struct frame_info *fi)
-{
- CORE_ADDR fn_start, callers_pc, fp;
-
- /* is this a dummy frame? */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return fi->frame; /* dummy frame same as caller's frame */
-
- /* is caller-of-this a dummy frame? */
- callers_pc = FRAME_SAVED_PC (fi); /* find out who called us: */
- fp = m32r_find_callers_reg (fi, FP_REGNUM);
- if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
- return fp; /* dummy frame's frame may bear no relation to ours */
-
- if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
- if (fn_start == entry_point_address ())
- return 0; /* in _start fn, don't chain further */
- if (fi->framesize == 0)
- {
- printf_filtered ("cannot determine frame size @ %s , pc(%s)\n",
- paddr (fi->frame),
- paddr (fi->pc));
- return 0;
- }
- insn_debug (("m32rx frame %08x\n", fi->frame + fi->framesize));
- return fi->frame + fi->framesize;
-}
-
-/* Function: push_return_address (pc)
- Set up the return address for the inferior function call.
- Necessary for targets that don't actually execute a JSR/BSR instruction
- (ie. when using an empty CALL_DUMMY) */
-
-CORE_ADDR
-m32r_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- write_register (RP_REGNUM, CALL_DUMMY_ADDRESS ());
- return sp;
-}
-
-
-/* Function: pop_frame
- Discard from the stack the innermost frame,
- restoring all saved registers. */
-
-struct frame_info *
-m32r_pop_frame (struct frame_info *frame)
-{
- int regnum;
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- generic_pop_dummy_frame ();
- else
- {
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->fsr.regs[regnum] != 0)
- write_register (regnum,
- read_memory_integer (frame->fsr.regs[regnum], 4));
-
- write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
- write_register (SP_REGNUM, read_register (FP_REGNUM));
- if (read_register (PSW_REGNUM) & 0x80)
- write_register (SPU_REGNUM, read_register (SP_REGNUM));
- else
- write_register (SPI_REGNUM, read_register (SP_REGNUM));
- }
- flush_cached_frames ();
- return NULL;
-}
-
-/* Function: frame_saved_pc
- Find the caller of this frame. We do this by seeing if RP_REGNUM is saved
- in the stack anywhere, otherwise we get it from the registers. */
-
-CORE_ADDR
-m32r_frame_saved_pc (struct frame_info *fi)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
- else
- return m32r_find_callers_reg (fi, RP_REGNUM);
-}
-
-/* Function: push_arguments
- Setup the function arguments for calling a function in the inferior.
-
- On the Mitsubishi M32R architecture, there are four registers (R0 to R3)
- 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.
-
- Arguments that are smaller than 4 bytes will still take up a whole
- register or a whole 32-bit word on the stack, and will be
- right-justified in the register or the stack word. This includes
- chars, shorts, and small aggregate types.
-
- Arguments of 8 bytes size are split between two registers, if
- available. If only one register is available, the argument will
- be split between the register and the stack. Otherwise it is
- passed entirely on the stack. Aggregate types with sizes between
- 4 and 8 bytes are passed entirely on the stack, and are left-justified
- within the double-word (as opposed to aggregates smaller than 4 bytes
- which are right-justified).
-
- Aggregates of greater than 8 bytes are first copied onto the stack,
- and then a pointer to the copy is passed in the place of the normal
- argument (either in a register if available, or on the stack).
-
- Functions that must return an aggregate type can return it in the
- normal return value registers (R0 and R1) if its size is 8 bytes or
- less. For larger return values, the caller must allocate space for
- the callee to copy the return value to. A pointer to this space is
- passed as an implicit first argument, always in R0. */
-
-CORE_ADDR
-m32r_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- unsigned char struct_return, CORE_ADDR struct_addr)
-{
- int stack_offset, stack_alloc;
- int argreg;
- int argnum;
- struct type *type;
- CORE_ADDR regval;
- char *val;
- char valbuf[4];
- int len;
- int odd_sized_struct;
-
- /* first force sp to a 4-byte alignment */
- sp = sp & ~3;
-
- argreg = ARG0_REGNUM;
- /* The "struct return pointer" pseudo-argument goes in R0 */
- if (struct_return)
- write_register (argreg++, 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 */
-
-
- /* 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++)
- {
- 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 */
- memcpy (valbuf + (4 - len),
- (char *) VALUE_CONTENTS (args[argnum]), len);
- val = valbuf;
- }
- else
- val = (char *) VALUE_CONTENTS (args[argnum]);
-
- 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;
- }
- /* 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)
- { /* there's room in a register */
- regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
- write_register (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_RAW_SIZE (argreg);
- val += REGISTER_RAW_SIZE (argreg);
- }
- }
- return sp;
-}
-
-/* Function: fix_call_dummy
- If there is real CALL_DUMMY code (eg. on the stack), this function
- has the responsability to insert the address of the actual code that
- is the target of the target function call. */
-
-void
-m32r_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
-{
- /* ld24 r8, <(imm24) fun> */
- *(unsigned long *) (dummy) = (fun & 0x00ffffff) | 0xe8000000;
-}
-
-
-/* Function: m32r_write_sp
- Because SP is really a read-only register that mirrors either SPU or SPI,
- we must actually write one of those two as well, depending on PSW. */
-
-void
-m32r_write_sp (CORE_ADDR val)
-{
- unsigned long psw = read_register (PSW_REGNUM);
-
- if (psw & 0x80) /* stack mode: user or interrupt */
- write_register (SPU_REGNUM, val);
- else
- write_register (SPI_REGNUM, val);
- write_register (SP_REGNUM, val);
-}
-
-void
-_initialize_m32r_tdep (void)
-{
- tm_print_insn = print_insn_m32r;
-}
+// OBSOLETE /* Target-dependent code for the Mitsubishi m32r for GDB, the GNU debugger.
+// OBSOLETE
+// OBSOLETE Copyright 1996, 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 /* Function: m32r_use_struct_convention
+// OBSOLETE Return nonzero if call_function should allocate stack space for a
+// OBSOLETE struct return? */
+// OBSOLETE int
+// OBSOLETE m32r_use_struct_convention (int gcc_p, struct type *type)
+// OBSOLETE {
+// OBSOLETE return (TYPE_LENGTH (type) > 8);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: frame_find_saved_regs
+// OBSOLETE Return the frame_saved_regs structure for the frame.
+// OBSOLETE Doesn't really work for dummy frames, but it does pass back
+// OBSOLETE an empty frame_saved_regs, so I guess that's better than total failure */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m32r_frame_find_saved_regs (struct frame_info *fi,
+// OBSOLETE struct frame_saved_regs *regaddr)
+// OBSOLETE {
+// OBSOLETE memcpy (regaddr, &fi->fsr, sizeof (struct frame_saved_regs));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Turn this on if you want to see just how much instruction decoding
+// OBSOLETE if being done, its quite a lot
+// OBSOLETE */
+// OBSOLETE #if 0
+// OBSOLETE static void
+// OBSOLETE dump_insn (char *commnt, CORE_ADDR pc, int insn)
+// OBSOLETE {
+// OBSOLETE printf_filtered (" %s %08x %08x ",
+// OBSOLETE commnt, (unsigned int) pc, (unsigned int) insn);
+// OBSOLETE TARGET_PRINT_INSN (pc, &tm_print_insn_info);
+// OBSOLETE printf_filtered ("\n");
+// OBSOLETE }
+// OBSOLETE #define insn_debug(args) { printf_filtered args; }
+// OBSOLETE #else
+// OBSOLETE #define dump_insn(a,b,c) {}
+// OBSOLETE #define insn_debug(args) {}
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #define DEFAULT_SEARCH_LIMIT 44
+// OBSOLETE
+// OBSOLETE /* Function: scan_prologue
+// OBSOLETE This function decodes the target function prologue to determine
+// OBSOLETE 1) the size of the stack frame, and 2) which registers are saved on it.
+// OBSOLETE It saves the offsets of saved regs in the frame_saved_regs argument,
+// OBSOLETE and returns the frame size. */
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE The sequence it currently generates is:
+// OBSOLETE
+// OBSOLETE if (varargs function) { ddi sp,#n }
+// OBSOLETE push registers
+// OBSOLETE if (additional stack <= 256) { addi sp,#-stack }
+// OBSOLETE else if (additional stack < 65k) { add3 sp,sp,#-stack
+// OBSOLETE
+// OBSOLETE } else if (additional stack) {
+// OBSOLETE seth sp,#(stack & 0xffff0000)
+// OBSOLETE or3 sp,sp,#(stack & 0x0000ffff)
+// OBSOLETE sub sp,r4
+// OBSOLETE }
+// OBSOLETE if (frame pointer) {
+// OBSOLETE mv sp,fp
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE These instructions are scheduled like everything else, so you should stop at
+// OBSOLETE the first branch instruction.
+// OBSOLETE
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* This is required by skip prologue and by m32r_init_extra_frame_info.
+// OBSOLETE The results of decoding a prologue should be cached because this
+// OBSOLETE thrashing is getting nuts.
+// OBSOLETE I am thinking of making a container class with two indexes, name and
+// OBSOLETE address. It may be better to extend the symbol table.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit, CORE_ADDR *pl_endptr, /* var parameter */
+// OBSOLETE unsigned long *framelength, struct frame_info *fi,
+// OBSOLETE struct frame_saved_regs *fsr)
+// OBSOLETE {
+// OBSOLETE unsigned long framesize;
+// OBSOLETE int insn;
+// OBSOLETE int op1;
+// OBSOLETE int maybe_one_more = 0;
+// OBSOLETE CORE_ADDR after_prologue = 0;
+// OBSOLETE CORE_ADDR after_stack_adjust = 0;
+// OBSOLETE CORE_ADDR current_pc;
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE framesize = 0;
+// OBSOLETE after_prologue = 0;
+// OBSOLETE insn_debug (("rd prolog l(%d)\n", scan_limit - current_pc));
+// OBSOLETE
+// OBSOLETE for (current_pc = start_pc; current_pc < scan_limit; current_pc += 2)
+// OBSOLETE {
+// OBSOLETE
+// OBSOLETE insn = read_memory_unsigned_integer (current_pc, 2);
+// OBSOLETE dump_insn ("insn-1", current_pc, insn); /* MTZ */
+// OBSOLETE
+// OBSOLETE /* If this is a 32 bit instruction, we dont want to examine its
+// OBSOLETE immediate data as though it were an instruction */
+// OBSOLETE if (current_pc & 0x02)
+// OBSOLETE { /* Clear the parallel execution bit from 16 bit instruction */
+// OBSOLETE if (maybe_one_more)
+// OBSOLETE { /* The last instruction was a branch, usually terminates
+// OBSOLETE the series, but if this is a parallel instruction,
+// OBSOLETE it may be a stack framing instruction */
+// OBSOLETE if (!(insn & 0x8000))
+// OBSOLETE {
+// OBSOLETE insn_debug (("Really done"));
+// OBSOLETE break; /* nope, we are really done */
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE insn &= 0x7fff; /* decode this instruction further */
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE if (maybe_one_more)
+// OBSOLETE break; /* This isnt the one more */
+// OBSOLETE if (insn & 0x8000)
+// OBSOLETE {
+// OBSOLETE insn_debug (("32 bit insn\n"));
+// OBSOLETE if (current_pc == scan_limit)
+// OBSOLETE scan_limit += 2; /* extend the search */
+// OBSOLETE current_pc += 2; /* skip the immediate data */
+// OBSOLETE if (insn == 0x8faf) /* add3 sp, sp, xxxx */
+// OBSOLETE /* add 16 bit sign-extended offset */
+// OBSOLETE {
+// OBSOLETE insn_debug (("stack increment\n"));
+// OBSOLETE framesize += -((short) read_memory_unsigned_integer (current_pc, 2));
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE if (((insn >> 8) == 0xe4) && /* ld24 r4, xxxxxx; sub sp, r4 */
+// OBSOLETE read_memory_unsigned_integer (current_pc + 2, 2) == 0x0f24)
+// OBSOLETE { /* subtract 24 bit sign-extended negative-offset */
+// OBSOLETE dump_insn ("insn-2", current_pc + 2, insn);
+// OBSOLETE insn = read_memory_unsigned_integer (current_pc - 2, 4);
+// OBSOLETE dump_insn ("insn-3(l4)", current_pc - 2, insn);
+// OBSOLETE if (insn & 0x00800000) /* sign extend */
+// OBSOLETE insn |= 0xff000000; /* negative */
+// OBSOLETE else
+// OBSOLETE insn &= 0x00ffffff; /* positive */
+// OBSOLETE framesize += insn;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE after_prologue = current_pc;
+// OBSOLETE continue;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE op1 = insn & 0xf000; /* isolate just the first nibble */
+// OBSOLETE
+// OBSOLETE if ((insn & 0xf0ff) == 0x207f)
+// OBSOLETE { /* st reg, @-sp */
+// OBSOLETE int regno;
+// OBSOLETE insn_debug (("push\n"));
+// OBSOLETE #if 0 /* No, PUSH FP is not an indication that we will use a frame pointer. */
+// OBSOLETE if (((insn & 0xffff) == 0x2d7f) && fi)
+// OBSOLETE fi->using_frame_pointer = 1;
+// OBSOLETE #endif
+// OBSOLETE framesize += 4;
+// OBSOLETE #if 0
+// OBSOLETE /* Why should we increase the scan limit, just because we did a push?
+// OBSOLETE And if there is a reason, surely we would only want to do it if we
+// OBSOLETE had already reached the scan limit... */
+// OBSOLETE if (current_pc == scan_limit)
+// OBSOLETE scan_limit += 2;
+// OBSOLETE #endif
+// OBSOLETE regno = ((insn >> 8) & 0xf);
+// OBSOLETE if (fsr) /* save_regs offset */
+// OBSOLETE fsr->regs[regno] = framesize;
+// OBSOLETE after_prologue = 0;
+// OBSOLETE continue;
+// OBSOLETE }
+// OBSOLETE if ((insn >> 8) == 0x4f) /* addi sp, xx */
+// OBSOLETE /* add 8 bit sign-extended offset */
+// OBSOLETE {
+// OBSOLETE int stack_adjust = (char) (insn & 0xff);
+// OBSOLETE
+// OBSOLETE /* there are probably two of these stack adjustments:
+// OBSOLETE 1) A negative one in the prologue, and
+// OBSOLETE 2) A positive one in the epilogue.
+// OBSOLETE We are only interested in the first one. */
+// OBSOLETE
+// OBSOLETE if (stack_adjust < 0)
+// OBSOLETE {
+// OBSOLETE framesize -= stack_adjust;
+// OBSOLETE after_prologue = 0;
+// OBSOLETE /* A frameless function may have no "mv fp, sp".
+// OBSOLETE In that case, this is the end of the prologue. */
+// OBSOLETE after_stack_adjust = current_pc + 2;
+// OBSOLETE }
+// OBSOLETE continue;
+// OBSOLETE }
+// OBSOLETE if (insn == 0x1d8f)
+// OBSOLETE { /* mv fp, sp */
+// OBSOLETE if (fi)
+// OBSOLETE fi->using_frame_pointer = 1; /* fp is now valid */
+// OBSOLETE insn_debug (("done fp found\n"));
+// OBSOLETE after_prologue = current_pc + 2;
+// OBSOLETE break; /* end of stack adjustments */
+// OBSOLETE }
+// OBSOLETE if (insn == 0x7000) /* Nop looks like a branch, continue explicitly */
+// OBSOLETE {
+// OBSOLETE insn_debug (("nop\n"));
+// OBSOLETE after_prologue = current_pc + 2;
+// OBSOLETE continue; /* nop occurs between pushes */
+// OBSOLETE }
+// OBSOLETE /* End of prolog if any of these are branch instructions */
+// OBSOLETE if ((op1 == 0x7000)
+// OBSOLETE || (op1 == 0xb000)
+// OBSOLETE || (op1 == 0xf000))
+// OBSOLETE {
+// OBSOLETE after_prologue = current_pc;
+// OBSOLETE insn_debug (("Done: branch\n"));
+// OBSOLETE maybe_one_more = 1;
+// OBSOLETE continue;
+// OBSOLETE }
+// OBSOLETE /* Some of the branch instructions are mixed with other types */
+// OBSOLETE if (op1 == 0x1000)
+// OBSOLETE {
+// OBSOLETE int subop = insn & 0x0ff0;
+// OBSOLETE if ((subop == 0x0ec0) || (subop == 0x0fc0))
+// OBSOLETE {
+// OBSOLETE insn_debug (("done: jmp\n"));
+// OBSOLETE after_prologue = current_pc;
+// OBSOLETE maybe_one_more = 1;
+// OBSOLETE continue; /* jmp , jl */
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (current_pc >= scan_limit)
+// OBSOLETE {
+// OBSOLETE if (pl_endptr)
+// OBSOLETE {
+// OBSOLETE #if 1
+// OBSOLETE if (after_stack_adjust != 0)
+// OBSOLETE /* We did not find a "mv fp,sp", but we DID find
+// OBSOLETE a stack_adjust. Is it safe to use that as the
+// OBSOLETE end of the prologue? I just don't know. */
+// OBSOLETE {
+// OBSOLETE *pl_endptr = after_stack_adjust;
+// OBSOLETE if (framelength)
+// OBSOLETE *framelength = framesize;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE #endif
+// OBSOLETE /* We reached the end of the loop without finding the end
+// OBSOLETE of the prologue. No way to win -- we should report failure.
+// OBSOLETE The way we do that is to return the original start_pc.
+// OBSOLETE GDB will set a breakpoint at the start of the function (etc.) */
+// OBSOLETE *pl_endptr = start_pc;
+// OBSOLETE }
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE if (after_prologue == 0)
+// OBSOLETE after_prologue = current_pc;
+// OBSOLETE
+// OBSOLETE insn_debug ((" framesize %d, firstline %08x\n", framesize, after_prologue));
+// OBSOLETE if (framelength)
+// OBSOLETE *framelength = framesize;
+// OBSOLETE if (pl_endptr)
+// OBSOLETE *pl_endptr = after_prologue;
+// OBSOLETE } /* decode_prologue */
+// OBSOLETE
+// OBSOLETE /* Function: skip_prologue
+// OBSOLETE Find end of function prologue */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m32r_skip_prologue (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE CORE_ADDR func_addr, func_end;
+// OBSOLETE struct symtab_and_line sal;
+// OBSOLETE
+// OBSOLETE /* See what the symbol table says */
+// OBSOLETE
+// OBSOLETE if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+// OBSOLETE {
+// OBSOLETE sal = find_pc_line (func_addr, 0);
+// OBSOLETE
+// OBSOLETE if (sal.line != 0 && sal.end <= func_end)
+// OBSOLETE {
+// OBSOLETE
+// OBSOLETE insn_debug (("BP after prologue %08x\n", sal.end));
+// OBSOLETE func_end = sal.end;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE /* Either there's no line info, or the line after the prologue is after
+// OBSOLETE the end of the function. In this case, there probably isn't a
+// OBSOLETE prologue. */
+// OBSOLETE {
+// OBSOLETE insn_debug (("No line info, line(%x) sal_end(%x) funcend(%x)\n",
+// OBSOLETE sal.line, sal.end, func_end));
+// OBSOLETE func_end = min (func_end, func_addr + DEFAULT_SEARCH_LIMIT);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE func_end = pc + DEFAULT_SEARCH_LIMIT;
+// OBSOLETE decode_prologue (pc, func_end, &sal.end, 0, 0, 0);
+// OBSOLETE return sal.end;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static unsigned long
+// OBSOLETE m32r_scan_prologue (struct frame_info *fi, struct frame_saved_regs *fsr)
+// OBSOLETE {
+// OBSOLETE struct symtab_and_line sal;
+// OBSOLETE CORE_ADDR prologue_start, prologue_end, current_pc;
+// OBSOLETE unsigned long framesize = 0;
+// OBSOLETE
+// OBSOLETE /* this code essentially duplicates skip_prologue,
+// OBSOLETE but we need the start address below. */
+// OBSOLETE
+// OBSOLETE if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
+// OBSOLETE {
+// OBSOLETE sal = find_pc_line (prologue_start, 0);
+// OBSOLETE
+// OBSOLETE if (sal.line == 0) /* no line info, use current PC */
+// OBSOLETE if (prologue_start == entry_point_address ())
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE prologue_start = fi->pc;
+// OBSOLETE prologue_end = prologue_start + 48; /* We're in the boondocks:
+// OBSOLETE allow for 16 pushes, an add,
+// OBSOLETE and "mv fp,sp" */
+// OBSOLETE }
+// OBSOLETE #if 0
+// OBSOLETE prologue_end = min (prologue_end, fi->pc);
+// OBSOLETE #endif
+// OBSOLETE insn_debug (("fipc(%08x) start(%08x) end(%08x)\n",
+// OBSOLETE fi->pc, prologue_start, prologue_end));
+// OBSOLETE prologue_end = min (prologue_end, prologue_start + DEFAULT_SEARCH_LIMIT);
+// OBSOLETE decode_prologue (prologue_start, prologue_end, &prologue_end, &framesize,
+// OBSOLETE fi, fsr);
+// OBSOLETE return framesize;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: init_extra_frame_info
+// OBSOLETE This function actually figures out the frame address for a given pc and
+// OBSOLETE sp. This is tricky on the m32r because we sometimes don't use an explicit
+// OBSOLETE frame pointer, and the previous stack pointer isn't necessarily recorded
+// OBSOLETE on the stack. The only reliable way to get this info is to
+// OBSOLETE examine the prologue. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m32r_init_extra_frame_info (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE int reg;
+// OBSOLETE
+// OBSOLETE if (fi->next)
+// OBSOLETE fi->pc = FRAME_SAVED_PC (fi->next);
+// OBSOLETE
+// OBSOLETE memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
+// OBSOLETE
+// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE {
+// OBSOLETE /* We need to setup fi->frame here because run_stack_dummy gets it wrong
+// OBSOLETE by assuming it's always FP. */
+// OBSOLETE fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
+// OBSOLETE SP_REGNUM);
+// OBSOLETE fi->framesize = 0;
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fi->using_frame_pointer = 0;
+// OBSOLETE fi->framesize = m32r_scan_prologue (fi, &fi->fsr);
+// OBSOLETE
+// OBSOLETE if (!fi->next)
+// OBSOLETE if (fi->using_frame_pointer)
+// OBSOLETE {
+// OBSOLETE fi->frame = read_register (FP_REGNUM);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE fi->frame = read_register (SP_REGNUM);
+// OBSOLETE else
+// OBSOLETE /* fi->next means this is not the innermost frame */ if (fi->using_frame_pointer)
+// OBSOLETE /* we have an FP */
+// OBSOLETE if (fi->next->fsr.regs[FP_REGNUM] != 0) /* caller saved our FP */
+// OBSOLETE fi->frame = read_memory_integer (fi->next->fsr.regs[FP_REGNUM], 4);
+// OBSOLETE for (reg = 0; reg < NUM_REGS; reg++)
+// OBSOLETE if (fi->fsr.regs[reg] != 0)
+// OBSOLETE fi->fsr.regs[reg] = fi->frame + fi->framesize - fi->fsr.regs[reg];
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: m32r_virtual_frame_pointer
+// OBSOLETE Return the register that the function uses for a frame pointer,
+// OBSOLETE plus any necessary offset to be applied to the register before
+// OBSOLETE any frame pointer offsets. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m32r_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset)
+// OBSOLETE {
+// OBSOLETE struct frame_info *fi = deprecated_frame_xmalloc ();
+// OBSOLETE struct cleanup *old_chain = make_cleanup (xfree, fi);
+// OBSOLETE
+// OBSOLETE /* Set up a dummy frame_info. */
+// OBSOLETE fi->next = NULL;
+// OBSOLETE fi->prev = NULL;
+// OBSOLETE fi->frame = 0;
+// OBSOLETE fi->pc = pc;
+// OBSOLETE
+// OBSOLETE /* Analyze the prolog and fill in the extra info. */
+// OBSOLETE m32r_init_extra_frame_info (fi);
+// OBSOLETE
+// OBSOLETE /* Results will tell us which type of frame it uses. */
+// OBSOLETE if (fi->using_frame_pointer)
+// OBSOLETE {
+// OBSOLETE *reg = FP_REGNUM;
+// OBSOLETE *offset = 0;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE *reg = SP_REGNUM;
+// OBSOLETE *offset = 0;
+// OBSOLETE }
+// OBSOLETE do_cleanups (old_chain);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: find_callers_reg
+// OBSOLETE Find REGNUM on the stack. Otherwise, it's in an active register. One thing
+// OBSOLETE we might want to do here is to check REGNUM against the clobber mask, and
+// OBSOLETE somehow flag it as invalid if it isn't saved on the stack somewhere. This
+// OBSOLETE would provide a graceful failure mode when trying to get the value of
+// OBSOLETE caller-saves registers for an inner frame. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m32r_find_callers_reg (struct frame_info *fi, int regnum)
+// OBSOLETE {
+// OBSOLETE for (; fi; fi = fi->next)
+// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
+// OBSOLETE else if (fi->fsr.regs[regnum] != 0)
+// OBSOLETE return read_memory_integer (fi->fsr.regs[regnum],
+// OBSOLETE REGISTER_RAW_SIZE (regnum));
+// OBSOLETE return read_register (regnum);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: frame_chain Given a GDB frame, determine the address of
+// OBSOLETE the calling function's frame. This will be used to create a new
+// OBSOLETE GDB frame struct, and then INIT_EXTRA_FRAME_INFO and
+// OBSOLETE DEPRECATED_INIT_FRAME_PC will be called for the new frame. For
+// OBSOLETE m32r, we save the frame size when we initialize the frame_info. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m32r_frame_chain (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE CORE_ADDR fn_start, callers_pc, fp;
+// OBSOLETE
+// OBSOLETE /* is this a dummy frame? */
+// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE return fi->frame; /* dummy frame same as caller's frame */
+// OBSOLETE
+// OBSOLETE /* is caller-of-this a dummy frame? */
+// OBSOLETE callers_pc = FRAME_SAVED_PC (fi); /* find out who called us: */
+// OBSOLETE fp = m32r_find_callers_reg (fi, FP_REGNUM);
+// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
+// OBSOLETE return fp; /* dummy frame's frame may bear no relation to ours */
+// OBSOLETE
+// OBSOLETE if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
+// OBSOLETE if (fn_start == entry_point_address ())
+// OBSOLETE return 0; /* in _start fn, don't chain further */
+// OBSOLETE if (fi->framesize == 0)
+// OBSOLETE {
+// OBSOLETE printf_filtered ("cannot determine frame size @ %s , pc(%s)\n",
+// OBSOLETE paddr (fi->frame),
+// OBSOLETE paddr (fi->pc));
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE insn_debug (("m32rx frame %08x\n", fi->frame + fi->framesize));
+// OBSOLETE return fi->frame + fi->framesize;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: push_return_address (pc)
+// OBSOLETE Set up the return address for the inferior function call.
+// OBSOLETE Necessary for targets that don't actually execute a JSR/BSR instruction
+// OBSOLETE (ie. when using an empty CALL_DUMMY) */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m32r_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+// OBSOLETE {
+// OBSOLETE write_register (RP_REGNUM, CALL_DUMMY_ADDRESS ());
+// OBSOLETE return sp;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Function: pop_frame
+// OBSOLETE Discard from the stack the innermost frame,
+// OBSOLETE restoring all saved registers. */
+// OBSOLETE
+// OBSOLETE struct frame_info *
+// OBSOLETE m32r_pop_frame (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE int regnum;
+// OBSOLETE
+// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+// OBSOLETE generic_pop_dummy_frame ();
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
+// OBSOLETE if (frame->fsr.regs[regnum] != 0)
+// OBSOLETE write_register (regnum,
+// OBSOLETE read_memory_integer (frame->fsr.regs[regnum], 4));
+// OBSOLETE
+// OBSOLETE write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
+// OBSOLETE write_register (SP_REGNUM, read_register (FP_REGNUM));
+// OBSOLETE if (read_register (PSW_REGNUM) & 0x80)
+// OBSOLETE write_register (SPU_REGNUM, read_register (SP_REGNUM));
+// OBSOLETE else
+// OBSOLETE write_register (SPI_REGNUM, read_register (SP_REGNUM));
+// OBSOLETE }
+// OBSOLETE flush_cached_frames ();
+// OBSOLETE return NULL;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: frame_saved_pc
+// OBSOLETE Find the caller of this frame. We do this by seeing if RP_REGNUM is saved
+// OBSOLETE in the stack anywhere, otherwise we get it from the registers. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m32r_frame_saved_pc (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+// OBSOLETE else
+// OBSOLETE return m32r_find_callers_reg (fi, RP_REGNUM);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: push_arguments
+// OBSOLETE Setup the function arguments for calling a function in the inferior.
+// OBSOLETE
+// OBSOLETE On the Mitsubishi M32R architecture, there are four registers (R0 to R3)
+// OBSOLETE which are dedicated for passing function arguments. Up to the first
+// OBSOLETE four arguments (depending on size) may go into these registers.
+// OBSOLETE The rest go on the stack.
+// OBSOLETE
+// OBSOLETE Arguments that are smaller than 4 bytes will still take up a whole
+// OBSOLETE register or a whole 32-bit word on the stack, and will be
+// OBSOLETE right-justified in the register or the stack word. This includes
+// OBSOLETE chars, shorts, and small aggregate types.
+// OBSOLETE
+// OBSOLETE Arguments of 8 bytes size are split between two registers, if
+// OBSOLETE available. If only one register is available, the argument will
+// OBSOLETE be split between the register and the stack. Otherwise it is
+// OBSOLETE passed entirely on the stack. Aggregate types with sizes between
+// OBSOLETE 4 and 8 bytes are passed entirely on the stack, and are left-justified
+// OBSOLETE within the double-word (as opposed to aggregates smaller than 4 bytes
+// OBSOLETE which are right-justified).
+// OBSOLETE
+// OBSOLETE Aggregates of greater than 8 bytes are first copied onto the stack,
+// OBSOLETE and then a pointer to the copy is passed in the place of the normal
+// OBSOLETE argument (either in a register if available, or on the stack).
+// OBSOLETE
+// OBSOLETE Functions that must return an aggregate type can return it in the
+// OBSOLETE normal return value registers (R0 and R1) if its size is 8 bytes or
+// OBSOLETE less. For larger return values, the caller must allocate space for
+// OBSOLETE the callee to copy the return value to. A pointer to this space is
+// OBSOLETE passed as an implicit first argument, always in R0. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m32r_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+// OBSOLETE unsigned char struct_return, CORE_ADDR struct_addr)
+// OBSOLETE {
+// OBSOLETE int stack_offset, stack_alloc;
+// OBSOLETE int argreg;
+// OBSOLETE int argnum;
+// OBSOLETE struct type *type;
+// OBSOLETE CORE_ADDR regval;
+// OBSOLETE char *val;
+// OBSOLETE char valbuf[4];
+// OBSOLETE int len;
+// OBSOLETE int odd_sized_struct;
+// OBSOLETE
+// OBSOLETE /* first force sp to a 4-byte alignment */
+// OBSOLETE sp = sp & ~3;
+// OBSOLETE
+// OBSOLETE argreg = ARG0_REGNUM;
+// OBSOLETE /* The "struct return pointer" pseudo-argument goes in R0 */
+// OBSOLETE if (struct_return)
+// OBSOLETE write_register (argreg++, struct_addr);
+// OBSOLETE
+// OBSOLETE /* Now make sure there's space on the stack */
+// OBSOLETE for (argnum = 0, stack_alloc = 0;
+// OBSOLETE argnum < nargs; argnum++)
+// OBSOLETE stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
+// OBSOLETE sp -= stack_alloc; /* make room on stack for args */
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Now load as many as possible of the first arguments into
+// OBSOLETE registers, and push the rest onto the stack. There are 16 bytes
+// OBSOLETE in four registers available. Loop thru args from first to last. */
+// OBSOLETE
+// OBSOLETE argreg = ARG0_REGNUM;
+// OBSOLETE for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
+// OBSOLETE {
+// OBSOLETE type = VALUE_TYPE (args[argnum]);
+// OBSOLETE len = TYPE_LENGTH (type);
+// OBSOLETE memset (valbuf, 0, sizeof (valbuf));
+// OBSOLETE if (len < 4)
+// OBSOLETE { /* value gets right-justified in the register or stack word */
+// OBSOLETE memcpy (valbuf + (4 - len),
+// OBSOLETE (char *) VALUE_CONTENTS (args[argnum]), len);
+// OBSOLETE val = valbuf;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE val = (char *) VALUE_CONTENTS (args[argnum]);
+// OBSOLETE
+// OBSOLETE if (len > 4 && (len & 3) != 0)
+// OBSOLETE odd_sized_struct = 1; /* such structs go entirely on stack */
+// OBSOLETE else
+// OBSOLETE odd_sized_struct = 0;
+// OBSOLETE while (len > 0)
+// OBSOLETE {
+// OBSOLETE if (argreg > ARGLAST_REGNUM || odd_sized_struct)
+// OBSOLETE { /* must go on the stack */
+// OBSOLETE write_memory (sp + stack_offset, val, 4);
+// OBSOLETE stack_offset += 4;
+// OBSOLETE }
+// OBSOLETE /* NOTE WELL!!!!! This is not an "else if" clause!!!
+// OBSOLETE That's because some *&^%$ things get passed on the stack
+// OBSOLETE AND in the registers! */
+// OBSOLETE if (argreg <= ARGLAST_REGNUM)
+// OBSOLETE { /* there's room in a register */
+// OBSOLETE regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
+// OBSOLETE write_register (argreg++, regval);
+// OBSOLETE }
+// OBSOLETE /* Store the value 4 bytes at a time. This means that things
+// OBSOLETE larger than 4 bytes may go partly in registers and partly
+// OBSOLETE on the stack. */
+// OBSOLETE len -= REGISTER_RAW_SIZE (argreg);
+// OBSOLETE val += REGISTER_RAW_SIZE (argreg);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE return sp;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Function: fix_call_dummy
+// OBSOLETE If there is real CALL_DUMMY code (eg. on the stack), this function
+// OBSOLETE has the responsability to insert the address of the actual code that
+// OBSOLETE is the target of the target function call. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m32r_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
+// OBSOLETE struct value **args, struct type *type, int gcc_p)
+// OBSOLETE {
+// OBSOLETE /* ld24 r8, <(imm24) fun> */
+// OBSOLETE *(unsigned long *) (dummy) = (fun & 0x00ffffff) | 0xe8000000;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Function: m32r_write_sp
+// OBSOLETE Because SP is really a read-only register that mirrors either SPU or SPI,
+// OBSOLETE we must actually write one of those two as well, depending on PSW. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m32r_write_sp (CORE_ADDR val)
+// OBSOLETE {
+// OBSOLETE unsigned long psw = read_register (PSW_REGNUM);
+// OBSOLETE
+// OBSOLETE if (psw & 0x80) /* stack mode: user or interrupt */
+// OBSOLETE write_register (SPU_REGNUM, val);
+// OBSOLETE else
+// OBSOLETE write_register (SPI_REGNUM, val);
+// OBSOLETE write_register (SP_REGNUM, val);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_m32r_tdep (void)
+// OBSOLETE {
+// OBSOLETE tm_print_insn = print_insn_m32r;
+// OBSOLETE }
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 7b2dc43809e..69c54d111a7 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Motorola 68HC11 & 68HC12
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Stephane Carrez, stcarrez@nerim.fr
This file is part of GDB.
@@ -401,7 +401,7 @@ m68hc11_saved_pc_after_call (struct frame_info *frame)
static CORE_ADDR
m68hc11_frame_saved_pc (struct frame_info *frame)
{
- return frame->extra_info->return_pc;
+ return get_frame_extra_info (frame)->return_pc;
}
static CORE_ADDR
@@ -409,10 +409,10 @@ m68hc11_frame_args_address (struct frame_info *frame)
{
CORE_ADDR addr;
- addr = frame->frame + frame->extra_info->size + STACK_CORRECTION + 2;
- if (frame->extra_info->return_kind == RETURN_RTC)
+ addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION + 2;
+ if (get_frame_extra_info (frame)->return_kind == RETURN_RTC)
addr += 1;
- else if (frame->extra_info->return_kind == RETURN_RTI)
+ else if (get_frame_extra_info (frame)->return_kind == RETURN_RTI)
addr += 7;
return addr;
@@ -421,7 +421,7 @@ m68hc11_frame_args_address (struct frame_info *frame)
static CORE_ADDR
m68hc11_frame_locals_address (struct frame_info *frame)
{
- return frame->frame;
+ return get_frame_base (frame);
}
/* Discard from the stack the innermost frame, restoring all saved
@@ -434,7 +434,9 @@ m68hc11_pop_frame (void)
register CORE_ADDR fp, sp;
register int regnum;
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
generic_pop_dummy_frame ();
else
{
@@ -443,12 +445,12 @@ m68hc11_pop_frame (void)
/* Copy regs from where they were saved in the frame. */
for (regnum = 0; regnum < M68HC11_ALL_REGS; regnum++)
- if (frame->saved_regs[regnum])
+ if (get_frame_saved_regs (frame)[regnum])
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum], 2));
+ read_memory_integer (get_frame_saved_regs (frame)[regnum], 2));
- write_register (HARD_PC_REGNUM, frame->extra_info->return_pc);
- sp = (fp + frame->extra_info->size + 2) & 0x0ffff;
+ write_register (HARD_PC_REGNUM, get_frame_extra_info (frame)->return_pc);
+ sp = (fp + get_frame_extra_info (frame)->size + 2) & 0x0ffff;
write_register (HARD_SP_REGNUM, sp);
}
flush_cached_frames ();
@@ -812,19 +814,21 @@ m68hc11_frame_chain (struct frame_info *frame)
{
CORE_ADDR addr;
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return frame->frame; /* dummy frame same as caller's 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 (frame->extra_info->return_pc == 0
- || inside_entry_file (frame->extra_info->return_pc))
+ if (get_frame_extra_info (frame)->return_pc == 0
+ || inside_entry_file (get_frame_extra_info (frame)->return_pc))
return (CORE_ADDR) 0;
- if (frame->frame == 0)
+ if (get_frame_base (frame) == 0)
{
return (CORE_ADDR) 0;
}
- addr = frame->frame + frame->extra_info->size + STACK_CORRECTION - 2;
+ addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION - 2;
addr = read_memory_unsigned_integer (addr, 2) & 0x0FFFF;
return addr;
}
@@ -840,36 +844,37 @@ m68hc11_frame_init_saved_regs (struct frame_info *fi)
CORE_ADDR pc;
CORE_ADDR addr;
- if (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
else
- memset (fi->saved_regs, 0, sizeof (fi->saved_regs));
+ memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
- pc = fi->pc;
- fi->extra_info->return_kind = m68hc11_get_return_insn (pc);
- m68hc11_guess_from_prologue (pc, fi->frame, &pc, &fi->extra_info->size,
- fi->saved_regs);
+ pc = get_frame_pc (fi);
+ get_frame_extra_info (fi)->return_kind = m68hc11_get_return_insn (pc);
+ m68hc11_guess_from_prologue (pc, get_frame_base (fi), &pc,
+ &get_frame_extra_info (fi)->size,
+ get_frame_saved_regs (fi));
- addr = fi->frame + fi->extra_info->size + STACK_CORRECTION;
+ addr = get_frame_base (fi) + get_frame_extra_info (fi)->size + STACK_CORRECTION;
if (soft_regs[SOFT_FP_REGNUM].name)
- fi->saved_regs[SOFT_FP_REGNUM] = addr - 2;
+ get_frame_saved_regs (fi)[SOFT_FP_REGNUM] = addr - 2;
/* Take into account how the function was called/returns. */
- if (fi->extra_info->return_kind == RETURN_RTC)
+ if (get_frame_extra_info (fi)->return_kind == RETURN_RTC)
{
- fi->saved_regs[HARD_PAGE_REGNUM] = addr;
+ get_frame_saved_regs (fi)[HARD_PAGE_REGNUM] = addr;
addr++;
}
- else if (fi->extra_info->return_kind == RETURN_RTI)
+ else if (get_frame_extra_info (fi)->return_kind == RETURN_RTI)
{
- fi->saved_regs[HARD_CCR_REGNUM] = addr;
- fi->saved_regs[HARD_D_REGNUM] = addr + 1;
- fi->saved_regs[HARD_X_REGNUM] = addr + 3;
- fi->saved_regs[HARD_Y_REGNUM] = addr + 5;
+ get_frame_saved_regs (fi)[HARD_CCR_REGNUM] = addr;
+ get_frame_saved_regs (fi)[HARD_D_REGNUM] = addr + 1;
+ get_frame_saved_regs (fi)[HARD_X_REGNUM] = addr + 3;
+ get_frame_saved_regs (fi)[HARD_Y_REGNUM] = addr + 5;
addr += 7;
}
- fi->saved_regs[HARD_SP_REGNUM] = addr;
- fi->saved_regs[HARD_PC_REGNUM] = fi->saved_regs[HARD_SP_REGNUM];
+ get_frame_saved_regs (fi)[HARD_SP_REGNUM] = addr;
+ get_frame_saved_regs (fi)[HARD_PC_REGNUM] = get_frame_saved_regs (fi)[HARD_SP_REGNUM];
}
static void
@@ -877,37 +882,36 @@ m68hc11_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
CORE_ADDR addr;
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
m68hc11_frame_init_saved_regs (fi);
if (fromleaf)
{
- fi->extra_info->return_kind = m68hc11_get_return_insn (fi->pc);
- fi->extra_info->return_pc = m68hc11_saved_pc_after_call (fi);
+ get_frame_extra_info (fi)->return_kind = m68hc11_get_return_insn (get_frame_pc (fi));
+ get_frame_extra_info (fi)->return_pc = m68hc11_saved_pc_after_call (fi);
}
else
{
- addr = fi->saved_regs[HARD_PC_REGNUM];
+ addr = get_frame_saved_regs (fi)[HARD_PC_REGNUM];
addr = read_memory_unsigned_integer (addr, 2) & 0x0ffff;
/* Take into account the 68HC12 specific call (PC + page). */
- if (fi->extra_info->return_kind == RETURN_RTC
+ if (get_frame_extra_info (fi)->return_kind == RETURN_RTC
&& addr >= 0x08000 && addr < 0x0c000
&& USE_PAGE_REGISTER)
{
- CORE_ADDR page_addr = fi->saved_regs[HARD_PAGE_REGNUM];
+ CORE_ADDR page_addr = get_frame_saved_regs (fi)[HARD_PAGE_REGNUM];
unsigned page = read_memory_unsigned_integer (page_addr, 1);
addr -= 0x08000;
addr += ((page & 0x0ff) << 14);
addr += 0x1000000;
}
- fi->extra_info->return_pc = addr;
+ get_frame_extra_info (fi)->return_pc = addr;
}
}
@@ -1331,14 +1335,12 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_frame_chain (gdbarch, m68hc11_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
set_gdbarch_frame_locals_address (gdbarch, m68hc11_frame_locals_address);
set_gdbarch_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 8735e07bd56..182cac698d2 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1,5 +1,6 @@
/* Target dependent code for the Motorola 68000 series.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
+ 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -257,9 +258,9 @@ static CORE_ADDR
m68k_frame_chain (struct frame_info *thisframe)
{
if (get_frame_type (thisframe) == SIGTRAMP_FRAME)
- return thisframe->frame;
- else if (!inside_entry_file (thisframe->pc))
- return read_memory_unsigned_integer (thisframe->frame, 4);
+ return get_frame_base (thisframe);
+ else if (!inside_entry_file (get_frame_pc (thisframe)))
+ return read_memory_unsigned_integer (get_frame_base (thisframe), 4);
else
return 0;
}
@@ -282,15 +283,15 @@ m68k_frame_saved_pc (struct frame_info *frame)
{
if (get_frame_type (frame) == SIGTRAMP_FRAME)
{
- if (frame->next)
- return read_memory_unsigned_integer (frame->next->frame
+ if (get_next_frame (frame))
+ return read_memory_unsigned_integer (get_frame_base (get_next_frame (frame))
+ SIG_PC_FP_OFFSET, 4);
else
return read_memory_unsigned_integer (read_register (SP_REGNUM)
+ SIG_PC_FP_OFFSET - 8, 4);
}
else
- return read_memory_unsigned_integer (frame->frame + 4, 4);
+ return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
}
@@ -331,17 +332,17 @@ delta68_frame_args_address (struct frame_info *frame_info)
/* we assume here that the only frameless functions are the system calls
or other functions who do not put anything on the stack. */
if (get_frame_type (frame_info) == SIGTRAMP_FRAME)
- return frame_info->frame + 12;
+ return get_frame_base (frame_info) + 12;
else if (frameless_look_for_prologue (frame_info))
{
/* Check for an interrupted system call */
- if (frame_info->next && (get_frame_type (frame_info->next) == SIGTRAMP_FRAME))
- return frame_info->next->frame + 16;
+ if (get_next_frame (frame_info) && (get_frame_type (get_next_frame (frame_info)) == SIGTRAMP_FRAME))
+ return get_frame_base (get_next_frame (frame_info)) + 16;
else
- return frame_info->frame + 4;
+ return get_frame_base (frame_info) + 4;
}
else
- return frame_info->frame;
+ return get_frame_base (frame_info);
}
CORE_ADDR
@@ -478,25 +479,25 @@ m68k_pop_frame (void)
m68k_frame_init_saved_regs (frame);
for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
{
- if (frame->saved_regs[regnum])
+ if (get_frame_saved_regs (frame)[regnum])
{
- read_memory (frame->saved_regs[regnum], raw_buffer, 12);
+ read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer, 12);
deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
12);
}
}
for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
{
- if (frame->saved_regs[regnum])
+ if (get_frame_saved_regs (frame)[regnum])
{
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum], 4));
+ read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
}
}
- if (frame->saved_regs[PS_REGNUM])
+ if (get_frame_saved_regs (frame)[PS_REGNUM])
{
write_register (PS_REGNUM,
- read_memory_integer (frame->saved_regs[PS_REGNUM], 4));
+ read_memory_integer (get_frame_saved_regs (frame)[PS_REGNUM], 4));
}
write_register (FP_REGNUM, read_memory_integer (fp, 4));
write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -588,19 +589,19 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
/* First possible address for a pc in a call dummy for this frame. */
CORE_ADDR possible_call_dummy_start =
- frame_info->frame - 28 - FP_REGNUM * 4 - 4 - 8 * 12;
+ get_frame_base (frame_info) - 28 - FP_REGNUM * 4 - 4 - 8 * 12;
int nextinsn;
- if (frame_info->saved_regs)
+ if (get_frame_saved_regs (frame_info))
return;
frame_saved_regs_zalloc (frame_info);
- memset (frame_info->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+ memset (get_frame_saved_regs (frame_info), 0, SIZEOF_FRAME_SAVED_REGS);
- if (frame_info->pc >= possible_call_dummy_start
- && frame_info->pc <= frame_info->frame)
+ if (get_frame_pc (frame_info) >= possible_call_dummy_start
+ && get_frame_pc (frame_info) <= get_frame_base (frame_info))
{
/* It is a call dummy. We could just stop now, since we know
@@ -608,12 +609,12 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
to parse the "prologue" which is part of the call dummy.
This is needlessly complex and confusing. FIXME. */
- next_addr = frame_info->frame;
+ next_addr = get_frame_base (frame_info);
pc = possible_call_dummy_start;
}
else
{
- pc = get_pc_function_start (frame_info->pc);
+ pc = get_pc_function_start (get_frame_pc (frame_info));
nextinsn = read_memory_unsigned_integer (pc, 2);
if (P_PEA_FP == nextinsn
@@ -621,7 +622,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
{
/* pea %fp
move.l %sp, %fp */
- next_addr = frame_info->frame;
+ next_addr = get_frame_base (frame_info);
pc += 4;
}
else if (P_LINKL_FP == nextinsn)
@@ -629,7 +630,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
/* Find the address above the saved
regs using the amount of storage from the link instruction. */
{
- next_addr = frame_info->frame + read_memory_integer (pc + 2, 4);
+ next_addr = get_frame_base (frame_info) + read_memory_integer (pc + 2, 4);
pc += 6;
}
else if (P_LINKW_FP == nextinsn)
@@ -637,7 +638,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
/* Find the address above the saved
regs using the amount of storage from the link instruction. */
{
- next_addr = frame_info->frame + read_memory_integer (pc + 2, 2);
+ next_addr = get_frame_base (frame_info) + read_memory_integer (pc + 2, 2);
pc += 4;
}
else
@@ -658,7 +659,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
/* Regmask's low bit is for register fp7, the first pushed */
for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
if (regmask & 1)
- frame_info->saved_regs[regnum] = (next_addr -= 12);
+ get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 12);
pc += 4;
}
/* fmovemx to (fp + displacement) */
@@ -666,12 +667,12 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
{
register CORE_ADDR addr;
- addr = frame_info->frame + read_memory_integer (pc + 4, 2);
+ addr = get_frame_base (frame_info) + read_memory_integer (pc + 4, 2);
/* Regmask's low bit is for register fp7, the first pushed */
for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
if (regmask & 1)
{
- frame_info->saved_regs[regnum] = addr;
+ get_frame_saved_regs (frame_info)[regnum] = addr;
addr += 12;
}
pc += 6;
@@ -683,7 +684,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
if (regmask & 1)
{
- frame_info->saved_regs[regnum] = next_addr;
+ get_frame_saved_regs (frame_info)[regnum] = next_addr;
next_addr += 4;
}
pc += 4;
@@ -693,12 +694,12 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
{
register CORE_ADDR addr;
- addr = frame_info->frame + read_memory_integer (pc + 4, 2);
+ addr = get_frame_base (frame_info) + read_memory_integer (pc + 4, 2);
/* Regmask's low bit is for register 0, the first written */
for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
if (regmask & 1)
{
- frame_info->saved_regs[regnum] = addr;
+ get_frame_saved_regs (frame_info)[regnum] = addr;
addr += 4;
}
pc += 6;
@@ -709,14 +710,14 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
/* Regmask's low bit is for register 15, the first pushed */
for (regnum = 16; --regnum >= 0; regmask >>= 1)
if (regmask & 1)
- frame_info->saved_regs[regnum] = (next_addr -= 4);
+ get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 4);
pc += 4;
}
/* movl r,-(sp) */
else if (0x2f00 == (0xfff0 & nextinsn))
{
regnum = 0xf & nextinsn;
- frame_info->saved_regs[regnum] = (next_addr -= 4);
+ get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 4);
pc += 2;
}
/* fmovemx to index of sp */
@@ -726,7 +727,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
if (regmask & 1)
{
- frame_info->saved_regs[regnum] = next_addr;
+ get_frame_saved_regs (frame_info)[regnum] = next_addr;
next_addr += 12;
}
pc += 10;
@@ -734,16 +735,16 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
/* clrw -(sp); movw ccr,-(sp) */
else if (0x4267 == nextinsn && 0x42e7 == regmask)
{
- frame_info->saved_regs[PS_REGNUM] = (next_addr -= 4);
+ get_frame_saved_regs (frame_info)[PS_REGNUM] = (next_addr -= 4);
pc += 4;
}
else
break;
}
lose:;
- frame_info->saved_regs[SP_REGNUM] = (frame_info)->frame + 8;
- frame_info->saved_regs[FP_REGNUM] = (frame_info)->frame;
- frame_info->saved_regs[PC_REGNUM] = (frame_info)->frame + 4;
+ get_frame_saved_regs (frame_info)[SP_REGNUM] = get_frame_base (frame_info) + 8;
+ get_frame_saved_regs (frame_info)[FP_REGNUM] = get_frame_base (frame_info);
+ get_frame_saved_regs (frame_info)[PC_REGNUM] = get_frame_base (frame_info) + 4;
#ifdef SIG_SP_FP_OFFSET
/* Adjust saved SP_REGNUM for fake _sigtramp frames. */
if ((get_frame_type (frame_info) == SIGTRAMP_FRAME) && frame_info->next)
@@ -1010,7 +1011,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
set_gdbarch_frame_chain (gdbarch, m68k_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, m68k_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
set_gdbarch_frameless_function_invocation (gdbarch,
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index cf47dd1dd0d..0f0a7d10241 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -135,7 +135,7 @@ fetch_register (int regno)
char mess[128]; /* For messages */
register int i;
unsigned int offset; /* Offset of registers within the u area. */
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
int tid;
if (CANNOT_FETCH_REGISTER (regno))
diff --git a/gdb/main.c b/gdb/main.c
index eb88747d19b..b10277bb7ee 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -1,7 +1,8 @@
/* Top level stuff for GDB, the GNU debugger.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 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.
@@ -37,6 +38,7 @@
#include "event-loop.h"
#include "ui-out.h"
+#include "interps.h"
#include "main.h"
/* If nonzero, display time usage both at startup and for each command. */
@@ -53,7 +55,9 @@ int display_space;
processes UI events asynchronously. */
int event_loop_p = 1;
-/* Has an interpreter been specified and if so, which. */
+/* The selected interpreter. This will be used as a set command
+ variable, so it should always be malloc'ed - since
+ do_setshow_command will free it. */
char *interpreter_p;
/* Whether this is the command line version or not */
@@ -65,6 +69,9 @@ int xdb_commands = 0;
/* Whether dbx commands will be handled */
int dbx_commands = 0;
+/* System root path, used to find libraries etc. */
+char *gdb_sysroot = 0;
+
struct ui_file *gdb_stdout;
struct ui_file *gdb_stderr;
struct ui_file *gdb_stdlog;
@@ -90,10 +97,7 @@ extern char *external_editor_command;
static int
captured_command_loop (void *data)
{
- if (command_loop_hook == NULL)
- command_loop ();
- else
- command_loop_hook ();
+ current_interp_command_loop ();
/* FIXME: cagney/1999-11-05: A correct command_loop() implementaton
would clean things up (restoring the cleanup chain) to the state
they were just prior to the call. Technically, this means that
@@ -164,13 +168,8 @@ captured_main (void *data)
START_PROGRESS (argv[0], 0);
-#ifdef MPW
- /* Do all Mac-specific setup. */
- mac_init ();
-#endif /* MPW */
-
/* This needs to happen before the first use of malloc. */
- init_malloc ((PTR) NULL);
+ init_malloc (NULL);
#if defined (ALIGN_STACK_ON_STARTUP)
i = (int) &count & 0x3;
@@ -201,6 +200,40 @@ captured_main (void *data)
/* initialize error() */
error_init ();
+ /* Set the sysroot path. */
+#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
+ gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT);
+ if (gdb_sysroot)
+ {
+ struct stat s;
+ int res = 0;
+
+ if (stat (gdb_sysroot, &s) == 0)
+ if (S_ISDIR (s.st_mode))
+ res = 1;
+
+ if (res == 0)
+ {
+ xfree (gdb_sysroot);
+ gdb_sysroot = TARGET_SYSTEM_ROOT;
+ }
+ }
+ else
+ gdb_sysroot = TARGET_SYSTEM_ROOT;
+#else
+#if defined (TARGET_SYSTEM_ROOT)
+ gdb_sysroot = TARGET_SYSTEM_ROOT;
+#else
+ gdb_sysroot = "";
+#endif
+#endif
+
+ /* There will always be an interpreter. Either the one passed into
+ this captured main (not yet implemented), or one specified by the
+ user at start up, or the console. Make life easier by always
+ initializing the interpreter to something. */
+ interpreter_p = xstrdup (INTERP_CONSOLE);
+
/* Parse arguments and options. */
{
int c;
@@ -269,10 +302,6 @@ captured_main (void *data)
{"statistics", no_argument, 0, 13},
{"write", no_argument, &write_files, 1},
{"args", no_argument, &set_args, 1},
-/* Allow machine descriptions to add more options... */
-#ifdef ADDITIONAL_OPTIONS
- ADDITIONAL_OPTIONS
-#endif
{0, no_argument, 0, 0}
};
@@ -359,7 +388,8 @@ extern int gdbtk_test (char *);
}
#endif /* GDBTK */
case 'i':
- interpreter_p = optarg;
+ xfree (interpreter_p);
+ interpreter_p = xstrdup (optarg);
break;
case 'd':
dirarg[ndir++] = optarg;
@@ -413,9 +443,6 @@ extern int gdbtk_test (char *);
}
break;
-#ifdef ADDITIONAL_OPTION_CASES
- ADDITIONAL_OPTION_CASES
-#endif
case '?':
fprintf_unfiltered (gdb_stderr,
_("Use `%s --help' for a complete list of options.\n"),
@@ -490,7 +517,10 @@ extern int gdbtk_test (char *);
gdb_init (argv[0]);
/* Do these (and anything which might call wrap_here or *_filtered)
- after initialize_all_files. */
+ after initialize_all_files() but before the interpreter has been
+ installed. Otherwize the help/version messages will be eaten by
+ the interpreter's output handler. */
+
if (print_version)
{
print_gdb_version (gdb_stdout);
@@ -506,7 +536,49 @@ extern int gdbtk_test (char *);
exit (0);
}
- if (!quiet)
+ /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets
+ GDB retain the old MI1 interpreter startup behavior. Output the
+ copyright message before the interpreter is installed. That way
+ it isn't encapsulated in MI output. */
+ if (!quiet && strcmp (interpreter_p, INTERP_MI1) == 0)
+ {
+ /* Print all the junk at the top, with trailing "..." if we are about
+ to read a symbol file (possibly slowly). */
+ print_gdb_version (gdb_stdout);
+ if (symarg)
+ printf_filtered ("..");
+ wrap_here ("");
+ gdb_flush (gdb_stdout); /* Force to screen during slow operations */
+ }
+
+
+ /* Install the default UI. All the interpreters should have had a
+ look at things by now. Initialize the default interpreter. */
+
+ {
+ /* Find it. */
+ struct interp *interp = interp_lookup (interpreter_p);
+ if (interp == NULL)
+ {
+ fprintf_unfiltered (gdb_stderr, "Interpreter `%s' unrecognized.\n",
+ interpreter_p);
+ exit (1);
+ }
+ /* Install it. */
+ if (!interp_set (interp))
+ {
+ fprintf_unfiltered (gdb_stderr,
+ "Interpreter `%s' failed to initialize.\n",
+ interpreter_p);
+ exit (1);
+ }
+ }
+
+ /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets
+ GDB retain the old MI1 interpreter startup behavior. Output the
+ copyright message after the interpreter is installed when it is
+ any sane interpreter. */
+ if (!quiet && !current_interp_named_p (INTERP_MI1))
{
/* Print all the junk at the top, with trailing "..." if we are about
to read a symbol file (possibly slowly). */
@@ -566,7 +638,7 @@ extern int gdbtk_test (char *);
if (execarg != NULL
&& symarg != NULL
- && STREQ (execarg, symarg))
+ && strcmp (execarg, symarg) == 0)
{
/* The exec file and the symbol-file are the same. If we can't
open it, better only print one error message.
@@ -612,10 +684,6 @@ extern int gdbtk_test (char *);
if (ttyarg != NULL)
catch_command_errors (tty_command, ttyarg, !batch, RETURN_MASK_ALL);
-#ifdef ADDITIONAL_OPTION_HANDLER
- ADDITIONAL_OPTION_HANDLER;
-#endif
-
/* Error messages should no longer be distinguished with extra output. */
error_pre_print = NULL;
quit_pre_print = NULL;
@@ -804,9 +872,6 @@ Options:\n\n\
--write Set writing into executable and core files.\n\
--xdb XDB compatibility mode.\n\
"), stream);
-#ifdef ADDITIONAL_OPTION_HELP
- fputs_unfiltered (ADDITIONAL_OPTION_HELP, stream);
-#endif
fputs_unfiltered (_("\n\
For more information, type \"help\" from within GDB, or consult the\n\
GDB manual (available as on-line info or a printed manual).\n\
diff --git a/gdb/maint.c b/gdb/maint.c
index 678fd2b866c..b118a56a3c0 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -1,5 +1,5 @@
/* Support for GDB maintenance commands.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support.
@@ -151,7 +151,17 @@ maintenance_demangle (char *args, int from_tty)
}
else
{
- demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
+ switch (current_language->la_language)
+ {
+ case language_objc:
+ /* Commented out until ObjC handling is enabled. */
+ /* demangled = objc_demangle (args); */
+ /* break; */
+ case language_cplus:
+ default:
+ demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
+ break;
+ }
if (demangled != NULL)
{
printf_unfiltered ("%s\n", demangled);
@@ -629,16 +639,60 @@ maintenance_show_cmd (char *args, int from_tty)
cmd_show_list (maintenance_show_cmdlist, from_tty, "");
}
-#ifdef NOTYET
/* Profiling support. */
static int maintenance_profile_p;
+#if defined (HAVE_MONSTARTUP) && defined (HAVE__MCLEANUP)
+
+static int profiling_state;
+
+static void
+mcleanup_wrapper (void)
+{
+ extern void _mcleanup (void);
+
+ if (profiling_state)
+ _mcleanup ();
+}
+
static void
maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
{
- maintenance_profile_p = 0;
- warning ("\"maintenance set profile\" command not supported.\n");
+ if (maintenance_profile_p == profiling_state)
+ return;
+
+ profiling_state = maintenance_profile_p;
+
+ if (maintenance_profile_p)
+ {
+ static int profiling_initialized;
+
+ extern void monstartup (unsigned long, unsigned long);
+ extern char _etext;
+ extern int main();
+
+ if (!profiling_initialized)
+ {
+ atexit (mcleanup_wrapper);
+ profiling_initialized = 1;
+ }
+
+ /* "main" is now always the first function in the text segment, so use
+ its address for monstartup. */
+ monstartup ((unsigned long) &main, (unsigned long) &_etext);
+ }
+ else
+ {
+ extern void _mcleanup (void);
+ _mcleanup ();
+ }
+}
+#else
+static void
+maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
+{
+ error ("Profiling support is not available on this system.");
}
#endif
@@ -651,7 +705,7 @@ _initialize_maint_cmds (void)
"Commands for use by GDB maintainers.\n\
Includes commands to dump specific internal GDB structures in\n\
a human readable form, to cause GDB to deliberately dump core,\n\
-to test internal functions such as the C++ demangler, etc.",
+to test internal functions such as the C++/ObjC demangler, etc.",
&maintenancelist, "maintenance ", 0,
&cmdlist);
@@ -713,7 +767,7 @@ Cause GDB to behave as if an internal warning was reported.",
&maintenancelist);
add_cmd ("demangle", class_maintenance, maintenance_demangle,
- "Demangle a C++ mangled name.\n\
+ "Demangle a C++/ObjC mangled name.\n\
Call internal GDB demangler routine to demangle a C++ link name\n\
and prints the result.",
&maintenancelist);
@@ -797,16 +851,12 @@ passes without a response from the target, an error occurs.", &setlist),
&showlist);
-#ifdef NOTYET
- /* FIXME: cagney/2002-06-15: A patch implementing profiling is
- pending, this just sets up the framework. */
- tmpcmd = add_setshow_boolean_cmd ("profile", class_maintenance,
- var_boolean, &maintenance_profile_p, "\
-Set internal profiling.\n\
-When enabled GDB is profiled.", "\
-Show internal profiling.\n",
- maintenance_set_profile_cmd, NULL,
- &maintenance_set_cmdlist,
- &maintenance_show_cmdlist);
-#endif
+ add_setshow_boolean_cmd ("profile", class_maintenance,
+ &maintenance_profile_p,
+ "Set internal profiling.\n"
+ "When enabled GDB is profiled.",
+ "Show internal profiling.\n",
+ maintenance_set_profile_cmd, NULL,
+ &maintenance_set_cmdlist,
+ &maintenance_show_cmdlist);
}
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index ae2821f87f3..134f9ddbdb2 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1,5 +1,5 @@
/* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -289,19 +289,22 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
if (dummy == NULL)
{
- dummy = (struct frame_info *) xmalloc (sizeof (struct frame_info));
- dummy->saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
- dummy->extra_info =
- (struct frame_extra_info *) xmalloc (sizeof (struct frame_extra_info));
+ struct frame_extra_info *extra_info;
+ CORE_ADDR *saved_regs;
+ dummy = deprecated_frame_xmalloc ();
+ saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
+ deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
+ extra_info = XMALLOC (struct frame_extra_info);
+ deprecated_set_frame_extra_info_hack (dummy, extra_info);
}
- dummy->next = NULL;
- dummy->prev = NULL;
- dummy->pc = pc;
- dummy->frame = frame;
- dummy->extra_info->status = 0;
- dummy->extra_info->framesize = 0;
- memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS);
+ deprecated_set_frame_next_hack (dummy, NULL);
+ deprecated_set_frame_prev_hack (dummy, NULL);
+ deprecated_update_frame_pc_hack (dummy, pc);
+ 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);
mcore_analyze_prologue (dummy, 0, 0);
return dummy;
}
@@ -345,7 +348,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
/* If provided, use the PC in the frame to look up the
start of this function. */
- pc = (fi == NULL ? pc : fi->pc);
+ pc = (fi == NULL ? pc : get_frame_pc (fi));
/* Find the start of this function. */
status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
@@ -359,7 +362,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
if (func_addr == entry_point_address ())
{
if (fi != NULL)
- fi->extra_info->status |= NO_MORE_FRAMES;
+ get_frame_extra_info (fi)->status |= NO_MORE_FRAMES;
return pc;
}
@@ -384,21 +387,21 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
if (fi != NULL && IS_RTS (insn))
{
mcore_insn_debug (("MCORE: got jmp r15"));
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
+ if (get_next_frame (fi) == NULL)
+ deprecated_update_frame_base_hack (fi, read_sp ());
+ return get_frame_pc (fi);
}
/* Check for first insn of prologue */
- if (fi != NULL && fi->pc == func_addr)
+ if (fi != NULL && get_frame_pc (fi) == func_addr)
{
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
+ if (get_next_frame (fi) == NULL)
+ deprecated_update_frame_base_hack (fi, read_sp ());
+ return get_frame_pc (fi);
}
/* Figure out where to stop scanning */
- stop = (fi ? fi->pc : func_end);
+ stop = (fi ? get_frame_pc (fi) : func_end);
/* Don't walk off the end of the function */
stop = (stop > func_end ? func_end : stop);
@@ -605,19 +608,19 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
/* Save everything we have learned about this frame into FI. */
if (fi != NULL)
{
- fi->extra_info->framesize = framesize;
- fi->extra_info->fp_regnum = fp_regnum;
- fi->extra_info->status = flags;
+ get_frame_extra_info (fi)->framesize = framesize;
+ get_frame_extra_info (fi)->fp_regnum = fp_regnum;
+ get_frame_extra_info (fi)->status = flags;
/* Fix the frame pointer. When gcc uses r8 as a frame pointer,
it is really an arg ptr. We adjust fi->frame to be a "real"
frame pointer. */
- if (fi->next == NULL)
+ if (get_next_frame (fi) == NULL)
{
- if (fi->extra_info->status & MY_FRAME_IN_SP)
- fi->frame = read_sp () + framesize;
+ if (get_frame_extra_info (fi)->status & MY_FRAME_IN_SP)
+ deprecated_update_frame_base_hack (fi, read_sp () + framesize);
else
- fi->frame = read_register (fp_regnum) + framesize;
+ deprecated_update_frame_base_hack (fi, read_register (fp_regnum) + framesize);
}
/* Note where saved registers are stored. The offsets in REGISTER_OFFSETS
@@ -626,7 +629,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
{
if (register_offsets[rn] >= 0)
{
- fi->saved_regs[rn] = fi->frame - register_offsets[rn];
+ 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)));
@@ -650,11 +653,11 @@ mcore_frame_chain (struct frame_info * fi)
CORE_ADDR callers_addr;
/* Analyze the prologue of this function. */
- if (fi->extra_info->status == 0)
+ if (get_frame_extra_info (fi)->status == 0)
mcore_analyze_prologue (fi, 0, 0);
/* If mcore_analyze_prologue set NO_MORE_FRAMES, quit now. */
- if (fi->extra_info->status & NO_MORE_FRAMES)
+ if (get_frame_extra_info (fi)->status & NO_MORE_FRAMES)
return 0;
/* Now that we've analyzed our prologue, we can start to ask
@@ -668,31 +671,31 @@ mcore_frame_chain (struct frame_info * fi)
If our caller does not have a frame pointer, then his frame base
is <our base> + -<caller's frame size>. */
- dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), fi->frame);
+ dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), get_frame_base (fi));
- if (dummy->extra_info->status & MY_FRAME_IN_FP)
+ if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_FP)
{
- int fp = dummy->extra_info->fp_regnum;
+ int fp = get_frame_extra_info (dummy)->fp_regnum;
/* Our caller has a frame pointer. */
- if (fi->saved_regs[fp] != 0)
+ if (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 (fi->saved_regs[fp], REGISTER_SIZE)
- + dummy->extra_info->framesize;
+ callers_addr = read_memory_integer (get_frame_saved_regs (fi)[fp], REGISTER_SIZE)
+ + get_frame_extra_info (dummy)->framesize;
}
else
{
/* It's still in the register. Don't forget to adjust
the "FP" with the framesize to get a real FP. */
- callers_addr = read_register (fp) + dummy->extra_info->framesize;
+ callers_addr = read_register (fp) + get_frame_extra_info (dummy)->framesize;
}
}
else
{
/* Our caller does not have a frame pointer. */
- callers_addr = fi->frame + dummy->extra_info->framesize;
+ callers_addr = get_frame_base (fi) + get_frame_extra_info (dummy)->framesize;
}
return callers_addr;
@@ -723,13 +726,13 @@ mcore_skip_prologue (CORE_ADDR pc)
CORE_ADDR
mcore_frame_args_address (struct frame_info * fi)
{
- return fi->frame - fi->extra_info->framesize;
+ return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
}
CORE_ADDR
mcore_frame_locals_address (struct frame_info * fi)
{
- return fi->frame - fi->extra_info->framesize;
+ return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
}
/* Return the frame pointer in use at address PC. */
@@ -738,14 +741,14 @@ void
mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
{
struct frame_info *dummy = analyze_dummy_frame (pc, 0);
- if (dummy->extra_info->status & MY_FRAME_IN_SP)
+ if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_SP)
{
*reg = SP_REGNUM;
*offset = 0;
}
else
{
- *reg = dummy->extra_info->fp_regnum;
+ *reg = get_frame_extra_info (dummy)->fp_regnum;
*offset = 0;
}
}
@@ -755,12 +758,14 @@ mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
CORE_ADDR
mcore_find_callers_reg (struct frame_info *fi, int regnum)
{
- for (; fi != NULL; fi = fi->next)
+ for (; fi != NULL; fi = get_next_frame (fi))
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
- else if (fi->saved_regs[regnum] != 0)
- return read_memory_integer (fi->saved_regs[regnum],
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ 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],
REGISTER_SIZE);
}
@@ -773,8 +778,10 @@ CORE_ADDR
mcore_frame_saved_pc (struct frame_info * fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), PC_REGNUM);
else
return mcore_find_callers_reg (fi, PR_REGNUM);
}
@@ -790,7 +797,8 @@ mcore_pop_frame (void)
int rn;
struct frame_info *fi = get_current_frame ();
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
generic_pop_dummy_frame ();
else
{
@@ -800,11 +808,11 @@ mcore_pop_frame (void)
/* Restore any saved registers. */
for (rn = 0; rn < NUM_REGS; rn++)
{
- if (fi->saved_regs[rn] != 0)
+ if (get_frame_saved_regs (fi)[rn] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (fi->saved_regs[rn],
+ value = read_memory_unsigned_integer (get_frame_saved_regs (fi)[rn],
REGISTER_SIZE);
write_register (rn, value);
}
@@ -1038,21 +1046,21 @@ mcore_store_return_value (struct type *type, char *valbuf)
void
mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- if (fi && fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (fi && get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
frame_saved_regs_zalloc (fi);
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
- fi->extra_info->status = 0;
- fi->extra_info->framesize = 0;
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+ get_frame_extra_info (fi)->status = 0;
+ get_frame_extra_info (fi)->framesize = 0;
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, SP_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), SP_REGNUM));
}
else
mcore_analyze_prologue (fi, 0, 0);
@@ -1131,7 +1139,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_init_extra_frame_info (gdbarch, mcore_init_extra_frame_info);
set_gdbarch_frame_chain (gdbarch, mcore_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_frame_init_saved_regs (gdbarch, mcore_frame_init_saved_regs);
set_gdbarch_frame_saved_pc (gdbarch, mcore_frame_saved_pc);
set_gdbarch_deprecated_store_return_value (gdbarch, mcore_store_return_value);
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 34d162fa823..a6b6fd17599 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1,6 +1,6 @@
/* Read a symbol table in ECOFF format (Third-Eye).
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Original version contributed by Alessandro Forin (af@cs.cmu.edu) at
CMU. Major work by Per Bothner, John Gilmore and Ian Lance Taylor
@@ -750,6 +750,38 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
case stProc: /* Procedure, usually goes into global block */
case stStaticProc: /* Static procedure, goes into current block */
+ /* For stProc symbol records, we need to check the storage class
+ as well, as only (stProc, scText) entries represent "real"
+ procedures - See the Compaq document titled "Object File /
+ Symbol Table Format Specification" for more information.
+ If the storage class is not scText, we discard the whole block
+ of symbol records for this stProc. */
+ if (sh->st == stProc && sh->sc != scText)
+ {
+ char *ext_tsym = ext_sh;
+ int keep_counting = 1;
+ SYMR tsym;
+
+ while (keep_counting)
+ {
+ ext_tsym += external_sym_size;
+ (*swap_sym_in) (cur_bfd, ext_tsym, &tsym);
+ count++;
+ switch (tsym.st)
+ {
+ case stParam:
+ break;
+ case stEnd:
+ keep_counting = 0;
+ break;
+ default:
+ complaint (&symfile_complaints,
+ "unknown symbol type 0x%x", sh->st);
+ break;
+ }
+ }
+ break;
+ }
s = new_symbol (name);
SYMBOL_NAMESPACE (s) = VAR_NAMESPACE;
SYMBOL_CLASS (s) = LOC_BLOCK;
@@ -794,6 +826,11 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
/* Make a type for the procedure itself */
SYMBOL_TYPE (s) = lookup_function_type (t);
+ /* All functions in C++ have prototypes. For C we don't have enough
+ information in the debug info. */
+ if (SYMBOL_LANGUAGE (s) == language_cplus)
+ TYPE_FLAGS (SYMBOL_TYPE (s)) |= TYPE_FLAG_PROTOTYPED;
+
/* Create and enter a new lexical context */
b = new_block ();
SYMBOL_BLOCK_VALUE (s) = b;
@@ -864,7 +901,24 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
switch (tsym.st)
{
case stEnd:
- goto end_of_fields;
+ /* C++ encodes class types as structures where there the
+ methods are encoded as stProc. The scope of stProc
+ symbols also ends with stEnd, thus creating a risk of
+ taking the wrong stEnd symbol record as the end of
+ the current struct, which would cause GDB to undercount
+ the real number of fields in this struct. To make sure
+ we really reached the right stEnd symbol record, we
+ check the associated name, and match it against the
+ struct name. Since method names are mangled while
+ the class name is not, there is no risk of having a
+ method whose name is identical to the class name
+ (in particular constructor method names are different
+ from the class name). There is therefore no risk that
+ this check stops the count on the StEnd of a method. */
+ if (strcmp (debug_info->ss + cur_fdr->issBase + tsym.iss,
+ name) == 0)
+ goto end_of_fields;
+ break;
case stMember:
if (nfields == 0 && type_code == TYPE_CODE_UNDEF)
@@ -1462,9 +1516,11 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
if (t->fBitfield)
{
int width = AUX_GET_WIDTH (bigend, ax);
-
- /* Inhibit core dumps with some cfront generated objects that
- corrupt the TIR. */
+#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)
{
/* Alpha cc -migrate encodes char and unsigned char types
@@ -2893,7 +2949,7 @@ parse_partial_symbols (struct objfile *objfile)
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
@@ -2981,20 +3037,22 @@ parse_partial_symbols (struct objfile *objfile)
psymtab_language, objfile);
p += 1;
}
- /* The semantics of C++ state that "struct foo { ... }"
- also defines a typedef for "foo". Unfortuantely, cfront
- never makes the typedef when translating from C++ to C.
- We make the typedef here so that "ptype foo" works as
- expected for cfront translated code. */
- else if (psymtab_language == language_cplus)
- {
- /* Also a typedef with the same name. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- sh.value, 0,
- psymtab_language, objfile);
- }
+#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_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE &objfile->static_psymbols,
+// OBSOLETE sh.value, 0,
+// OBSOLETE psymtab_language, objfile);
+// OBSOLETE }
+#endif /* OBSOLETE CFront */
}
goto check_enum;
case 't':
@@ -3141,9 +3199,11 @@ parse_partial_symbols (struct objfile *objfile)
case '9':
case '-':
case '#': /* for symbol identification (used in live ranges) */
- /* added to support cfront stabs strings */
- case 'Z': /* for definition continuations */
- case 'P': /* for prototypes */
+#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 ':':
@@ -3305,6 +3365,39 @@ parse_partial_symbols (struct objfile *objfile)
/* FALLTHROUGH */
case stProc:
+ /* Ignore all parameter symbol records. */
+ if (sh.index >= hdr->iauxMax)
+ {
+ /* Should not happen, but does when cross-compiling
+ with the MIPS compiler. FIXME -- pull later. */
+ index_complaint (name);
+ new_sdx = cur_sdx + 1; /* Don't skip at all */
+ }
+ else
+ new_sdx = AUX_GET_ISYM (fh->fBigendian,
+ (debug_info->external_aux
+ + fh->iauxBase
+ + sh.index));
+
+ if (new_sdx <= cur_sdx)
+ {
+ /* This should not happen either... FIXME. */
+ complaint (&symfile_complaints,
+ "bad proc end in aux found from symbol %s",
+ name);
+ new_sdx = cur_sdx + 1; /* Don't skip backward */
+ }
+
+ /* For stProc symbol records, we need to check the
+ storage class as well, as only (stProc, scText)
+ entries represent "real" procedures - See the
+ Compaq document titled "Object File / Symbol Table
+ Format Specification" for more information. If the
+ storage class is not scText, we discard the whole
+ block of symbol records for this stProc. */
+ if (sh.st == stProc && sh.sc != scText)
+ goto skip;
+
/* Usually there is a local and a global stProc symbol
for a function. This means that the function name
has already been entered into the mimimal symbol table
@@ -3327,30 +3420,8 @@ parse_partial_symbols (struct objfile *objfile)
&objfile->static_psymbols,
0, sh.value, psymtab_language, objfile);
- /* Skip over procedure to next one. */
- if (sh.index >= hdr->iauxMax)
- {
- /* Should not happen, but does when cross-compiling
- with the MIPS compiler. FIXME -- pull later. */
- index_complaint (name);
- new_sdx = cur_sdx + 1; /* Don't skip at all */
- }
- else
- new_sdx = AUX_GET_ISYM (fh->fBigendian,
- (debug_info->external_aux
- + fh->iauxBase
- + sh.index));
procaddr = sh.value;
- if (new_sdx <= cur_sdx)
- {
- /* This should not happen either... FIXME. */
- complaint (&symfile_complaints,
- "bad proc end in aux found from symbol %s",
- name);
- new_sdx = cur_sdx + 1; /* Don't skip backward */
- }
-
cur_sdx = new_sdx;
(*swap_sym_in) (cur_bfd,
((char *) debug_info->external_sym
@@ -4640,10 +4711,8 @@ new_symbol (char *name)
sizeof (struct symbol)));
memset (s, 0, sizeof (*s));
- SYMBOL_NAME (s) = obsavestring (name, strlen (name),
- &current_objfile->symbol_obstack);
SYMBOL_LANGUAGE (s) = psymtab_language;
- SYMBOL_INIT_DEMANGLED_NAME (s, &current_objfile->symbol_obstack);
+ SYMBOL_SET_NAMES (s, name, strlen (name), current_objfile);
return s;
}
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 97d8d460ad7..17c6614fb13 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,64 @@
+2003-02-06 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-env.c: Include "gdb_stat.h" instead of <sys/stat.h>.
+
+2003-02-04 Jim Ingham <jingham@apple.com>
+ Keith Seitz <keiths@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.h: New file.
+ * mi-interp.c: New file.
+ * mi-main.c: Include "interps.h".
+ (mi_error_message): Make global.
+ (mi_input): Delete static function, moved to "mi-interp.c".
+ (mi_execute_command, mi_execute_command_wrapper): Ditto.
+ (mi_command_loop, mi1_command_loop, mi2_command_loop): Ditto.
+ (mi_load_progress): Make non-static.
+ (mi_error_last_message): New function.
+ (captured_mi_execute_command): If the interpreter changed, don't
+ print anything.
+ (mi_load_progress): Use current_interp_named_p.
+ (mi_init_ui): Delete function.
+ (_initialize_mi_main): Don't install the mi interpreter, handled
+ by "mi-interp.c".
+ (mi_exec_async_cli_cmd_continuation): Make static.
+ * mi-console.h (mi_console_file_new): Add `quote' parameter.
+ * mi-console.c (struct mi_console_file): Add `quote'.
+ (mi_console_file_new): Add `quote' parameter. Initialize `quote'.
+ (mi_console_raw_packet): Only quote the output when `quote'.
+ * mi-cmds.h (mi_cmd_interpreter_exec): Declare.
+ (mi_error_message, mi_error_last_message): Declare.
+ (mi_execute_command): Declare.
+ * mi-cmds.c: Add `interpreter-exec' command.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ From Keith Seitz <keiths@redhat.com>:
+ * gdbmi.texinfo (GDB/MI Miscellaneous Commands): Document the
+ interpreter-exec command.
+
+2003-02-02 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-11-10 Jason Molenda (jason-cl@molenda.com):
+ * mi-cmd-var.c (mi_cmd_var_list_children): CHILDREN field is
+ now a list; still a tuple when in mi1.
+ * gdbmi.texinfo: Update var-list-children example.
+
+2003-01-13 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-env.c: Update copyright.
+
+2003-01-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-main.c (mi_cmd_exec_return): Use print_stack_frame instead of
+ show_and_print_stack_frame.
+
+2003-01-09 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-env.c: Include "gdb_string.h" instead of <string.h>.
+ Move all includes to after "defs.h".
+
2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
* mi-cmds.c (-environment-directory) Change to use mi_cmd_env_dir,
@@ -127,7 +188,6 @@
2002-07-29 Andrew Cagney <ac131313@redhat.com>
-
* mi-cmd-var.c: Include "gdb_string.h".
* mi-cmd-disas.c: Ditto.
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index 4cf34c24918..da8b77cc354 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -2543,6 +2543,33 @@ information when you start an interactive session.
(@value{GDBP})
@end smallexample
+@subheading The @code{-interpreter-exec} Command
+@findex -interpreter-exec
+
+@subheading Synopsis
+
+@smallexample
+-interpreter-exec @var{interpreter} @var{command}
+@end smallexample
+
+Execute the specified @var{command} in the given @var{interpreter}.
+
+@subheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{interpreter-exec}.
+
+@subheading Example
+
+@smallexample
+(@value{GDBP})
+-interpreter-exec console "break main"
+&"During symbol reading, couldn't parse type; debugger out of date?.\n"
+&"During symbol reading, bad structure-type format.\n"
+~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
+^done
+(@value{GDBP})
+@end smallexample
+
@ignore
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node GDB/MI Kod Commands
@@ -3756,8 +3783,8 @@ Returns the number of children of a variable object @var{name}:
Returns a list of the children of the specified variable object:
@example
- numchild=@var{n},children=@{@{name=@var{name},
- numchild=@var{n},type=@var{type}@},@r{(repeats N times)}@}
+ numchild=@var{n},children=[@{name=@var{name},
+ numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
@end example
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index 104a73bf721..55fcba10c9d 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -1,5 +1,7 @@
/* MI Command Set - environment commands.
- Copyright 2002 Free Software Foundation, Inc.
+
+ Copyright 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Red Hat Inc.
This file is part of GDB.
@@ -19,9 +21,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <string.h>
-#include <sys/stat.h>
-
#include "defs.h"
#include "inferior.h"
#include "value.h"
@@ -35,6 +34,9 @@
#include "ui-out.h"
#include "top.h"
+#include "gdb_string.h"
+#include "gdb_stat.h"
+
static void env_cli_command (const char *cli, char *args);
static void env_mod_path (char *dirname, char **which_path);
extern void _initialize_mi_cmd_env (void);
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 990b2788ca1..0da61066809 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -272,7 +272,10 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
if (numchild <= 0)
return MI_CMD_DONE;
- cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
+ if (mi_version (uiout) == 1)
+ cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
+ else
+ cleanup_children = make_cleanup_ui_out_list_begin_end (uiout, "children");
cc = childlist;
while (*cc != NULL)
{
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 699937d0ff2..5a0bf50754e 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -1,5 +1,7 @@
-/* MI Command Set.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+/* MI Command Set for GDB, the GNU debugger.
+
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -88,6 +90,7 @@ struct mi_cmd mi_cmds[] =
{"gdb-show", "show %s", 0},
{"gdb-source", 0, 0},
{"gdb-version", "show version", 0},
+ {"interpreter-exec", 0, 0, mi_cmd_interpreter_exec},
{"kod-info", 0, 0},
{"kod-list", 0, 0},
{"kod-list-object-types", 0, 0},
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index f4fe64d279e..3eb6153694e 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -1,5 +1,7 @@
-/* MI Command Set.
- Copyright 2000 Free Software Foundation, Inc.
+/* MI Command Set for GDB, the GNU debugger.
+
+ Copyright 2000, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -79,6 +81,7 @@ extern mi_cmd_args_ftype mi_cmd_exec_step_instruction;
extern mi_cmd_args_ftype mi_cmd_exec_until;
extern mi_cmd_args_ftype mi_cmd_exec_interrupt;
extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
+extern mi_cmd_argv_ftype mi_cmd_interpreter_exec;
extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
extern mi_cmd_argv_ftype mi_cmd_stack_list_args;
extern mi_cmd_argv_ftype mi_cmd_stack_list_frames;
@@ -126,4 +129,8 @@ extern int mi_debug_p;
/* Raw console output - FIXME: should this be a parameter? */
extern struct ui_file *raw_stdout;
+extern char *mi_error_message;
+extern void mi_error_last_message (void);
+extern void mi_execute_command (char *cmd, int from_tty);
+
#endif
diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c
index c1b6e9f7b33..aca008640fd 100644
--- a/gdb/mi/mi-console.c
+++ b/gdb/mi/mi-console.c
@@ -37,13 +37,14 @@ struct mi_console_file
struct ui_file *raw;
struct ui_file *buffer;
const char *prefix;
+ char quote;
};
int mi_console_file_magic;
struct ui_file *
mi_console_file_new (struct ui_file *raw,
- const char *prefix)
+ const char *prefix, char quote)
{
struct ui_file *ui_file = ui_file_new ();
struct mi_console_file *mi_console = XMALLOC (struct mi_console_file);
@@ -51,6 +52,7 @@ mi_console_file_new (struct ui_file *raw,
mi_console->raw = raw;
mi_console->buffer = mem_fileopen ();
mi_console->prefix = prefix;
+ mi_console->quote = quote;
set_ui_file_fputs (ui_file, mi_console_file_fputs);
set_ui_file_flush (ui_file, mi_console_file_flush);
set_ui_file_data (ui_file, mi_console, mi_console_file_delete);
@@ -96,9 +98,17 @@ mi_console_raw_packet (void *data,
if (length_buf > 0)
{
fputs_unfiltered (mi_console->prefix, mi_console->raw);
- fputs_unfiltered ("\"", mi_console->raw);
- fputstrn_unfiltered (buf, length_buf, '"', mi_console->raw);
- fputs_unfiltered ("\"\n", mi_console->raw);
+ if (mi_console->quote)
+ {
+ fputs_unfiltered ("\"", mi_console->raw);
+ fputstrn_unfiltered (buf, length_buf, mi_console->quote, mi_console->raw);
+ fputs_unfiltered ("\"\n", mi_console->raw);
+ }
+ else
+ {
+ fputstrn_unfiltered (buf, length_buf, 0, mi_console->raw);
+ fputs_unfiltered ("\n", mi_console->raw);
+ }
gdb_flush (mi_console->raw);
}
}
diff --git a/gdb/mi/mi-console.h b/gdb/mi/mi-console.h
index 6bd03cbd924..bc6c0085398 100644
--- a/gdb/mi/mi-console.h
+++ b/gdb/mi/mi-console.h
@@ -22,6 +22,8 @@
#ifndef MI_CONSOLE_H
#define MI_CONSOLE_H
-extern struct ui_file *mi_console_file_new (struct ui_file *raw, const char *prefix);
+extern struct ui_file *mi_console_file_new (struct ui_file *raw,
+ const char *prefix,
+ char quote);
#endif
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
new file mode 100644
index 00000000000..bf5873a61df
--- /dev/null
+++ b/gdb/mi/mi-interp.c
@@ -0,0 +1,412 @@
+/* MI Interpreter Definitions and Commands for GDB, the GNU debugger.
+
+ Copyright 2002, 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "gdb_string.h"
+#include "interps.h"
+#include "event-top.h"
+#include "event-loop.h"
+#include "inferior.h"
+#include "ui-out.h"
+#include "top.h"
+
+#include "mi-main.h"
+#include "mi-cmds.h"
+#include "mi-out.h"
+#include "mi-console.h"
+
+struct mi_interp
+{
+ /* MI's output channels */
+ struct ui_file *out;
+ struct ui_file *err;
+ struct ui_file *log;
+ struct ui_file *targ;
+ struct ui_file *event_channel;
+
+ /* This is the interpreter for the mi... */
+ struct interp *mi2_interp;
+ struct interp *mi1_interp;
+ struct interp *mi_interp;
+};
+
+/* These are the interpreter setup, etc. functions for the MI interpreter */
+static void mi_execute_command_wrapper (char *cmd);
+static void mi_command_loop (int mi_version);
+static char *mi_input (char *);
+
+/* These are hooks that we put in place while doing interpreter_exec
+ so we can report interesting things that happened "behind the mi's
+ back" in this command */
+static int mi_interp_query_hook (const char *ctlstr, va_list ap);
+static char *mi_interp_read_one_line_hook (char *prompt, int repeat,
+ char *anno);
+
+static void mi2_command_loop (void);
+static void mi1_command_loop (void);
+
+static void mi_insert_notify_hooks (void);
+static void mi_remove_notify_hooks (void);
+
+static void *
+mi_interpreter_init (void)
+{
+ struct mi_interp *mi = XMALLOC (struct mi_interp);
+
+ /* Why is this a part of the mi architecture? */
+
+ mi_setup_architecture_data ();
+
+ /* HACK: We need to force stdout/stderr to point at the console. This avoids
+ any potential side effects caused by legacy code that is still
+ using the TUI / fputs_unfiltered_hook. So we set up output channels for
+ this now, and swap them in when we are run. */
+
+ raw_stdout = stdio_fileopen (stdout);
+
+ /* Create MI channels */
+ mi->out = mi_console_file_new (raw_stdout, "~", '"');
+ mi->err = mi_console_file_new (raw_stdout, "&", '"');
+ mi->log = mi->err;
+ mi->targ = mi_console_file_new (raw_stdout, "@", '"');
+ mi->event_channel = mi_console_file_new (raw_stdout, "=", 0);
+
+ return mi;
+}
+
+static int
+mi_interpreter_resume (void *data)
+{
+ struct mi_interp *mi = data;
+ /* As per hack note in mi_interpreter_init, swap in the output channels... */
+
+ gdb_setup_readline ();
+
+ if (event_loop_p)
+ {
+ /* These overwrite some of the initialization done in
+ _intialize_event_loop. */
+ call_readline = gdb_readline2;
+ input_handler = mi_execute_command_wrapper;
+ add_file_handler (input_fd, stdin_event_handler, 0);
+ async_command_editing_p = 0;
+ /* FIXME: This is a total hack for now. PB's use of the MI implicitly
+ relies on a bug in the async support which allows asynchronous
+ commands to leak through the commmand loop. The bug involves
+ (but is not limited to) the fact that sync_execution was
+ erroneously initialized to 0. Duplicate by initializing it
+ thus here... */
+ sync_execution = 0;
+ }
+
+ gdb_stdout = mi->out;
+ /* Route error and log output through the MI */
+ gdb_stderr = mi->err;
+ gdb_stdlog = mi->log;
+ /* Route target output through the MI. */
+ gdb_stdtarg = mi->targ;
+
+ /* Replace all the hooks that we know about. There really needs to
+ be a better way of doing this... */
+ clear_interpreter_hooks ();
+
+ show_load_progress = mi_load_progress;
+
+ /* If we're _the_ interpreter, take control. */
+ if (current_interp_named_p (INTERP_MI1))
+ command_loop_hook = mi1_command_loop;
+ else if (current_interp_named_p (INTERP_MI))
+ command_loop_hook = mi2_command_loop;
+ else
+ return 0;
+
+ return 1;
+}
+
+static int
+mi_interpreter_suspend (void *data)
+{
+ gdb_disable_readline ();
+ return 1;
+}
+
+static int
+mi_interpreter_exec (void *data, const char *command)
+{
+ char *tmp = alloca (strlen (command) + 1);
+ strcpy (tmp, command);
+ mi_execute_command_wrapper (tmp);
+ return 1;
+}
+
+/* Never display the default gdb prompt in mi case. */
+static int
+mi_interpreter_prompt_p (void *data)
+{
+ return 0;
+}
+
+static void
+mi_interpreter_exec_continuation (struct continuation_arg *arg)
+{
+ bpstat_do_actions (&stop_bpstat);
+ if (!target_executing)
+ {
+ fputs_unfiltered ("*stopped", raw_stdout);
+ mi_out_put (uiout, raw_stdout);
+ fputs_unfiltered ("\n", raw_stdout);
+ fputs_unfiltered ("(gdb) \n", raw_stdout);
+ gdb_flush (raw_stdout);
+ do_exec_cleanups (ALL_CLEANUPS);
+ }
+ else if (target_can_async_p ())
+ {
+ add_continuation (mi_interpreter_exec_continuation, NULL);
+ }
+}
+
+enum mi_cmd_result
+mi_cmd_interpreter_exec (char *command, char **argv, int argc)
+{
+ struct interp *interp_to_use;
+ enum mi_cmd_result result = MI_CMD_DONE;
+ int i;
+ struct interp_procs *procs;
+
+ if (argc < 2)
+ {
+ xasprintf (&mi_error_message,
+ "mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command");
+ return MI_CMD_ERROR;
+ }
+
+ interp_to_use = interp_lookup (argv[0]);
+ if (interp_to_use == NULL)
+ {
+ xasprintf (&mi_error_message,
+ "mi_cmd_interpreter_exec: could not find interpreter \"%s\"",
+ argv[0]);
+ return MI_CMD_ERROR;
+ }
+
+ if (!interp_exec_p (interp_to_use))
+ {
+ xasprintf (&mi_error_message,
+ "mi_cmd_interpreter_exec: interpreter \"%s\" does not support command execution",
+ argv[0]);
+ return MI_CMD_ERROR;
+ }
+
+ /* Insert the MI out hooks, making sure to also call the interpreter's hooks
+ if it has any. */
+ /* KRS: We shouldn't need this... Events should be installed and they should
+ just ALWAYS fire something out down the MI channel... */
+ mi_insert_notify_hooks ();
+
+ /* Now run the code... */
+
+ for (i = 1; i < argc; i++)
+ {
+ char *buff = NULL;
+ /* Do this in a cleaner way... We want to force execution to be
+ asynchronous for commands that run the target. */
+ if (target_can_async_p () && (strcmp (argv[0], "console") == 0))
+ {
+ int len = strlen (argv[i]);
+ buff = xmalloc (len + 2);
+ memcpy (buff, argv[i], len);
+ buff[len] = '&';
+ buff[len + 1] = '\0';
+ }
+
+ /* We had to set sync_execution = 0 for the mi (well really for Project
+ Builder's use of the mi - particularly so interrupting would work.
+ But for console commands to work, we need to initialize it to 1 -
+ since that is what the cli expects - before running the command,
+ and then set it back to 0 when we are done. */
+ sync_execution = 1;
+ if (interp_exec (interp_to_use, argv[i]) < 0)
+ {
+ mi_error_last_message ();
+ result = MI_CMD_ERROR;
+ break;
+ }
+ xfree (buff);
+ do_exec_error_cleanups (ALL_CLEANUPS);
+ sync_execution = 0;
+ }
+
+ mi_remove_notify_hooks ();
+
+ /* Okay, now let's see if the command set the inferior going...
+ Tricky point - have to do this AFTER resetting the interpreter, since
+ changing the interpreter will clear out all the continuations for
+ that interpreter... */
+
+ if (target_can_async_p () && target_executing)
+ {
+ fputs_unfiltered ("^running\n", raw_stdout);
+ add_continuation (mi_interpreter_exec_continuation, NULL);
+ }
+
+ return result;
+}
+
+/*
+ * mi_insert_notify_hooks - This inserts a number of hooks that are meant to produce
+ * async-notify ("=") MI messages while running commands in another interpreter
+ * using mi_interpreter_exec. The canonical use for this is to allow access to
+ * the gdb CLI interpreter from within the MI, while still producing MI style output
+ * when actions in the CLI command change gdb's state.
+*/
+
+static void
+mi_insert_notify_hooks (void)
+{
+ query_hook = mi_interp_query_hook;
+}
+
+static void
+mi_remove_notify_hooks ()
+{
+ query_hook = NULL;
+}
+
+static int
+mi_interp_query_hook (const char *ctlstr, va_list ap)
+{
+ return 1;
+}
+
+static char *
+mi_interp_read_one_line_hook (char *prompt, int repeat, char *anno)
+{
+ static char buff[256];
+ printf_unfiltered ("=read-one-line,prompt=\"%s\"\n", prompt);
+ gdb_flush (gdb_stdout);
+ (void) fgets (buff, sizeof (buff), stdin);
+ buff[(strlen (buff) - 1)] = 0;
+ return buff;
+}
+
+static void
+output_control_change_notification (char *notification)
+{
+ printf_unfiltered ("^");
+ printf_unfiltered ("%s\n", notification);
+ gdb_flush (gdb_stdout);
+}
+
+static void
+mi_execute_command_wrapper (char *cmd)
+{
+ mi_execute_command (cmd, stdin == instream);
+}
+
+static void
+mi1_command_loop (void)
+{
+ mi_command_loop (1);
+}
+
+static void
+mi2_command_loop (void)
+{
+ mi_command_loop (2);
+}
+
+static void
+mi_command_loop (int mi_version)
+{
+#if 0
+ /* HACK: Force stdout/stderr to point at the console. This avoids
+ any potential side effects caused by legacy code that is still
+ using the TUI / fputs_unfiltered_hook */
+ raw_stdout = stdio_fileopen (stdout);
+ /* Route normal output through the MIx */
+ gdb_stdout = mi_console_file_new (raw_stdout, "~", '"');
+ /* Route error and log output through the MI */
+ gdb_stderr = mi_console_file_new (raw_stdout, "&", '"');
+ gdb_stdlog = gdb_stderr;
+ /* Route target output through the MI. */
+ gdb_stdtarg = mi_console_file_new (raw_stdout, "@", '"');
+ /* HACK: Poke the ui_out table directly. Should we be creating a
+ mi_out object wired up to the above gdb_stdout / gdb_stderr? */
+ uiout = mi_out_new (mi_version);
+ /* HACK: Override any other interpreter hooks. We need to create a
+ real event table and pass in that. */
+ init_ui_hook = 0;
+ /* command_loop_hook = 0; */
+ print_frame_info_listing_hook = 0;
+ query_hook = 0;
+ warning_hook = 0;
+ create_breakpoint_hook = 0;
+ delete_breakpoint_hook = 0;
+ modify_breakpoint_hook = 0;
+ interactive_hook = 0;
+ registers_changed_hook = 0;
+ readline_begin_hook = 0;
+ readline_hook = 0;
+ readline_end_hook = 0;
+ register_changed_hook = 0;
+ memory_changed_hook = 0;
+ context_hook = 0;
+ target_wait_hook = 0;
+ call_command_hook = 0;
+ error_hook = 0;
+ error_begin_hook = 0;
+ show_load_progress = mi_load_progress;
+#endif
+ /* Turn off 8 bit strings in quoted output. Any character with the
+ high bit set is printed using C's octal format. */
+ sevenbit_strings = 1;
+ /* Tell the world that we're alive */
+ fputs_unfiltered ("(gdb) \n", raw_stdout);
+ gdb_flush (raw_stdout);
+ if (!event_loop_p)
+ simplified_command_loop (mi_input, mi_execute_command);
+ else
+ start_event_loop ();
+}
+
+static char *
+mi_input (char *buf)
+{
+ return gdb_readline (NULL);
+}
+
+void
+_initialize_mi_interp (void)
+{
+ static const struct interp_procs procs =
+ {
+ mi_interpreter_init, /* init_proc */
+ mi_interpreter_resume, /* resume_proc */
+ mi_interpreter_suspend, /* suspend_proc */
+ mi_interpreter_exec, /* exec_proc */
+ mi_interpreter_prompt_p /* prompt_proc_p */
+ };
+
+ /* Create MI1 interpreter */
+ interp_add (interp_new (INTERP_MI1, NULL, mi_out_new (1), &procs));
+
+ interp_add (interp_new (INTERP_MI, NULL, mi_out_new (3), &procs));
+}
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 536e8a5b054..8a54108bca4 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1,5 +1,5 @@
/* MI Command Set.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -33,6 +33,7 @@
#include "mi-console.h"
#include "ui-out.h"
#include "mi-out.h"
+#include "interps.h"
#include "event-loop.h"
#include "event-top.h"
#include "gdbcore.h" /* for write_memory() */
@@ -79,27 +80,29 @@ struct ui_file *raw_stdout;
/* The token of the last asynchronous command */
static char *last_async_command;
static char *previous_async_command;
-static char *mi_error_message;
+char *mi_error_message;
static char *old_regs;
extern void _initialize_mi_main (void);
-static char *mi_input (char *);
-static void mi_execute_command (char *cmd, int from_tty);
static enum mi_cmd_result mi_cmd_execute (struct mi_parse *parse);
static void mi_execute_cli_command (const char *cli, char *args);
static enum mi_cmd_result mi_execute_async_cli_command (char *mi, char *args, int from_tty);
-static void mi_execute_command_wrapper (char *cmd);
-void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg);
+static void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg);
static int register_changed_p (int regnum);
static int get_register (int regnum, int format);
-static void mi_load_progress (const char *section_name,
- unsigned long sent_so_far,
- unsigned long total_section,
- unsigned long total_sent,
- unsigned long grand_total);
+
+/* A helper function which will set mi_error_message to
+ error_last_message. */
+void
+mi_error_last_message (void)
+{
+ char *s = error_last_message ();
+ xasprintf (&mi_error_message, s);
+ xfree (s);
+}
/* Command implementations. FIXME: Is this libgdb? No. This is the MI
layer that calls libgdb. Any operation used in the below should be
@@ -183,9 +186,9 @@ mi_cmd_exec_return (char *args, int from_tty)
/* Because we have called return_command with from_tty = 0, we need
to print the frame here. */
- show_and_print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame),
- LOC_AND_ADDRESS);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame),
+ LOC_AND_ADDRESS);
return MI_CMD_DONE;
}
@@ -1098,7 +1101,12 @@ captured_mi_execute_command (struct ui_out *uiout, void *data)
if (!target_can_async_p () || !target_executing)
{
- /* print the result if there were no errors */
+ /* print the result if there were no errors
+
+ Remember that on the way out of executing a command, you have
+ to directly use the mi_interp's uiout, since the command could
+ have reset the interpreter, in which case the current uiout
+ will most likely crash in the mi_out_* routines. */
if (args->rc == MI_CMD_DONE)
{
fputs_unfiltered (context->token, raw_stdout);
@@ -1146,15 +1154,21 @@ captured_mi_execute_command (struct ui_out *uiout, void *data)
/* FIXME: If the command string has something that looks like
a format spec (e.g. %s) we will get a core dump */
mi_execute_cli_command ("%s", context->command);
- /* print the result */
- /* FIXME: Check for errors here. */
- fputs_unfiltered (context->token, raw_stdout);
- fputs_unfiltered ("^done", raw_stdout);
- mi_out_put (uiout, raw_stdout);
- mi_out_rewind (uiout);
- fputs_unfiltered ("\n", raw_stdout);
- args->action = EXECUTE_COMMAND_DISPLAY_PROMPT;
- args->rc = MI_CMD_DONE;
+
+ /* If we changed interpreters, DON'T print out anything. */
+ if (current_interp_named_p (INTERP_MI)
+ || current_interp_named_p (INTERP_MI1))
+ {
+ /* print the result */
+ /* FIXME: Check for errors here. */
+ fputs_unfiltered (context->token, raw_stdout);
+ fputs_unfiltered ("^done", raw_stdout);
+ mi_out_put (uiout, raw_stdout);
+ mi_out_rewind (uiout);
+ fputs_unfiltered ("\n", raw_stdout);
+ args->action = EXECUTE_COMMAND_DISPLAY_PROMPT;
+ args->rc = MI_CMD_DONE;
+ }
break;
}
@@ -1169,7 +1183,7 @@ mi_execute_command (char *cmd, int from_tty)
struct mi_parse *command;
struct captured_mi_execute_command_args args;
struct ui_out *saved_uiout = uiout;
- int result, rc;
+ int result;
/* This is to handle EOF (^D). We just quit gdb. */
/* FIXME: we should call some API function here. */
@@ -1277,12 +1291,6 @@ mi_cmd_execute (struct mi_parse *parse)
}
}
-static void
-mi_execute_command_wrapper (char *cmd)
-{
- mi_execute_command (cmd, stdin == instream);
-}
-
/* FIXME: This is just a hack so we can get some extra commands going.
We don't want to channel things through the CLI, but call libgdb directly */
/* Use only for synchronous commands */
@@ -1385,13 +1393,7 @@ mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg)
do_exec_cleanups (ALL_CLEANUPS);
}
-static char *
-mi_input (char *buf)
-{
- return gdb_readline (NULL);
-}
-
-static void
+void
mi_load_progress (const char *section_name,
unsigned long sent_so_far,
unsigned long total_section,
@@ -1403,7 +1405,8 @@ mi_load_progress (const char *section_name,
static char *previous_sect_name = NULL;
int new_section;
- if (!interpreter_p || strncmp (interpreter_p, "mi", 2) != 0)
+ if (!current_interp_named_p (INTERP_MI)
+ && !current_interp_named_p (INTERP_MI1))
return;
update_threshold.tv_sec = 0;
@@ -1462,131 +1465,17 @@ mi_load_progress (const char *section_name,
}
}
-static void
-mi_command_loop (int mi_version)
-{
- if (mi_version <= 1)
- {
- /* HACK: Force stdout/stderr to point at the console. This avoids
- any potential side effects caused by legacy code that is still
- using the TUI / fputs_unfiltered_hook */
- raw_stdout = stdio_fileopen (stdout);
- /* Route normal output through the MIx */
- gdb_stdout = mi_console_file_new (raw_stdout, "~");
- }
-
- /* Route error and log output through the MI */
- gdb_stderr = mi_console_file_new (raw_stdout, "&");
- gdb_stdlog = gdb_stderr;
- /* Route target output through the MI. */
- gdb_stdtarg = mi_console_file_new (raw_stdout, "@");
-
- /* HACK: Poke the ui_out table directly. Should we be creating a
- mi_out object wired up to the above gdb_stdout / gdb_stderr? */
- uiout = mi_out_new (mi_version);
-
- /* HACK: Override any other interpreter hooks. We need to create a
- real event table and pass in that. */
- init_ui_hook = 0;
- /* command_loop_hook = 0; */
- print_frame_info_listing_hook = 0;
- query_hook = 0;
- warning_hook = 0;
- create_breakpoint_hook = 0;
- delete_breakpoint_hook = 0;
- modify_breakpoint_hook = 0;
- interactive_hook = 0;
- registers_changed_hook = 0;
- readline_begin_hook = 0;
- readline_hook = 0;
- readline_end_hook = 0;
- register_changed_hook = 0;
- memory_changed_hook = 0;
- context_hook = 0;
- target_wait_hook = 0;
- call_command_hook = 0;
- error_hook = 0;
- error_begin_hook = 0;
- show_load_progress = mi_load_progress;
-
- /* Turn off 8 bit strings in quoted output. Any character with the
- high bit set is printed using C's octal format. */
- sevenbit_strings = 1;
-
- /* Tell the world that we're alive */
- fputs_unfiltered ("(gdb) \n", raw_stdout);
- gdb_flush (raw_stdout);
-
- if (!event_loop_p)
- simplified_command_loop (mi_input, mi_execute_command);
- else
- start_event_loop ();
-}
-
-static void
-mi1_command_loop (void)
-{
- mi_command_loop (1);
-}
-
-static void
-mi2_command_loop (void)
-{
- mi_command_loop (2);
-}
-
-static void
-setup_architecture_data (void)
+void
+mi_setup_architecture_data (void)
{
/* don't trust REGISTER_BYTES to be zero. */
old_regs = xmalloc (REGISTER_BYTES + 1);
memset (old_regs, 0, REGISTER_BYTES + 1);
}
-static void
-mi_init_ui (char *arg0)
-{
- if (strlen (interpreter_p) <= 2 ||
- interpreter_p[2] > '1')
- {
- /* HACK: Force stdout/stderr to point at the console. This avoids
- any potential side effects caused by legacy code that is still
- using the TUI / fputs_unfiltered_hook */
- raw_stdout = stdio_fileopen (stdout);
- /* Route normal output through the MIx */
- gdb_stdout = mi_console_file_new (raw_stdout, "~");
- }
-}
-
void
_initialize_mi_main (void)
{
- if (interpreter_p == NULL)
- return;
-
- /* If we're _the_ interpreter, take control. */
- if (strcmp (interpreter_p, "mi") == 0)
- command_loop_hook = mi2_command_loop;
- else if (strcmp (interpreter_p, "mi1") == 0)
- command_loop_hook = mi1_command_loop;
- else if (strcmp (interpreter_p, "mi2") == 0)
- command_loop_hook = mi2_command_loop;
- else
- return;
-
- init_ui_hook = mi_init_ui;
- setup_architecture_data ();
register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
- register_gdbarch_swap (NULL, 0, setup_architecture_data);
- if (event_loop_p)
- {
- /* These overwrite some of the initialization done in
- _intialize_event_loop. */
- call_readline = gdb_readline2;
- input_handler = mi_execute_command_wrapper;
- add_file_handler (input_fd, stdin_event_handler, 0);
- async_command_editing_p = 0;
- }
- /* FIXME: Should we notify main that we are here as a possible
- interpreter? */
+ register_gdbarch_swap (NULL, 0, mi_setup_architecture_data);
}
diff --git a/gdb/config/i386/xm-i386v32.h b/gdb/mi/mi-main.h
index 706822f30dd..8e504c6076e 100644
--- a/gdb/config/i386/xm-i386v32.h
+++ b/gdb/mi/mi-main.h
@@ -1,5 +1,6 @@
-/* Macro defintions for i386, running System V 3.2.
- Copyright (C) 1989 Free Software Foundation, Inc.
+/* MI Internal Functions for GDB, the GNU debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,8 +19,15 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "i386/xm-i386v.h"
+#ifndef MI_MAIN_H
+#define MI_MAIN_H
+
+extern void mi_setup_architecture_data (void);
+
+extern void mi_load_progress (const char *section_name,
+ unsigned long sent_so_far,
+ unsigned long total_section,
+ unsigned long total_sent,
+ unsigned long grand_total);
+#endif
-/* Apparently there is inconsistency among various System V's about what
- the name of this field is. */
-#define U_FPSTATE(u) u.u_fps.u_fpstate
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 5d5506bff32..8f77ec16909 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1,5 +1,6 @@
/* GDB routines for manipulating the minimal symbol tables.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
@@ -135,14 +136,15 @@ add_minsym_to_demangled_hash_table (struct minimal_symbol *sym,
/* Look through all the current minimal symbol tables and find the
first minimal symbol that matches NAME. If OBJF is non-NULL, limit
- the search to that objfile. If SFILE is non-NULL, limit the search
- to that source file. Returns a pointer to the minimal symbol that
+ 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.
Note: One instance where there may be duplicate minimal symbols with
the same name is when the symbol tables for a shared library and the
symbol tables for an executable contain global symbols with the same
- names (the dynamic linker deals with the duplication). */
+ names (the dynamic linker deals with the duplication). */
struct minimal_symbol *
lookup_minimal_symbol (register const char *name, const char *sfile,
@@ -248,12 +250,13 @@ lookup_minimal_symbol (register const char *name, const char *sfile,
}
/* Look through all the current minimal symbol tables and find the
- first minimal symbol that matches NAME and of text type.
- If OBJF is non-NULL, limit
- the search to that objfile. If SFILE is non-NULL, limit the search
- to that source file. Returns a pointer to the minimal symbol that
- matches, or NULL if no match is found.
- */
+ 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.
+
+ This function only searches the mangled (linkage) names. */
struct minimal_symbol *
lookup_minimal_symbol_text (register const char *name, const char *sfile,
@@ -264,6 +267,8 @@ lookup_minimal_symbol_text (register const char *name, const char *sfile,
struct minimal_symbol *found_symbol = NULL;
struct minimal_symbol *found_file_symbol = NULL;
+ unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
+
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile != NULL)
{
@@ -279,10 +284,9 @@ lookup_minimal_symbol_text (register const char *name, const char *sfile,
{
if (objf == NULL || objf == objfile)
{
- for (msymbol = objfile->msymbols;
- msymbol != NULL && SYMBOL_NAME (msymbol) != NULL &&
- found_symbol == NULL;
- msymbol++)
+ for (msymbol = objfile->msymbol_hash[hash];
+ msymbol != NULL && found_symbol == NULL;
+ msymbol = msymbol->hash_next)
{
if (SYMBOL_MATCHES_NAME (msymbol, name) &&
(MSYMBOL_TYPE (msymbol) == mst_text ||
@@ -323,12 +327,13 @@ lookup_minimal_symbol_text (register const char *name, const char *sfile,
}
/* Look through all the current minimal symbol tables and find the
- first minimal symbol that matches NAME and of solib trampoline type.
- If OBJF is non-NULL, limit
- the search to that objfile. If SFILE is non-NULL, limit the search
- to that source file. 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. 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.
+
+ This function only searches the mangled (linkage) names. */
struct minimal_symbol *
lookup_minimal_symbol_solib_trampoline (register const char *name,
@@ -338,6 +343,8 @@ lookup_minimal_symbol_solib_trampoline (register const char *name,
struct minimal_symbol *msymbol;
struct minimal_symbol *found_symbol = NULL;
+ unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
+
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile != NULL)
{
@@ -353,10 +360,9 @@ lookup_minimal_symbol_solib_trampoline (register const char *name,
{
if (objf == NULL || objf == objfile)
{
- for (msymbol = objfile->msymbols;
- msymbol != NULL && SYMBOL_NAME (msymbol) != NULL &&
- found_symbol == NULL;
- msymbol++)
+ for (msymbol = objfile->msymbol_hash[hash];
+ msymbol != NULL && found_symbol == NULL;
+ msymbol = msymbol->hash_next)
{
if (SYMBOL_MATCHES_NAME (msymbol, name) &&
MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
@@ -606,9 +612,10 @@ prim_record_minimal_symbol_and_info (const char *name, CORE_ADDR address,
msym_bunch = new;
}
msymbol = &msym_bunch->contents[msym_bunch_index];
- SYMBOL_NAME (msymbol) = obsavestring ((char *) name, strlen (name),
- &objfile->symbol_obstack);
SYMBOL_INIT_LANGUAGE_SPECIFIC (msymbol, language_unknown);
+ SYMBOL_LANGUAGE (msymbol) = language_auto;
+ SYMBOL_SET_NAMES (msymbol, (char *)name, strlen (name), objfile);
+
SYMBOL_VALUE_ADDRESS (msymbol) = address;
SYMBOL_SECTION (msymbol) = section;
SYMBOL_BFD_SECTION (msymbol) = bfd_section;
@@ -860,7 +867,6 @@ install_minimal_symbols (struct objfile *objfile)
for (bindex = 0; bindex < msym_bunch_index; bindex++, mcount++)
{
msymbols[mcount] = bunch->contents[bindex];
- SYMBOL_LANGUAGE (&msymbols[mcount]) = language_auto;
if (SYMBOL_NAME (&msymbols[mcount])[0] == leading_char)
{
SYMBOL_NAME (&msymbols[mcount])++;
@@ -920,11 +926,6 @@ install_minimal_symbols (struct objfile *objfile)
}
}
}
-
- /* Now walk through all the minimal symbols, selecting the newly added
- ones and attempting to cache their C++ demangled names. */
- for (; mcount-- > 0; msymbols++)
- SYMBOL_INIT_DEMANGLED_NAME (msymbols, &objfile->symbol_obstack);
/* Now build the hash tables; we can't do this incrementally
at an earlier point since we weren't finished with the obstack
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index e5aecfffdac..ae4e6897949 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -24,7 +24,9 @@
#include "target.h"
#include "solib-svr4.h"
#include "osabi.h"
+#include "mips-tdep.h"
#include "gdb_string.h"
+#include "gdb_assert.h"
/* Copied from <asm/elf.h>. */
#define ELF_NGREG 45
@@ -83,6 +85,18 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
return 1;
}
+/* Transform the bits comprising a 32-bit register to the right
+ size for supply_register(). This is needed when MIPS_REGSIZE is 8. */
+
+static void
+supply_32bit_reg (int regnum, const void *addr)
+{
+ char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+ store_signed_integer (buf, REGISTER_RAW_SIZE (regnum),
+ extract_signed_integer (addr, 4));
+ supply_register (regnum, buf);
+}
+
/* Unpack an elf_gregset_t into GDB's register cache. */
void
@@ -95,15 +109,15 @@ supply_gregset (elf_gregset_t *gregsetp)
memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
for (regi = EF_REG0; regi <= EF_REG31; regi++)
- supply_register ((regi - EF_REG0), (char *)(regp + regi));
+ supply_32bit_reg ((regi - EF_REG0), (char *)(regp + regi));
- supply_register (LO_REGNUM, (char *)(regp + EF_LO));
- supply_register (HI_REGNUM, (char *)(regp + EF_HI));
+ supply_32bit_reg (LO_REGNUM, (char *)(regp + EF_LO));
+ supply_32bit_reg (HI_REGNUM, (char *)(regp + EF_HI));
- supply_register (PC_REGNUM, (char *)(regp + EF_CP0_EPC));
- supply_register (BADVADDR_REGNUM, (char *)(regp + EF_CP0_BADVADDR));
- supply_register (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
- supply_register (CAUSE_REGNUM, (char *)(regp + EF_CP0_CAUSE));
+ supply_32bit_reg (PC_REGNUM, (char *)(regp + EF_CP0_EPC));
+ supply_32bit_reg (BADVADDR_REGNUM, (char *)(regp + EF_CP0_BADVADDR));
+ supply_32bit_reg (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
+ supply_32bit_reg (CAUSE_REGNUM, (char *)(regp + EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
supply_register (UNUSED_REGNUM, zerobuf);
@@ -118,7 +132,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
{
int regaddr, regi;
elf_greg_t *regp = *gregsetp;
- void *src, *dst;
+ void *dst;
if (regno == -1)
{
@@ -137,9 +151,8 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regno < 32)
{
- src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regno + EF_REG0;
- memcpy (dst, src, sizeof (elf_greg_t));
+ regcache_collect (regno, dst);
return;
}
@@ -168,9 +181,8 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regaddr != -1)
{
- src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regaddr;
- memcpy (dst, src, sizeof (elf_greg_t));
+ regcache_collect (regno, dst);
}
}
@@ -227,8 +239,8 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
/* Map gdb internal register number to ptrace ``address''.
These ``addresses'' are normally defined in <asm/ptrace.h>. */
-CORE_ADDR
-register_addr (int regno, CORE_ADDR blockend)
+static CORE_ADDR
+mips_linux_register_addr (int regno, CORE_ADDR blockend)
{
int regaddr;
@@ -259,6 +271,282 @@ register_addr (int regno, CORE_ADDR blockend)
return regaddr;
}
+
+/* Fetch (and possibly build) an appropriate link_map_offsets
+ structure for native GNU/Linux MIPS targets using the struct offsets
+ defined in link.h (but without actual reference to that file).
+
+ This makes it possible to access GNU/Linux MIPS shared libraries from a
+ GDB that was built on a different host platform (for cross debugging). */
+
+static struct link_map_offsets *
+mips_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = NULL;
+
+ if (lmp == NULL)
+ {
+ lmp = &lmo;
+
+ lmo.r_debug_size = 8; /* The actual size is 20 bytes, but
+ this is all we need. */
+ lmo.r_map_offset = 4;
+ lmo.r_map_size = 4;
+
+ lmo.link_map_size = 20;
+
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 4;
+
+ lmo.l_name_offset = 4;
+ lmo.l_name_size = 4;
+
+ lmo.l_next_offset = 12;
+ lmo.l_next_size = 4;
+
+ lmo.l_prev_offset = 16;
+ lmo.l_prev_size = 4;
+ }
+
+ return lmp;
+}
+
+/* Support for 64-bit ABIs. */
+
+/* Copied from <asm/elf.h>. */
+#define MIPS64_ELF_NGREG 45
+#define MIPS64_ELF_NFPREG 33
+
+typedef unsigned char mips64_elf_greg_t[8];
+typedef mips64_elf_greg_t mips64_elf_gregset_t[MIPS64_ELF_NGREG];
+
+typedef unsigned char mips64_elf_fpreg_t[8];
+typedef mips64_elf_fpreg_t mips64_elf_fpregset_t[MIPS64_ELF_NFPREG];
+
+/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
+#define MIPS64_FPR_BASE 32
+#define MIPS64_PC 64
+#define MIPS64_CAUSE 65
+#define MIPS64_BADVADDR 66
+#define MIPS64_MMHI 67
+#define MIPS64_MMLO 68
+#define MIPS64_FPC_CSR 69
+#define MIPS64_FPC_EIR 70
+
+#define MIPS64_EF_REG0 0
+#define MIPS64_EF_REG31 31
+#define MIPS64_EF_LO 32
+#define MIPS64_EF_HI 33
+#define MIPS64_EF_CP0_EPC 34
+#define MIPS64_EF_CP0_BADVADDR 35
+#define MIPS64_EF_CP0_STATUS 36
+#define MIPS64_EF_CP0_CAUSE 37
+
+#define MIPS64_EF_SIZE 304
+
+/* Figure out where the longjmp will land.
+ We expect the first arg to be a pointer to the jmp_buf structure from
+ which we extract the pc (MIPS_LINUX_JB_PC) that we will land at. The pc
+ is copied into PC. This routine returns 1 on success. */
+
+/* Details about jmp_buf. */
+
+#define MIPS64_LINUX_JB_PC 0
+
+static int
+mips64_linux_get_longjmp_target (CORE_ADDR *pc)
+{
+ CORE_ADDR jb_addr;
+ void *buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ int element_size = TARGET_PTR_BIT == 32 ? 4 : 8;
+
+ jb_addr = read_register (A0_REGNUM);
+
+ if (target_read_memory (jb_addr + MIPS64_LINUX_JB_PC * element_size,
+ buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
+ return 0;
+
+ *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+
+ return 1;
+}
+
+/* Unpack an elf_gregset_t into GDB's register cache. */
+
+static void
+mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
+{
+ int regi;
+ mips64_elf_greg_t *regp = *gregsetp;
+ char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
+
+ memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
+
+ for (regi = MIPS64_EF_REG0; regi <= MIPS64_EF_REG31; regi++)
+ supply_register ((regi - MIPS64_EF_REG0), (char *)(regp + regi));
+
+ supply_register (LO_REGNUM, (char *)(regp + MIPS64_EF_LO));
+ supply_register (HI_REGNUM, (char *)(regp + MIPS64_EF_HI));
+
+ supply_register (PC_REGNUM, (char *)(regp + MIPS64_EF_CP0_EPC));
+ supply_register (BADVADDR_REGNUM, (char *)(regp + MIPS64_EF_CP0_BADVADDR));
+ supply_register (PS_REGNUM, (char *)(regp + MIPS64_EF_CP0_STATUS));
+ supply_register (CAUSE_REGNUM, (char *)(regp + MIPS64_EF_CP0_CAUSE));
+
+ /* Fill inaccessible registers with zero. */
+ supply_register (UNUSED_REGNUM, zerobuf);
+ for (regi = FIRST_EMBED_REGNUM; regi < LAST_EMBED_REGNUM; regi++)
+ supply_register (regi, zerobuf);
+}
+
+/* Pack our registers (or one register) into an elf_gregset_t. */
+
+static void
+mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
+{
+ int regaddr, regi;
+ mips64_elf_greg_t *regp = *gregsetp;
+ void *src, *dst;
+
+ if (regno == -1)
+ {
+ memset (regp, 0, sizeof (mips64_elf_gregset_t));
+ for (regi = 0; regi < 32; regi++)
+ mips64_fill_gregset (gregsetp, regi);
+ mips64_fill_gregset (gregsetp, LO_REGNUM);
+ mips64_fill_gregset (gregsetp, HI_REGNUM);
+ mips64_fill_gregset (gregsetp, PC_REGNUM);
+ mips64_fill_gregset (gregsetp, BADVADDR_REGNUM);
+ mips64_fill_gregset (gregsetp, PS_REGNUM);
+ mips64_fill_gregset (gregsetp, CAUSE_REGNUM);
+
+ return;
+ }
+
+ if (regno < 32)
+ {
+ dst = regp + regno + MIPS64_EF_REG0;
+ regcache_collect (regno, dst);
+ return;
+ }
+
+ regaddr = -1;
+ switch (regno)
+ {
+ case LO_REGNUM:
+ regaddr = MIPS64_EF_LO;
+ break;
+ case HI_REGNUM:
+ regaddr = MIPS64_EF_HI;
+ break;
+ case PC_REGNUM:
+ regaddr = MIPS64_EF_CP0_EPC;
+ break;
+ case BADVADDR_REGNUM:
+ regaddr = MIPS64_EF_CP0_BADVADDR;
+ break;
+ case PS_REGNUM:
+ regaddr = MIPS64_EF_CP0_STATUS;
+ break;
+ case CAUSE_REGNUM:
+ regaddr = MIPS64_EF_CP0_CAUSE;
+ break;
+ }
+
+ if (regaddr != -1)
+ {
+ dst = regp + regaddr;
+ regcache_collect (regno, dst);
+ }
+}
+
+/* Likewise, unpack an elf_fpregset_t. */
+
+static void
+mips64_supply_fpregset (mips64_elf_fpregset_t *fpregsetp)
+{
+ register int regi;
+ char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
+
+ memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
+
+ for (regi = 0; regi < 32; regi++)
+ supply_register (FP0_REGNUM + regi,
+ (char *)(*fpregsetp + regi));
+
+ supply_register (FCRCS_REGNUM, (char *)(*fpregsetp + 32));
+
+ /* FIXME: how can we supply FCRIR_REGNUM? The ABI doesn't tell us. */
+ supply_register (FCRIR_REGNUM, zerobuf);
+}
+
+/* Likewise, pack one or all floating point registers into an
+ elf_fpregset_t. */
+
+static void
+mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno)
+{
+ char *from, *to;
+
+ if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
+ {
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
+ to = (char *) (*fpregsetp + regno - FP0_REGNUM);
+ memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
+ }
+ else if (regno == FCRCS_REGNUM)
+ {
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
+ to = (char *) (*fpregsetp + 32);
+ memcpy (to, from, REGISTER_RAW_SIZE (regno));
+ }
+ else if (regno == -1)
+ {
+ int regi;
+
+ for (regi = 0; regi < 32; regi++)
+ mips64_fill_fpregset (fpregsetp, FP0_REGNUM + regi);
+ mips64_fill_fpregset(fpregsetp, FCRCS_REGNUM);
+ }
+}
+
+
+/* Map gdb internal register number to ptrace ``address''.
+ These ``addresses'' are normally defined in <asm/ptrace.h>. */
+
+static CORE_ADDR
+mips64_linux_register_addr (int regno, CORE_ADDR blockend)
+{
+ int regaddr;
+
+ if (regno < 0 || regno >= NUM_REGS)
+ error ("Bogon register number %d.", regno);
+
+ if (regno < 32)
+ regaddr = regno;
+ else if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
+ regaddr = MIPS64_FPR_BASE + (regno - FP0_REGNUM);
+ else if (regno == PC_REGNUM)
+ regaddr = MIPS64_PC;
+ else if (regno == CAUSE_REGNUM)
+ regaddr = MIPS64_CAUSE;
+ else if (regno == BADVADDR_REGNUM)
+ regaddr = MIPS64_BADVADDR;
+ else if (regno == LO_REGNUM)
+ regaddr = MIPS64_MMLO;
+ else if (regno == HI_REGNUM)
+ regaddr = MIPS64_MMHI;
+ else if (regno == FCRCS_REGNUM)
+ regaddr = MIPS64_FPC_CSR;
+ else if (regno == FCRIR_REGNUM)
+ regaddr = MIPS64_FPC_EIR;
+ else
+ error ("Unknowable register number %d.", regno);
+
+ return regaddr;
+}
+
/* Use a local version of this function to get the correct types for
regsets, until multi-arch core support is ready. */
@@ -268,29 +556,41 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
elf_gregset_t gregset;
elf_fpregset_t fpregset;
+ mips64_elf_gregset_t gregset64;
+ mips64_elf_fpregset_t fpregset64;
if (which == 0)
{
- if (core_reg_size != sizeof (gregset))
+ if (core_reg_size == sizeof (gregset))
{
- warning ("wrong size gregset struct in core file");
+ memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
+ supply_gregset (&gregset);
+ }
+ else if (core_reg_size == sizeof (gregset64))
+ {
+ memcpy ((char *) &gregset64, core_reg_sect, sizeof (gregset64));
+ mips64_supply_gregset (&gregset64);
}
else
{
- memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
- supply_gregset (&gregset);
+ warning ("wrong size gregset struct in core file");
}
}
else if (which == 2)
{
- if (core_reg_size != sizeof (fpregset))
+ if (core_reg_size == sizeof (fpregset))
{
- warning ("wrong size fpregset struct in core file");
+ memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
+ supply_fpregset (&fpregset);
+ }
+ else if (core_reg_size == sizeof (fpregset64))
+ {
+ memcpy ((char *) &fpregset64, core_reg_sect, sizeof (fpregset64));
+ mips64_supply_fpregset (&fpregset64);
}
else
{
- memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
- supply_fpregset (&fpregset);
+ warning ("wrong size fpregset struct in core file");
}
}
}
@@ -315,7 +615,7 @@ static struct core_fns regset_core_fns =
GDB that was built on a different host platform (for cross debugging). */
static struct link_map_offsets *
-mips_linux_svr4_fetch_link_map_offsets (void)
+mips64_linux_svr4_fetch_link_map_offsets (void)
{
static struct link_map_offsets lmo;
static struct link_map_offsets *lmp = NULL;
@@ -324,41 +624,107 @@ mips_linux_svr4_fetch_link_map_offsets (void)
{
lmp = &lmo;
- lmo.r_debug_size = 8; /* The actual size is 20 bytes, but
+ lmo.r_debug_size = 16; /* The actual size is 40 bytes, but
this is all we need. */
- lmo.r_map_offset = 4;
- lmo.r_map_size = 4;
+ lmo.r_map_offset = 8;
+ lmo.r_map_size = 8;
- lmo.link_map_size = 20;
+ lmo.link_map_size = 40;
lmo.l_addr_offset = 0;
- lmo.l_addr_size = 4;
+ lmo.l_addr_size = 8;
- lmo.l_name_offset = 4;
- lmo.l_name_size = 4;
+ lmo.l_name_offset = 8;
+ lmo.l_name_size = 8;
- lmo.l_next_offset = 12;
- lmo.l_next_size = 4;
+ lmo.l_next_offset = 24;
+ lmo.l_next_size = 8;
- lmo.l_prev_offset = 16;
- lmo.l_prev_size = 4;
+ lmo.l_prev_offset = 32;
+ lmo.l_prev_size = 8;
}
return lmp;
}
+/* Handle for obtaining pointer to the current register_addr() function
+ for a given architecture. */
+static struct gdbarch_data *register_addr_data;
+
+CORE_ADDR
+register_addr (int regno, CORE_ADDR blockend)
+{
+ CORE_ADDR (*register_addr_ptr) (int, CORE_ADDR) =
+ gdbarch_data (current_gdbarch, register_addr_data);
+
+ gdb_assert (register_addr_ptr != 0);
+
+ return register_addr_ptr (regno, blockend);
+}
+
+static void
+set_mips_linux_register_addr (struct gdbarch *gdbarch,
+ CORE_ADDR (*register_addr_ptr) (int, CORE_ADDR))
+{
+ set_gdbarch_data (gdbarch, register_addr_data, register_addr_ptr);
+}
+
+static void *
+init_register_addr_data (struct gdbarch *gdbarch)
+{
+ return 0;
+}
+
static void
mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- set_gdbarch_get_longjmp_target (gdbarch, mips_linux_get_longjmp_target);
- set_solib_svr4_fetch_link_map_offsets
- (gdbarch, mips_linux_svr4_fetch_link_map_offsets);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ enum mips_abi abi = mips_abi (gdbarch);
+
+ switch (abi)
+ {
+ case MIPS_ABI_O32:
+ set_gdbarch_get_longjmp_target (gdbarch,
+ mips_linux_get_longjmp_target);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, mips_linux_svr4_fetch_link_map_offsets);
+ set_mips_linux_register_addr (gdbarch, mips_linux_register_addr);
+ break;
+ case MIPS_ABI_N32:
+ set_gdbarch_get_longjmp_target (gdbarch,
+ mips_linux_get_longjmp_target);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, mips_linux_svr4_fetch_link_map_offsets);
+ set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr);
+ break;
+ case MIPS_ABI_N64:
+ set_gdbarch_get_longjmp_target (gdbarch,
+ mips64_linux_get_longjmp_target);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, mips64_linux_svr4_fetch_link_map_offsets);
+ set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr);
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "can't handle ABI");
+ break;
+ }
}
void
_initialize_mips_linux_tdep (void)
{
- gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_LINUX,
- mips_linux_init_abi);
+ const struct bfd_arch_info *arch_info;
+
+ register_addr_data =
+ register_gdbarch_data (init_register_addr_data, 0);
+
+ for (arch_info = bfd_lookup_arch (bfd_arch_mips, 0);
+ arch_info != NULL;
+ arch_info = arch_info->next)
+ {
+ gdbarch_register_osabi (bfd_arch_mips, arch_info->mach, GDB_OSABI_LINUX,
+ mips_linux_init_abi);
+ }
+
add_core_fns (&regset_core_fns);
}
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 16009c2e545..f893e339c2e 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -62,9 +62,6 @@
: regno >= FP0_REGNUM ? FPR_BASE + (regno - FP0_REGNUM) \
: 0)
-static char zerobuf[MAX_REGISTER_RAW_SIZE] =
-{0};
-
static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
/* Get all registers from the inferior */
@@ -73,8 +70,10 @@ void
fetch_inferior_registers (int regno)
{
register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
register int i;
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
deprecated_registers_fetched ();
@@ -175,6 +174,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
int bad_reg = -1;
register reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
+
+
/* If u.u_ar0 was an absolute address in the core file, relativize it now,
so we can use it as an offset into core_reg_sect. When we're done,
"register 0" will be at core_reg_sect+reg_ptr, and we can use
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index ece50b975f4..3555eedd1ea 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
@@ -130,8 +130,6 @@ struct gdbarch_tdep
int mips_default_stack_argsize;
int gdb_target_is_mips64;
int default_mask_address_p;
-
- enum gdb_osabi osabi;
};
#define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
@@ -323,8 +321,8 @@ int gdb_print_insn_mips (bfd_vma, disassemble_info *);
static void mips_print_register (int, int);
-static mips_extra_func_info_t
-heuristic_proc_desc (CORE_ADDR, CORE_ADDR, struct frame_info *, int);
+static mips_extra_func_info_t heuristic_proc_desc (CORE_ADDR, CORE_ADDR,
+ struct frame_info *, int);
static CORE_ADDR heuristic_proc_start (CORE_ADDR);
@@ -336,8 +334,9 @@ static void mips_show_processor_type_command (char *, int);
static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *);
-static mips_extra_func_info_t
-find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame, int cur_frame);
+static mips_extra_func_info_t find_proc_desc (CORE_ADDR pc,
+ struct frame_info *next_frame,
+ int cur_frame);
static CORE_ADDR after_prologue (CORE_ADDR pc,
mips_extra_func_info_t proc_desc);
@@ -495,12 +494,12 @@ void
mips_print_extra_frame_info (struct frame_info *fi)
{
if (fi
- && fi->extra_info
- && fi->extra_info->proc_desc
- && fi->extra_info->proc_desc->pdr.framereg < NUM_REGS)
+ && 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 (fi->extra_info->proc_desc->pdr.framereg),
- paddr_d (fi->extra_info->proc_desc->pdr.frameoffset));
+ 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
@@ -1423,21 +1422,21 @@ mips_find_saved_regs (struct frame_info *fci)
{
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
- reg_position = fci->frame + SIGFRAME_REGSAVE_OFF
+ reg_position = get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
+ ireg * SIGFRAME_REG_SIZE;
- fci->saved_regs[ireg] = reg_position;
+ get_frame_saved_regs (fci)[ireg] = reg_position;
}
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
- reg_position = fci->frame + SIGFRAME_FPREGSAVE_OFF
+ reg_position = get_frame_base (fci) + SIGFRAME_FPREGSAVE_OFF
+ ireg * SIGFRAME_REG_SIZE;
- fci->saved_regs[FP0_REGNUM + ireg] = reg_position;
+ get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
}
- fci->saved_regs[PC_REGNUM] = fci->frame + SIGFRAME_PC_OFF;
+ get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_base (fci) + SIGFRAME_PC_OFF;
return;
}
- proc_desc = fci->extra_info->proc_desc;
+ proc_desc = get_frame_extra_info (fci)->proc_desc;
if (proc_desc == NULL)
/* I'm not sure how/whether this can happen. Normally when we can't
find a proc_desc, we "synthesize" one using heuristic_proc_desc
@@ -1452,7 +1451,8 @@ mips_find_saved_regs (struct frame_info *fci)
a signal, we assume that all registers have been saved.
This assumes that all register saves in a function happen before
the first function call. */
- (fci->next == NULL || (get_frame_type (fci->next) == SIGTRAMP_FRAME))
+ (get_next_frame (fci) == NULL
+ || (get_frame_type (get_next_frame (fci)) == SIGTRAMP_FRAME))
/* In a dummy frame we know exactly where things are saved. */
&& !PROC_DESC_IS_DUMMY (proc_desc)
@@ -1460,7 +1460,7 @@ mips_find_saved_regs (struct frame_info *fci)
/* Don't bother unless we are inside a function prologue. Outside the
prologue, we know where everything is. */
- && in_prologue (fci->pc, PROC_LOW_ADDR (proc_desc))
+ && in_prologue (get_frame_pc (fci), PROC_LOW_ADDR (proc_desc))
/* Not sure exactly what kernel_trap means, but if it means
the kernel saves the registers without a prologue doing it,
@@ -1484,7 +1484,7 @@ mips_find_saved_regs (struct frame_info *fci)
/* Scan through this function's instructions preceding the current
PC, and look for those that save registers. */
- while (addr < fci->pc)
+ while (addr < get_frame_pc (fci))
{
inst = mips_fetch_instruction (addr);
if (pc_is_mips16 (addr))
@@ -1499,11 +1499,11 @@ mips_find_saved_regs (struct frame_info *fci)
/* Fill in the offsets for the registers which gen_mask says
were saved. */
- reg_position = fci->frame + PROC_REG_OFFSET (proc_desc);
+ reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
if (gen_mask & 0x80000000)
{
- fci->saved_regs[ireg] = reg_position;
+ get_frame_saved_regs (fci)[ireg] = reg_position;
reg_position -= MIPS_SAVED_REGSIZE;
}
@@ -1520,14 +1520,14 @@ mips_find_saved_regs (struct frame_info *fci)
int sreg_count = (inst >> 6) & 3;
/* Check if the ra register was pushed on the stack. */
- reg_position = fci->frame + PROC_REG_OFFSET (proc_desc);
+ reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
if (inst & 0x20)
reg_position -= MIPS_SAVED_REGSIZE;
/* Check if the s0 and s1 registers were pushed on the stack. */
for (reg = 16; reg < sreg_count + 16; reg++)
{
- fci->saved_regs[reg] = reg_position;
+ get_frame_saved_regs (fci)[reg] = reg_position;
reg_position -= MIPS_SAVED_REGSIZE;
}
}
@@ -1535,7 +1535,7 @@ mips_find_saved_regs (struct frame_info *fci)
/* Fill in the offsets for the registers which float_mask says
were saved. */
- reg_position = fci->frame + PROC_FREG_OFFSET (proc_desc);
+ reg_position = get_frame_base (fci) + PROC_FREG_OFFSET (proc_desc);
/* Apparently, the freg_offset gives the offset to the first 64 bit
saved.
@@ -1558,11 +1558,11 @@ mips_find_saved_regs (struct frame_info *fci)
for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
if (float_mask & 0x80000000)
{
- fci->saved_regs[FP0_REGNUM + ireg] = reg_position;
+ get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
reg_position -= MIPS_SAVED_REGSIZE;
}
- fci->saved_regs[PC_REGNUM] = fci->saved_regs[RA_REGNUM];
+ get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_saved_regs (fci)[RA_REGNUM];
}
/* Set up the 'saved_regs' array. This is a data structure containing
@@ -1575,11 +1575,11 @@ mips_find_saved_regs (struct frame_info *fci)
static void
mips_frame_init_saved_regs (struct frame_info *frame)
{
- if (frame->saved_regs == NULL)
+ if (get_frame_saved_regs (frame) == NULL)
{
mips_find_saved_regs (frame);
}
- frame->saved_regs[SP_REGNUM] = frame->frame;
+ get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame);
}
static CORE_ADDR
@@ -1683,8 +1683,11 @@ mips_init_frame_pc_first (int fromleaf, struct frame_info *prev)
{
CORE_ADDR pc, tmp;
- pc = ((fromleaf) ? SAVED_PC_AFTER_CALL (prev->next) :
- prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
+ pc = ((fromleaf)
+ ? SAVED_PC_AFTER_CALL (get_next_frame (prev))
+ : get_next_frame (prev)
+ ? FRAME_SAVED_PC (get_next_frame (prev))
+ : read_pc ());
tmp = SKIP_TRAMPOLINE_CODE (pc);
return tmp ? tmp : pc;
}
@@ -1694,20 +1697,20 @@ static CORE_ADDR
mips_frame_saved_pc (struct frame_info *frame)
{
CORE_ADDR saved_pc;
- mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
+ mips_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
/* We have to get the saved pc from the sigcontext
if it is a signal handler frame. */
int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM
: (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM);
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))
{
LONGEST tmp;
frame_unwind_signed_register (frame, PC_REGNUM, &tmp);
saved_pc = tmp;
}
else if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
- saved_pc = read_memory_integer (frame->frame - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
+ saved_pc = read_memory_integer (get_frame_base (frame) - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
else
saved_pc = read_next_frame_reg (frame, pcreg);
@@ -2436,7 +2439,7 @@ mips_frame_chain (struct frame_info *frame)
/* A dummy frame, uses SP not FP. Get the old SP value. If all
is well, frame->frame the bottom of the current frame will
contain that value. */
- return frame->frame;
+ return get_frame_base (frame);
}
/* Look up the procedure descriptor for this PC. */
@@ -2456,7 +2459,7 @@ mips_frame_chain (struct frame_info *frame)
&& !(get_frame_type (frame) == SIGTRAMP_FRAME)
/* For a generic dummy frame, let get_frame_pointer() unwind a
register value saved as part of the dummy frame call. */
- && !(DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0)))
+ && !(DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0)))
return 0;
else
return get_frame_pointer (frame, proc_desc);
@@ -2466,16 +2469,21 @@ static void
mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
{
int regnum;
+ mips_extra_func_info_t proc_desc;
+
+ if (get_frame_type (fci) == DUMMY_FRAME)
+ return;
/* Use proc_desc calculated in frame_chain */
- mips_extra_func_info_t proc_desc =
- fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1);
+ proc_desc =
+ get_next_frame (fci)
+ ? cached_proc_desc
+ : find_proc_desc (get_frame_pc (fci), get_next_frame (fci), 1);
- fci->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info));
- fci->saved_regs = NULL;
- fci->extra_info->proc_desc =
+ deprecated_set_frame_saved_regs_hack (fci, NULL);
+ get_frame_extra_info (fci)->proc_desc =
proc_desc == &temp_proc_desc ? 0 : proc_desc;
if (proc_desc)
{
@@ -2483,10 +2491,10 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
/* This may not be quite right, if proc has a real frame register.
Get the value of the frame relative sp, procedure might have been
interrupted by a signal at it's very start. */
- if (fci->pc == PROC_LOW_ADDR (proc_desc)
+ if (get_frame_pc (fci) == PROC_LOW_ADDR (proc_desc)
&& !PROC_DESC_IS_DUMMY (proc_desc))
- fci->frame = read_next_frame_reg (fci->next, SP_REGNUM);
- else if (DEPRECATED_PC_IN_CALL_DUMMY (fci->pc, 0, 0))
+ deprecated_update_frame_base_hack (fci, read_next_frame_reg (get_next_frame (fci), SP_REGNUM));
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fci), 0, 0))
/* Do not ``fix'' fci->frame. It will have the value of the
generic dummy frame's top-of-stack (since the draft
fci->frame is obtained by returning the unwound stack
@@ -2495,7 +2503,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
part of the dummy frames data. */
/* Do nothing. */;
else
- fci->frame = get_frame_pointer (fci->next, proc_desc);
+ deprecated_update_frame_base_hack (fci, get_frame_pointer (get_next_frame (fci), proc_desc));
if (proc_desc == &temp_proc_desc)
{
@@ -2508,31 +2516,31 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
/* FIXME: cagney/2002-11-18: This problem will go away once
frame.c:get_prev_frame() is modified to set the frame's
type before calling functions like this. */
- find_pc_partial_function (fci->pc, &name,
+ find_pc_partial_function (get_frame_pc (fci), &name,
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (!PC_IN_SIGTRAMP (fci->pc, name))
+ if (!PC_IN_SIGTRAMP (get_frame_pc (fci), name))
{
frame_saved_regs_zalloc (fci);
- memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
- fci->saved_regs[PC_REGNUM]
- = fci->saved_regs[RA_REGNUM];
+ memcpy (get_frame_saved_regs (fci), temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
+ get_frame_saved_regs (fci)[PC_REGNUM]
+ = get_frame_saved_regs (fci)[RA_REGNUM];
/* Set value of previous frame's stack pointer. Remember that
saved_regs[SP_REGNUM] is special in that it contains the
value of the stack pointer register. The other saved_regs
values are addresses (in the inferior) at which a given
register's value may be found. */
- fci->saved_regs[SP_REGNUM] = fci->frame;
+ get_frame_saved_regs (fci)[SP_REGNUM] = get_frame_base (fci);
}
}
/* hack: if argument regs are saved, guess these contain args */
/* assume we can't tell how many args for now */
- fci->extra_info->num_args = -1;
+ get_frame_extra_info (fci)->num_args = -1;
for (regnum = MIPS_LAST_ARG_REGNUM; regnum >= A0_REGNUM; regnum--)
{
if (PROC_REG_MASK (proc_desc) & (1 << regnum))
{
- fci->extra_info->num_args = regnum - A0_REGNUM + 1;
+ get_frame_extra_info (fci)->num_args = regnum - A0_REGNUM + 1;
break;
}
}
@@ -3814,9 +3822,9 @@ mips_pop_frame (void)
register int regnum;
struct frame_info *frame = get_current_frame ();
CORE_ADDR new_sp = get_frame_base (frame);
- mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
+ mips_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))
{
generic_pop_dummy_frame ();
flush_cached_frames ();
@@ -3824,22 +3832,22 @@ mips_pop_frame (void)
}
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
- if (frame->saved_regs == NULL)
+ if (get_frame_saved_regs (frame) == NULL)
FRAME_INIT_SAVED_REGS (frame);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (regnum != SP_REGNUM && regnum != PC_REGNUM
- && frame->saved_regs[regnum])
+ && 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 (frame->saved_regs[regnum],
+ read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
MIPS_SAVED_REGSIZE));
else
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum],
+ read_memory_integer (get_frame_saved_regs (frame)[regnum],
MIPS_SAVED_REGSIZE));
}
@@ -5454,24 +5462,6 @@ mips_call_dummy_address (void)
}
-/* If the current gcc for this target does not produce correct debugging
- information for float parameters, both prototyped and unprototyped, then
- define this macro. This forces gdb to always assume that floats are
- passed as doubles and then converted in the callee.
-
- For the mips chip, it appears that the debug info marks the parameters as
- floats regardless of whether the function is prototyped, but the actual
- values are passed as doubles for the non-prototyped case and floats for
- the prototyped case. Thus we choose to make the non-prototyped case work
- for C and break the prototyped case, since the non-prototyped case is
- probably much more common. (FIXME). */
-
-static int
-mips_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- return current_language->la_language == language_c;
-}
-
/* When debugging a 64 MIPS target running a 32 bit ABI, the size of
the register stored on the stack (32) is different to its real raw
size (64). The below ensures that registers are fetched from the
@@ -5626,7 +5616,6 @@ mips_gdbarch_init (struct gdbarch_info info,
struct gdbarch_tdep *tdep;
int elf_flags;
enum mips_abi mips_abi, found_abi, wanted_abi;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
/* Reset the disassembly info, in case it was set to something
non-default. */
@@ -5641,10 +5630,6 @@ mips_gdbarch_init (struct gdbarch_info info,
/* First of all, extract the elf_flags, if available. */
if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
elf_flags = elf_elfheader (info.abfd)->e_flags;
-
- /* Try to determine the OS ABI of the object we are loading. If
- we end up with `unknown', just leave it that way. */
- osabi = gdbarch_lookup_osabi (info.abfd);
}
/* Check ELF_FLAGS to see if it specifies the ABI being used. */
@@ -5741,15 +5726,13 @@ mips_gdbarch_init (struct gdbarch_info info,
continue;
if (gdbarch_tdep (arches->gdbarch)->mips_abi != mips_abi)
continue;
- if (gdbarch_tdep (arches->gdbarch)->osabi == osabi)
- return arches->gdbarch;
+ return arches->gdbarch;
}
/* Need a new architecture. Fill in a target specific vector. */
tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
tdep->elf_flags = elf_flags;
- tdep->osabi = osabi;
/* Initially set everything according to the default ABI/ISA. */
set_gdbarch_short_bit (gdbarch, 16);
@@ -5766,7 +5749,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_elf_make_msymbol_special (gdbarch,
mips_elf_make_msymbol_special);
- if (osabi == GDB_OSABI_IRIX)
+ if (info.osabi == GDB_OSABI_IRIX)
set_gdbarch_num_regs (gdbarch, 71);
else
set_gdbarch_num_regs (gdbarch, 90);
@@ -6014,10 +5997,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_register_convert_to_raw (gdbarch,
mips_register_convert_to_raw);
- set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
-
set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frameless_function_invocation (gdbarch,
generic_frameless_function_invocation_not);
set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
@@ -6048,7 +6028,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch,
@@ -6453,10 +6433,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: _PROC_MAGIC_ = %d\n",
_PROC_MAGIC_);
-
- fprintf_unfiltered (file,
- "mips_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
}
void
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index ec46df60826..2695f1f8dbf 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -47,8 +47,8 @@ supply_gregset (gregset_t *gregsetp)
{
register int regi;
register greg_t *regp = &(*gregsetp)[0];
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
for (regi = 0; regi <= CXT_RA; regi++)
supply_register (regi, (char *) (regp + regi));
@@ -102,8 +102,8 @@ void
supply_fpregset (fpregset_t *fpregsetp)
{
register int regi;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
+ char *zerobuf = alloca (max_register_size (current_gdbarch));
+ memset (zerobuf, 0, max_register_size (current_gdbarch));
for (regi = 0; regi < 32; regi++)
supply_register (FP0_REGNUM + regi,
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index fdc0941fee7..a484f02ad41 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -1,891 +1,899 @@
-/* Target-dependent code for the Matsushita MN10200 for GDB, the GNU debugger.
- Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "value.h"
-#include "bfd.h"
-#include "gdb_string.h"
-#include "gdbcore.h"
-#include "symfile.h"
-#include "regcache.h"
-
-
-/* Should call_function allocate stack space for a struct return? */
-int
-mn10200_use_struct_convention (int gcc_p, struct type *type)
-{
- return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 8);
-}
-/* *INDENT-OFF* */
-/* The main purpose of this file is dealing with prologues to extract
- information about stack frames and saved registers.
-
- For reference here's how prologues look on the mn10200:
-
- With frame pointer:
- mov fp,a0
- mov sp,fp
- add <size>,sp
- Register saves for d2, d3, a1, a2 as needed. Saves start
- at fp - <size> + <outgoing_args_size> and work towards higher
- addresses. Note that the saves are actually done off the stack
- pointer in the prologue! This makes for smaller code and easier
- prologue scanning as the displacement fields will unlikely
- be more than 8 bits!
-
- Without frame pointer:
- add <size>,sp
- Register saves for d2, d3, a1, a2 as needed. Saves start
- at sp + <outgoing_args_size> and work towards higher addresses.
-
- Out of line prologue:
- add <local size>,sp -- optional
- jsr __prologue
- add <outgoing_size>,sp -- optional
-
- The stack pointer remains constant throughout the life of most
- functions. As a result the compiler will usually omit the
- frame pointer, so we must handle frame pointerless functions. */
-
-/* Analyze the prologue to determine where registers are saved,
- the end of the prologue, etc etc. Return the end of the prologue
- scanned.
-
- We store into FI (if non-null) several tidbits of information:
-
- * stack_size -- size of this stack frame. Note that if we stop in
- certain parts of the prologue/epilogue we may claim the size of the
- current frame is zero. This happens when the current frame has
- not been allocated yet or has already been deallocated.
-
- * fsr -- Addresses of registers saved in the stack by this frame.
-
- * status -- A (relatively) generic status indicator. It's a bitmask
- with the following bits:
-
- MY_FRAME_IN_SP: The base of the current frame is actually in
- the stack pointer. This can happen for frame pointerless
- functions, or cases where we're stopped in the prologue/epilogue
- itself. For these cases mn10200_analyze_prologue will need up
- update fi->frame before returning or analyzing the register
- save instructions.
-
- MY_FRAME_IN_FP: The base of the current frame is in the
- frame pointer register ($a2).
-
- CALLER_A2_IN_A0: $a2 from the caller's frame is temporarily
- in $a0. This can happen if we're stopped in the prologue.
-
- NO_MORE_FRAMES: Set this if the current frame is "start" or
- if the first instruction looks like mov <imm>,sp. This tells
- frame chain to not bother trying to unwind past this frame. */
-/* *INDENT-ON* */
-
-
-
-
-#define MY_FRAME_IN_SP 0x1
-#define MY_FRAME_IN_FP 0x2
-#define CALLER_A2_IN_A0 0x4
-#define NO_MORE_FRAMES 0x8
-
-static CORE_ADDR
-mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
-{
- CORE_ADDR func_addr, func_end, addr, stop;
- CORE_ADDR stack_size = 0;
- unsigned char buf[4];
- int status;
- char *name;
- int out_of_line_prologue = 0;
-
- /* Use the PC in the frame if it's provided to look up the
- start of this function. */
- pc = (fi ? fi->pc : pc);
-
- /* Find the start of this function. */
- status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
-
- /* Do nothing if we couldn't find the start of this function or if we're
- stopped at the first instruction in the prologue. */
- if (status == 0)
- return pc;
-
- /* If we're in start, then give up. */
- if (strcmp (name, "start") == 0)
- {
- if (fi)
- fi->status = NO_MORE_FRAMES;
- return pc;
- }
-
- /* At the start of a function our frame is in the stack pointer. */
- if (fi)
- fi->status = MY_FRAME_IN_SP;
-
- /* If we're physically on an RTS instruction, then our frame has already
- been deallocated.
-
- fi->frame is bogus, we need to fix it. */
- if (fi && fi->pc + 1 == func_end)
- {
- status = target_read_memory (fi->pc, buf, 1);
- if (status != 0)
- {
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
- }
-
- if (buf[0] == 0xfe)
- {
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
- }
- }
-
- /* Similarly if we're stopped on the first insn of a prologue as our
- frame hasn't been allocated yet. */
- if (fi && fi->pc == func_addr)
- {
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
- }
-
- /* Figure out where to stop scanning. */
- stop = fi ? fi->pc : func_end;
-
- /* Don't walk off the end of the function. */
- stop = stop > func_end ? func_end : stop;
-
- /* Start scanning on the first instruction of this function. */
- addr = func_addr;
-
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- {
- if (fi && fi->next == NULL && fi->status & MY_FRAME_IN_SP)
- fi->frame = read_sp ();
- return addr;
- }
-
- /* First see if this insn sets the stack pointer; if so, it's something
- we won't understand, so quit now. */
- if (buf[0] == 0xdf
- || (buf[0] == 0xf4 && buf[1] == 0x77))
- {
- if (fi)
- fi->status = NO_MORE_FRAMES;
- return addr;
- }
-
- /* Now see if we have a frame pointer.
-
- Search for mov a2,a0 (0xf278)
- then mov a3,a2 (0xf27e). */
-
- if (buf[0] == 0xf2 && buf[1] == 0x78)
- {
- /* Our caller's $a2 will be found in $a0 now. Note it for
- our callers. */
- if (fi)
- fi->status |= CALLER_A2_IN_A0;
- addr += 2;
- if (addr >= stop)
- {
- /* We still haven't allocated our local stack. Handle this
- as if we stopped on the first or last insn of a function. */
- if (fi && fi->next == NULL)
- fi->frame = read_sp ();
- return addr;
- }
-
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- {
- if (fi && fi->next == NULL)
- fi->frame = read_sp ();
- return addr;
- }
- if (buf[0] == 0xf2 && buf[1] == 0x7e)
- {
- addr += 2;
-
- /* Our frame pointer is valid now. */
- if (fi)
- {
- fi->status |= MY_FRAME_IN_FP;
- fi->status &= ~MY_FRAME_IN_SP;
- }
- if (addr >= stop)
- return addr;
- }
- else
- {
- if (fi && fi->next == NULL)
- fi->frame = read_sp ();
- return addr;
- }
- }
-
- /* Next we should allocate the local frame.
-
- Search for add imm8,a3 (0xd3XX)
- or add imm16,a3 (0xf70bXXXX)
- or add imm24,a3 (0xf467XXXXXX).
-
- If none of the above was found, then this prologue has
- no stack, and therefore can't have any register saves,
- so quit now. */
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
- if (buf[0] == 0xd3)
- {
- stack_size = extract_signed_integer (&buf[1], 1);
- if (fi)
- fi->stack_size = stack_size;
- addr += 2;
- if (addr >= stop)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp () - stack_size;
- return addr;
- }
- }
- else if (buf[0] == 0xf7 && buf[1] == 0x0b)
- {
- status = target_read_memory (addr + 2, buf, 2);
- if (status != 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
- stack_size = extract_signed_integer (buf, 2);
- if (fi)
- fi->stack_size = stack_size;
- addr += 4;
- if (addr >= stop)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp () - stack_size;
- return addr;
- }
- }
- else if (buf[0] == 0xf4 && buf[1] == 0x67)
- {
- status = target_read_memory (addr + 2, buf, 3);
- if (status != 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
- stack_size = extract_signed_integer (buf, 3);
- if (fi)
- fi->stack_size = stack_size;
- addr += 5;
- if (addr >= stop)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp () - stack_size;
- return addr;
- }
- }
-
- /* Now see if we have a call to __prologue for an out of line
- prologue. */
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- return addr;
-
- /* First check for 16bit pc-relative call to __prologue. */
- if (buf[0] == 0xfd)
- {
- CORE_ADDR temp;
- status = target_read_memory (addr + 1, buf, 2);
- if (status != 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
-
- /* Get the PC this instruction will branch to. */
- temp = (extract_signed_integer (buf, 2) + addr + 3) & 0xffffff;
-
- /* Get the name of the function at the target address. */
- status = find_pc_partial_function (temp, &name, NULL, NULL);
- if (status == 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
-
- /* Note if it is an out of line prologue. */
- out_of_line_prologue = (strcmp (name, "__prologue") == 0);
-
- /* This sucks up 3 bytes of instruction space. */
- if (out_of_line_prologue)
- addr += 3;
-
- if (addr >= stop)
- {
- if (fi && fi->next == NULL)
- {
- fi->stack_size -= 16;
- fi->frame = read_sp () - fi->stack_size;
- }
- return addr;
- }
- }
- /* Now check for the 24bit pc-relative call to __prologue. */
- else if (buf[0] == 0xf4 && buf[1] == 0xe1)
- {
- CORE_ADDR temp;
- status = target_read_memory (addr + 2, buf, 3);
- if (status != 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
-
- /* Get the PC this instruction will branch to. */
- temp = (extract_signed_integer (buf, 3) + addr + 5) & 0xffffff;
-
- /* Get the name of the function at the target address. */
- status = find_pc_partial_function (temp, &name, NULL, NULL);
- if (status == 0)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
- return addr;
- }
-
- /* Note if it is an out of line prologue. */
- out_of_line_prologue = (strcmp (name, "__prologue") == 0);
-
- /* This sucks up 5 bytes of instruction space. */
- if (out_of_line_prologue)
- addr += 5;
-
- if (addr >= stop)
- {
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- {
- fi->stack_size -= 16;
- fi->frame = read_sp () - fi->stack_size;
- }
- return addr;
- }
- }
-
- /* Now actually handle the out of line prologue. */
- if (out_of_line_prologue)
- {
- int outgoing_args_size = 0;
-
- /* First adjust the stack size for this function. The out of
- line prologue saves 4 registers (16bytes of data). */
- if (fi)
- fi->stack_size -= 16;
-
- /* Update fi->frame if necessary. */
- if (fi && fi->next == NULL)
- fi->frame = read_sp () - fi->stack_size;
-
- /* After the out of line prologue, there may be another
- stack adjustment for the outgoing arguments.
-
- Search for add imm8,a3 (0xd3XX)
- or add imm16,a3 (0xf70bXXXX)
- or add imm24,a3 (0xf467XXXXXX). */
-
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- {
- if (fi)
- {
- fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
- fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
- fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
- fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
- }
- return addr;
- }
-
- if (buf[0] == 0xd3)
- {
- outgoing_args_size = extract_signed_integer (&buf[1], 1);
- addr += 2;
- }
- else if (buf[0] == 0xf7 && buf[1] == 0x0b)
- {
- status = target_read_memory (addr + 2, buf, 2);
- if (status != 0)
- {
- if (fi)
- {
- fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
- fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
- fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
- fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
- }
- return addr;
- }
- outgoing_args_size = extract_signed_integer (buf, 2);
- addr += 4;
- }
- else if (buf[0] == 0xf4 && buf[1] == 0x67)
- {
- status = target_read_memory (addr + 2, buf, 3);
- if (status != 0)
- {
- if (fi && fi->next == NULL)
- {
- fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
- fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
- fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
- fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
- }
- return addr;
- }
- outgoing_args_size = extract_signed_integer (buf, 3);
- addr += 5;
- }
- else
- outgoing_args_size = 0;
-
- /* Now that we know the size of the outgoing arguments, fix
- fi->frame again if this is the innermost frame. */
- if (fi && fi->next == NULL)
- fi->frame -= outgoing_args_size;
-
- /* Note the register save information and update the stack
- size for this frame too. */
- if (fi)
- {
- fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
- fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
- fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
- fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
- fi->stack_size += outgoing_args_size;
- }
- /* There can be no more prologue insns, so return now. */
- return addr;
- }
-
- /* At this point fi->frame needs to be correct.
-
- If MY_FRAME_IN_SP is set and we're the innermost frame, then we
- need to fix fi->frame so that backtracing, find_frame_saved_regs,
- etc work correctly. */
- if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
- fi->frame = read_sp () - fi->stack_size;
-
- /* And last we have the register saves. These are relatively
- simple because they're physically done off the stack pointer,
- and thus the number of different instructions we need to
- check is greatly reduced because we know the displacements
- will be small.
-
- Search for movx d2,(X,a3) (0xf55eXX)
- then movx d3,(X,a3) (0xf55fXX)
- then mov a1,(X,a3) (0x5dXX) No frame pointer case
- then mov a2,(X,a3) (0x5eXX) No frame pointer case
- or mov a0,(X,a3) (0x5cXX) Frame pointer case. */
-
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- return addr;
- if (buf[0] == 0xf5 && buf[1] == 0x5e)
- {
- if (fi)
- {
- status = target_read_memory (addr + 2, buf, 1);
- if (status != 0)
- return addr;
- fi->fsr.regs[2] = (fi->frame + stack_size
- + extract_signed_integer (buf, 1));
- }
- addr += 3;
- if (addr >= stop)
- return addr;
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- return addr;
- }
- if (buf[0] == 0xf5 && buf[1] == 0x5f)
- {
- if (fi)
- {
- status = target_read_memory (addr + 2, buf, 1);
- if (status != 0)
- return addr;
- fi->fsr.regs[3] = (fi->frame + stack_size
- + extract_signed_integer (buf, 1));
- }
- addr += 3;
- if (addr >= stop)
- return addr;
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- return addr;
- }
- if (buf[0] == 0x5d)
- {
- if (fi)
- {
- status = target_read_memory (addr + 1, buf, 1);
- if (status != 0)
- return addr;
- fi->fsr.regs[5] = (fi->frame + stack_size
- + extract_signed_integer (buf, 1));
- }
- addr += 2;
- if (addr >= stop)
- return addr;
- status = target_read_memory (addr, buf, 2);
- if (status != 0)
- return addr;
- }
- if (buf[0] == 0x5e || buf[0] == 0x5c)
- {
- if (fi)
- {
- status = target_read_memory (addr + 1, buf, 1);
- if (status != 0)
- return addr;
- fi->fsr.regs[6] = (fi->frame + stack_size
- + extract_signed_integer (buf, 1));
- fi->status &= ~CALLER_A2_IN_A0;
- }
- addr += 2;
- if (addr >= stop)
- return addr;
- return addr;
- }
- return addr;
-}
-
-/* Function: frame_chain
- Figure out and return the caller's frame pointer given current
- frame_info struct.
-
- We don't handle dummy frames yet but we would probably just return the
- stack pointer that was in use at the time the function call was made? */
-
-CORE_ADDR
-mn10200_frame_chain (struct frame_info *fi)
-{
- struct frame_info dummy_frame;
-
- /* Walk through the prologue to determine the stack size,
- location of saved registers, end of the prologue, etc. */
- if (fi->status == 0)
- mn10200_analyze_prologue (fi, (CORE_ADDR) 0);
-
- /* Quit now if mn10200_analyze_prologue set NO_MORE_FRAMES. */
- if (fi->status & NO_MORE_FRAMES)
- return 0;
-
- /* Now that we've analyzed our prologue, determine the frame
- pointer for our caller.
-
- If our caller has a frame pointer, then we need to
- find the entry value of $a2 to our function.
-
- If CALLER_A2_IN_A0, then the chain is in $a0.
-
- If fsr.regs[6] is nonzero, then it's at the memory
- location pointed to by fsr.regs[6].
-
- Else it's still in $a2.
-
- If our caller does not have a frame pointer, then his
- frame base is fi->frame + -caller's stack size + 4. */
-
- /* The easiest way to get that info is to analyze our caller's frame.
-
- So we set up a dummy frame and call mn10200_analyze_prologue to
- find stuff for us. */
- dummy_frame.pc = FRAME_SAVED_PC (fi);
- dummy_frame.frame = fi->frame;
- memset (dummy_frame.fsr.regs, '\000', sizeof dummy_frame.fsr.regs);
- dummy_frame.status = 0;
- dummy_frame.stack_size = 0;
- mn10200_analyze_prologue (&dummy_frame, 0);
-
- if (dummy_frame.status & MY_FRAME_IN_FP)
- {
- /* Our caller has a frame pointer. So find the frame in $a2, $a0,
- or in the stack. */
- if (fi->fsr.regs[6])
- return (read_memory_integer (fi->fsr.regs[FP_REGNUM], REGISTER_SIZE)
- & 0xffffff);
- else if (fi->status & CALLER_A2_IN_A0)
- return read_register (4);
- else
- return read_register (FP_REGNUM);
- }
- else
- {
- /* Our caller does not have a frame pointer. So his frame starts
- at the base of our frame (fi->frame) + <his size> + 4 (saved pc). */
- return fi->frame + -dummy_frame.stack_size + 4;
- }
-}
-
-/* Function: skip_prologue
- Return the address of the first inst past the prologue of the function. */
-
-CORE_ADDR
-mn10200_skip_prologue (CORE_ADDR pc)
-{
- /* We used to check the debug symbols, but that can lose if
- we have a null prologue. */
- return mn10200_analyze_prologue (NULL, pc);
-}
-
-/* Function: pop_frame
- This routine gets called when either the user uses the `return'
- command, or the call dummy breakpoint gets hit. */
-
-void
-mn10200_pop_frame (struct frame_info *frame)
-{
- int regnum;
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- generic_pop_dummy_frame ();
- else
- {
- write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-
- /* Restore any saved registers. */
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->fsr.regs[regnum] != 0)
- {
- ULONGEST value;
-
- value = read_memory_unsigned_integer (frame->fsr.regs[regnum],
- REGISTER_RAW_SIZE (regnum));
- write_register (regnum, value);
- }
-
- /* Actually cut back the stack. */
- write_register (SP_REGNUM, get_frame_base (frame));
-
- /* Don't we need to set the PC?!? XXX FIXME. */
- }
-
- /* Throw away any cached frame information. */
- flush_cached_frames ();
-}
-
-/* Function: push_arguments
- Setup arguments for a call to the target. Arguments go in
- order on the stack. */
-
-CORE_ADDR
-mn10200_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- unsigned char struct_return, CORE_ADDR struct_addr)
-{
- int argnum = 0;
- int len = 0;
- int stack_offset = 0;
- int regsused = struct_return ? 1 : 0;
-
- /* This should be a nop, but align the stack just in case something
- went wrong. Stacks are two byte aligned on the mn10200. */
- sp &= ~1;
-
- /* Now make space on the stack for the args.
-
- XXX This doesn't appear to handle pass-by-invisible reference
- arguments. */
- for (argnum = 0; argnum < nargs; argnum++)
- {
- int arg_length = (TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 1) & ~1;
-
- /* If we've used all argument registers, then this argument is
- pushed. */
- if (regsused >= 2 || arg_length > 4)
- {
- regsused = 2;
- len += arg_length;
- }
- /* We know we've got some arg register space left. If this argument
- will fit entirely in regs, then put it there. */
- else if (arg_length <= 2
- || TYPE_CODE (VALUE_TYPE (args[argnum])) == TYPE_CODE_PTR)
- {
- regsused++;
- }
- else if (regsused == 0)
- {
- regsused = 2;
- }
- else
- {
- regsused = 2;
- len += arg_length;
- }
- }
-
- /* Allocate stack space. */
- sp -= len;
-
- regsused = struct_return ? 1 : 0;
- /* Push all arguments onto the stack. */
- for (argnum = 0; argnum < nargs; argnum++)
- {
- int len;
- char *val;
-
- /* XXX Check this. What about UNIONS? */
- if (TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_STRUCT
- && TYPE_LENGTH (VALUE_TYPE (*args)) > 8)
- {
- /* XXX Wrong, we want a pointer to this argument. */
- len = TYPE_LENGTH (VALUE_TYPE (*args));
- val = (char *) VALUE_CONTENTS (*args);
- }
- else
- {
- len = TYPE_LENGTH (VALUE_TYPE (*args));
- val = (char *) VALUE_CONTENTS (*args);
- }
-
- if (regsused < 2
- && (len <= 2
- || TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_PTR))
- {
- write_register (regsused, extract_unsigned_integer (val, 4));
- regsused++;
- }
- else if (regsused == 0 && len == 4)
- {
- write_register (regsused, extract_unsigned_integer (val, 2));
- write_register (regsused + 1, extract_unsigned_integer (val + 2, 2));
- regsused = 2;
- }
- else
- {
- regsused = 2;
- while (len > 0)
- {
- write_memory (sp + stack_offset, val, 2);
-
- len -= 2;
- val += 2;
- stack_offset += 2;
- }
- }
- args++;
- }
-
- return sp;
-}
-
-/* Function: push_return_address (pc)
- Set up the return address for the inferior function call.
- Needed for targets where we don't actually execute a JSR/BSR instruction */
-
-CORE_ADDR
-mn10200_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- unsigned char buf[4];
-
- store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 4, buf, 4);
- return sp - 4;
-}
-
-/* Function: store_struct_return (addr,sp)
- Store the structure value return address for an inferior function
- call. */
-
-CORE_ADDR
-mn10200_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- /* The structure return address is passed as the first argument. */
- write_register (0, addr);
- return sp;
-}
-
-/* Function: frame_saved_pc
- Find the caller of this frame. We do this by seeing if RP_REGNUM
- is saved in the stack anywhere, otherwise we get it from the
- registers. If the inner frame is a dummy frame, return its PC
- instead of RP, because that's where "caller" of the dummy-frame
- will be found. */
-
-CORE_ADDR
-mn10200_frame_saved_pc (struct frame_info *fi)
-{
- /* The saved PC will always be at the base of the current frame. */
- return (read_memory_integer (fi->frame, REGISTER_SIZE) & 0xffffff);
-}
-
-/* Function: init_extra_frame_info
- Setup the frame's frame pointer, pc, and frame addresses for saved
- registers. Most of the work is done in mn10200_analyze_prologue().
-
- Note that when we are called for the last frame (currently active frame),
- that fi->pc and fi->frame will already be setup. However, fi->frame will
- be valid only if this routine uses FP. For previous frames, fi-frame will
- always be correct. mn10200_analyze_prologue will fix fi->frame if
- it's not valid.
-
- We can be called with the PC in the call dummy under two circumstances.
- First, during normal backtracing, second, while figuring out the frame
- pointer just prior to calling the target function (see run_stack_dummy). */
-
-void
-mn10200_init_extra_frame_info (struct frame_info *fi)
-{
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
-
- memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
- fi->status = 0;
- fi->stack_size = 0;
-
- mn10200_analyze_prologue (fi, 0);
-}
-
-void
-_initialize_mn10200_tdep (void)
-{
- tm_print_insn = print_insn_mn10200;
-}
+// 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 e503d197ad1..a3dd0129c9b 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -153,17 +153,21 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
static struct frame_info *dummy = NULL;
if (dummy == NULL)
{
- dummy = xmalloc (sizeof (struct frame_info));
- dummy->saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
- dummy->extra_info = xmalloc (sizeof (struct frame_extra_info));
+ struct frame_extra_info *extra_info;
+ CORE_ADDR *saved_regs;
+ dummy = deprecated_frame_xmalloc ();
+ saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
+ deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
+ extra_info = XMALLOC (struct frame_extra_info);
+ deprecated_set_frame_extra_info_hack (dummy, extra_info);
}
- dummy->next = NULL;
- dummy->prev = NULL;
- dummy->pc = pc;
- dummy->frame = frame;
- dummy->extra_info->status = 0;
- dummy->extra_info->stack_size = 0;
- memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS);
+ deprecated_set_frame_next_hack (dummy, NULL);
+ deprecated_set_frame_prev_hack (dummy, NULL);
+ deprecated_update_frame_pc_hack (dummy, pc);
+ 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);
mn10300_analyze_prologue (dummy, 0);
return dummy;
}
@@ -205,12 +209,12 @@ mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
static void
fix_frame_pointer (struct frame_info *fi, int stack_size)
{
- if (fi && fi->next == NULL)
+ if (fi && get_next_frame (fi) == NULL)
{
- if (fi->extra_info->status & MY_FRAME_IN_SP)
- fi->frame = read_sp () - stack_size;
- else if (fi->extra_info->status & MY_FRAME_IN_FP)
- fi->frame = read_register (A3_REGNUM);
+ if (get_frame_extra_info (fi)->status & MY_FRAME_IN_SP)
+ deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
+ else if (get_frame_extra_info (fi)->status & MY_FRAME_IN_FP)
+ deprecated_update_frame_base_hack (fi, read_register (A3_REGNUM));
}
}
@@ -231,59 +235,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. */
- fi->saved_regs[LAR_REGNUM] = fi->frame + offset + 4;
- fi->saved_regs[LIR_REGNUM] = fi->frame + offset + 8;
- fi->saved_regs[MDR_REGNUM] = fi->frame + offset + 12;
- fi->saved_regs[A0_REGNUM + 1] = fi->frame + offset + 16;
- fi->saved_regs[A0_REGNUM] = fi->frame + offset + 20;
- fi->saved_regs[D0_REGNUM + 1] = fi->frame + offset + 24;
- fi->saved_regs[D0_REGNUM] = fi->frame + offset + 28;
+ 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;
offset += 32;
}
if (movm_args & movm_a3_bit)
{
- fi->saved_regs[A3_REGNUM] = fi->frame + offset;
+ get_frame_saved_regs (fi)[A3_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (movm_args & movm_a2_bit)
{
- fi->saved_regs[A2_REGNUM] = fi->frame + offset;
+ get_frame_saved_regs (fi)[A2_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (movm_args & movm_d3_bit)
{
- fi->saved_regs[D3_REGNUM] = fi->frame + offset;
+ get_frame_saved_regs (fi)[D3_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (movm_args & movm_d2_bit)
{
- fi->saved_regs[D2_REGNUM] = fi->frame + offset;
+ get_frame_saved_regs (fi)[D2_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (AM33_MODE)
{
if (movm_args & movm_exother_bit)
{
- fi->saved_regs[MCVF_REGNUM] = fi->frame + offset;
- fi->saved_regs[MCRL_REGNUM] = fi->frame + offset + 4;
- fi->saved_regs[MCRH_REGNUM] = fi->frame + offset + 8;
- fi->saved_regs[MDRQ_REGNUM] = fi->frame + offset + 12;
- fi->saved_regs[E0_REGNUM + 1] = fi->frame + offset + 16;
- fi->saved_regs[E0_REGNUM + 0] = fi->frame + offset + 20;
+ 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;
offset += 24;
}
if (movm_args & movm_exreg1_bit)
{
- fi->saved_regs[E0_REGNUM + 7] = fi->frame + offset;
- fi->saved_regs[E0_REGNUM + 6] = fi->frame + offset + 4;
- fi->saved_regs[E0_REGNUM + 5] = fi->frame + offset + 8;
- fi->saved_regs[E0_REGNUM + 4] = fi->frame + offset + 12;
+ 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;
offset += 16;
}
if (movm_args & movm_exreg0_bit)
{
- fi->saved_regs[E0_REGNUM + 3] = fi->frame + offset;
- fi->saved_regs[E0_REGNUM + 2] = fi->frame + offset + 4;
+ 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;
offset += 8;
}
}
@@ -397,7 +401,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
/* Use the PC in the frame if it's provided to look up the
start of this function. */
- pc = (fi ? fi->pc : pc);
+ pc = (fi ? get_frame_pc (fi) : pc);
/* Find the start of this function. */
status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
@@ -413,13 +417,13 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
if (strcmp (name, "start") == 0)
{
if (fi != NULL)
- fi->extra_info->status = NO_MORE_FRAMES;
+ get_frame_extra_info (fi)->status = NO_MORE_FRAMES;
return pc;
}
/* At the start of a function our frame is in the stack pointer. */
if (fi)
- fi->extra_info->status = MY_FRAME_IN_SP;
+ get_frame_extra_info (fi)->status = MY_FRAME_IN_SP;
/* Get the next two bytes into buf, we need two because rets is a two
byte insn and the first isn't enough to uniquely identify it. */
@@ -434,22 +438,22 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
In this case fi->frame is bogus, we need to fix it. */
if (fi && buf[0] == 0xf0 && buf[1] == 0xfc)
{
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
+ if (get_next_frame (fi) == NULL)
+ deprecated_update_frame_base_hack (fi, read_sp ());
+ return get_frame_pc (fi);
}
/* Similarly if we're stopped on the first insn of a prologue as our
frame hasn't been allocated yet. */
- if (fi && fi->pc == func_addr)
+ if (fi && get_frame_pc (fi) == func_addr)
{
- if (fi->next == NULL)
- fi->frame = read_sp ();
- return fi->pc;
+ if (get_next_frame (fi) == NULL)
+ deprecated_update_frame_base_hack (fi, read_sp ());
+ return get_frame_pc (fi);
}
/* Figure out where to stop scanning. */
- stop = fi ? fi->pc : func_end;
+ stop = fi ? get_frame_pc (fi) : func_end;
/* Don't walk off the end of the function. */
stop = stop > func_end ? func_end : stop;
@@ -471,7 +475,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
if (buf[0] == 0xf2 && (buf[1] & 0xf3) == 0xf0)
{
if (fi)
- fi->extra_info->status = NO_MORE_FRAMES;
+ get_frame_extra_info (fi)->status = NO_MORE_FRAMES;
return addr;
}
@@ -492,8 +496,8 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
if (addr >= stop)
{
/* Fix fi->frame since it's bogus at this point. */
- if (fi && fi->next == NULL)
- fi->frame = read_sp ();
+ if (fi && get_next_frame (fi) == NULL)
+ deprecated_update_frame_base_hack (fi, read_sp ());
/* Note if/where callee saved registers were saved. */
set_movm_offsets (fi, movm_args);
@@ -505,8 +509,8 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
if (status != 0)
{
/* Fix fi->frame since it's bogus at this point. */
- if (fi && fi->next == NULL)
- fi->frame = read_sp ();
+ if (fi && get_next_frame (fi) == NULL)
+ deprecated_update_frame_base_hack (fi, read_sp ());
/* Note if/where callee saved registers were saved. */
set_movm_offsets (fi, movm_args);
@@ -522,8 +526,8 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
/* The frame pointer is now valid. */
if (fi)
{
- fi->extra_info->status |= MY_FRAME_IN_FP;
- fi->extra_info->status &= ~MY_FRAME_IN_SP;
+ get_frame_extra_info (fi)->status |= MY_FRAME_IN_FP;
+ get_frame_extra_info (fi)->status &= ~MY_FRAME_IN_SP;
}
/* Quit now if we're beyond the stop point. */
@@ -597,7 +601,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
/* Note the size of the stack in the frame info structure. */
stack_size = extract_signed_integer (buf, imm_size);
if (fi)
- fi->extra_info->stack_size = stack_size;
+ get_frame_extra_info (fi)->stack_size = stack_size;
/* We just consumed 2 + imm_size bytes. */
addr += 2 + imm_size;
@@ -633,14 +637,14 @@ saved_regs_size (struct frame_info *fi)
/* Reserve four bytes for every register saved. */
for (i = 0; i < NUM_REGS; i++)
- if (fi->saved_regs[i])
+ if (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 (fi->saved_regs[LIR_REGNUM])
+ if (get_frame_saved_regs (fi)[LIR_REGNUM])
adjust += 4;
return adjust;
@@ -660,11 +664,11 @@ mn10300_frame_chain (struct frame_info *fi)
struct frame_info *dummy;
/* Walk through the prologue to determine the stack size,
location of saved registers, end of the prologue, etc. */
- if (fi->extra_info->status == 0)
+ if (get_frame_extra_info (fi)->status == 0)
mn10300_analyze_prologue (fi, (CORE_ADDR) 0);
/* Quit now if mn10300_analyze_prologue set NO_MORE_FRAMES. */
- if (fi->extra_info->status & NO_MORE_FRAMES)
+ if (get_frame_extra_info (fi)->status & NO_MORE_FRAMES)
return 0;
/* Now that we've analyzed our prologue, determine the frame
@@ -684,14 +688,14 @@ mn10300_frame_chain (struct frame_info *fi)
/* The easiest way to get that info is to analyze our caller's frame.
So we set up a dummy frame and call mn10300_analyze_prologue to
find stuff for us. */
- dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), fi->frame);
+ dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), get_frame_base (fi));
- if (dummy->extra_info->status & MY_FRAME_IN_FP)
+ if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_FP)
{
/* Our caller has a frame pointer. So find the frame in $a3 or
in the stack. */
- if (fi->saved_regs[A3_REGNUM])
- return (read_memory_integer (fi->saved_regs[A3_REGNUM], REGISTER_SIZE));
+ if (get_frame_saved_regs (fi)[A3_REGNUM])
+ return (read_memory_integer (get_frame_saved_regs (fi)[A3_REGNUM], REGISTER_SIZE));
else
return read_register (A3_REGNUM);
}
@@ -702,7 +706,7 @@ mn10300_frame_chain (struct frame_info *fi)
/* Our caller does not have a frame pointer. So his frame starts
at the base of our frame (fi->frame) + register save space
+ <his size>. */
- return fi->frame + adjust + -dummy->extra_info->stack_size;
+ return get_frame_base (fi) + adjust + -get_frame_extra_info (dummy)->stack_size;
}
}
@@ -728,11 +732,11 @@ mn10300_pop_frame_regular (struct frame_info *frame)
/* Restore any saved registers. */
for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->saved_regs[regnum] != 0)
+ if (get_frame_saved_regs (frame)[regnum] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (frame->saved_regs[regnum],
+ value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
REGISTER_RAW_SIZE (regnum));
write_register (regnum, value);
}
@@ -875,7 +879,7 @@ mn10300_frame_saved_pc (struct frame_info *fi)
{
int adjust = saved_regs_size (fi);
- return (read_memory_integer (fi->frame + adjust, REGISTER_SIZE));
+ return (read_memory_integer (get_frame_base (fi) + adjust, REGISTER_SIZE));
}
/* Function: mn10300_init_extra_frame_info
@@ -883,7 +887,7 @@ mn10300_frame_saved_pc (struct frame_info *fi)
registers. Most of the work is done in mn10300_analyze_prologue().
Note that when we are called for the last frame (currently active frame),
- that fi->pc and fi->frame will already be setup. However, fi->frame will
+ that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will
be valid only if this routine uses FP. For previous frames, fi-frame will
always be correct. mn10300_analyze_prologue will fix fi->frame if
it's not valid.
@@ -895,15 +899,14 @@ mn10300_frame_saved_pc (struct frame_info *fi)
static void
mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
frame_saved_regs_zalloc (fi);
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- fi->extra_info->status = 0;
- fi->extra_info->stack_size = 0;
+ get_frame_extra_info (fi)->status = 0;
+ get_frame_extra_info (fi)->stack_size = 0;
mn10300_analyze_prologue (fi, 0);
}
@@ -930,10 +933,10 @@ mn10300_virtual_frame_pointer (CORE_ADDR pc,
/* Set up a dummy frame_info, Analyze the prolog and fill in the
extra info. */
/* Results will tell us which type of frame it uses. */
- if (dummy->extra_info->status & MY_FRAME_IN_SP)
+ if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_SP)
{
*reg = SP_REGNUM;
- *offset = -(dummy->extra_info->stack_size);
+ *offset = -(get_frame_extra_info (dummy)->stack_size);
}
else
{
@@ -1162,9 +1165,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_decr_pc_after_break (gdbarch, 0);
/* Stack unwinding. */
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_saved_pc_after_call (gdbarch, mn10300_saved_pc_after_call);
set_gdbarch_init_extra_frame_info (gdbarch, mn10300_init_extra_frame_info);
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
diff --git a/gdb/mon960-rom.c b/gdb/mon960-rom.c
deleted file mode 100644
index 46f5784ed7c..00000000000
--- a/gdb/mon960-rom.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/* Remote target glue for the Intel 960 MON960 ROM monitor.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "srec.h"
-#include "xmodem.h"
-#include "symtab.h"
-#include "symfile.h" /* for generic_load */
-#include "inferior.h" /* for write_pc() */
-#include "gdb_string.h"
-
-#define USE_GENERIC_LOAD
-
-static struct target_ops mon960_ops;
-
-static void mon960_open (char *args, int from_tty);
-
-#ifdef USE_GENERIC_LOAD
-
-static void
-mon960_load_gen (char *filename, int from_tty)
-{
- generic_load (filename, from_tty);
- /* Finally, make the PC point at the start address */
- if (exec_bfd)
- write_pc (bfd_get_start_address (exec_bfd));
-
- inferior_ptid = null_ptid; /* No process now */
-}
-
-#else
-
-static void
-mon960_load (struct serial *desc, char *file, int hashmark)
-{
- bfd *abfd;
- asection *s;
- char *buffer;
- int i;
-
- buffer = alloca (XMODEM_PACKETSIZE);
- abfd = bfd_openr (file, 0);
- if (!abfd)
- {
- printf_filtered ("Unable to open file %s\n", file);
- return;
- }
- if (bfd_check_format (abfd, bfd_object) == 0)
- {
- printf_filtered ("File is not an object file\n");
- return;
- }
- for (s = abfd->sections; s; s = s->next)
- if (s->flags & SEC_LOAD)
- {
- bfd_size_type section_size;
- printf_filtered ("%s\t: 0x%4x .. 0x%4x ", s->name, s->vma,
- s->vma + s->_raw_size);
- gdb_flush (gdb_stdout);
- monitor_printf (current_monitor->load, s->vma);
- if (current_monitor->loadresp)
- monitor_expect (current_monitor->loadresp, NULL, 0);
- xmodem_init_xfer (desc);
- section_size = bfd_section_size (abfd, s);
- for (i = 0; i < section_size; i += XMODEM_DATASIZE)
- {
- int numbytes;
- numbytes = min (XMODEM_DATASIZE, section_size - i);
- bfd_get_section_contents (abfd, s, buffer + XMODEM_DATAOFFSET, i,
- numbytes);
- xmodem_send_packet (desc, buffer, numbytes, hashmark);
- if (hashmark)
- {
- putchar_unfiltered ('#');
- gdb_flush (gdb_stdout);
- }
- } /* Per-packet (or S-record) loop */
- xmodem_finish_xfer (desc);
- monitor_expect_prompt (NULL, 0);
- putchar_unfiltered ('\n');
- } /* Loadable sections */
- if (hashmark)
- putchar_unfiltered ('\n');
-}
-
-#endif /* USE_GENERIC_LOAD */
-
-/* This array of registers need to match the indexes used by GDB.
- This exists because the various ROM monitors use different strings
- than does GDB, and don't necessarily support all the registers
- either. So, typing "info reg sp" becomes a "r30". */
-
-/* these correspond to the offsets from tm-* files from config directories */
-/* g0-g14, fp, pfp, sp, rip,r3-15, pc, ac, tc, fp0-3 */
-/* NOTE: "ip" is documented as "ir" in the Mon960 UG. */
-/* NOTE: "ir" can't be accessed... but there's an ip and rip. */
-static char *full_regnames[NUM_REGS] =
-{
- /* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7",
- /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- /* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
- /* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp",
- /* 32 */ "pc", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",
-};
-
-static char *mon960_regnames[NUM_REGS];
-
-/* Define the monitor command strings. Since these are passed directly
- through to a printf style function, we may include formatting
- strings. We also need a CR or LF on the end. */
-
-/* need to pause the monitor for timing reasons, so slow it down */
-
-#if 0
-/* FIXME: this extremely long init string causes MON960 to return two NAKS
- instead of performing the autobaud recognition, at least when gdb
- is running on GNU/Linux. The short string below works on Linux, and on
- SunOS using a tcp serial connection. Must retest on SunOS using a
- direct serial connection; if that works, get rid of the long string. */
-static char *mon960_inits[] =
-{"\n\r\r\r\r\r\r\r\r\r\r\r\r\r\r\n\r\n\r\n", NULL};
-#else
-static char *mon960_inits[] =
-{"\r", NULL};
-#endif
-
-static struct monitor_ops mon960_cmds;
-
-static void
-init_mon960_cmds (void)
-{
- mon960_cmds.flags = MO_CLR_BREAK_USES_ADDR
- | MO_NO_ECHO_ON_OPEN | MO_SEND_BREAK_ON_STOP | MO_GETMEM_READ_SINGLE; /* flags */
- mon960_cmds.init = mon960_inits; /* Init strings */
- mon960_cmds.cont = "go\n\r"; /* continue command */
- mon960_cmds.step = "st\n\r"; /* single step */
- mon960_cmds.stop = NULL; /* break interrupts the program */
- mon960_cmds.set_break = NULL; /* set a breakpoint */
- mon960_cmds.clr_break = /* can't use "br" because only 2 hw bps are supported */
- mon960_cmds.clr_all_break = NULL; /* clear a breakpoint - "de" is for hw bps */
- NULL, /* clear all breakpoints */
- mon960_cmds.fill = NULL; /* fill (start end val) */
- /* can't use "fi" because it takes words, not bytes */
- /* can't use "mb", "md" or "mo" because they require interaction */
- mon960_cmds.setmem.cmdb = NULL; /* setmem.cmdb (addr, value) */
- mon960_cmds.setmem.cmdw = NULL; /* setmem.cmdw (addr, value) */
- mon960_cmds.setmem.cmdl = "md %x %x\n\r"; /* setmem.cmdl (addr, value) */
- mon960_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- mon960_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
- mon960_cmds.setmem.term = NULL; /* setmem.term */
- mon960_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
- /* since the parsing of multiple bytes is difficult due to
- interspersed addresses, we'll only read 1 value at a time,
- even tho these can handle a count */
- mon960_cmds.getmem.cmdb = "db %x\n\r"; /* getmem.cmdb (addr, #bytes) */
- mon960_cmds.getmem.cmdw = "ds %x\n\r"; /* getmem.cmdw (addr, #swords) */
- mon960_cmds.getmem.cmdl = "di %x\n\r"; /* getmem.cmdl (addr, #words) */
- mon960_cmds.getmem.cmdll = "dd %x\n\r"; /* getmem.cmdll (addr, #dwords) */
- mon960_cmds.getmem.resp_delim = " : "; /* getmem.resp_delim */
- mon960_cmds.getmem.term = NULL; /* getmem.term */
- mon960_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
- mon960_cmds.setreg.cmd = "md %s %x\n\r"; /* setreg.cmd (name, value) */
- mon960_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- mon960_cmds.setreg.term = NULL; /* setreg.term */
- mon960_cmds.setreg.term_cmd = NULL, /* setreg.term_cmd */
- mon960_cmds.getreg.cmd = "di %s\n\r"; /* getreg.cmd (name) */
- mon960_cmds.getreg.resp_delim = " : "; /* getreg.resp_delim */
- mon960_cmds.getreg.term = NULL; /* getreg.term */
- mon960_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
- mon960_cmds.dump_registers = "re\n\r"; /* dump_registers */
- mon960_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
- mon960_cmds.supply_register = NULL; /* supply_register */
-#ifdef USE_GENERIC_LOAD
- mon960_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
- mon960_cmds.load = NULL; /* download command */
- mon960_cmds.loadresp = NULL; /* load response */
-#else
- mon960_cmds.load_routine = mon960_load; /* load_routine (defaults to SRECs) */
- mon960_cmds.load = "do\n\r"; /* download command */
- mon960_cmds.loadresp = "Downloading\n\r"; /* load response */
-#endif
- mon960_cmds.prompt = "=>"; /* monitor command prompt */
- mon960_cmds.line_term = "\n\r"; /* end-of-command delimitor */
- mon960_cmds.cmd_end = NULL; /* optional command terminator */
- mon960_cmds.target = &mon960_ops; /* target operations */
- mon960_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- mon960_cmds.regnames = mon960_regnames; /* registers names */
- mon960_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-};
-
-static void
-mon960_open (char *args, int from_tty)
-{
- char buf[64];
-
- monitor_open (args, &mon960_cmds, from_tty);
-
- /* Attempt to fetch the value of the first floating point register (fp0).
- If the monitor returns a string containing the word "Bad" we'll assume
- this processor has no floating point registers, and nullify the
- regnames entries that refer to FP registers. */
-
- monitor_printf (mon960_cmds.getreg.cmd, full_regnames[FP0_REGNUM]); /* di fp0 */
- if (monitor_expect_prompt (buf, sizeof (buf)) != -1)
- if (strstr (buf, "Bad") != NULL)
- {
- int i;
-
- for (i = FP0_REGNUM; i < FP0_REGNUM + 4; i++)
- mon960_regnames[i] = NULL;
- }
-}
-
-void
-_initialize_mon960 (void)
-{
- memcpy (mon960_regnames, full_regnames, sizeof (full_regnames));
-
- init_mon960_cmds ();
-
- init_monitor_ops (&mon960_ops);
-
- mon960_ops.to_shortname = "mon960"; /* for the target command */
- mon960_ops.to_longname = "Intel 960 MON960 monitor";
-#ifdef USE_GENERIC_LOAD
- mon960_ops.to_load = mon960_load_gen; /* FIXME - should go back and try "do" */
-#endif
- /* use SW breaks; target only supports 2 HW breakpoints */
- mon960_ops.to_insert_breakpoint = memory_insert_breakpoint;
- mon960_ops.to_remove_breakpoint = memory_remove_breakpoint;
-
- mon960_ops.to_doc =
- "Use an Intel 960 board running the MON960 debug monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
-
- mon960_ops.to_open = mon960_open;
- add_target (&mon960_ops);
-}
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 5a9bb60f988..f58ed2aa6ef 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -569,12 +569,14 @@ monitor_expect (char *string, char *buf, int buflen)
return 0;
}
}
- else if ((c == '\021' || c == '\023') &&
- (STREQ (targ_ops->to_shortname, "m32r")
- || STREQ (targ_ops->to_shortname, "mon2000")))
- { /* m32r monitor emits random DC1/DC3 chars */
- continue;
- }
+#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
@@ -894,7 +896,7 @@ char *
monitor_supply_register (int regno, char *valstr)
{
ULONGEST val;
- unsigned char regbuf[MAX_REGISTER_RAW_SIZE];
+ unsigned char *regbuf = alloca (max_register_size (current_gdbarch));
char *p;
val = 0;
diff --git a/gdb/monitor.h b/gdb/monitor.h
index 5d6138c4398..7b87f95b394 100644
--- a/gdb/monitor.h
+++ b/gdb/monitor.h
@@ -245,9 +245,7 @@ extern char *monitor_supply_register (int regno, char *valstr);
extern int monitor_expect (char *prompt, char *buf, int buflen);
extern int monitor_expect_prompt (char *buf, int buflen);
extern void monitor_printf (char *, ...) ATTR_FORMAT (printf, 1, 2);
-extern void
-monitor_printf_noecho (char *, ...)
-ATTR_FORMAT (printf, 1, 2);
+extern void monitor_printf_noecho (char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void monitor_write (char *buf, int buflen);
extern int monitor_readchar (void);
extern char *monitor_get_dev_name (void);
diff --git a/gdb/nindy-share/Makefile b/gdb/nindy-share/Makefile
deleted file mode 100644
index 5ec99ba38e7..00000000000
--- a/gdb/nindy-share/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-#Copyright 1992 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#-----------------------------------------------------------------------------
-# Makefile for toolib.a -- host code shAred by more than one tool
-#-----------------------------------------------------------------------------
-
-RANLIB = ranlib
-
-# The following lines should be uncommented for system V (i386v).
-#__i386v__#USG = -DUSG
-#__i386v__#SYSV_INCL = ${IPATH}/sysv.h
-#__i386v__#RANLIB = echo >/dev/null
-
-# The following line should be uncommented for HP-UX
-#__hp9000__#USG = -DUSG
-#__hp9000__#SYSV_INCL = ${IPATH}/sysv.h
-#__hp9000__#RANLIB = echo >/dev/null
-
-# Essential under System V, harmless elsewhere
-SHELL = /bin/sh
-
-#'HOST' will be defined in the host-specific makefile by 'make make'
-
-TARG = toolib.a
-OPT = -g
-IPATH = ../../include
-CFLAGS = ${OPT} ${USG} -I${IPATH} -DHOST=\"${HOST}\"
-OBJS = coffstrip.o nindy.o ttybreak.o ttyflush.o Onindy.o
-
-${TARG}: ${OBJS} VERSION
- make ver960.o
- rm -f ${TARG}
- ar cvr ${TARG} ${OBJS} ver960.o
- ${RANLIB} ${TARG}
-
-coffstrip.o: ${IPATH}/b.out.h ${IPATH}/coff.h ${IPATH}/sysv.h
-nindy.o: ${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
-nindy.o: ${IPATH}/ttycntl.h ${IPATH}/wait.h
-ttybreak.o: ${IPATH}/ttycntl.h
-ttyflush.o: ${IPATH}/ttycntl.h
-Onindy.o: ${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
-Onindy.o: ${IPATH}/ttycntl.h ${IPATH}/wait.h
-
-
-#-----------------------------------------------------------------------------
-# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
-#
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#-----------------------------------------------------------------------------
-
-ver960.c: FORCE
- rm -f ver960.c
- echo "char toolib_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
-
-
-# This target should be invoked before building a new release.
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#
-roll:
- @V=`cat VERSION` ; \
- MAJ=`sed 's/\..*//' VERSION` ; \
- MIN=`sed 's/.*\.//' VERSION` ; \
- V=$$MAJ.`expr $$MIN + 1` ; \
- rm -f VERSION ; \
- echo $$V >VERSION ; \
- echo Version $$V
-
-# Dummy target to force execution of dependent targets.
-#
-FORCE:
-
-# 'G960BASE' will be defined at invocation
-#
-install:
- make ${TARG}
- mv -f ${TARG} ${G960BASE}/lib
-
-clean:
- rm -f ${TARG} *.o core
-
-# Target to uncomment host-specific lines in this makefile. Such lines must
-# have the following string beginning in column 1: #__<hostname>__#
-# Original Makefile is backed up as 'Makefile.old'.
-#
-# Invoke with: make make HOST=xxx
-#
-make:
- -@if test $(HOST)x = x ; then \
- echo 'Specify "make make HOST=???"'; \
- exit 1; \
- fi ; \
- grep -s "^#The next line was generated by 'make make'" Makefile; \
- if test $$? = 0 ; then \
- echo "Makefile has already been processed with 'make make'";\
- exit 1; \
- fi ; \
- mv -f Makefile Makefile.old; \
- echo "#The next line was generated by 'make make'" >Makefile ; \
- echo "HOST=$(HOST)" >>Makefile ; \
- echo >>Makefile ; \
- sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
diff --git a/gdb/nindy-share/Onindy.c b/gdb/nindy-share/Onindy.c
deleted file mode 100644
index f544183c4cb..00000000000
--- a/gdb/nindy-share/Onindy.c
+++ /dev/null
@@ -1,743 +0,0 @@
-/* This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This started out life as code shared between the nindy monitor and
- GDB. For various reasons, this is no longer true. Eventually, it
- probably should be merged into remote-nindy.c. */
-
-/******************************************************************************
- *
- * NINDY INTERFACE ROUTINES
- *
- * This version of the NINDY interface routines supports NINDY versions
- * 2.13 and older. The older versions used a hex communication protocol,
- * instead of the (faster) current binary protocol. These routines have
- * been renamed by prepending the letter 'O' to their names, to avoid
- * conflict with the current version. The old versions are kept only for
- * backward compatibility, and well disappear in a future release.
- *
- **************************************************************************/
-
-/* Having these in a separate file from nindy.c is really ugly, and should
- be merged with nindy.c. */
-
-#include <stdio.h>
-#if 0
-#include <sys/ioctl.h>
-#include <sys/types.h> /* Needed by file.h on Sys V */
-#include <sys/file.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <fcntl.h> /* Needed on Sys V */
-#include "ttycntl.h"
-#endif
-#include "defs.h"
-#include "serial.h"
-
-#include "block_io.h"
-#include "gdb_wait.h"
-#include "env.h"
-
-/* Number of bytes that we send to nindy. I believe this is defined by
- the protocol (it does not agree with REGISTER_BYTES). */
-#define OLD_NINDY_REGISTER_BYTES ((36*4) + (4*8))
-
-extern int quiet; /* 1 => stifle unnecessary messages */
-
-/* tty connected to 960/NINDY board. */
-extern struct serial *nindy_serial;
-
-static OninStrGet();
-
- /****************************
- * *
- * MISCELLANEOUS UTILTIES *
- * *
- ****************************/
-
-
-/******************************************************************************
- * fromhex:
- * Convert a hex ascii digit h to a binary integer
- ******************************************************************************/
-static
-int
-fromhex( h )
- int h;
-{
- if (h >= '0' && h <= '9'){
- h -= '0';
- } else if (h >= 'a' && h <= 'f'){
- h -= 'a' - 10;
- } else {
- h = 0;
- }
- return (h & 0xff);
-}
-
-
-/******************************************************************************
- * hexbin:
- * Convert a string of ASCII hex digits to a string of binary bytes.
- ******************************************************************************/
-static
-hexbin( n, hexp, binp )
- int n; /* Number of bytes to convert (twice this many digits)*/
- char *hexp; /* Get hex from here */
- char *binp; /* Put binary here */
-{
- while ( n-- ){
- *binp++ = (fromhex(*hexp) << 4) | fromhex(*(hexp+1));
- hexp += 2;
- }
-}
-
-
-/******************************************************************************
- * binhex:
- * Convert a string of binary bytes to a string of ASCII hex digits
- ******************************************************************************/
-static
-binhex( n, binp, hexp )
- int n; /* Number of bytes to convert */
- char *binp; /* Get binary from here */
- char *hexp; /* Place hex here */
-{
- static char tohex[] = "0123456789abcdef";
-
- while ( n-- ){
- *hexp++ = tohex[ (*binp >> 4) & 0xf ];
- *hexp++ = tohex[ *binp & 0xf ];
- binp++;
- }
-}
-
-/******************************************************************************
- * byte_order:
- * If the host byte order is different from 960 byte order (i.e., the
- * host is big-endian), reverse the bytes in the passed value; otherwise,
- * return the passed value unchanged.
- *
- ******************************************************************************/
-static
-long
-byte_order( n )
- long n;
-{
- long rev;
- int i;
- static short test = 0x1234;
-
- if (*((char *) &test) == 0x12) {
- /*
- * Big-endian host, swap the bytes.
- */
- rev = 0;
- for ( i = 0; i < sizeof(n); i++ ){
- rev <<= 8;
- rev |= n & 0xff;
- n >>= 8;
- }
- n = rev;
- }
- return n;
-}
-
-/******************************************************************************
- * say:
- * This is a printf that takes at most two arguments (in addition to the
- * format string) and that outputs nothing if verbose output has been
- * suppressed.
- ******************************************************************************/
-static
-say( fmt, arg1, arg2 )
- char *fmt;
- int arg1, arg2;
-{
- if ( !quiet ){
- printf( fmt, arg1, arg2 );
- fflush( stdout );
- }
-}
-
- /*****************************
- * *
- * LOW-LEVEL COMMUNICATION *
- * *
- *****************************/
-
-/* Read a single character from the remote end. */
-
-static int
-readchar()
-{
- /* FIXME: Do we really want to be reading without a timeout? */
- return serial_readchar (nindy_serial, -1);
-}
-
-/******************************************************************************
- * getpkt:
- * Read a packet from a remote NINDY, with error checking, and return
- * it in the indicated buffer.
- ******************************************************************************/
-static
-getpkt (buf)
- char *buf;
-{
- unsigned char recv; /* Checksum received */
- unsigned char csum; /* Checksum calculated */
- char *bp; /* Poointer into the buffer */
- int c;
-
- while (1){
- csum = 0;
- bp = buf;
- /* FIXME: check for error from readchar (). */
- while ( (c = readchar()) != '#' ){
- *bp++ = c;
- csum += c;
- }
- *bp = 0;
-
- /* FIXME: check for error from readchar (). */
- recv = fromhex(readchar()) << 4;
- recv |= fromhex(readchar());
- if ( csum == recv ){
- break;
- }
-
- fprintf(stderr,
- "Bad checksum (recv=0x%02x; calc=0x%02x); retrying\r\n",
- recv, csum );
- serial_write (nindy_serial, "-", 1);
- }
-
- serial_write (nindy_serial, "+", 1);
-}
-
-
-/******************************************************************************
- * putpkt:
- * Checksum and send a gdb command to a remote NINDY, and wait for
- * positive acknowledgement.
- *
- ******************************************************************************/
-static
-putpkt( cmd )
- char *cmd; /* Command to be sent, without lead ^P (\020)
- * or trailing checksum
- */
-{
- char ack; /* Response received from NINDY */
- char checksum[4];
- char *p;
- unsigned int s;
- char resend;
-
- for ( s='\020', p=cmd; *p; p++ ){
- s += *p;
- }
- sprintf( checksum, "#%02x", s & 0xff );
-
- /* Send checksummed message over and over until we get a positive ack
- */
- resend = 1;
- do {
- if ( resend ) {
- serial_write ( nindy_serial, "\020", 1 );
- serial_write( nindy_serial, cmd, strlen(cmd) );
- serial_write( nindy_serial, checksum, strlen(checksum) );
- }
- /* FIXME: do we really want to be reading without timeout? */
- ack = serial_readchar (nindy_serial, -1);
- if (ack < 0)
- {
- fprintf (stderr, "error reading from serial port\n");
- }
- if ( ack == '-' ){
- fprintf( stderr, "Remote NAK, resending\r\n" );
- resend = 1;
- } else if ( ack != '+' ){
- fprintf( stderr, "Bad ACK, ignored: <%c>\r\n", ack );
- resend = 0;
- }
- } while ( ack != '+' );
-}
-
-
-
-/******************************************************************************
- * send:
- * Send a message to a remote NINDY and return the reply in the same
- * buffer (clobbers the input message). Check for error responses
- * as indicated by the second argument.
- *
- ******************************************************************************/
-static
-send( buf, ack_required )
- char *buf; /* Message to be sent to NINDY; replaced by
- * NINDY's response.
- */
- int ack_required; /* 1 means NINDY's response MUST be either "X00" (no
- * error) or an error code "Xnn".
- * 0 means the it's OK as long as it doesn't
- * begin with "Xnn".
- */
-{
- int errnum;
- static char *errmsg[] = {
- "", /* X00 */
- "Buffer overflow", /* X01 */
- "Unknown command", /* X02 */
- "Wrong amount of data to load register(s)", /* X03 */
- "Missing command argument(s)", /* X04 */
- "Odd number of digits sent to load memory", /* X05 */
- "Unknown register name", /* X06 */
- "No such memory segment", /* X07 */
- "No breakpoint available", /* X08 */
- "Can't set requested baud rate", /* X09 */
- };
-# define NUMERRS ( sizeof(errmsg) / sizeof(errmsg[0]) )
-
- static char err0[] = "NINDY failed to acknowledge command: <%s>\r\n";
- static char err1[] = "Unknown error response from NINDY: <%s>\r\n";
- static char err2[] = "Error response %s from NINDY: %s\r\n";
-
- putpkt (buf);
- getpkt (buf);
-
- if ( buf[0] != 'X' ){
- if ( ack_required ){
- fprintf( stderr, err0, buf );
- abort();
- }
-
- } else if ( strcmp(buf,"X00") ){
- sscanf( &buf[1], "%x", &errnum );
- if ( errnum > NUMERRS ){
- fprintf( stderr, err1, buf );
- } else{
- fprintf( stderr, err2, buf, errmsg[errnum] );
- }
- abort();
- }
-}
-
- /**********************************
- * *
- * NINDY INTERFACE ROUTINES *
- * *
- * ninConnect *MUST* be the first *
- * one of these routines called. *
- **********************************/
-
-/******************************************************************************
- * ninBptDel:
- * Ask NINDY to delete the specified type of *hardware* breakpoint at
- * the specified address. If the 'addr' is -1, all breakpoints of
- * the specified type are deleted.
- ******************************************************************************/
-OninBptDel( addr, data )
- long addr; /* Address in 960 memory */
- int data; /* '1' => data bkpt, '0' => instruction breakpoint */
-{
- char buf[100];
-
- if ( addr == -1 ){
- sprintf( buf, "b%c", data ? '1' : '0' );
- } else {
- sprintf( buf, "b%c%x", data ? '1' : '0', addr );
- }
- return send( buf, 0 );
-}
-
-
-/******************************************************************************
- * ninBptSet:
- * Ask NINDY to set the specified type of *hardware* breakpoint at
- * the specified address.
- ******************************************************************************/
-OninBptSet( addr, data )
- long addr; /* Address in 960 memory */
- int data; /* '1' => data bkpt, '0' => instruction breakpoint */
-{
- char buf[100];
-
- sprintf( buf, "B%c%x", data ? '1' : '0', addr );
- return send( buf, 0 );
-}
-
-/******************************************************************************
- * ninGdbExit:
- * Ask NINDY to leave GDB mode and print a NINDY prompt.
- * Since it'll no longer be in GDB mode, don't wait for a response.
- ******************************************************************************/
-OninGdbExit()
-{
- putpkt( "E" );
-}
-
-/******************************************************************************
- * ninGo:
- * Ask NINDY to start or continue execution of an application program
- * in it's memory at the current ip.
- ******************************************************************************/
-OninGo( step_flag )
- int step_flag; /* 1 => run in single-step mode */
-{
- putpkt( step_flag ? "s" : "c" );
-}
-
-
-/******************************************************************************
- * ninMemGet:
- * Read a string of bytes from NINDY's address space (960 memory).
- ******************************************************************************/
-OninMemGet(ninaddr, hostaddr, len)
- long ninaddr; /* Source address, in the 960 memory space */
- char *hostaddr; /* Destination address, in our memory space */
- int len; /* Number of bytes to read */
-{
- /* How much do we send at a time? */
-#define OLD_NINDY_MEMBYTES 1024
- /* Buffer: hex in, binary out */
- char buf[2*OLD_NINDY_MEMBYTES+20];
-
- int cnt; /* Number of bytes in next transfer */
-
- for ( ; len > 0; len -= OLD_NINDY_MEMBYTES ){
- cnt = len > OLD_NINDY_MEMBYTES ? OLD_NINDY_MEMBYTES : len;
-
- sprintf( buf, "m%x,%x", ninaddr, cnt );
- send( buf, 0 );
- hexbin( cnt, buf, hostaddr );
-
- ninaddr += cnt;
- hostaddr += cnt;
- }
-}
-
-
-/******************************************************************************
- * ninMemPut:
- * Write a string of bytes into NINDY's address space (960 memory).
- ******************************************************************************/
-OninMemPut( destaddr, srcaddr, len )
- long destaddr; /* Destination address, in NINDY memory space */
- char *srcaddr; /* Source address, in our memory space */
- int len; /* Number of bytes to write */
-{
- char buf[2*OLD_NINDY_MEMBYTES+20]; /* Buffer: binary in, hex out */
- char *p; /* Pointer into buffer */
- int cnt; /* Number of bytes in next transfer */
-
- for ( ; len > 0; len -= OLD_NINDY_MEMBYTES ){
- cnt = len > OLD_NINDY_MEMBYTES ? OLD_NINDY_MEMBYTES : len;
-
- sprintf( buf, "M%x,", destaddr );
- p = buf + strlen(buf);
- binhex( cnt, srcaddr, p );
- *(p+(2*cnt)) = '\0';
- send( buf, 1 );
-
- srcaddr += cnt;
- destaddr += cnt;
- }
-}
-
-/******************************************************************************
- * ninRegGet:
- * Retrieve the contents of a 960 register, and return them as a long
- * in host byte order.
- *
- * THIS ROUTINE CAN ONLY BE USED TO READ THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-long
-OninRegGet( regname )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
-{
- char buf[200];
- long val;
-
- sprintf( buf, "u%s", regname );
- send( buf, 0 );
- hexbin( 4, buf, (char *)&val );
- return byte_order(val);
-}
-
-/******************************************************************************
- * ninRegPut:
- * Set the contents of a 960 register.
- *
- * THIS ROUTINE CAN ONLY BE USED TO SET THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-OninRegPut( regname, val )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
- long val; /* New contents of register, in host byte-order */
-{
- char buf[200];
-
- sprintf( buf, "U%s,%08x", regname, byte_order(val) );
- send( buf, 1 );
-}
-
-/******************************************************************************
- * ninRegsGet:
- * Get a dump of the contents of the entire 960 register set. The
- * individual registers appear in the dump in the following order:
- *
- * pfp sp rip r3 r4 r5 r6 r7
- * r8 r9 r10 r11 r12 r13 r14 r15
- * g0 g1 g2 g3 g4 g5 g6 g7
- * g8 g9 g10 g11 g12 g13 g14 fp
- * pc ac ip tc fp0 fp1 fp2 fp3
- *
- * Each individual register comprises exactly 4 bytes, except for
- * fp0-fp3, which are 8 bytes.
- *
- * WARNING:
- * Each register value is in 960 (little-endian) byte order.
- *
- ******************************************************************************/
-OninRegsGet( regp )
- char *regp; /* Where to place the register dump */
-{
- char buf[(2*OLD_NINDY_REGISTER_BYTES)+10]; /* Registers in ASCII hex */
-
- strcpy( buf, "r" );
- send( buf, 0 );
- hexbin( OLD_NINDY_REGISTER_BYTES, buf, regp );
-}
-
-/******************************************************************************
- * ninRegsPut:
- * Initialize the entire 960 register set to a specified set of values.
- * The format of the register value data should be the same as that
- * returned by ninRegsGet.
- *
- * WARNING:
- * Each register value should be in 960 (little-endian) byte order.
- *
- ******************************************************************************/
-OninRegsPut( regp )
- char *regp; /* Pointer to desired values of registers */
-{
- char buf[(2*OLD_NINDY_REGISTER_BYTES)+10]; /* Registers in ASCII hex */
-
- buf[0] = 'R';
- binhex( OLD_NINDY_REGISTER_BYTES, regp, buf+1 );
- buf[ (2*OLD_NINDY_REGISTER_BYTES)+1 ] = '\0';
-
- send( buf, 1 );
-}
-
-
-/******************************************************************************
- * ninReset:
- * Ask NINDY to perform a soft reset; wait for the reset to complete.
- ******************************************************************************/
-OninReset()
-{
-
- putpkt( "X" );
- /* FIXME: check for error from readchar (). */
- while ( readchar() != '+' ){
- ;
- }
-}
-
-
-/******************************************************************************
- * ninSrq:
- * Assume NINDY has stopped execution of the 960 application program in
- * order to process a host service request (srq). Ask NINDY for the
- * srq arguments, perform the requested service, and send an "srq
- * complete" message so NINDY will return control to the application.
- *
- ******************************************************************************/
-OninSrq()
-{
- /* FIXME: Imposes arbitrary limits on lengths of pathnames and such. */
- char buf[BUFSIZE];
- int retcode;
- unsigned char srqnum;
- char *p;
- char *argp;
- int nargs;
- int arg[MAX_SRQ_ARGS];
-
-
- /* Get srq number and arguments
- */
- strcpy( buf, "!" );
- send( buf, 0 );
- hexbin( 1, buf, (char *)&srqnum );
-
- /* Set up array of pointers the each of the individual
- * comma-separated args
- */
- nargs=0;
- argp = p = buf+2;
- while ( 1 ){
- while ( *p != ',' && *p != '\0' ){
- p++;
- }
- sscanf( argp, "%x", &arg[nargs++] );
- if ( *p == '\0' || nargs == MAX_SRQ_ARGS ){
- break;
- }
- argp = ++p;
- }
-
- /* Process Srq
- */
- switch( srqnum ){
- case BS_CLOSE:
- /* args: file descriptor */
- if ( arg[0] > 2 ){
- retcode = close( arg[0] );
- } else {
- retcode = 0;
- }
- break;
- case BS_CREAT:
- /* args: filename, mode */
- OninStrGet( arg[0], buf );
- retcode = creat(buf,arg[1]);
- break;
- case BS_OPEN:
- /* args: filename, flags, mode */
- OninStrGet( arg[0], buf );
- retcode = open(buf,arg[1],arg[2]);
- break;
- case BS_READ:
- /* args: file descriptor, buffer, count */
- retcode = read(arg[0],buf,arg[2]);
- if ( retcode > 0 ){
- OninMemPut( arg[1], buf, retcode );
- }
- break;
- case BS_SEEK:
- /* args: file descriptor, offset, whence */
- retcode = lseek(arg[0],arg[1],arg[2]);
- break;
- case BS_WRITE:
- /* args: file descriptor, buffer, count */
- OninMemGet( arg[1], buf, arg[2] );
- retcode = write(arg[0],buf,arg[2]);
- break;
- default:
- retcode = -1;
- break;
- }
-
- /* Tell NINDY to continue
- */
- sprintf( buf, "e%x", retcode );
- send( buf, 1 );
-}
-
-
-/******************************************************************************
- * ninStopWhy:
- * Assume the application program has stopped (i.e., a DLE was received
- * from NINDY). Ask NINDY for status information describing the
- * reason for the halt.
- *
- * Returns a non-zero value if the user program has exited, 0 otherwise.
- * Also returns the following information, through passed pointers:
- * - why: an exit code if program the exited; otherwise the reason
- * why the program halted (see stop.h for values).
- * - contents of register ip (little-endian byte order)
- * - contents of register sp (little-endian byte order)
- * - contents of register fp (little-endian byte order)
- ******************************************************************************/
-char
-OninStopWhy( whyp, ipp, fpp, spp )
- char *whyp; /* Return the 'why' code through this pointer */
- char *ipp; /* Return contents of register ip through this pointer */
- char *fpp; /* Return contents of register fp through this pointer */
- char *spp; /* Return contents of register sp through this pointer */
-{
- char buf[30];
- char stop_exit;
-
- strcpy( buf, "?" );
- send( buf, 0 );
- hexbin( 1, buf, &stop_exit );
- hexbin( 1, buf+2, whyp );
- hexbin( 4, buf+4, ipp );
- hexbin( 4, buf+12, fpp );
- hexbin( 4, buf+20, spp );
- return stop_exit;
-}
-
-/******************************************************************************
- * ninStrGet:
- * Read a '\0'-terminated string of data out of the 960 memory space.
- *
- ******************************************************************************/
-static
-OninStrGet( ninaddr, hostaddr )
- unsigned long ninaddr; /* Address of string in NINDY memory space */
- char *hostaddr; /* Address of the buffer to which string should
- * be copied.
- */
-{
- /* FIXME: seems to be an arbitrary limit on the length of the string. */
- char buf[BUFSIZE]; /* String as 2 ASCII hex digits per byte */
- int numchars; /* Length of string in bytes. */
-
- sprintf( buf, "\"%x", ninaddr );
- send( buf, 0 );
- numchars = strlen(buf)/2;
- hexbin( numchars, buf, hostaddr );
- hostaddr[numchars] = '\0';
-}
-
-#if 0
-/* never used. */
-
-/******************************************************************************
- * ninVersion:
- * Ask NINDY for version information about itself.
- * The information is sent as an ascii string in the form "x.xx,<arch>",
- * where,
- * x.xx is the version number
- * <arch> is the processor architecture: "KA", "KB", "MC", "CA" *
- *
- ******************************************************************************/
-int
-OninVersion( p )
- char *p; /* Where to place version string */
-{
- /* FIXME: this is an arbitrary limit on the length of version string. */
- char buf[BUFSIZE];
-
- strcpy( buf, "v" );
- send( buf, 0 );
- strcpy( p, buf );
- return strlen( buf );
-}
-#endif
diff --git a/gdb/nindy-share/README b/gdb/nindy-share/README
deleted file mode 100644
index 3f217ad9527..00000000000
--- a/gdb/nindy-share/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The files in this directory started out life as code shared between
-the nindy monitor and GDB. For various reasons, this is no longer
-true. Eventually, they probably should be merged into remote-nindy.c.
diff --git a/gdb/nindy-share/VERSION b/gdb/nindy-share/VERSION
deleted file mode 100644
index 5625e59da88..00000000000
--- a/gdb/nindy-share/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.2
diff --git a/gdb/nindy-share/b.out.h b/gdb/nindy-share/b.out.h
deleted file mode 100644
index a82c261a7fd..00000000000
--- a/gdb/nindy-share/b.out.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright 1992 Free Software Foundation, Inc.
- *
- * This file is a modified version of 'a.out.h'. It is to be used in all
- * all GNU tools modified to support the i80960 (or tools that operate on
- * object files created by such tools).
- *
- * All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
- * object code is generated on, and executed under the direction of a symbolic
- * debugger running on, a host system. We do not want to be subject to the
- * vagaries of which host it is or whether it supports COFF or a.out format,
- * or anything else. We DO want to:
- *
- * o always generate the same format object files, regardless of host.
- *
- * o have an 'a.out' header that we can modify for our own purposes
- * (the 80960 is typically an embedded processor and may require
- * enhanced linker support that the normal a.out.h header can't
- * accommodate).
- *
- * As for byte-ordering, the following rules apply:
- *
- * o Text and data that is actually downloaded to the target is always
- * in i80960 (little-endian) order.
- *
- * o All other numbers (in the header, symbols, relocation directives)
- * are in host byte-order: object files CANNOT be lifted from a
- * little-end host and used on a big-endian (or vice versa) without
- * modification.
- *
- * o The downloader ('comm960') takes care to generate a pseudo-header
- * with correct (i80960) byte-ordering before shipping text and data
- * off to the NINDY monitor in the target systems. Symbols and
- * relocation info are never sent to the target.
- */
-
-
-#define BMAGIC 0415
-/* We don't accept the following (see N_BADMAG macro).
- * They're just here so GNU code will compile.
- */
-#define OMAGIC 0407 /* old impure format */
-#define NMAGIC 0410 /* read-only text */
-#define ZMAGIC 0413 /* demand load format */
-
-/* FILE HEADER
- * All 'lengths' are given as a number of bytes.
- * All 'alignments' are for relinkable files only; an alignment of
- * 'n' indicates the corresponding segment must begin at an
- * address that is a multiple of (2**n).
- */
-struct exec {
- /* Standard stuff */
- unsigned long a_magic; /* Identifies this as a b.out file */
- unsigned long a_text; /* Length of text */
- unsigned long a_data; /* Length of data */
- unsigned long a_bss; /* Length of runtime uninitialized data area */
- unsigned long a_syms; /* Length of symbol table */
- unsigned long a_entry; /* Runtime start address */
- unsigned long a_trsize; /* Length of text relocation info */
- unsigned long a_drsize; /* Length of data relocation info */
-
- /* Added for i960 */
- unsigned long a_tload; /* Text runtime load address */
- unsigned long a_dload; /* Data runtime load address */
- unsigned char a_talign; /* Alignment of text segment */
- unsigned char a_dalign; /* Alignment of data segment */
- unsigned char a_balign; /* Alignment of bss segment */
- unsigned char unused; /* (Just to make struct size a multiple of 4) */
-};
-
-#define N_BADMAG(x) (((x).a_magic)!=BMAGIC)
-#define N_TXTOFF(x) ( sizeof(struct exec) )
-#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
-#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
-#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
-#define N_SYMOFF(x) ( N_DROFF(x) + (x).a_drsize )
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-
-/* A single entry in the symbol table
- */
-struct nlist {
- union {
- char *n_name;
- struct nlist *n_next;
- long n_strx; /* Index into string table */
- } n_un;
- unsigned char n_type; /* See below */
- char n_other; /* Used in i80960 support -- see below */
- short n_desc;
- unsigned long n_value;
-};
-
-
-/* Legal values of n_type
- */
-#define N_UNDF 0 /* Undefined symbol */
-#define N_ABS 2 /* Absolute symbol */
-#define N_TEXT 4 /* Text symbol */
-#define N_DATA 6 /* Data symbol */
-#define N_BSS 8 /* BSS symbol */
-#define N_FN 31 /* Filename symbol */
-
-#define N_EXT 1 /* External symbol (OR'd in with one of above) */
-#define N_TYPE 036 /* Mask for all the type bits */
-#define N_STAB 0340 /* Mask for all bits used for SDB entries */
-
-/* MEANING OF 'n_other'
- *
- * If non-zero, the 'n_other' fields indicates either a leaf procedure or
- * a system procedure, as follows:
- *
- * 1 <= n_other <= 32 :
- * The symbol is the entry point to a system procedure.
- * 'n_value' is the address of the entry, as for any other
- * procedure. The system procedure number (which can be used in
- * a 'calls' instruction) is (n_other-1). These entries come from
- * '.sysproc' directives.
- *
- * n_other == N_CALLNAME
- * the symbol is the 'call' entry point to a leaf procedure.
- * The *next* symbol in the symbol table must be the corresponding
- * 'bal' entry point to the procedure (see following). These
- * entries come from '.leafproc' directives in which two different
- * symbols are specified (the first one is represented here).
- *
- *
- * n_other == N_BALNAME
- * the symbol is the 'bal' entry point to a leaf procedure.
- * These entries result from '.leafproc' directives in which only
- * one symbol is specified, or in which the same symbol is
- * specified twice.
- *
- * Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
- * but not every N_BALNAME entry must have an N_CALLNAME entry.
- */
-#define N_CALLNAME -1
-#define N_BALNAME -2
-
-
-struct relocation_info {
- int r_address; /* File address of item to be relocated */
- unsigned
- r_symbolnum:24,/* Index of symbol on which relocation is based*/
- r_pcrel:1, /* 1 => relocate PC-relative; else absolute
- * On i960, pc-relative implies 24-bit
- * address, absolute implies 32-bit.
- */
- r_length:2, /* Number of bytes to relocate:
- * 0 => 1 byte
- * 1 => 2 bytes
- * 2 => 4 bytes -- only value used for i960
- */
- r_extern:1,
- r_bsr:1, /* Something for the GNU NS32K assembler */
- r_disp:1, /* Something for the GNU NS32K assembler */
- r_callj:1, /* 1 if relocation target is an i960 'callj' */
- nuthin:1; /* Unused */
-};
diff --git a/gdb/nindy-share/block_io.h b/gdb/nindy-share/block_io.h
deleted file mode 100644
index 6521cdb9b05..00000000000
--- a/gdb/nindy-share/block_io.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/******************************************************************
- Copyright 1990, 1992 Free Software Foundation, Inc.
-
- This code was donated by Intel Corp.
-
- Intel hereby grants you permission to copy, modify, and
- distribute this software and its documentation. Intel grants
- this permission provided that the above copyright notice
- appears in all copies and that both the copyright notice and
- this permission notice appear in supporting documentation. In
- addition, Intel grants this permission provided that you
- prominently mark as not part of the original any modifications
- made to this software or documentation, and that the name of
- Intel Corporation not be used in advertising or publicity
- pertaining to distribution of the software or the documentation
- without specific, written prior permission.
-
- Intel Corporation does not warrant, guarantee or make any
- representations regarding the use of, or the results of the use
- of, the software and documentation in terms of correctness,
- accuracy, reliability, currentness, or otherwise; and you rely
- on the software, documentation and results solely at your own
- risk. */
-/******************************************************************/
-
-/*****************************************************************************
- * Structures and definitions supporting NINDY requests for services by a
- * remote host. Used by NINDY monitor, library libnin, comm960, gdb960,
- * etc. Also contains some defines for NINDY console I/O requests.
- *****************************************************************************/
-
-/* the following four are hardware dependent */
-#define BIT_16 short
-#define BIT_32 int
-#define UBIT_16 unsigned short
-#define UBIT_32 unsigned int
-
-/* Service request numbers -- these are the services that can be asked of the
- * host.
- */
-#define BS_ACCESS 0x10
-#define BS_CLOSE 0x20
-#define BS_CREAT 0x30
-#define BS_SEEK 0x40
-#define BS_OPEN 0x50
-#define BS_READ 0x60
-#define BS_STAT 0x70
-#define BS_SYSTEMD 0x80
-#define BS_TIME 0x90
-#define BS_UNMASK 0xa0
-#define BS_UNLINK 0xb0
-#define BS_WRITE 0xc0
-
-
-/* Maximum number of arguments to any of the above service requests
- * (in addition to the request number).
- */
-#define MAX_SRQ_ARGS 3
-
-/* Number of bytes of data that can be read or written by a single I/O request
- */
-#define BUFSIZE 1024
-
-/* NINDY console I/O requests: CO sends a single character to stdout,
- * CI reads one.
- */
-#define CI 0
-#define CO 1
diff --git a/gdb/nindy-share/coff.h b/gdb/nindy-share/coff.h
deleted file mode 100644
index b169b71ec53..00000000000
--- a/gdb/nindy-share/coff.h
+++ /dev/null
@@ -1,336 +0,0 @@
-/* Copyright 1990, 1992 Free Software Foundation, Inc.
- *
- * This code was donated by Intel Corp.
- *
- * This is a coff version of a.out.h to support 80960 debugging from
- * a Unix (possibly BSD) host. It's used by:
- * o gdb960 to symbols in code generated with Intel (non-GNU) tools.
- * o comm960 to convert a b.out file to a coff file for download.
- */
-
-
-/********************** FILE HEADER **********************/
-
-struct filehdr {
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- long f_timdat; /* time & date stamp */
- long f_symptr; /* file pointer to symtab */
- long f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
-};
-
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved externel references)
- * F_LNNO line nunbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- */
-#define F_RELFLG 0000001
-#define F_EXEC 0000002
-#define F_LNNO 0000004
-#define F_LSYMS 0000010
-#define F_AR32WR 0000400
-
-
-/*
- * Intel 80960 (I960) processor flags.
- * F_I960TYPE == mask for processor type field.
- */
-#define F_I960TYPE 0170000
-#define F_I960CA 0010000
-#define F_I960FLOAT 0020000
-#define F_I960BA 0030000
-#define F_I960XA 0040000
-
-/*
- * i80960 Magic Numbers
- */
-#define I960ROMAGIC 0540 /* read-only text segments */
-#define I960RWMAGIC 0541 /* read-write text segments */
-
-#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC))
-
-#define FILHDR struct filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct {
- unsigned long phys_addr;
- unsigned long bitarray;
-} TAGBITS;
-
-typedef struct aouthdr {
- short magic; /* type of file */
- short vstamp; /* version stamp */
- unsigned long tsize; /* text size in bytes, padded to FW bdry*/
- unsigned long dsize; /* initialized data " " */
- unsigned long bsize; /* uninitialized data " " */
-#if U3B
- unsigned long dum1;
- unsigned long dum2; /* pad to entry point */
-#endif
- unsigned long entry; /* entry pt. */
- unsigned long text_start; /* base of text used for this file */
- unsigned long data_start; /* base of data used for this file */
- unsigned long tagentries; /* number of tag entries to follow */
-} AOUTHDR;
-
-/* return a pointer to the tag bits array */
-
-#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1))
-
-/* compute size of a header */
-
-#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))
-
-/********************** STORAGE CLASSES **********************/
-
-#define C_EFCN -1 /* physical end of function */
-#define C_NULL 0
-#define C_AUTO 1 /* automatic variable */
-#define C_EXT 2 /* external symbol */
-#define C_STAT 3 /* static */
-#define C_REG 4 /* register variable */
-#define C_EXTDEF 5 /* external definition */
-#define C_LABEL 6 /* label */
-#define C_ULABEL 7 /* undefined label */
-#define C_MOS 8 /* member of structure */
-#define C_ARG 9 /* function argument */
-#define C_STRTAG 10 /* structure tag */
-#define C_MOU 11 /* member of union */
-#define C_UNTAG 12 /* union tag */
-#define C_TPDEF 13 /* type definition */
-#define C_USTATIC 14 /* undefined static */
-#define C_ENTAG 15 /* enumeration tag */
-#define C_MOE 16 /* member of enumeration */
-#define C_REGPARM 17 /* register parameter */
-#define C_FIELD 18 /* bit field */
-#define C_BLOCK 100 /* ".bb" or ".eb" */
-#define C_FCN 101 /* ".bf" or ".ef" */
-#define C_EOS 102 /* end of structure */
-#define C_FILE 103 /* file name */
-#define C_LINE 104 /* line # reformatted as symbol table entry */
-#define C_ALIAS 105 /* duplicate tag */
-#define C_HIDDEN 106 /* ext symbol in dmert public lib */
-
- /* New storage classes for 80960 */
-
-#define C_SCALL 107 /* Procedure reachable via system call */
-#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
-
-
-/********************** SECTION HEADER **********************/
-
-struct scnhdr {
- char s_name[8]; /* section name */
- long s_paddr; /* physical address, aliased s_nlib */
- long s_vaddr; /* virtual address */
- long s_size; /* section size */
- long s_scnptr; /* file ptr to raw data for section */
- long s_relptr; /* file ptr to relocation */
- long s_lnnoptr; /* file ptr to line numbers */
- unsigned short s_nreloc; /* number of relocation entries */
- unsigned short s_nlnno; /* number of line number entries*/
- long s_flags; /* flags */
- unsigned long s_align; /* section alignment */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-/*
- * s_flags "type"
- */
-#define STYP_TEXT 0x20 /* section contains text only */
-#define STYP_DATA 0x40 /* section contains data only */
-#define STYP_BSS 0x80 /* section contains bss only */
-
-#define SCNHDR struct scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct lineno{
- union {
- long l_symndx; /* function name symbol index, iff l_lnno == 0*/
- long l_paddr; /* (physical) address of line number */
- } l_addr;
- unsigned short l_lnno; /* line number */
- char padding[2]; /* force alignment */
-};
-
-#define LINENO struct lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define SYMNMLEN 8 /* # characters in a symbol name */
-#define FILNMLEN 14 /* # characters in a file name */
-#define DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-
-struct syment {
- union {
- char _n_name[SYMNMLEN]; /* old COFF version */
- struct {
- long _n_zeroes; /* new == 0 */
- long _n_offset; /* offset into string table */
- } _n_n;
- char *_n_nptr[2]; /* allows for overlaying */
- } _n;
- long n_value; /* value of symbol */
- short n_scnum; /* section number */
- char pad1[2]; /* force alignment */
- unsigned long n_type; /* type and derived type */
- char n_sclass; /* storage class */
- char n_numaux; /* number of aux. entries */
- char pad2[2]; /* force alignment */
-};
-
-#define n_name _n._n_name
-#define n_zeroes _n._n_n._n_zeroes
-#define n_offset _n._n_n._n_offset
-
-/*
- * Relocatable symbols have number of the section in which they are defined,
- * or one of the following:
- */
-#define N_UNDEF 0 /* undefined symbol */
-#define N_ABS -1 /* value of symbol is absolute */
-#define N_DEBUG -2 /* debugging symbol -- symbol value is meaningless */
-
-/*
- * Type of a symbol, in low 4 bits of the word
- */
-#define T_NULL 0
-#define T_VOID 1 /* function argument (only used by compiler) */
-#define T_CHAR 2 /* character */
-#define T_SHORT 3 /* short integer */
-#define T_INT 4 /* integer */
-#define T_LONG 5 /* long integer */
-#define T_FLOAT 6 /* floating point */
-#define T_DOUBLE 7 /* double word */
-#define T_STRUCT 8 /* structure */
-#define T_UNION 9 /* union */
-#define T_ENUM 10 /* enumeration */
-#define T_MOE 11 /* member of enumeration*/
-#define T_UCHAR 12 /* unsigned character */
-#define T_USHORT 13 /* unsigned short */
-#define T_UINT 14 /* unsigned integer */
-#define T_ULONG 15 /* unsigned long */
-#define T_LNGDBL 16 /* long double */
-
-
-/*
- * derived types
- */
-#define DT_PTR 1 /* pointer */
-#define DT_FCN 2 /* function */
-#define DT_ARY 3 /* array */
-
-#define N_BTMASK 037
-#define N_TMASK 0140
-#define N_BTSHFT 5
-#define N_TSHIFT 2
-
-#define BTYPE(x) ((x) & N_BTMASK)
-
-
-#define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))
-#define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))
-#define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))
-
-#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
-
-union auxent {
- struct {
- long x_tagndx; /* str, un, or enum tag indx */
- union {
- struct {
- unsigned short x_lnno; /* declaration line number */
- unsigned short x_size; /* str/union/array size */
- } x_lnsz;
- long x_fsize; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- long x_lnnoptr; /* ptr to fcn line # */
- long x_endndx; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- unsigned short x_dimen[DIMNUM];
- } x_ary;
- } x_fcnary;
- unsigned short x_tvndx; /* tv index */
- } x_sym;
-
- union {
- char x_fname[FILNMLEN];
- struct {
- long x_zeroes;
- long x_offset;
- } x_n;
- } x_file;
-
- struct {
- long x_scnlen; /* section length */
- unsigned short x_nreloc; /* # relocation entries */
- unsigned short x_nlinno; /* # line numbers */
- } x_scn;
-
- struct {
- long x_stdindx;
- } x_sc;
-
- struct {
- unsigned long x_balntry;
- } x_bal;
-
- char a[sizeof(struct syment)]; /* force auxent/syment sizes to match */
-};
-
-#define SYMENT struct syment
-#define SYMESZ sizeof(SYMENT)
-#define AUXENT union auxent
-#define AUXESZ sizeof(AUXENT)
-
-#if VAX || I960
-# define _ETEXT "_etext"
-#else
-# define _ETEXT "etext"
-#endif
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct reloc {
- long r_vaddr; /* Virtual address of reference */
- long r_symndx; /* Index into symbol table */
- unsigned short r_type; /* Relocation type */
- char pad[2]; /* Unused */
-};
-
-/* Only values of r_type GNU/960 cares about */
-#define R_RELLONG 17 /* Direct 32-bit relocation */
-#define R_IPRMED 25 /* 24-bit ip-relative relocation */
-#define R_OPTCALL 27 /* 32-bit optimizable call (leafproc/sysproc) */
-
-
-#define RELOC struct reloc
-#define RELSZ sizeof(RELOC)
diff --git a/gdb/nindy-share/env.h b/gdb/nindy-share/env.h
deleted file mode 100644
index 4343d8b4c01..00000000000
--- a/gdb/nindy-share/env.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Copyright 1990, 1991 Free Software Foundation, Inc.
- *
- * This code was donated by Intel Corp.
- *
- * GNU/960 tool runtime environment
- */
-
-
-/* Base directory at which GNU/960 tools are assumed to be installed, if
- * the environment variable G960BASE is not defined.
- */
-#define DEFAULT_BASE "/usr/local/g960"
diff --git a/gdb/nindy-share/nindy.c b/gdb/nindy-share/nindy.c
deleted file mode 100644
index 77dd734fac2..00000000000
--- a/gdb/nindy-share/nindy.c
+++ /dev/null
@@ -1,1154 +0,0 @@
-/* This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This started out life as code shared between the nindy monitor and
- GDB. For various reasons, this is no longer true. Eventually, it
- probably should be merged into remote-nindy.c. */
-
-/******************************************************************************
- *
- * NINDY INTERFACE ROUTINES
- *
- * The caller of these routines should be aware that:
- *
- * (1) ninConnect() should be called to open communications with the
- * remote NINDY board before any of the other routines are invoked.
- *
- * (2) almost all interactions are driven by the host: nindy sends information
- * in response to host commands.
- *
- * (3) the lone exception to (2) is the single character DLE (^P, 0x10).
- * Receipt of a DLE from NINDY indicates that the application program
- * running under NINDY has stopped execution and that NINDY is now
- * available to talk to the host (all other communication received after
- * the application has been started should be presumed to come from the
- * application and should be passed on by the host to stdout).
- *
- * (4) the reason the application program stopped can be determined with the
- * ninStopWhy() function. There are three classes of stop reasons:
- *
- * (a) the application has terminated execution.
- * The host should take appropriate action.
- *
- * (b) the application had a fault or trace event.
- * The host should take appropriate action.
- *
- * (c) the application wishes to make a service request (srq) of the host;
- * e.g., to open/close a file, read/write a file, etc. The ninSrq()
- * function should be called to determine the nature of the request
- * and process it.
- */
-
-#include <stdio.h>
-#include "defs.h"
-#include "serial.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY)
-#define HAVE_SGTTY
-#endif
-
-#ifdef HAVE_SGTTY
-#include <sys/ioctl.h>
-#endif
-
-#include <sys/types.h> /* Needed by file.h on Sys V */
-#include <sys/file.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#if 0
-#include "ttycntl.h"
-#endif
-#include "block_io.h"
-#include "gdb_wait.h"
-#include "env.h"
-
-#define DLE 0x10 /* ^P */
-#define XON 0x11 /* ^Q */
-#define XOFF 0x13 /* ^S */
-#define ESC 0x1b
-
-#define TIMEOUT -1
-
-int quiet = 0; /* 1 => stifle unnecessary messages */
-struct serial *nindy_serial;
-
-static int old_nindy = 0; /* 1 => use old (hex) communication protocol */
-static ninStrGet();
-
- /****************************
- * *
- * MISCELLANEOUS UTILTIES *
- * *
- ****************************/
-
-/******************************************************************************
- * say:
- * This is a printf that takes at most two arguments (in addition to the
- * format string) and that outputs nothing if verbose output has been
- * suppressed.
- *****************************************************************************/
-
-/* VARARGS */
-static void
-#ifdef ANSI_PROTOTYPES
-say (char *fmt, ...)
-#else
-say (va_alist)
- va_dcl
-#endif
-{
- va_list args;
-#ifdef ANSI_PROTOTYPES
- va_start(args, fmt);
-#else
- char *fmt;
-
- va_start (args);
- fmt = va_arg (args, char *);
-#endif
-
- if (!quiet)
- {
- vfprintf_unfiltered (gdb_stdout, fmt, args);
- gdb_flush (gdb_stdout);
- }
- va_end (args);
-}
-
-/******************************************************************************
- * exists:
- * Creates a full pathname by concatenating up to three name components
- * onto a specified base name; optionally looks up the base name as a
- * runtime environment variable; and checks to see if the file or
- * directory specified by the pathname actually exists.
- *
- * Returns: the full pathname if it exists, NULL otherwise.
- * (returned pathname is in malloc'd memory and must be freed
- * by caller).
- *****************************************************************************/
-static char *
-exists( base, c1, c2, c3, env )
- char *base; /* Base directory of path */
- char *c1, *c2, *c3; /* Components (subdirectories and/or file name) to be
- * appended onto the base directory name. One or
- * more may be omitted by passing NULL pointers.
- */
- int env; /* If 1, '*base' is the name of an environment variable
- * to be examined for the base directory name;
- * otherwise, '*base' is the actual name of the
- * base directory.
- */
-{
- struct stat buf;/* For call to 'stat' -- never examined */
- char *path; /* Pointer to full pathname (malloc'd memory) */
- int len; /* Length of full pathname (incl. terminator) */
- extern char *getenv();
-
-
- if ( env ){
- base = getenv( base );
- if ( base == NULL ){
- return NULL;
- }
- }
-
- len = strlen(base) + 4;
- /* +4 for terminator and "/" before each component */
- if ( c1 != NULL ){
- len += strlen(c1);
- }
- if ( c2 != NULL ){
- len += strlen(c2);
- }
- if ( c3 != NULL ){
- len += strlen(c3);
- }
-
- path = xmalloc (len);
-
- strcpy( path, base );
- if ( c1 != NULL ){
- strcat( path, "/" );
- strcat( path, c1 );
- if ( c2 != NULL ){
- strcat( path, "/" );
- strcat( path, c2 );
- if ( c3 != NULL ){
- strcat( path, "/" );
- strcat( path, c3 );
- }
- }
- }
-
- if ( stat(path,&buf) != 0 ){
- free( path );
- path = NULL;
- }
- return path;
-}
-
- /*****************************
- * *
- * LOW-LEVEL COMMUNICATION *
- * *
- *****************************/
-
-/* Read *exactly* N characters from the NINDY tty, and put them in
- *BUF. Translate escape sequences into single characters, counting
- each such sequence as 1 character.
-
- An escape sequence consists of ESC and a following character. The
- ESC is discarded and the other character gets bit 0x40 cleared --
- thus ESC P == ^P, ESC S == ^S, ESC [ == ESC, etc.
-
- Return 1 if successful, 0 if more than TIMEOUT seconds pass without
- any input. */
-
-static int
-rdnin (buf,n,timeout)
- unsigned char * buf; /* Where to place characters read */
- int n; /* Number of characters to read */
- int timeout; /* Timeout, in seconds */
-{
- int escape_seen; /* 1 => last character of a read was an ESC */
- int c;
-
- escape_seen = 0;
- while (n)
- {
- c = serial_readchar (nindy_serial, timeout);
- switch (c)
- {
- case SERIAL_ERROR:
- case SERIAL_TIMEOUT:
- case SERIAL_EOF:
- return 0;
-
- case ESC:
- escape_seen = 1;
- break;
-
- default:
- if (escape_seen)
- {
- escape_seen = 0;
- c &= ~0x40;
- }
- *buf++ = c;
- --n;
- break;
- }
- }
- return 1;
-}
-
-
-/******************************************************************************
- * getpkt:
- * Read a packet from a remote NINDY, with error checking, into the
- * indicated buffer.
- *
- * Return packet status byte on success, TIMEOUT on failure.
- ******************************************************************************/
-static
-int
-getpkt(buf)
- unsigned char *buf;
-{
- int i;
- unsigned char hdr[3]; /* Packet header:
- * hdr[0] = low byte of message length
- * hdr[1] = high byte of message length
- * hdr[2] = message status
- */
- int cnt; /* Message length (status byte + data) */
- unsigned char cs_calc; /* Checksum calculated */
- unsigned char cs_recv; /* Checksum received */
- static char errfmt[] =
- "Bad checksum (recv=0x%02x; calc=0x%02x); retrying\r\n";
-
- while (1){
- if ( !rdnin(hdr,3,5) ){
- return TIMEOUT;
- }
- cnt = (hdr[1]<<8) + hdr[0] - 1;
- /* -1 for status byte (already read) */
-
- /* Caller's buffer may only be big enough for message body,
- * without status byte and checksum, so make sure to read
- * checksum into a separate buffer.
- */
- if ( !rdnin(buf,cnt,5) || !rdnin(&cs_recv,1,5) ){
- return TIMEOUT;
- }
-
- /* Calculate checksum
- */
- cs_calc = hdr[0] + hdr[1] + hdr[2];
- for ( i = 0; i < cnt; i++ ){
- cs_calc += buf[i];
- }
- if ( cs_calc == cs_recv ){
- serial_write (nindy_serial, "+", 1);
- return hdr[2];
- }
-
- /* Bad checksum: report, send NAK, and re-receive
- */
- fprintf(stderr, errfmt, cs_recv, cs_calc );
- serial_write (nindy_serial, "-", 1);
- }
-}
-
-
-/******************************************************************************
- * putpkt:
- * Send a packet to NINDY, checksumming it and converting special
- * characters to escape sequences.
- ******************************************************************************/
-
-/* This macro puts the character 'c' into the buffer pointed at by 'p',
- * and increments the pointer. If 'c' is one of the 4 special characters
- * in the transmission protocol, it is converted into a 2-character
- * escape sequence.
- */
-#define PUTBUF(c,p) \
- if ( c == DLE || c == ESC || c == XON || c == XOFF ){ \
- *p++ = ESC; \
- *p++ = c | 0x40; \
- } else { \
- *p++ = c; \
- }
-
-static
-putpkt( msg, len )
- unsigned char *msg; /* Command to be sent, without lead ^P (\020) or checksum */
- int len; /* Number of bytes in message */
-{
- static char *buf = NULL;/* Local buffer -- build packet here */
- static int maxbuf = 0; /* Current length of buffer */
- unsigned char ack; /* Response received from NINDY */
- unsigned char checksum; /* Packet checksum */
- char *p; /* Pointer into buffer */
- int lenhi, lenlo; /* High and low bytes of message length */
- int i;
-
-
- /* Make sure local buffer is big enough. Must include space for
- * packet length, message body, and checksum. And in the worst
- * case, each character would expand into a 2-character escape
- * sequence.
- */
- if ( maxbuf < ((2*len)+10) ){
- if ( buf ){
- free( buf );
- }
- buf = xmalloc( maxbuf=((2*len)+10) );
- }
-
- /* Attention, NINDY!
- */
- serial_write (nindy_serial, "\020", 1);
-
-
- lenlo = len & 0xff;
- lenhi = (len>>8) & 0xff;
- checksum = lenlo + lenhi;
- p = buf;
-
- PUTBUF( lenlo, p );
- PUTBUF( lenhi, p );
-
- for ( i=0; i<len; i++ ){
- PUTBUF( msg[i], p );
- checksum += msg[i];
- }
-
- PUTBUF( checksum, p );
-
- /* Send checksummed message over and over until we get a positive ack
- */
- serial_write (nindy_serial, buf, p - buf);
- while (1){
- if ( !rdnin(&ack,1,5) ){
- /* timed out */
- fprintf(stderr,"ACK timed out; resending\r\n");
- /* Attention, NINDY! */
- serial_write (nindy_serial, "\020", 1);
- serial_write (nindy_serial, buf, p - buf);
- } else if ( ack == '+' ){
- return;
- } else if ( ack == '-' ){
- fprintf( stderr, "Remote NAK; resending\r\n" );
- serial_write (nindy_serial, buf, p - buf);
- } else {
- fprintf( stderr, "Bad ACK, ignored: <%c>\r\n", ack );
- }
- }
-}
-
-
-
-/******************************************************************************
- * send:
- * Send a message to a remote NINDY. Check message status byte
- * for error responses. If no error, return NINDY reponse (if any).
- ******************************************************************************/
-static
-send( out, len, in )
- unsigned char *out; /* Message to be sent to NINDY */
- int len; /* Number of meaningful bytes in out buffer */
- unsigned char *in; /* Where to put response received from NINDY */
-{
- char *fmt;
- int status;
- static char *errmsg[] = {
- "", /* 0 */
- "Buffer overflow", /* 1 */
- "Unknown command", /* 2 */
- "Wrong amount of data to load register(s)", /* 3 */
- "Missing command argument(s)", /* 4 */
- "Odd number of digits sent to load memory", /* 5 */
- "Unknown register name", /* 6 */
- "No such memory segment", /* 7 */
- "No breakpoint available", /* 8 */
- "Can't set requested baud rate", /* 9 */
- };
-# define NUMERRS ( sizeof(errmsg) / sizeof(errmsg[0]) )
-
- static char err1[] = "Unknown error response from NINDY: #%d\r\n";
- static char err2[] = "Error response #%d from NINDY: %s\r\n";
-
- while (1){
- putpkt(out,len);
- status = getpkt(in);
- if ( status == TIMEOUT ){
- fprintf( stderr, "Response timed out; resending\r\n" );
- } else {
- break;
- }
- }
-
- if ( status ){
- fmt = status > NUMERRS ? err1 : err2;
- fprintf( stderr, fmt, status, errmsg[status] );
- abort();
- }
-}
-
- /************************
- * *
- * BAUD RATE ROUTINES *
- * *
- ************************/
-
-/* Table of baudrates known to be acceptable to NINDY. Each baud rate
- * appears both as character string and as a Unix baud rate constant.
- */
-struct baudrate {
- char *string;
- int rate;
-};
-
-static struct baudrate baudtab[] = {
- "1200", 1200,
- "2400", 2400,
- "4800", 4800,
- "9600", 9600,
- "19200", 19200,
- "38400", 38400,
- NULL, 0 /* End of table */
-};
-
-/******************************************************************************
- * parse_baudrate:
- * Look up the passed baud rate in the baudrate table. If found, change
- * our internal record of the current baud rate, but don't do anything
- * about the tty just now.
- *
- * Return pointer to baudrate structure on success, NULL on failure.
- ******************************************************************************/
-static
-struct baudrate *
-parse_baudrate(s)
- char *s; /* Desired baud rate, as an ASCII (decimal) string */
-{
- int i;
-
- for ( i=0; baudtab[i].string != NULL; i++ ){
- if ( !strcmp(baudtab[i].string,s) ){
- return &baudtab[i];
- }
- }
- return NULL;
-}
-
-/******************************************************************************
- * try_baudrate:
- * Try speaking to NINDY via the specified file descriptor at the
- * specified baudrate. Assume success if we can send an empty command
- * with a bogus checksum and receive a NAK (response of '-') back within
- * one second.
- *
- * Return 1 on success, 0 on failure.
- ***************************************************************************/
-
-static int
-try_baudrate (serial, brp)
- struct serial *serial;
- struct baudrate *brp;
-{
- unsigned char c;
-
- /* Set specified baud rate and flush all pending input */
- serial_setbaudrate (serial, brp->rate);
- tty_flush (serial);
-
- /* Send empty command with bad checksum, hope for NAK ('-') response */
- serial_write (serial, "\020\0\0\001", 4);
-
- /* Anything but a quick '-', including error, eof, or timeout, means that
- this baudrate doesn't work. */
- return serial_readchar (serial, 1) == '-';
-}
-
-/******************************************************************************
- * autobaud:
- * Get NINDY talking over the specified file descriptor at the specified
- * baud rate. First see if NINDY's already talking at 'baudrate'. If
- * not, run through all the legal baudrates in 'baudtab' until one works,
- * and then tell NINDY to talk at 'baudrate' instead.
- ******************************************************************************/
-static
-autobaud( serial, brp )
- struct serial *serial;
- struct baudrate *brp;
-{
- int i;
- int failures;
-
- say("NINDY at wrong baud rate? Trying to autobaud...\n");
- failures = i = 0;
- while (1)
- {
- say( "\r%s... ", baudtab[i].string );
- if (try_baudrate(serial, &baudtab[i]))
- {
- break;
- }
- if (baudtab[++i].string == NULL)
- {
- /* End of table -- wraparound */
- i = 0;
- if ( failures++ )
- {
- say("\nAutobaud failed again. Giving up.\n");
- exit(1);
- }
- else
- {
- say("\nAutobaud failed. Trying again...\n");
- }
- }
- }
-
- /* Found NINDY's current baud rate; now change it. */
- say("Changing NINDY baudrate to %s\n", brp->string);
- ninBaud (brp->string);
-
- /* Change our baud rate back to rate to which we just set NINDY. */
- serial_setbaudrate (serial, brp->rate);
-}
-
- /**********************************
- * *
- * NINDY INTERFACE ROUTINES *
- * *
- * ninConnect *MUST* be the first *
- * one of these routines called. *
- **********************************/
-
-
-/******************************************************************************
- * ninBaud:
- * Ask NINDY to change the baud rate on its serial port.
- * Assumes we know the baud rate at which NINDY's currently talking.
- ******************************************************************************/
-ninBaud( baudrate )
- char *baudrate; /* Desired baud rate, as a string of ASCII decimal
- * digits.
- */
-{
- unsigned char msg[100];
-
- tty_flush (nindy_serial);
-
- if (old_nindy)
- {
- char *p; /* Pointer into buffer */
- unsigned char csum; /* Calculated checksum */
-
- /* Can't use putpkt() because after the baudrate change NINDY's
- ack/nak will look like gibberish. */
-
- for (p=baudrate, csum=020+'z'; *p; p++)
- {
- csum += *p;
- }
- sprintf (msg, "\020z%s#%02x", baudrate, csum);
- serial_write (nindy_serial, msg, strlen (msg));
- }
- else
- {
- /* Can't use "send" because NINDY reply will be unreadable after
- baud rate change. */
- sprintf( msg, "z%s", baudrate );
- putpkt( msg, strlen(msg)+1 ); /* "+1" to send terminator too */
- }
-}
-
-/******************************************************************************
- * ninBptDel:
- * Ask NINDY to delete the specified type of *hardware* breakpoint at
- * the specified address. If the 'addr' is -1, all breakpoints of
- * the specified type are deleted.
- ***************************************************************************/
-ninBptDel( addr, type )
- long addr; /* Address in 960 memory */
- char type; /* 'd' => data bkpt, 'i' => instruction breakpoint */
-{
- unsigned char buf[10];
-
- if ( old_nindy ){
- OninBptDel( addr, type == 'd' ? 1 : 0 );
- return;
- }
-
- buf[0] = 'b';
- buf[1] = type;
-
- if ( addr == -1 ){
- send( buf, 2, NULL );
- } else {
- store_unsigned_integer (&buf[2], 4, addr);
- send( buf, 6, NULL );
- }
-}
-
-
-/******************************************************************************
- * ninBptSet:
- * Ask NINDY to set the specified type of *hardware* breakpoint at
- * the specified address.
- ******************************************************************************/
-ninBptSet( addr, type )
- long addr; /* Address in 960 memory */
- char type; /* 'd' => data bkpt, 'i' => instruction breakpoint */
-{
- unsigned char buf[10];
-
- if ( old_nindy ){
- OninBptSet( addr, type == 'd' ? 1 : 0 );
- return;
- }
-
-
- buf[0] = 'B';
- buf[1] = type;
- store_unsigned_integer (&buf[2], 4, addr);
- send( buf, 6, NULL );
-}
-
-
-/******************************************************************************
- * ninConnect:
- * Open the specified tty. Get communications working at the specified
- * baud rate. Flush any pending I/O on the tty.
- *
- * Return the file descriptor, or -1 on failure.
- ******************************************************************************/
-int
-ninConnect( name, baudrate, brk, silent, old_protocol )
- char *name; /* "/dev/ttyXX" to be opened */
- char *baudrate;/* baud rate: a string of ascii decimal digits (eg,"9600")*/
- int brk; /* 1 => send break to tty first thing after opening it*/
- int silent; /* 1 => stifle unnecessary messages when talking to
- * this tty.
- */
- int old_protocol;
-{
- int i;
- char *p;
- struct baudrate *brp;
-
- /* We will try each of the following paths when trying to open the tty
- */
- static char *prefix[] = { "", "/dev/", "/dev/tty", NULL };
-
- if ( old_protocol ){
- old_nindy = 1;
- }
-
- quiet = silent; /* Make global to this file */
-
- for ( i=0; prefix[i] != NULL; i++ ){
- p = xmalloc(strlen(prefix[i]) + strlen(name) + 1 );
- strcpy( p, prefix[i] );
- strcat( p, name );
- nindy_serial = serial_open (p);
- if (nindy_serial != NULL) {
-#ifdef TIOCEXCL
- /* Exclusive use mode (hp9000 does not support it) */
- ioctl(nindy_serial->fd,TIOCEXCL,NULL);
-#endif
- serial_raw (nindy_serial);
-
- if (brk)
- {
- serial_send_break (nindy_serial);
- }
-
- brp = parse_baudrate( baudrate );
- if ( brp == NULL ){
- say("Illegal baudrate %s ignored; using 9600\n",
- baudrate);
- brp = parse_baudrate( "9600" );
- }
-
- if ( !try_baudrate(nindy_serial, brp) ){
- autobaud(nindy_serial, brp);
- }
- tty_flush (nindy_serial);
- say( "Connected to %s\n", p );
- free(p);
- break;
- }
- free(p);
- }
- return 0;
-}
-
-#if 0
-
-/* Currently unused; shouldn't we be doing this on target_kill and
-perhaps target_mourn? FIXME. */
-
-/******************************************************************************
- * ninGdbExit:
- * Ask NINDY to leave GDB mode and print a NINDY prompt.
- ****************************************************************************/
-ninGdbExit()
-{
- if ( old_nindy ){
- OninGdbExit();
- return;
- }
- putpkt((unsigned char *) "E", 1 );
-}
-#endif
-
-/******************************************************************************
- * ninGo:
- * Ask NINDY to start or continue execution of an application program
- * in it's memory at the current ip.
- ******************************************************************************/
-ninGo( step_flag )
- int step_flag; /* 1 => run in single-step mode */
-{
- if ( old_nindy ){
- OninGo( step_flag );
- return;
- }
- putpkt((unsigned char *) (step_flag ? "s" : "c"), 1 );
-}
-
-
-/******************************************************************************
- * ninMemGet:
- * Read a string of bytes from NINDY's address space (960 memory).
- ******************************************************************************/
-int
-ninMemGet(ninaddr, hostaddr, len)
- long ninaddr; /* Source address, in the 960 memory space */
- unsigned char *hostaddr; /* Destination address, in our memory space */
- int len; /* Number of bytes to read */
-{
- unsigned char buf[BUFSIZE+20];
- int cnt; /* Number of bytes in next transfer */
- int origlen = len;
-
- if ( old_nindy ){
- OninMemGet(ninaddr, hostaddr, len);
- return;
- }
-
- for ( ; len > 0; len -= BUFSIZE ){
- cnt = len > BUFSIZE ? BUFSIZE : len;
-
- buf[0] = 'm';
- store_unsigned_integer (&buf[1], 4, ninaddr);
- buf[5] = cnt & 0xff;
- buf[6] = (cnt>>8) & 0xff;
-
- send( buf, 7, hostaddr );
-
- ninaddr += cnt;
- hostaddr += cnt;
- }
- return origlen;
-}
-
-
-/******************************************************************************
- * ninMemPut:
- * Write a string of bytes into NINDY's address space (960 memory).
- ******************************************************************************/
-int
-ninMemPut( ninaddr, hostaddr, len )
- long ninaddr; /* Destination address, in NINDY memory space */
- unsigned char *hostaddr; /* Source address, in our memory space */
- int len; /* Number of bytes to write */
-{
- unsigned char buf[BUFSIZE+20];
- int cnt; /* Number of bytes in next transfer */
- int origlen = len;
-
- if ( old_nindy ){
- OninMemPut( ninaddr, hostaddr, len );
- return;
- }
- for ( ; len > 0; len -= BUFSIZE ){
- cnt = len > BUFSIZE ? BUFSIZE : len;
-
- buf[0] = 'M';
- store_unsigned_integer (&buf[1], 4, ninaddr);
- memcpy(buf + 5, hostaddr, cnt);
- send( buf, cnt+5, NULL );
-
- ninaddr += cnt;
- hostaddr += cnt;
- }
- return origlen;
-}
-
-/******************************************************************************
- * ninRegGet:
- * Retrieve the contents of a 960 register, and return them as a long
- * in host byte order.
- *
- * THIS ROUTINE CAN ONLY BE USED TO READ THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-long
-ninRegGet( regname )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
-{
- unsigned char outbuf[10];
- unsigned char inbuf[20];
-
- if ( old_nindy ){
- return OninRegGet( regname );
- }
-
- sprintf( outbuf, "u%s:", regname );
- send( outbuf, strlen(outbuf), inbuf );
- return extract_unsigned_integer (inbuf, 4);
-}
-
-/******************************************************************************
- * ninRegPut:
- * Set the contents of a 960 register.
- *
- * THIS ROUTINE CAN ONLY BE USED TO SET THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-ninRegPut( regname, val )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
- long val; /* New contents of register, in host byte-order */
-{
- unsigned char buf[20];
- int len;
-
- if ( old_nindy ){
- OninRegPut( regname, val );
- return;
- }
-
- sprintf( buf, "U%s:", regname );
- len = strlen(buf);
- store_unsigned_integer (&buf[len], 4, val);
- send( buf, len+4, NULL );
-}
-
-/******************************************************************************
- * ninRegsGet:
- * Get a dump of the contents of the entire 960 register set. The
- * individual registers appear in the dump in the following order:
- *
- * pfp sp rip r3 r4 r5 r6 r7
- * r8 r9 r10 r11 r12 r13 r14 r15
- * g0 g1 g2 g3 g4 g5 g6 g7
- * g8 g9 g10 g11 g12 g13 g14 fp
- * pc ac ip tc fp0 fp1 fp2 fp3
- *
- * Each individual register comprises exactly 4 bytes, except for
- * fp0-fp3, which are 8 bytes. All register values are in 960
- * (little-endian) byte order.
- *
- ******************************************************************************/
-ninRegsGet( regp )
- unsigned char *regp; /* Where to place the register dump */
-{
- if ( old_nindy ){
- OninRegsGet( regp );
- return;
- }
- send( (unsigned char *) "r", 1, regp );
-}
-
-
-/******************************************************************************
- * ninRegsPut:
- * Initialize the entire 960 register set to a specified set of values.
- * The format of the register value data should be the same as that
- * returned by ninRegsGet.
- *
- * WARNING:
- * All register values must be in 960 (little-endian) byte order.
- *
- ******************************************************************************/
-ninRegsPut( regp )
- char *regp; /* Pointer to desired values of registers */
-{
-/* Number of bytes that we send to nindy. I believe this is defined by
- the protocol (it does not agree with REGISTER_BYTES). */
-#define NINDY_REGISTER_BYTES ((36*4) + (4*8))
- unsigned char buf[NINDY_REGISTER_BYTES+10];
-
- if ( old_nindy ){
- OninRegsPut( regp );
- return;
- }
-
- buf[0] = 'R';
- memcpy(buf+1, regp, NINDY_REGISTER_BYTES );
- send( buf, NINDY_REGISTER_BYTES+1, NULL );
-}
-
-
-/******************************************************************************
- * ninReset:
- * Ask NINDY to perform a soft reset; wait for the reset to complete.
- *
- ******************************************************************************/
-ninReset()
-{
- unsigned char ack;
-
- if ( old_nindy ){
- OninReset();
- return;
- }
-
- while (1){
- putpkt((unsigned char *) "X", 1 );
- while (1){
- if ( !rdnin(&ack,1,5) ){
- /* Timed out */
- break; /* Resend */
- }
- if ( ack == '+' ){
- return;
- }
- }
- }
-}
-
-
-/******************************************************************************
- * ninSrq:
- * Assume NINDY has stopped execution of the 960 application program in
- * order to process a host service request (srq). Ask NINDY for the
- * srq arguments, perform the requested service, and send an "srq
- * complete" message so NINDY will return control to the application.
- *
- ******************************************************************************/
-ninSrq()
-{
- /* FIXME: Imposes arbitrary limits on lengths of pathnames and such. */
- unsigned char buf[BUFSIZE];
- int retcode;
- unsigned char srqnum;
- int i;
- int offset;
- int arg[MAX_SRQ_ARGS];
-
- if ( old_nindy ){
- OninSrq();
- return;
- }
-
-
- /* Get srq number and arguments
- */
- send((unsigned char *) "!", 1, buf );
-
- srqnum = buf[0];
- for ( i=0, offset=1; i < MAX_SRQ_ARGS; i++, offset+=4 ){
- arg[i] = extract_unsigned_integer (&buf[offset], 4);
- }
-
- /* Process Srq
- */
- switch( srqnum ){
- case BS_CLOSE:
- /* args: file descriptor */
- if ( arg[0] > 2 ){
- retcode = close( arg[0] );
- } else {
- retcode = 0;
- }
- break;
- case BS_CREAT:
- /* args: filename, mode */
- ninStrGet( arg[0], buf );
- retcode = creat(buf,arg[1]);
- break;
- case BS_OPEN:
- /* args: filename, flags, mode */
- ninStrGet( arg[0], buf );
- retcode = open(buf,arg[1],arg[2]);
- break;
- case BS_READ:
- /* args: file descriptor, buffer, count */
- retcode = read(arg[0],buf,arg[2]);
- if ( retcode > 0 ){
- ninMemPut( arg[1], buf, retcode );
- }
- break;
- case BS_SEEK:
- /* args: file descriptor, offset, whence */
- retcode = lseek(arg[0],arg[1],arg[2]);
- break;
- case BS_WRITE:
- /* args: file descriptor, buffer, count */
- ninMemGet( arg[1], buf, arg[2] );
- retcode = write(arg[0],buf,arg[2]);
- break;
- default:
- retcode = -1;
- break;
- }
-
- /* Send request termination status to NINDY
- */
- buf[0] = 'e';
- store_unsigned_integer (&buf[1], 4, retcode);
- send( buf, 5, NULL );
-}
-
-
-/******************************************************************************
- * ninStopWhy:
- * Assume the application program has stopped (i.e., a DLE was received
- * from NINDY). Ask NINDY for status information describing the
- * reason for the halt.
- *
- * Returns a non-zero value if the user program has exited, 0 otherwise.
- * Also returns the following information, through passed pointers:
- * - why: an exit code if program the exited; otherwise the reason
- * why the program halted (see stop.h for values).
- * - contents of register ip (little-endian byte order)
- * - contents of register sp (little-endian byte order)
- * - contents of register fp (little-endian byte order)
- ******************************************************************************/
-char
-ninStopWhy( whyp, ipp, fpp, spp )
- unsigned char *whyp; /* Return the 'why' code through this pointer */
- long *ipp; /* Return contents of register ip through this pointer */
- long *fpp; /* Return contents of register fp through this pointer */
- long *spp; /* Return contents of register sp through this pointer */
-{
- unsigned char buf[30];
- extern char OninStopWhy ();
-
- if ( old_nindy ){
- return OninStopWhy( whyp, ipp, fpp, spp );
- }
- send((unsigned char *) "?", 1, buf );
-
- *whyp = buf[1];
- memcpy ((char *)ipp, &buf[2], sizeof (*ipp));
- memcpy ((char *)fpp, &buf[6], sizeof (*ipp));
- memcpy ((char *)spp, &buf[10], sizeof (*ipp));
- return buf[0];
-}
-
-/******************************************************************************
- * ninStrGet:
- * Read a '\0'-terminated string of data out of the 960 memory space.
- *
- ******************************************************************************/
-static
-ninStrGet( ninaddr, hostaddr )
- unsigned long ninaddr; /* Address of string in NINDY memory space */
- unsigned char *hostaddr; /* Address of the buffer to which string should
- * be copied.
- */
-{
- unsigned char cmd[5];
-
- cmd[0] = '"';
- store_unsigned_integer (&cmd[1], 4, ninaddr);
- send( cmd, 5, hostaddr );
-}
-
-#if 0
-/* Not used. */
-
-/******************************************************************************
- * ninVersion:
- * Ask NINDY for version information about itself.
- * The information is sent as an ascii string in the form "x.xx,<arch>",
- * where,
- * x.xx is the version number
- * <arch> is the processor architecture: "KA", "KB", "MC", "CA" *
- *
- ******************************************************************************/
-int
-ninVersion( p )
- unsigned char *p; /* Where to place version string */
-{
-
- if ( old_nindy ){
- return OninVersion( p );
- }
- send((unsigned char *) "v", 1, p );
- return strlen(p);
-}
-#endif /* 0 */
diff --git a/gdb/nindy-share/stop.h b/gdb/nindy-share/stop.h
deleted file mode 100644
index 82a90a54840..00000000000
--- a/gdb/nindy-share/stop.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/******************************************************************
- Copyright 1990, 1992 Free Software Foundation, Inc.
-
- This code was donated by Intel Corp.
-
- Intel hereby grants you permission to copy, modify, and
- distribute this software and its documentation. Intel grants
- this permission provided that the above copyright notice
- appears in all copies and that both the copyright notice and
- this permission notice appear in supporting documentation. In
- addition, Intel grants this permission provided that you
- prominently mark as not part of the original any modifications
- made to this software or documentation, and that the name of
- Intel Corporation not be used in advertising or publicity
- pertaining to distribution of the software or the documentation
- without specific, written prior permission.
-
- Intel Corporation does not warrant, guarantee or make any
- representations regarding the use of, or the results of the use
- of, the software and documentation in terms of correctness,
- accuracy, reliability, currentness, or otherwise; and you rely
- on the software, documentation and results solely at your own
- risk. */
-/******************************************************************/
-
-
-/******************************************************************
- *
- * REASONS WHY NINDY CAN STOP EXECUTING AN APPLICATION PROGRAM
- *
- * When NINDY stops executing an application program that was running
- * under remote host ("gdb") control, it signals the host by sending
- * a single ^P. The host can then query as to the reason for the halt.
- * NINDY responds with two bytes of information.
- *
- * The first byte is a boolean flag that indicates whether or not
- * the application has exited.
- *
- * If the flag is true, the second byte contains the exit code.
- *
- * If the flag is false, the second byte contains a "reason for
- * stopping" code. This file defines the possible values of that
- * code.
- *
- * There are three categories of reasons why the halt may have occurred:
- * faults, traces, and software interactions. The first two categories
- * are processor-dependent; the values of these codes are tightly coupled
- * to the hardware and should not be changed without first examining
- * src/nindy/common/fault.c. The software interactions involve
- * communication between NINDY and the host debugger; their codes are
- * arbitrary.
- *
- ******************************************************************/
-
-#define FAULT_PARALLEL 0x00
-#define FAULT_UNKNOWN 0x01
-#define FAULT_OPERATION 0x02
-#define FAULT_ARITH 0x03
-#define FAULT_FP 0x04
-#define FAULT_CONSTR 0x05
-#define FAULT_VM 0x06
-#define FAULT_PROTECT 0x07
-#define FAULT_MACHINE 0x08
-#define FAULT_STRUCT 0x09
-#define FAULT_TYPE 0x0a
- /* 0x0b reserved */
-#define FAULT_PROCESS 0x0c
-#define FAULT_DESC 0x0d
-#define FAULT_EVENT 0x0e
- /* 0x0f reserved */
-
-#define LAST_FAULT 0x0f
-
-#define TRACE_STEP 0x10
-#define TRACE_BRANCH 0x11
-#define TRACE_CALL 0x12
-#define TRACE_RET 0x13
-#define TRACE_PRERET 0x14
-#define TRACE_SVC 0x15
-#define TRACE_BKPT 0x16
-
-#define STOP_SRQ 0xfe
- /* Application program has service request to make of host */
-
-#define STOP_GDB_BPT 0xff
- /* Application program has reached breakpoint (fmark) set by host */
diff --git a/gdb/nindy-share/ttyflush.c b/gdb/nindy-share/ttyflush.c
deleted file mode 100644
index f9aaa2edf4f..00000000000
--- a/gdb/nindy-share/ttyflush.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This started out life as code shared between the nindy monitor and
- GDB. For various reasons, this is no longer true. Eventually, it
- probably should be merged into remote-nindy.c. */
-
-#include <stdio.h>
-#include "defs.h"
-#include "serial.h"
-
-/* Flush all pending input and output for SERIAL, wait for a second, and
- then if there is a character pending, discard it and flush again. */
-
-int
-tty_flush (serial)
- struct serial *serial;
-{
- while (1)
- {
- serial_flush_input (serial);
- serial_flush_output (serial);
- sleep(1);
- switch (serial_readchar (serial, 0))
- {
- case SERIAL_TIMEOUT:
- case SERIAL_ERROR:
- case SERIAL_EOF:
- return 0;
- default:
- /* We read something. Eeek. Try again. */
- break;
- }
- }
-}
diff --git a/gdb/nindy-tdep.c b/gdb/nindy-tdep.c
deleted file mode 100644
index 8e058c97c86..00000000000
--- a/gdb/nindy-tdep.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Target-machine dependent code for the NINDY monitor running on the Intel 960
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 2000
- Free Software Foundation, Inc.
- Contributed by Intel 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. */
-
-/* Miscellaneous NINDY-dependent routines.
- Some replace macros normally defined in "tm.h". */
-
-#include "defs.h"
-#include "symtab.h"
-#include "frame.h"
-#include "gdbcore.h"
-
-/* 'start_frame' is a variable in the NINDY runtime startup routine
- that contains the frame pointer of the 'start' routine (the routine
- that calls 'main'). By reading its contents out of remote memory,
- we can tell where the frame chain ends: backtraces should halt before
- they display this frame. */
-
-int
-nindy_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
-{
- struct symbol *sym;
- struct minimal_symbol *msymbol;
-
- /* crtnindy.o is an assembler module that is assumed to be linked
- * first in an i80960 executable. It contains the true entry point;
- * it performs startup up initialization and then calls 'main'.
- *
- * 'sf' is the name of a variable in crtnindy.o that is set
- * during startup to the address of the first frame.
- *
- * 'a' is the address of that variable in 80960 memory.
- */
- static char sf[] = "start_frame";
- CORE_ADDR a;
-
-
- chain &= ~0x3f; /* Zero low 6 bits because previous frame pointers
- contain return status info in them. */
- if (chain == 0)
- {
- return 0;
- }
-
- sym = lookup_symbol_linkage (sf);
- if (sym != 0)
- {
- a = SYMBOL_VALUE (sym);
- }
- else
- {
- msymbol = lookup_minimal_symbol (sf, NULL, NULL);
- if (msymbol == NULL)
- return 0;
- a = SYMBOL_VALUE_ADDRESS (msymbol);
- }
-
- return (chain != read_memory_integer (a, 4));
-}
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 6e51b83216a..fe5ebdf0732 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -1,6 +1,6 @@
/* Target dependent code for the NS32000, for GDB.
Copyright 1986, 1988, 1991, 1992, 1994, 1995, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,8 +26,8 @@
#include "inferior.h"
#include "regcache.h"
#include "target.h"
-
#include "arch-utils.h"
+#include "osabi.h"
#include "ns32k-tdep.h"
#include "gdb_string.h"
@@ -186,7 +186,7 @@ umax_frame_num_args (struct frame_info *fi)
int width;
numargs = -1;
- enter_addr = ns32k_get_enter_addr ((fi)->pc);
+ enter_addr = ns32k_get_enter_addr (get_frame_pc (fi));
if (enter_addr > 0)
{
pc = ((enter_addr == 1)
@@ -308,10 +308,10 @@ ns32k_frame_chain (struct frame_info *frame)
FP value, and that address is saved at the previous FP value as a
4-byte word. */
- if (inside_entry_file (frame->pc))
+ if (inside_entry_file (get_frame_pc (frame)))
return 0;
- return (read_memory_integer (frame->frame, 4));
+ return (read_memory_integer (get_frame_base (frame), 4));
}
@@ -325,9 +325,9 @@ ns32k_sigtramp_saved_pc (struct frame_info *frame)
buf = alloca (ptrbytes);
/* Get sigcontext address, it is the third parameter on the stack. */
- if (frame->next)
+ if (get_next_frame (frame))
sigcontext_addr = read_memory_typed_address
- (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
+ (FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
builtin_type_void_data_ptr);
else
sigcontext_addr = read_memory_typed_address
@@ -345,14 +345,14 @@ ns32k_frame_saved_pc (struct frame_info *frame)
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
return (ns32k_sigtramp_saved_pc (frame)); /* XXXJRT */
- return (read_memory_integer (frame->frame + 4, 4));
+ return (read_memory_integer (get_frame_base (frame) + 4, 4));
}
static CORE_ADDR
ns32k_frame_args_address (struct frame_info *frame)
{
- if (ns32k_get_enter_addr (frame->pc) > 1)
- return (frame->frame);
+ if (ns32k_get_enter_addr (get_frame_pc (frame)) > 1)
+ return (get_frame_base (frame));
return (read_register (SP_REGNUM) - 4);
}
@@ -360,7 +360,7 @@ ns32k_frame_args_address (struct frame_info *frame)
static CORE_ADDR
ns32k_frame_locals_address (struct frame_info *frame)
{
- return (frame->frame);
+ return (get_frame_base (frame));
}
/* Code to initialize the addresses of the saved registers of frame described
@@ -375,33 +375,33 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
int localcount;
CORE_ADDR enter_addr, next_addr;
- if (frame->saved_regs)
+ if (get_frame_saved_regs (frame))
return;
frame_saved_regs_zalloc (frame);
- enter_addr = ns32k_get_enter_addr (frame->pc);
+ enter_addr = ns32k_get_enter_addr (get_frame_pc (frame));
if (enter_addr > 1)
{
regmask = read_memory_integer (enter_addr + 1, 1) & 0xff;
localcount = ns32k_localcount (enter_addr);
- next_addr = frame->frame + localcount;
+ next_addr = get_frame_base (frame) + localcount;
for (regnum = 0; regnum < 8; regnum++)
{
if (regmask & (1 << regnum))
- frame->saved_regs[regnum] = next_addr -= 4;
+ get_frame_saved_regs (frame)[regnum] = next_addr -= 4;
}
- frame->saved_regs[SP_REGNUM] = frame->frame + 4;
- frame->saved_regs[PC_REGNUM] = frame->frame + 4;
- frame->saved_regs[FP_REGNUM] = read_memory_integer (frame->frame, 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)[FP_REGNUM] = read_memory_integer (get_frame_base (frame), 4);
}
else if (enter_addr == 1)
{
CORE_ADDR sp = read_register (SP_REGNUM);
- frame->saved_regs[PC_REGNUM] = sp;
- frame->saved_regs[SP_REGNUM] = sp + 4;
+ get_frame_saved_regs (frame)[PC_REGNUM] = sp;
+ get_frame_saved_regs (frame)[SP_REGNUM] = sp + 4;
}
}
@@ -428,13 +428,13 @@ ns32k_pop_frame (void)
CORE_ADDR fp;
int regnum;
- fp = frame->frame;
+ fp = get_frame_base (frame);
FRAME_INIT_SAVED_REGS (frame);
for (regnum = 0; regnum < 8; regnum++)
- if (frame->saved_regs[regnum])
+ if (get_frame_saved_regs (frame)[regnum])
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum], 4));
+ read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
write_register (FP_REGNUM, read_memory_integer (fp, 4));
write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -536,36 +536,19 @@ ns32k_gdbarch_init_32382 (struct gdbarch *gdbarch)
static struct gdbarch *
ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
- /* Try to determine the OS ABI of the object we are loading. */
- if (info.abfd != NULL)
- {
- osabi = gdbarch_lookup_osabi (info.abfd);
- }
+ /* If there is already a candidate, use it. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return arches->gdbarch;
- /* Find a candidate among extant architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the OS ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- return arches->gdbarch;
- }
-
- tdep = xmalloc (sizeof (struct gdbarch_tdep));
- gdbarch = gdbarch_alloc (&info, tdep);
+ 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);
- tdep->osabi = osabi;
-
/* Register info */
ns32k_gdbarch_init_32082 (gdbarch);
set_gdbarch_num_regs (gdbarch, NS32K_SP_REGNUM);
@@ -590,7 +573,6 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
generic_frameless_function_invocation_not);
set_gdbarch_frame_chain (gdbarch, ns32k_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
@@ -631,27 +613,15 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* Hook in OS ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return (gdbarch);
}
-static void
-ns32k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep == NULL)
- return;
-
- fprintf_unfiltered (file, "ns32k_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
-}
-
void
_initialize_ns32k_tdep (void)
{
- gdbarch_register (bfd_arch_ns32k, ns32k_gdbarch_init, ns32k_dump_tdep);
+ gdbarch_register (bfd_arch_ns32k, ns32k_gdbarch_init, NULL);
tm_print_insn = print_insn_ns32k;
}
diff --git a/gdb/ns32k-tdep.h b/gdb/ns32k-tdep.h
index c0463247f47..c2dc71aab2e 100644
--- a/gdb/ns32k-tdep.h
+++ b/gdb/ns32k-tdep.h
@@ -1,5 +1,5 @@
/* Target-dependent definitions for GDB on NS32000 systems.
- Copyright 1987, 1989, 1991, 1993, 1994, 1998, 1999, 2000, 2001, 2002
+ Copyright 1987, 1989, 1991, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,8 +22,6 @@
#ifndef NS32K_TDEP_H
#define NS32K_TDEP_H
-#include "osabi.h"
-
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
@@ -55,11 +53,6 @@
#define NS32K_MAX_REGISTER_RAW_SIZE 8
#define NS32K_MAX_REGISTER_VIRTUAL_SIZE 8
-struct gdbarch_tdep
-{
- enum gdb_osabi osabi;
-};
-
void ns32k_gdbarch_init_32082 (struct gdbarch *);
void ns32k_gdbarch_init_32382 (struct gdbarch *);
diff --git a/gdb/ns32knbsd-tdep.c b/gdb/ns32knbsd-tdep.c
index ad360c8ee6b..33b99d98094 100644
--- a/gdb/ns32knbsd-tdep.c
+++ b/gdb/ns32knbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for NS32000 systems running NetBSD.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "osabi.h"
#include "ns32k-tdep.h"
#include "gdb_string.h"
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index d9e75a35cb5..5b70b654c70 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -846,7 +846,7 @@ array_mod: '[' ']'
func_mod: '(' ')'
{ $$ = 0; }
| '(' nonempty_typelist ')'
- { free ((PTR)$2); $$ = 0; }
+ { free ($2); $$ = 0; }
;
/* We used to try to recognize more pointer to member types here, but
@@ -1026,9 +1026,9 @@ parse_number (p, len, parsed_float, putithere)
/* It's a float since it contains a point or an exponent. */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- sscanf (p, "%g", &putithere->typed_val_float.dval);
+ sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- sscanf (p, "%lg", &putithere->typed_val_float.dval);
+ sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
else
{
#ifdef PRINTF_HAS_LONG_DOUBLE
@@ -1281,6 +1281,7 @@ yylex ()
return tokentab2[i].token;
}
+ c = 0;
switch (tokchr = *tokstart)
{
case 0:
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index f6890b03bd3..35176974512 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -152,8 +152,7 @@ lookup_objc_class (char *classname)
function = find_function_in_inferior("objc_lookup_class");
else
{
- complaint (&symfile_complaints, "no way to lookup Objective-C classes",
- 0);
+ complaint (&symfile_complaints, "no way to lookup Objective-C classes");
return 0;
}
@@ -180,8 +179,7 @@ lookup_child_selector (char *selname)
function = find_function_in_inferior("sel_get_any_uid");
else
{
- complaint (&symfile_complaints, "no way to lookup Objective-C selectors",
- 0);
+ complaint (&symfile_complaints, "no way to lookup Objective-C selectors");
return 0;
}
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index d2578d7229e..80ed7901963 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1,7 +1,7 @@
/* GDB routines for manipulating objfiles.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
@@ -40,6 +40,7 @@
#include <fcntl.h>
#include "gdb_obstack.h"
#include "gdb_string.h"
+#include "hashtab.h"
#include "breakpoint.h"
#include "dictionary.h"
@@ -54,11 +55,11 @@ static int open_existing_mapped_file (char *, long, int);
static int open_mapped_file (char *filename, long mtime, int flags);
-static PTR map_to_file (int);
+static void *map_to_file (int);
#endif /* defined(USE_MMALLOC) && defined(HAVE_MMAP) */
-static void add_to_objfile_sections (bfd *, sec_ptr, PTR);
+static void add_to_objfile_sections (bfd *, sec_ptr, void *);
/* Externally visible variables that are owned by this module.
See declarations in objfile.h for more info. */
@@ -84,7 +85,7 @@ 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, PTR objfile_p_char)
+add_to_objfile_sections (bfd *abfd, sec_ptr asect, void *objfile_p_char)
{
struct objfile *objfile = (struct objfile *) objfile_p_char;
struct obj_section section;
@@ -151,6 +152,15 @@ build_objfile_section_table (struct objfile *objfile)
OBJF_SHARED are simply copied through to the new objfile flags
member. */
+/* NOTE: carlton/2003-02-04: This function is called with args NULL, 0
+ by jv-lang.c, to create an artificial objfile used to hold
+ information about dynamically-loaded Java classes. Unfortunately,
+ that branch of this function doesn't get tested very frequently, so
+ it's prone to breakage. (E.g. at one time the name was set to NULL
+ in that situation, which broke a loop over all names in the dynamic
+ library loader.) If you change this function, please try to leave
+ things in a consistent state even if abfd is NULL. */
+
struct objfile *
allocate_objfile (bfd *abfd, int flags)
{
@@ -180,7 +190,7 @@ allocate_objfile (bfd *abfd, int flags)
flags);
if (fd >= 0)
{
- PTR md;
+ void *md;
if ((md = map_to_file (fd)) == NULL)
{
@@ -193,6 +203,11 @@ allocate_objfile (bfd *abfd, int flags)
objfile->md = md;
objfile->mmfd = fd;
/* Update pointers to functions to *our* copies */
+ if (objfile->demangled_names_hash)
+ htab_set_functions_ex
+ (objfile->demangled_names_hash, htab_hash_string,
+ (int (*) (const void *, const void *)) streq, NULL,
+ objfile->md, xmcalloc, xmfree);
obstack_chunkfun (&objfile->psymbol_cache.cache, xmmalloc);
obstack_freefun (&objfile->psymbol_cache.cache, xmfree);
obstack_chunkfun (&objfile->macro_cache.cache, xmmalloc);
@@ -341,6 +356,7 @@ allocate_objfile (bfd *abfd, int flags)
return (objfile);
}
+
/* Create the terminating entry of OBJFILE's minimal symbol table.
If OBJFILE->msymbols is zero, allocate a single entry from
OBJFILE->symbol_obstack; otherwise, just initialize
@@ -366,6 +382,31 @@ terminate_minimal_symbol_table (struct objfile *objfile)
}
}
+
+/* Put one object file before a specified on in the global list.
+ This can be used to make sure an object file is destroyed before
+ another when using ALL_OBJFILES_SAFE to free all objfiles. */
+void
+put_objfile_before (struct objfile *objfile, struct objfile *before_this)
+{
+ struct objfile **objp;
+
+ unlink_objfile (objfile);
+
+ for (objp = &object_files; *objp != NULL; objp = &((*objp)->next))
+ {
+ if (*objp == before_this)
+ {
+ objfile->next = *objp;
+ *objp = objfile;
+ return;
+ }
+ }
+
+ internal_error (__FILE__, __LINE__,
+ "put_objfile_before: before objfile not in list");
+}
+
/* Put OBJFILE at the front of the list. */
void
@@ -438,6 +479,18 @@ unlink_objfile (struct objfile *objfile)
void
free_objfile (struct objfile *objfile)
{
+ if (objfile->separate_debug_objfile)
+ {
+ free_objfile (objfile->separate_debug_objfile);
+ }
+
+ if (objfile->separate_debug_objfile_backlink)
+ {
+ /* We freed the separate debug file, make sure the base objfile
+ doesn't reference it. */
+ objfile->separate_debug_objfile_backlink->separate_debug_objfile = NULL;
+ }
+
/* First do any symbol file specific actions required when we are
finished with a particular symbol file. Note that if the objfile
is using reusable symbol information (via mmalloc) then each of
@@ -519,6 +572,8 @@ free_objfile (struct objfile *objfile)
/* Free the obstacks for non-reusable objfiles */
bcache_xfree (objfile->psymbol_cache);
bcache_xfree (objfile->macro_cache);
+ if (objfile->demangled_names_hash)
+ htab_delete (objfile->demangled_names_hash);
obstack_free (&objfile->psymbol_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
obstack_free (&objfile->type_obstack, 0);
@@ -933,13 +988,13 @@ open_mapped_file (char *filename, long mtime, int flags)
return (fd);
}
-static PTR
+static void *
map_to_file (int fd)
{
- PTR md;
+ void *md;
CORE_ADDR mapto;
- md = mmalloc_attach (fd, (PTR) 0);
+ md = mmalloc_attach (fd, 0);
if (md != NULL)
{
mapto = (CORE_ADDR) mmalloc_getkey (md, 1);
@@ -952,7 +1007,7 @@ map_to_file (int fd)
else if (mapto != (CORE_ADDR) NULL)
{
/* This mapping file needs to be remapped at "mapto" */
- md = mmalloc_attach (fd, (PTR) mapto);
+ md = mmalloc_attach (fd, mapto);
}
else
{
@@ -964,10 +1019,10 @@ map_to_file (int fd)
address selected by mmap, we must truncate it before trying
to do an attach at the address we want. */
ftruncate (fd, 0);
- md = mmalloc_attach (fd, (PTR) mapto);
+ md = mmalloc_attach (fd, mapto);
if (md != NULL)
{
- mmalloc_setkey (md, 1, (PTR) mapto);
+ mmalloc_setkey (md, 1, mapto);
}
}
}
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index a082cb081de..7546623f148 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -1,7 +1,7 @@
/* Definitions for symbol file management in GDB.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,6 +27,7 @@
#include "symfile.h" /* For struct psymbol_allocation_list */
struct bcache;
+struct htab;
/* This structure maintains information on a per-objfile basis about the
"entry point" of the objfile, and the scope within which the entry point
@@ -238,7 +239,8 @@ struct objfile
struct objfile *next;
- /* The object file's name. Malloc'd; free it if you free this struct. */
+ /* The object file's name, tilde-expanded and absolute.
+ Malloc'd; free it if you free this struct. */
char *name;
@@ -285,6 +287,13 @@ struct objfile
struct bcache *psymbol_cache; /* Byte cache for partial syms */
struct bcache *macro_cache; /* Byte cache for macros */
+ /* Hash table for mapping symbol names to demangled names. Each
+ entry in the hash table is actually two consecutive strings,
+ both null-terminated; the first one is a mangled or linkage
+ name, and the second is the demangled name or just a zero byte
+ if the name doesn't demangle. */
+ struct htab *demangled_names_hash;
+
/* Vectors of all partial symbols read in from file. The actual data
is stored in the psymbol_obstack. */
@@ -328,7 +337,7 @@ struct objfile
the memory mapped malloc() package to manage storage for this objfile's
data. NULL if we are not. */
- PTR md;
+ void *md;
/* The file descriptor that was used to obtain the mmalloc descriptor
for this objfile. If we call mmalloc_detach with the malloc descriptor
@@ -359,7 +368,7 @@ struct objfile
typically a pointer to malloc'd memory. The symbol reader's finish
function is responsible for freeing the memory thusly allocated. */
- PTR sym_private;
+ void *sym_private;
/* Hook for target-architecture-specific information. This must
point to memory allocated on one of the obstacks in this objfile,
@@ -414,6 +423,15 @@ struct objfile
ExportEntry *export_list;
int export_list_size;
+ /* Link to objfile that contains the debug symbols for this one.
+ One is loaded if this file has an debug link to an existing
+ debug file with the right checksum */
+ struct objfile *separate_debug_objfile;
+
+ /* If this is a separate debug object, this is used as a link to the
+ actual executable objfile. */
+ struct objfile *separate_debug_objfile_backlink;
+
/* Place to stash various statistics about this objfile */
OBJSTATS;
};
@@ -507,6 +525,8 @@ extern int build_objfile_section_table (struct objfile *);
extern void terminate_minimal_symbol_table (struct objfile *objfile);
+extern void put_objfile_before (struct objfile *, struct objfile *);
+
extern void objfile_to_front (struct objfile *);
extern void unlink_objfile (struct objfile *);
diff --git a/gdb/ocd.c b/gdb/ocd.c
index e735fe01a45..4dfda5d6d4b 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -42,7 +42,7 @@
static int ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-static int ocd_start_remote (PTR dummy);
+static int ocd_start_remote (void *dummy);
static int readchar (int timeout);
@@ -171,7 +171,7 @@ ocd_close (int quitting)
/* Stub for catch_errors. */
static int
-ocd_start_remote (PTR dummy)
+ocd_start_remote (void *dummy)
{
unsigned char buf[10], *p;
int pktlen;
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 47d08a2ebce..5b4531ad669 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -1,5 +1,5 @@
/* OS ABI variant handling for GDB.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,15 +24,32 @@
#include "gdb_string.h"
#include "osabi.h"
+#include "arch-utils.h"
+#include "gdbcmd.h"
+#include "command.h"
#include "elf-bfd.h"
+#ifndef GDB_OSABI_DEFAULT
+#define GDB_OSABI_DEFAULT GDB_OSABI_UNKNOWN
+#endif
+
+/* State for the "set osabi" command. */
+static enum { osabi_auto, osabi_default, osabi_user } user_osabi_state;
+static enum gdb_osabi user_selected_osabi;
+static const char *gdb_osabi_available_names[GDB_OSABI_INVALID + 3] = {
+ "auto",
+ "default",
+ "none",
+ NULL
+};
+static const char *set_osabi_string;
/* This table matches the indices assigned to enum gdb_osabi. Keep
them in sync. */
static const char * const gdb_osabi_names[] =
{
- "<unknown>",
+ "none",
"SVR4",
"GNU/Hurd",
@@ -88,6 +105,7 @@ gdbarch_register_osabi (enum bfd_architecture arch, unsigned long machine,
{
struct gdb_osabi_handler **handler_p;
const struct bfd_arch_info *arch_info = bfd_lookup_arch (arch, machine);
+ const char **name_ptr;
/* Registering an OS ABI handler for "unknown" is not allowed. */
if (osabi == GDB_OSABI_UNKNOWN)
@@ -128,6 +146,16 @@ gdbarch_register_osabi (enum bfd_architecture arch, unsigned long machine,
(*handler_p)->arch_info = arch_info;
(*handler_p)->osabi = osabi;
(*handler_p)->init_osabi = init_osabi;
+
+ /* Add this OS ABI to the list of enum values for "set osabi", if it isn't
+ already there. */
+ for (name_ptr = gdb_osabi_available_names; *name_ptr; name_ptr ++)
+ {
+ if (*name_ptr == gdbarch_osabi_name (osabi))
+ return;
+ }
+ *name_ptr++ = gdbarch_osabi_name (osabi);
+ *name_ptr = NULL;
}
@@ -171,6 +199,20 @@ gdbarch_lookup_osabi (bfd *abfd)
enum gdb_osabi osabi, match;
int match_specific;
+ /* If we aren't in "auto" mode, return the specified OS ABI. */
+ if (user_osabi_state == osabi_user)
+ return user_selected_osabi;
+
+ /* If we don't have a binary, return the default OS ABI (if set) or
+ an inconclusive result (otherwise). */
+ if (abfd == NULL)
+ {
+ if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
+ return GDB_OSABI_DEFAULT;
+ else
+ return GDB_OSABI_UNINITIALIZED;
+ }
+
match = GDB_OSABI_UNKNOWN;
match_specific = 0;
@@ -230,18 +272,22 @@ gdbarch_lookup_osabi (bfd *abfd)
}
}
- return match;
+ /* If we didn't find a match, but a default was specified at configure
+ time, return the default. */
+ if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN && match == GDB_OSABI_UNKNOWN)
+ return GDB_OSABI_DEFAULT;
+ else
+ return match;
}
void
-gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch,
- enum gdb_osabi osabi)
+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 (osabi == GDB_OSABI_UNKNOWN)
+ if (info.osabi == GDB_OSABI_UNKNOWN)
{
/* Don't complain about an unknown OSABI. Assume the user knows
what they are doing. */
@@ -251,7 +297,7 @@ gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch,
for (handler = gdb_osabi_handler_list; handler != NULL;
handler = handler->next)
{
- if (handler->osabi != osabi)
+ if (handler->osabi != info.osabi)
continue;
/* Check whether the machine type and architecture of the
@@ -279,7 +325,7 @@ gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch,
"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 (osabi),
+ gdbarch_osabi_name (info.osabi),
bfd_printable_arch_mach (arch_info->arch, arch_info->mach));
}
@@ -442,10 +488,66 @@ generic_elf_osabi_sniffer (bfd *abfd)
return osabi;
}
+static void
+set_osabi (char *args, int from_tty, struct cmd_list_element *c)
+{
+ struct gdbarch_info info;
+
+ if (strcmp (set_osabi_string, "auto") == 0)
+ user_osabi_state = osabi_auto;
+ else if (strcmp (set_osabi_string, "default") == 0)
+ {
+ user_selected_osabi = GDB_OSABI_DEFAULT;
+ user_osabi_state = osabi_user;
+ }
+ else if (strcmp (set_osabi_string, "none") == 0)
+ {
+ user_selected_osabi = GDB_OSABI_UNKNOWN;
+ user_osabi_state = osabi_user;
+ }
+ else
+ {
+ int i;
+ for (i = 1; i < GDB_OSABI_INVALID; i++)
+ if (strcmp (set_osabi_string, gdbarch_osabi_name (i)) == 0)
+ {
+ user_selected_osabi = i;
+ user_osabi_state = osabi_user;
+ break;
+ }
+ if (i == GDB_OSABI_INVALID)
+ internal_error (__FILE__, __LINE__,
+ "Invalid OS ABI \"%s\" passed to command handler.",
+ set_osabi_string);
+ }
+
+ /* NOTE: At some point (true multiple architectures) we'll need to be more
+ graceful here. */
+ gdbarch_info_init (&info);
+ if (! gdbarch_update_p (info))
+ internal_error (__FILE__, __LINE__, "Updating OS ABI failed.");
+}
void
+show_osabi (char *args, int from_tty)
+{
+ if (user_osabi_state == osabi_auto)
+ printf_filtered ("The current OS ABI is \"auto\" (currently \"%s\").\n",
+ gdbarch_osabi_name (gdbarch_osabi (current_gdbarch)));
+ else
+ printf_filtered ("The current OS ABI is \"%s\".\n",
+ gdbarch_osabi_name (user_selected_osabi));
+
+ if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
+ printf_filtered ("The default OS ABI is \"%s\".\n",
+ gdbarch_osabi_name (GDB_OSABI_DEFAULT));
+}
+
+void
_initialize_gdb_osabi (void)
{
+ struct cmd_list_element *c;
+
if (strcmp (gdb_osabi_names[GDB_OSABI_INVALID], "<invalid>") != 0)
internal_error
(__FILE__, __LINE__,
@@ -455,4 +557,16 @@ _initialize_gdb_osabi (void)
gdbarch_register_osabi_sniffer (bfd_arch_unknown,
bfd_target_elf_flavour,
generic_elf_osabi_sniffer);
+
+ if (!GDB_MULTI_ARCH)
+ return;
+
+ /* Register the "set osabi" command. */
+ c = add_set_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
+ &set_osabi_string, "Set OS ABI of target.", &setlist);
+
+ set_cmd_sfunc (c, set_osabi);
+ add_cmd ("osabi", class_support, show_osabi, "Show OS/ABI of target.",
+ &showlist);
+ user_osabi_state = osabi_auto;
}
diff --git a/gdb/osabi.h b/gdb/osabi.h
index ebff83195bf..d0e33b35882 100644
--- a/gdb/osabi.h
+++ b/gdb/osabi.h
@@ -1,5 +1,5 @@
/* OS ABI variant handling for GDB.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,37 +21,6 @@
#ifndef OSABI_H
#define OSABI_H
-/* List of known OS ABIs. If you change this, make sure to update the
- table in osabi.c. */
-enum gdb_osabi
-{
- GDB_OSABI_UNKNOWN = 0, /* keep this first */
-
- GDB_OSABI_SVR4,
- GDB_OSABI_HURD,
- GDB_OSABI_SOLARIS,
- GDB_OSABI_OSF1,
- GDB_OSABI_LINUX,
- GDB_OSABI_FREEBSD_AOUT,
- GDB_OSABI_FREEBSD_ELF,
- GDB_OSABI_NETBSD_AOUT,
- GDB_OSABI_NETBSD_ELF,
- GDB_OSABI_WINCE,
- GDB_OSABI_GO32,
- GDB_OSABI_NETWARE,
- GDB_OSABI_IRIX,
- GDB_OSABI_LYNXOS,
- GDB_OSABI_INTERIX,
- GDB_OSABI_HPUX_ELF,
- GDB_OSABI_HPUX_SOM,
-
- GDB_OSABI_ARM_EABI_V1,
- GDB_OSABI_ARM_EABI_V2,
- GDB_OSABI_ARM_APCS,
-
- GDB_OSABI_INVALID /* keep this last */
-};
-
/* Register an OS ABI sniffer. Each arch/flavour may have more than
one sniffer. This is used to e.g. differentiate one OS's a.out from
another. The first sniffer to return something other than
@@ -73,8 +42,7 @@ void gdbarch_register_osabi (enum bfd_architecture, unsigned long,
enum gdb_osabi gdbarch_lookup_osabi (bfd *);
/* Initialize the gdbarch for the specified OS ABI variant. */
-void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *,
- enum gdb_osabi);
+void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *);
/* Return the name of the specified OS ABI. */
const char *gdbarch_osabi_name (enum gdb_osabi);
diff --git a/gdb/parse.c b/gdb/parse.c
index 1b69344121b..6c3a8e52915 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -90,8 +90,8 @@ static void free_funcalls (void *ignore);
static void prefixify_expression (struct expression *);
-static void
-prefixify_subexp (struct expression *, struct expression *, int, int);
+static void prefixify_subexp (struct expression *, struct expression *, int,
+ int);
void _initialize_parse (void);
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 8e5c4f7a2e7..4561e4d648d 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1,6 +1,7 @@
/* PPC GNU/Linux native support.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -31,7 +32,7 @@
#include <signal.h>
#include <sys/user.h>
#include <sys/ioctl.h>
-#include <sys/wait.h>
+#include "gdb_wait.h"
#include <fcntl.h>
#include <sys/procfs.h>
#include <sys/ptrace.h>
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 0f6699e5be9..3677d9fb314 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -31,14 +31,20 @@
#include "objfiles.h"
#include "regcache.h"
#include "value.h"
+#include "osabi.h"
#include "solib-svr4.h"
#include "ppc-tdep.h"
-/* The following two instructions are used in the signal trampoline
- code on GNU/Linux PPC. */
-#define INSTR_LI_R0_0x7777 0x38007777
-#define INSTR_SC 0x44000002
+/* The following instructions are used in the signal trampoline code
+ on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and
+ 0x7777 but now uses the sigreturn syscalls. We check for both. */
+#define INSTR_LI_R0_0x6666 0x38006666
+#define INSTR_LI_R0_0x7777 0x38007777
+#define INSTR_LI_R0_NR_sigreturn 0x38000077
+#define INSTR_LI_R0_NR_rt_sigreturn 0x380000AC
+
+#define INSTR_SC 0x44000002
/* Since the *-tdep.c files are platform independent (i.e, they may be
used to build cross platform debuggers), we can't include system
@@ -182,6 +188,21 @@ ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name)
return (pc == handler || pc == handler + 4);
}
+static inline int
+insn_is_sigreturn (unsigned long pcinsn)
+{
+ switch(pcinsn)
+ {
+ case INSTR_LI_R0_0x6666:
+ case INSTR_LI_R0_0x7777:
+ case INSTR_LI_R0_NR_sigreturn:
+ case INSTR_LI_R0_NR_rt_sigreturn:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
/*
* The signal handler trampoline is on the stack and consists of exactly
* two instructions. The easiest and most accurate way of determining
@@ -201,11 +222,11 @@ ppc_linux_at_sigtramp_return_path (CORE_ADDR pc)
pcinsn = extract_unsigned_integer (buf + 4, 4);
return (
- (pcinsn == INSTR_LI_R0_0x7777
+ (insn_is_sigreturn (pcinsn)
&& extract_unsigned_integer (buf + 8, 4) == INSTR_SC)
||
(pcinsn == INSTR_SC
- && extract_unsigned_integer (buf, 4) == INSTR_LI_R0_0x7777));
+ && insn_is_sigreturn (extract_unsigned_integer (buf, 4))));
}
CORE_ADDR
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index 48c5647e5da..cf81eb9c1ea 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -1,5 +1,5 @@
/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2000
+ Copyright 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,8 +22,6 @@
#ifndef PPC_TDEP_H
#define PPC_TDEP_H
-#include "osabi.h"
-
struct frame_info;
struct value;
@@ -56,7 +54,6 @@ int altivec_register_p (int regno);
struct gdbarch_tdep
{
int wordsize; /* size in bytes of fixed-point word */
- enum gdb_osabi osabi; /* OS / ABI from ELF header */
int *regoff; /* byte offsets in register arrays */
const struct reg *regs; /* from current variant */
int ppc_gp0_regnum; /* GPR register 0 */
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index e58bb6a3c5f..21ab858768e 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for PowerPC systems running NetBSD.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -25,6 +25,7 @@
#include "target.h"
#include "breakpoint.h"
#include "value.h"
+#include "osabi.h"
#include "ppc-tdep.h"
#include "ppcnbsd-tdep.h"
@@ -207,9 +208,6 @@ static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- /* Stop at main. */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 9ca17a1152a..d1fc2a750bc 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1,7 +1,7 @@
/* Print values for GNU debugger GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -645,7 +645,7 @@ build_address_symbolic (CORE_ADDR addr, /* IN */
if (do_demangle || asm_demangle)
name_temp = SYMBOL_PRINT_NAME (symbol);
else
- name_temp = SYMBOL_LINKAGE_NAME (symbol);
+ name_temp = SYMBOL_NAME (symbol);
}
if (msymbol != NULL)
@@ -660,7 +660,7 @@ build_address_symbolic (CORE_ADDR addr, /* IN */
if (do_demangle || asm_demangle)
name_temp = SYMBOL_PRINT_NAME (msymbol);
else
- name_temp = SYMBOL_LINKAGE_NAME (msymbol);
+ name_temp = SYMBOL_NAME (msymbol);
}
}
if (symbol == NULL && msymbol == NULL)
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index 3e8b19841ac..2d4fe814c94 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -1,5 +1,7 @@
/* Machine independent support for SVR4 /proc (process file system) for GDB.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
Written by Michael Snyder at Cygnus Solutions.
Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
@@ -43,7 +45,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/user.h> /* for struct user */
#endif
#include <fcntl.h> /* for O_RDWR etc. */
-#include <sys/wait.h>
+#include "gdb_wait.h"
#include "proc-utils.h"
diff --git a/gdb/proc-utils.h b/gdb/proc-utils.h
index 1c419649184..d9f38a89fef 100644
--- a/gdb/proc-utils.h
+++ b/gdb/proc-utils.h
@@ -22,44 +22,37 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
* Pretty-print functions for /proc data
*/
-extern void
-proc_prettyprint_why (unsigned long why, unsigned long what, int verbose);
+extern void proc_prettyprint_why (unsigned long why, unsigned long what,
+ int verbose);
-extern void
-proc_prettyprint_syscalls (sysset_t *sysset, int verbose);
+extern void proc_prettyprint_syscalls (sysset_t *sysset, int verbose);
-extern void
-proc_prettyprint_syscall (int num, int verbose);
+extern void proc_prettyprint_syscall (int num, int verbose);
extern void proc_prettyprint_flags (unsigned long flags, int verbose);
-extern void
-proc_prettyfprint_signalset (FILE *file, sigset_t *sigset, int verbose);
+extern void proc_prettyfprint_signalset (FILE *file, sigset_t *sigset,
+ int verbose);
-extern void
-proc_prettyfprint_faultset (FILE *file, fltset_t *fltset, int verbose);
+extern void proc_prettyfprint_faultset (FILE *file, fltset_t *fltset,
+ int verbose);
-extern void
-proc_prettyfprint_syscall (FILE *file, int num, int verbose);
+extern void proc_prettyfprint_syscall (FILE *file, int num, int verbose);
-extern void
-proc_prettyfprint_signal (FILE *file, int signo, int verbose);
+extern void proc_prettyfprint_signal (FILE *file, int signo, int verbose);
-extern void
-proc_prettyfprint_flags (FILE *file, unsigned long flags, int verbose);
+extern void proc_prettyfprint_flags (FILE *file, unsigned long flags,
+ int verbose);
-extern void
-proc_prettyfprint_why (FILE *file, unsigned long why,
- unsigned long what, int verbose);
+extern void proc_prettyfprint_why (FILE *file, unsigned long why,
+ unsigned long what, int verbose);
-extern void
-proc_prettyfprint_fault (FILE *file, int faultno, int verbose);
+extern void proc_prettyfprint_fault (FILE *file, int faultno, int verbose);
-extern void
-proc_prettyfprint_syscalls (FILE *file, sysset_t *sysset, int verbose);
+extern void proc_prettyfprint_syscalls (FILE *file, sysset_t *sysset,
+ int verbose);
-extern void
-proc_prettyfprint_status (long, int, int, int);
+extern void proc_prettyfprint_status (long, int, int, int);
/*
* Trace functions for /proc api.
diff --git a/gdb/procfs.c b/gdb/procfs.c
index fe5987601c6..2f14c5d2402 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -1,5 +1,8 @@
/* Machine independent support for SVR4 /proc (process file system) for GDB.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+ Inc.
+
Written by Michael Snyder at Cygnus Solutions.
Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
@@ -39,9 +42,11 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/syscall.h>
#endif
#include <sys/errno.h>
-#include <sys/wait.h>
+#include "gdb_wait.h"
#include <signal.h>
#include <ctype.h>
+#include "gdb_assert.h"
+#include "inflow.h"
/*
* PROCFS.C
@@ -2841,6 +2846,19 @@ proc_parent_pid (procinfo *pi)
}
+/* Convert a target address (a.k.a. CORE_ADDR) into a host address
+ (a.k.a void pointer)! */
+
+static void *
+procfs_address_to_host_pointer (CORE_ADDR addr)
+{
+ void *ptr;
+
+ gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
+ ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
+ return ptr;
+}
+
/*
* Function: proc_set_watchpoint
*
@@ -2863,10 +2881,13 @@ proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags)
prwatch_t *pwatch;
pwatch = (prwatch_t *) &arg.watch;
+ /* NOTE: cagney/2003-02-01: Even more horrible hack. Need to
+ convert a target address into something that can be stored in a
+ native data structure. */
#ifdef PCAGENT /* Horrible hack: only defined on Solaris 2.6+ */
- pwatch->pr_vaddr = (uintptr_t) address_to_host_pointer (addr);
+ pwatch->pr_vaddr = (uintptr_t) procfs_address_to_host_pointer (addr);
#else
- pwatch->pr_vaddr = (caddr_t) address_to_host_pointer (addr);
+ pwatch->pr_vaddr = (caddr_t) procfs_address_to_host_pointer (addr);
#endif
pwatch->pr_size = len;
pwatch->pr_wflags = wflags;
@@ -4589,8 +4610,6 @@ procfs_can_run (void)
static void
procfs_stop (void)
{
- extern pid_t inferior_process_group;
-
kill (-inferior_process_group, SIGINT);
}
@@ -5163,10 +5182,11 @@ procfs_can_use_hw_breakpoint (int type, int cnt, int othertype)
/* Due to the way that proc_set_watchpoint() is implemented, host
and target pointers must be of the same size. If they are not,
we can't use hardware watchpoints. This limitation is due to the
- fact that proc_set_watchpoint() calls address_to_host_pointer();
- a close inspection of address_to_host_pointer will reveal that
- an internal error will be generated when the host and target
- pointer sizes are different. */
+ fact that proc_set_watchpoint() calls
+ procfs_address_to_host_pointer(); a close inspection of
+ procfs_address_to_host_pointer will reveal that an internal error
+ will be generated when the host and target pointer sizes are
+ different. */
if (sizeof (void *) != TYPE_LENGTH (builtin_type_void_data_ptr))
return 0;
diff --git a/gdb/ptx4-nat.c b/gdb/ptx4-nat.c
deleted file mode 100644
index 1798b509f30..00000000000
--- a/gdb/ptx4-nat.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Native-dependent code for ptx 4.0
- Copyright 1988, 1989, 1991, 1992, 1994, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include <sys/procfs.h>
-#include <sys/ptrace.h>
-#include <sys/param.h>
-#include <fcntl.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- supply_register (EAX_REGNUM, (char *) &(*gregsetp)[EAX]);
- supply_register (EDX_REGNUM, (char *) &(*gregsetp)[EDX]);
- supply_register (ECX_REGNUM, (char *) &(*gregsetp)[ECX]);
- supply_register (EBX_REGNUM, (char *) &(*gregsetp)[EBX]);
- supply_register (ESI_REGNUM, (char *) &(*gregsetp)[ESI]);
- supply_register (EDI_REGNUM, (char *) &(*gregsetp)[EDI]);
- supply_register (ESP_REGNUM, (char *) &(*gregsetp)[UESP]);
- supply_register (EBP_REGNUM, (char *) &(*gregsetp)[EBP]);
- supply_register (EIP_REGNUM, (char *) &(*gregsetp)[EIP]);
- supply_register (EFLAGS_REGNUM, (char *) &(*gregsetp)[EFL]);
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
-
- for (regi = 0; regi < NUM_REGS; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- (*gregsetp)[regi] = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
- }
- }
-}
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- supply_fpu_registers ((struct fpusave *) &fpregsetp->fp_reg_set);
- supply_fpa_registers ((struct fpasave *) &fpregsetp->f_wregs);
-}
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), update the register specified by REGNO from gdb's idea
- of the current floating point register set. If REGNO is -1, update
- them all. */
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regno)
-{
- int regi;
- char *to;
- char *from;
-
- /* FIXME: see m68k-tdep.c for an example, for the m68k. */
-}
-
-/*
- * This doesn't quite do the same thing as the procfs.c version, but give
- * it the same name so we don't have to put an ifdef in solib.c.
- */
-/* this could use elf_interpreter() from elfread.c */
-int
-proc_iterate_over_mappings (int (*func) (int, CORE_ADDR))
-{
- vaddr_t curseg, memptr;
- pt_vseg_t pv;
- int rv, cmperr;
- sec_ptr interp_sec;
- char *interp_content;
- int interp_fd, funcstat;
- unsigned int size;
- char buf1[NBPG], buf2[NBPG];
-
- /*
- * The following is really vile. We can get the name of the
- * shared library from the exec_bfd, and we can get a list of
- * each virtual memory segment, but there is no simple way to
- * find the mapped segment from the shared library (ala
- * procfs's PIOCOPENMEM). As a pretty nasty kludge, we
- * compare the virtual memory segment to the contents of the
- * .interp file. If they match, we assume that we've got the
- * right one.
- */
-
- /*
- * TODO: for attach, use XPT_OPENT to get the executable, in
- * case we're attached without knowning the executable's
- * filename.
- */
-
-#ifdef VERBOSE_DEBUG
- printf ("proc_iter\n");
-#endif
- interp_sec = bfd_get_section_by_name (exec_bfd, ".interp");
- if (!interp_sec)
- {
- return 0;
- }
-
- size = bfd_section_size (exec_bfd, interp_sec);
- interp_content = alloca (size);
- if (0 == bfd_get_section_contents (exec_bfd, interp_sec,
- interp_content, (file_ptr) 0, size))
- {
- return 0;
- }
-
-#ifdef VERBOSE_DEBUG
- printf ("proc_iter: \"%s\"\n", interp_content);
-#endif
- interp_fd = open (interp_content, O_RDONLY, 0);
- if (-1 == interp_fd)
- {
- return 0;
- }
-
- curseg = 0;
- while (1)
- {
- rv = ptrace (PT_NEXT_VSEG, PIDGET (inferior_ptid), &pv, curseg);
-#ifdef VERBOSE_DEBUG
- printf ("PT_NEXT_VSEG: rv %d errno %d\n", rv, errno);
-#endif
- if (-1 == rv)
- break;
- if (0 == rv)
- break;
-#ifdef VERBOSE_DEBUG
- printf ("pv.pv_start 0x%x pv_size 0x%x pv_prot 0x%x\n",
- pv.pv_start, pv.pv_size, pv.pv_prot);
-#endif
- curseg = pv.pv_start + pv.pv_size;
-
- rv = lseek (interp_fd, 0, SEEK_SET);
- if (-1 == rv)
- {
- perror ("lseek");
- close (interp_fd);
- return 0;
- }
- for (memptr = pv.pv_start; memptr < pv.pv_start + pv.pv_size;
- memptr += NBPG)
- {
-#ifdef VERBOSE_DEBUG
- printf ("memptr 0x%x\n", memptr);
-#endif
- rv = read (interp_fd, buf1, NBPG);
- if (-1 == rv)
- {
- perror ("read");
- close (interp_fd);
- return 0;
- }
- rv = ptrace (PT_RDATA_PAGE, PIDGET (inferior_ptid), buf2,
- memptr);
- if (-1 == rv)
- {
- perror ("ptrace");
- close (interp_fd);
- return 0;
- }
- cmperr = memcmp (buf1, buf2, NBPG);
- if (cmperr)
- break;
- }
- if (0 == cmperr)
- {
- /* this is it */
- funcstat = (*func) (interp_fd, pv.pv_start);
- break;
- }
- }
- close (interp_fd);
- return 0;
-}
diff --git a/gdb/rdi-share/ardi.c b/gdb/rdi-share/ardi.c
index f4424606aaf..bb10ca6732e 100644
--- a/gdb/rdi-share/ardi.c
+++ b/gdb/rdi-share/ardi.c
@@ -154,7 +154,7 @@ static int wait_for_debug_message(int *rcode, int *debugID,
unpack_message(BUFFERDATA((*packet)->pk_buffer), "%w%w%w%w%w", &reason, debugID,
OSinfo1, OSinfo2, status);
- if (reason&0xffffff == ADP_HADPUnrecognised)
+ if ((reason&0xffffff) == ADP_HADPUnrecognised)
return RDIError_UnimplementedMessage;
if (reason != (unsigned ) *rcode) {
if((reason&0xffffff) == ADP_HADPUnrecognised)
@@ -1842,7 +1842,7 @@ int angel_RDI_info(unsigned type, ARMword *arg1, ARMword *arg2) {
len +=msgbuild(BUFFERDATA(packet->pk_buffer)+20, "%b%b%b%b%b", cpnum,
cpd->regdesc[cpnum].rmin, cpd->regdesc[cpnum].rmax,
cpd->regdesc[cpnum].nbytes, cpd->regdesc[cpnum].access);
- if (cpd->regdesc[cpnum].access&0x3 == 0x3){
+ if ((cpd->regdesc[cpnum].access&0x3) == 0x3){
len += msgbuild(BUFFERDATA(packet->pk_buffer)+25, "%b%b%b%b%b",
cpd->regdesc[cpnum].accessinst.cprt.read_b0,
cpd->regdesc[cpnum].accessinst.cprt.read_b1,
diff --git a/gdb/regformats/reg-m68k.dat b/gdb/regformats/reg-m68k.dat
index 1f0b078dd3c..8928b45282c 100644
--- a/gdb/regformats/reg-m68k.dat
+++ b/gdb/regformats/reg-m68k.dat
@@ -31,5 +31,3 @@ expedite:sp,fp,pc
32:fpcontrol
32:fpstatus
32:fpiaddr
-32:fpcode
-32:fpflags
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 49909b104b1..49c7fb99ae8 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -1,7 +1,7 @@
/* Remote debugging interface for Hitachi E7000 ICE, for GDB
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -785,7 +785,7 @@ void
fetch_regs_from_dump (int (*nextchar) (), char *want)
{
int regno;
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
int thischar = nextchar ();
@@ -1812,7 +1812,7 @@ e7000_drain_command (char *args, int fromtty)
puts_e7000debug ("end\r");
putchar_e7000 (CTRLC);
- while ((c = readchar (1) != -1))
+ while ((c = readchar (1)) != -1)
{
if (quit_flag)
{
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
deleted file mode 100644
index 72e61710e2a..00000000000
--- a/gdb/remote-es.c
+++ /dev/null
@@ -1,2047 +0,0 @@
-/* Memory-access and commands for remote es1800 processes, for GDB.
-
- Copyright 1988, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
-
- This file is added to GDB to make it possible to do debugging via an
- ES-1800 emulator. The code was originally written by Johan Holmberg
- TT/SJ Ericsson Telecom AB and later modified by Johan Henriksson
- TT/SJ. It was modified for gdb 4.0 by TX/DK Jan Nordenand by TX/DKG
- Harald Johansen.
-
- This file is part of GDB.
-
- GDB is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- GDB is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-
-/* Emulator communication protocol.
- All values are encoded in ascii hex digits.
-
- Request
- Command
- Reply
- read registers:
- DR<cr>
- - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - -- 6 - - 7 -
- D = XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- A = XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- PC = XXXXXX SSP = XXXXXX USP = XXXXXX SR = XXXXXXXX
- >
- Each byte of register data is described by two hex digits.
-
- write regs
- D0=XXXXXXXX<cr>
- >D1=XXXXXXXX<cr>
- >D2=XXXXXXXX<cr>
- >D3=XXXXXXXX<cr>
- >D4=XXXXXXXX<cr>
- >D5=XXXXXXXX<cr>
- >D6=XXXXXXXX<cr>
- >D7=XXXXXXXX<cr>
- >A0=XXXXXXXX<cr>
- >A1=XXXXXXXX<cr>
- >A2=XXXXXXXX<cr>
- >A3=XXXXXXXX<cr>
- >A4=XXXXXXXX<cr>
- >A5=XXXXXXXX<cr>
- >A6=XXXXXXXX<cr>
- >A7=XXXXXXXX<cr>
- >SR=XXXXXXXX<cr>
- >PC=XXXXXX<cr>
- >
- Each byte of register data is described by two hex digits.
-
- read mem
- @.BAA..AA
- $FFFFFFXX
- >
- AA..AA is address, XXXXXXX is the contents
-
- write mem
- @.BAA..AA=$XXXXXXXX
- >
- AA..AA is address, XXXXXXXX is data
-
- cont
- PC=$AA..AA
- >RBK
- R>
- AA..AA is address to resume. If AA..AA is omitted, resume at same address.
-
- step
- PC=$AA..AA
- >STP
- R>
- AA..AA is address to resume. If AA..AA is omitted, resume at same address.
-
- kill req
- STP
- >
- */
-
-
-#include <stdio.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <errno.h>
-#include <ctype.h>
-#include <setjmp.h>
-#include <fcntl.h>
-#include "defs.h"
-#include "gdb_string.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "command.h"
-#include "symfile.h"
-#include "remote-utils.h"
-#include "gdbcore.h"
-#include "serial.h"
-#include "regcache.h"
-#include "value.h"
-
-/* Prototypes for local functions */
-
-static void es1800_child_detach (char *, int);
-
-static void es1800_child_open (char *, int);
-
-static void es1800_transparent (char *, int);
-
-static void es1800_create_inferior (char *, char *, char **);
-
-static void es1800_load (char *, int);
-
-static void es1800_kill (void);
-
-static int verify_break (int);
-
-static int es1800_remove_breakpoint (CORE_ADDR, char *);
-
-static int es1800_insert_breakpoint (CORE_ADDR, char *);
-
-static void es1800_files_info (struct target_ops *);
-
-static int es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
- struct mem_attrib *,
- struct target_ops *);
-
-static void es1800_prepare_to_store (void);
-
-static ptid_t es1800_wait (ptid_t, struct target_waitstatus *);
-
-static void es1800_resume (ptid_t, int, enum target_signal);
-
-static void es1800_detach (char *, int);
-
-static void es1800_attach (char *, int);
-
-static int damn_b (char *);
-
-static void es1800_open (char *, int);
-
-static void es1800_timer (void);
-
-static void es1800_reset (char *);
-
-static void es1800_request_quit (void);
-
-static int readchar (void);
-
-static void expect (char *, int);
-
-static void expect_prompt (void);
-
-static void download (FILE *, int, int);
-
-#if 0
-static void bfd_copy (bfd *, bfd *);
-#endif
-
-static void get_break_addr (int, CORE_ADDR *);
-
-static int fromhex (int);
-
-static int tohex (int);
-
-static void es1800_close (int);
-
-static void es1800_fetch_registers (void);
-
-static void es1800_fetch_register (int);
-
-static void es1800_store_register (int);
-
-static void es1800_read_bytes (CORE_ADDR, char *, int);
-
-static void es1800_write_bytes (CORE_ADDR, char *, int);
-
-static void send_with_reply (char *, char *, int);
-
-static void send_command (char *);
-
-static void send (char *);
-
-static void getmessage (char *, int);
-
-static void es1800_mourn_inferior (void);
-
-static void es1800_create_break_insn (char *, int);
-
-static void es1800_init_break (char *, int);
-
-/* Local variables */
-
-/* FIXME: Convert this to use "set remotedebug" instead. */
-#define LOG_FILE "es1800.log"
-#if defined (LOG_FILE)
-static FILE *log_file;
-#endif
-
-extern struct target_ops es1800_ops; /* Forward decl */
-extern struct target_ops es1800_child_ops; /* Forward decl */
-
-static int kiodebug;
-static int timeout = 100;
-static char *savename; /* Name of i/o device used */
-static serial_ttystate es1800_saved_ttystate;
-static int es1800_fc_save; /* Save fcntl state */
-
-/* indicates that the emulator uses 32-bit data-adress (68020-mode)
- instead of 24-bit (68000 -mode) */
-
-static int m68020;
-
-#define MODE (m68020 ? "M68020" : "M68000" )
-#define ES1800_BREAK_VEC (0xf)
-
-/* Descriptor for I/O to remote machine. Initialize it to NULL so that
- es1800_open knows that we don't have a file open when the program
- starts. */
-
-static struct serial *es1800_desc = NULL;
-
-#define PBUFSIZ 1000
-#define HDRLEN sizeof("@.BAAAAAAAA=$VV\r")
-
-/* Maximum number of bytes to read/write at once. The value here
- is chosen to fill up a packet. */
-
-#define MAXBUFBYTES ((PBUFSIZ-150)*16/75 )
-
-static int es1800_break_vec = 0;
-static char es1800_break_insn[2];
-static long es1800_break_address;
-static void (*old_sigint) (); /* Old signal-handler for sigint */
-static jmp_buf interrupt;
-
-/* Local signalhandler to allow breaking tranfers or program run.
- Rely on global variables: old_sigint(), interrupt */
-
-static void
-es1800_request_quit (void)
-{
- /* restore original signalhandler */
- signal (SIGINT, old_sigint);
- longjmp (interrupt, 1);
-}
-
-
-/* Reset emulator.
- Sending reset character(octal 32) to emulator.
- quit - return to '(esgdb)' prompt or continue */
-
-static void
-es1800_reset (char *quit)
-{
- char buf[80];
-
- if (quit)
- {
- printf ("\nResetting emulator... ");
- }
- strcpy (buf, "\032");
- send (buf);
- expect_prompt ();
- if (quit)
- {
- error ("done\n");
- }
-}
-
-
-/* Open a connection to a remote debugger and push the new target
- onto the stack. Check if the emulator is responding and find out
- what kind of processor the emulator is connected to.
- Initiate the breakpoint handling in the emulator.
-
- name - the filename used for communication (ex. '/dev/tta')
- from_tty - says whether to be verbose or not */
-
-static void
-es1800_open (char *name, int from_tty)
-{
- char buf[PBUFSIZ];
- char *p;
- int i, fcflag;
-
- m68020 = 0;
-
- if (!name) /* no device name given in target command */
- {
- error_no_arg ("serial port device name");
- }
-
- target_preopen (from_tty);
- es1800_close (0);
-
- /* open the device and configure it for communication */
-
-#ifndef DEBUG_STDIN
-
- es1800_desc = serial_open (name);
- if (es1800_desc == NULL)
- {
- perror_with_name (name);
- }
- savename = savestring (name, strlen (name));
-
- es1800_saved_ttystate = serial_get_tty_state (es1800_desc);
-
- if ((fcflag = fcntl (deprecated_serial_fd (es1800_desc), F_GETFL, 0)) == -1)
- {
- perror_with_name ("fcntl serial");
- }
- es1800_fc_save = fcflag;
-
- fcflag = (fcflag & (FREAD | FWRITE)); /* mask out any funny stuff */
- if (fcntl (deprecated_serial_fd (es1800_desc), F_SETFL, fcflag) == -1)
- {
- perror_with_name ("fcntl serial");
- }
-
- if (baud_rate != -1)
- {
- if (serial_setbaudrate (es1800_desc, baud_rate))
- {
- serial_close (es1800_desc);
- perror_with_name (name);
- }
- }
-
- serial_raw (es1800_desc);
-
- /* If there is something sitting in the buffer we might take it as a
- response to a command, which would be bad. */
- serial_flush_input (es1800_desc);
-
-#endif /* DEBUG_STDIN */
-
- push_target (&es1800_ops); /* Switch to using remote target now */
- if (from_tty)
- {
- printf ("Remote ES1800 debugging using %s\n", name);
- }
-
-#if defined (LOG_FILE)
-
- log_file = fopen (LOG_FILE, "w");
- if (log_file == NULL)
- {
- perror_with_name (LOG_FILE);
- }
-
-#endif /* LOG_FILE */
-
- /* Hello? Are you there?, also check mode */
-
- /* send_with_reply( "DB 0 TO 1", buf, sizeof(buf)); */
- /* for (p = buf, i = 0; *p++ =='0';) *//* count the number of zeros */
- /* i++; */
-
- send ("\032");
- getmessage (buf, sizeof (buf)); /* send reset character */
-
- if (from_tty)
- {
- printf ("Checking mode.... ");
- }
- /* m68020 = (i==8); *//* if eight zeros then we are in m68020 mode */
-
- /* What kind of processor am i talking to ? */
- p = buf;
- while (*p++ != '\n')
- {;
- }
- while (*p++ != '\n')
- {;
- }
- while (*p++ != '\n')
- {;
- }
- for (i = 0; i < 20; i++, p++)
- {;
- }
- m68020 = !strncmp (p, "68020", 5);
- if (from_tty)
- {
- printf ("You are in %s(%c%c%c%c%c)-mode\n", MODE, p[0], p[1], p[2],
- p[3], p[4]);
- }
-
- /* if no init_break statement is present in .gdb file we have to check
- whether to download a breakpoint routine or not */
-
-#if 0
- if ((es1800_break_vec == 0) || (verify_break (es1800_break_vec) != 0)
- && query ("No breakpoint routine in ES 1800 emulator!\nDownload a breakpoint routine to the emulator? "))
- {
- CORE_ADDR memaddress;
- printf ("Give the start address of the breakpoint routine: ");
- scanf ("%li", &memaddress);
- es1800_init_break ((es1800_break_vec ? es1800_break_vec :
- ES1800_BREAK_VEC), memaddress);
- }
-#endif
-
-}
-
-/* Close out all files and local state before this target loses control.
- quitting - are we quitting gdb now? */
-
-static void
-es1800_close (int quitting)
-{
- if (es1800_desc != NULL)
- {
- printf ("\nClosing connection to emulator...\n");
- if (serial_set_tty_state (es1800_desc, es1800_saved_ttystate) < 0)
- print_sys_errmsg ("warning: unable to restore tty state", errno);
- fcntl (deprecated_serial_fd (es1800_desc), F_SETFL, es1800_fc_save);
- serial_close (es1800_desc);
- es1800_desc = NULL;
- }
- if (savename != NULL)
- {
- xfree (savename);
- }
- savename = NULL;
-
-#if defined (LOG_FILE)
-
- if (log_file != NULL)
- {
- if (ferror (log_file))
- {
- printf ("Error writing log file.\n");
- }
- if (fclose (log_file) != 0)
- {
- printf ("Error closing log file.\n");
- }
- log_file = NULL;
- }
-
-#endif /* LOG_FILE */
-
-}
-
-/* Attaches to a process on the target side
- proc_id - the id of the process to be attached.
- from_tty - says whether to be verbose or not */
-
-static void
-es1800_attach (char *args, int from_tty)
-{
- error ("Cannot attach to pid %s, this feature is not implemented yet.",
- args);
-}
-
-
-/* Takes a program previously attached to and detaches it.
- We better not have left any breakpoints
- in the program or it'll die when it hits one.
- Close the open connection to the remote debugger.
- Use this when you want to detach and do something else
- with your gdb.
-
- args - arguments given to the 'detach' command
- from_tty - says whether to be verbose or not */
-
-static void
-es1800_detach (char *args, int from_tty)
-{
- if (args)
- {
- error ("Argument given to \"detach\" when remotely debugging.");
- }
- pop_target ();
- if (from_tty)
- {
- printf ("Ending es1800 remote debugging.\n");
- }
-}
-
-
-/* Tell the remote machine to resume.
- step - single-step or run free
- siggnal - the signal value to be given to the target (0 = no signal) */
-
-static void
-es1800_resume (ptid_t ptid, int step, enum target_signal siggnal)
-{
- char buf[PBUFSIZ];
-
- if (siggnal)
- {
- error ("Can't send signals to a remote system.");
- }
- if (step)
- {
- strcpy (buf, "STP\r");
- send (buf);
- }
- else
- {
- send_command ("RBK");
- }
-}
-
-/* Wait until the remote machine stops, then return,
- storing status in STATUS just as `wait' would.
- status - */
-
-static ptid_t
-es1800_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- unsigned char buf[PBUFSIZ];
- int old_timeout = timeout;
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- timeout = 0; /* Don't time out -- user program is running. */
- if (!setjmp (interrupt))
- {
- old_sigint = signal (SIGINT, es1800_request_quit);
- while (1)
- {
- getmessage (buf, sizeof (buf));
- if (strncmp (buf, "\r\n* BREAK *", 11) == 0)
- {
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- send_command ("STP"); /* Restore stack and PC and such */
- if (m68020)
- {
- send_command ("STP");
- }
- break;
- }
- if (strncmp (buf, "STP\r\n ", 6) == 0)
- {
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- break;
- }
- if (buf[strlen (buf) - 2] == 'R')
- {
- printf ("Unexpected emulator reply: \n%s\n", buf);
- }
- else
- {
- printf ("Unexpected stop: \n%s\n", buf);
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_QUIT;
- break;
- }
- }
- }
- else
- {
- fflush (stdin);
- printf ("\nStopping emulator...");
- if (!setjmp (interrupt))
- {
- old_sigint = signal (SIGINT, es1800_request_quit);
- send_command ("STP");
- printf (" emulator stopped\n");
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_INT;
- }
- else
- {
- fflush (stdin);
- es1800_reset ((char *) 1);
- }
- }
- signal (SIGINT, old_sigint);
- timeout = old_timeout;
- return inferior_ptid;
-}
-
-
-/* Fetch register values from remote machine.
- regno - the register to be fetched (fetch all registers if -1) */
-
-static void
-es1800_fetch_register (int regno)
-{
- char buf[PBUFSIZ];
- int k;
- int r;
- char *p;
- static char regtab[18][4] =
- {
- "D0 ", "D1 ", "D2 ", "D3 ", "D4 ", "D5 ", "D6 ", "D7 ",
- "A0 ", "A1 ", "A2 ", "A3 ", "A4 ", "A5 ", "A6 ", "SSP",
- "SR ", "PC "
- };
-
- if ((regno < 15) || (regno == 16) || (regno == 17))
- {
- r = regno * 4;
- send_with_reply (regtab[regno], buf, sizeof (buf));
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if ((p[k * 2 + 1] == 0) || (p[k * 2 + 2] == 0))
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
- }
- }
- else
- {
- es1800_fetch_registers ();
- }
-}
-
-/* Read the remote registers into REGISTERS.
- Always fetches all registers. */
-
-static void
-es1800_fetch_registers (void)
-{
- char buf[PBUFSIZ];
- char SR_buf[PBUFSIZ];
- int i;
- int k;
- int r;
- char *p;
-
- send_with_reply ("DR", buf, sizeof (buf));
-
- /* Reply is edited to a string that describes registers byte by byte,
- each byte encoded as two hex characters. */
-
- p = buf;
- r = 0;
-
- /* parsing row one - D0-D7-registers */
-
- while (*p++ != '\n')
- {;
- }
- for (i = 4; i < 70; i += (i == 39 ? 3 : 1))
- {
- for (k = 0; k < 4; k++)
- {
- if (p[i + 0] == 0 || p[i + 1] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = (fromhex (p[i + 0]) * 16) + fromhex (p[i + 1]);
- i += 2;
- }
- }
- p += i;
-
- /* parsing row two - A0-A6-registers */
-
- while (*p++ != '\n')
- {;
- }
- for (i = 4; i < 61; i += (i == 39 ? 3 : 1))
- {
- for (k = 0; k < 4; k++)
- {
- if (p[i + 0] == 0 || p[i + 1] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = (fromhex (p[i + 0])) * 16 + fromhex (p[i + 1]);
- i += 2;
- }
- }
- p += i;
-
- while (*p++ != '\n')
- {;
- }
-
- /* fetch SSP-, SR- and PC-registers */
-
- /* first - check STATUS-word and decide which stackpointer to use */
-
- send_with_reply ("SR", SR_buf, sizeof (SR_buf));
- p = SR_buf;
- p += 5;
-
- if (m68020)
- {
- if (*p == '3') /* use masterstackpointer MSP */
- {
- send_with_reply ("MSP", buf, sizeof (buf));
- }
- else if (*p == '2') /* use interruptstackpointer ISP */
- {
- send_with_reply ("ISP", buf, sizeof (buf));
- }
- else
- /* use userstackpointer USP */
- {
- send_with_reply ("USP", buf, sizeof (buf));
- }
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if (p[k * 2 + 1] == 0 || p[k * 2 + 2] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
- }
-
- p = SR_buf;
- for (k = 0; k < 4; k++)
- {
- if (p[k * 2 + 1] == 0 || p[k * 2 + 2] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] =
- fromhex (SR_buf[k * 2 + 1]) * 16 + fromhex (SR_buf[k * 2 + 2]);
- }
- send_with_reply ("PC", buf, sizeof (buf));
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if (p[k * 2 + 1] == 0 || p[k * 2 + 2] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
- }
- }
- else
- /* 68000-mode */
- {
- if (*p == '2') /* use supervisorstackpointer SSP */
- {
- send_with_reply ("SSP", buf, sizeof (buf));
- }
- else
- /* use userstackpointer USP */
- {
- send_with_reply ("USP", buf, sizeof (buf));
- }
-
- /* fetch STACKPOINTER */
-
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if (p[k * 2 + 1] == 0 || p[k * 2 + 2] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
- }
-
- /* fetch STATUS */
-
- p = SR_buf;
- for (k = 0; k < 4; k++)
- {
- if (p[k * 2 + 1] == 0 || p[k * 2 + 2] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] =
- fromhex (SR_buf[k * 2 + 1]) * 16 + fromhex (SR_buf[k * 2 + 2]);
- }
-
- /* fetch PC */
-
- send_with_reply ("PC", buf, sizeof (buf));
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if (p[k * 2 + 1] == 0 || p[k * 2 + 2] == 0)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
- }
- }
-}
-
-/* Store register value, located in REGISTER, on the target processor.
- regno - the register-number of the register to store
- (-1 means store them all)
- FIXME: Return errno value. */
-
-static void
-es1800_store_register (int regno)
-{
-
- static char regtab[18][4] =
- {
- "D0 ", "D1 ", "D2 ", "D3 ", "D4 ", "D5 ", "D6 ", "D7 ",
- "A0 ", "A1 ", "A2 ", "A3 ", "A4 ", "A5 ", "A6 ", "SSP",
- "SR ", "PC "
- };
-
- char buf[PBUFSIZ];
- char SR_buf[PBUFSIZ];
- char stack_pointer[4];
- char *p;
- int i;
- int j;
- int k;
- unsigned char *r;
-
- r = (unsigned char *) deprecated_registers;
-
- if (regno == -1) /* write all registers */
- {
- j = 0;
- k = 18;
- }
- else
- /* write one register */
- {
- j = regno;
- k = regno + 1;
- r += regno * 4;
- }
-
- if ((regno == -1) || (regno == 15))
- {
- /* fetch current status */
- send_with_reply ("SR", SR_buf, sizeof (SR_buf));
- p = SR_buf;
- p += 5;
- if (m68020)
- {
- if (*p == '3') /* use masterstackpointer MSP */
- {
- strcpy (stack_pointer, "MSP");
- }
- else
- {
- if (*p == '2') /* use interruptstackpointer ISP */
- {
- strcpy (stack_pointer, "ISP");
- }
- else
- {
- strcpy (stack_pointer, "USP"); /* use userstackpointer USP */
- }
- }
- }
- else
- /* 68000-mode */
- {
- if (*p == '2') /* use supervisorstackpointer SSP */
- {
- strcpy (stack_pointer, "SSP");
- }
- else
- {
- strcpy (stack_pointer, "USP"); /* use userstackpointer USP */
- }
- }
- strcpy (regtab[15], stack_pointer);
- }
-
- for (i = j; i < k; i++)
- {
- buf[0] = regtab[i][0];
- buf[1] = regtab[i][1];
- buf[2] = regtab[i][2];
- buf[3] = '=';
- buf[4] = '$';
- buf[5] = tohex ((*r >> 4) & 0x0f);
- buf[6] = tohex (*r++ & 0x0f);
- buf[7] = tohex ((*r >> 4) & 0x0f);
- buf[8] = tohex (*r++ & 0x0f);
- buf[9] = tohex ((*r >> 4) & 0x0f);
- buf[10] = tohex (*r++ & 0x0f);
- buf[11] = tohex ((*r >> 4) & 0x0f);
- buf[12] = tohex (*r++ & 0x0f);
- buf[13] = 0;
-
- send_with_reply (buf, buf, sizeof (buf)); /* FIXME, reply not used? */
- }
-}
-
-
-/* Prepare to store registers. */
-
-static void
-es1800_prepare_to_store (void)
-{
- /* Do nothing, since we can store individual regs */
-}
-
-/* Convert hex digit A to a number. */
-
-static int
-fromhex (int a)
-{
- if (a >= '0' && a <= '9')
- {
- return a - '0';
- }
- else if (a >= 'a' && a <= 'f')
- {
- return a - 'a' + 10;
- }
- else if (a >= 'A' && a <= 'F')
- {
- return a - 'A' + 10;
- }
- else
- {
- error ("Reply contains invalid hex digit");
- }
- return (-1);
-}
-
-
-/* Convert number NIB to a hex digit. */
-
-static int
-tohex (int nib)
-{
- if (nib < 10)
- {
- return ('0' + nib);
- }
- else
- {
- return ('A' + nib - 10);
- }
-}
-
-/* Read or write LEN bytes from inferior memory at MEMADDR, transferring
- to or from debugger address MYADDR. Write to inferior if WRITE is
- nonzero. Returns length of data written or read; 0 for error.
-
- memaddr - the target's address
- myaddr - gdb's address
- len - number of bytes
- write - write if != 0 otherwise read
- tops - unused */
-
-static int
-es1800_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int write, struct mem_attrib *attrib,
- struct target_ops *target)
-{
- int origlen = len;
- int xfersize;
-
- while (len > 0)
- {
- xfersize = len > MAXBUFBYTES ? MAXBUFBYTES : len;
- if (write)
- {
- es1800_write_bytes (memaddr, myaddr, xfersize);
- }
- else
- {
- es1800_read_bytes (memaddr, myaddr, xfersize);
- }
- memaddr += xfersize;
- myaddr += xfersize;
- len -= xfersize;
- }
- return (origlen); /* no error possible */
-}
-
-
-/* Write memory data directly to the emulator.
- This does not inform the data cache; the data cache uses this.
- MEMADDR is the address in the remote memory space.
- MYADDR is the address of the buffer in our space.
- LEN is the number of bytes.
-
- memaddr - the target's address
- myaddr - gdb's address
- len - number of bytes */
-
-static void
-es1800_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
-{
- char buf[PBUFSIZ];
- int i;
- char *p;
-
- p = myaddr;
- for (i = 0; i < len; i++)
- {
- sprintf (buf, "@.B$%x=$%x", memaddr + i, (*p++) & 0xff);
- send_with_reply (buf, buf, sizeof (buf)); /* FIXME send_command? */
- }
-}
-
-
-/* Read memory data directly from the emulator.
- This does not use the data cache; the data cache uses this.
-
- memaddr - the target's address
- myaddr - gdb's address
- len - number of bytes */
-
-static void
-es1800_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
-{
- static int DB_tab[16] =
- {8, 11, 14, 17, 20, 23, 26, 29, 34, 37, 40, 43, 46, 49, 52, 55};
- char buf[PBUFSIZ];
- int i;
- int low_addr;
- char *p;
- char *b;
-
- if (len > PBUFSIZ / 2 - 1)
- {
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-
- if (len == 1) /* The emulator does not like expressions like: */
- {
- len = 2; /* DB.B $20018 TO $20018 */
- }
-
- /* Reply describes registers byte by byte, each byte encoded as two hex
- characters. */
-
- sprintf (buf, "DB.B $%x TO $%x", memaddr, memaddr + len - 1);
- send_with_reply (buf, buf, sizeof (buf));
- b = buf;
- low_addr = memaddr & 0x0f;
- for (i = low_addr; i < low_addr + len; i++)
- {
- if ((!(i % 16)) && i)
- { /* if (i = 16,32,48) */
- while (*p++ != '\n')
- {;
- }
- b = p;
- }
- p = b + DB_tab[i % 16] + (m68020 ? 2 : 0);
- if (p[0] == 32 || p[1] == 32)
- {
- error ("Emulator reply is too short: %s", buf);
- }
- myaddr[i - low_addr] = fromhex (p[0]) * 16 + fromhex (p[1]);
- }
-}
-
-/* Display information about the current target. TOPS is unused. */
-
-static void
-es1800_files_info (struct target_ops *tops)
-{
- printf ("ES1800 Attached to %s at %d baud in %s mode\n", savename, 19200,
- MODE);
-}
-
-
-/* We read the contents of the target location and stash it,
- then overwrite it with a breakpoint instruction.
-
- addr - is the target location in the target machine.
- contents_cache - is a pointer to memory allocated for saving the target contents.
- It is guaranteed by the caller to be long enough to save sizeof
- BREAKPOINT bytes.
-
- FIXME: This size is target_arch dependent and should be available in
- the target_arch transfer vector, if we ever have one... */
-
-static int
-es1800_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
- int val;
-
- val = target_read_memory (addr, contents_cache, sizeof (es1800_break_insn));
-
- if (val == 0)
- {
- val = target_write_memory (addr, es1800_break_insn,
- sizeof (es1800_break_insn));
- }
-
- return (val);
-}
-
-
-/* Write back the stashed instruction
-
- addr - is the target location in the target machine.
- contents_cache - is a pointer to memory allocated for saving the target contents.
- It is guaranteed by the caller to be long enough to save sizeof
- BREAKPOINT bytes. */
-
-static int
-es1800_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
-
- return (target_write_memory (addr, contents_cache,
- sizeof (es1800_break_insn)));
-}
-
-/* create_break_insn ()
- Primitive datastructures containing the es1800 breakpoint instruction */
-
-static void
-es1800_create_break_insn (char *ins, int vec)
-{
- if (vec == 15)
- {
- ins[0] = 0x4e;
- ins[1] = 0x4f;
- }
-}
-
-
-/* verify_break ()
- Seach for breakpoint routine in emulator memory.
- returns non-zero on failure
- vec - trap vector used for breakpoints */
-
-static int
-verify_break (int vec)
-{
- CORE_ADDR memaddress;
- char buf[8];
- char *instr = "NqNqNqNs"; /* breakpoint routine */
- int status;
-
- get_break_addr (vec, &memaddress);
-
- if (memaddress)
- {
- status = target_read_memory (memaddress, buf, 8);
- if (status != 0)
- {
- memory_error (status, memaddress);
- }
- return (strcmp (instr, buf));
- }
- return (-1);
-}
-
-
-/* get_break_addr ()
- find address of breakpoint routine
- vec - trap vector used for breakpoints
- addrp - store the address here */
-
-static void
-get_break_addr (int vec, CORE_ADDR *addrp)
-{
- CORE_ADDR memaddress = 0;
- int status;
- int k;
- char buf[PBUFSIZ];
- char base_addr[4];
- char *p;
-
- if (m68020)
- {
- send_with_reply ("VBR ", buf, sizeof (buf));
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if ((p[k * 2 + 1] == 0) || (p[k * 2 + 2] == 0))
- {
- error ("Emulator reply is too short: %s", buf);
- }
- base_addr[k] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
- }
- /* base addr of exception vector table */
- memaddress = *((CORE_ADDR *) base_addr);
- }
-
- memaddress += (vec + 32) * 4; /* address of trap vector */
- status = target_read_memory (memaddress, (char *) addrp, 4);
- if (status != 0)
- {
- memory_error (status, memaddress);
- }
-}
-
-
-/* Kill an inferior process */
-
-static void
-es1800_kill (void)
-{
- if (!ptid_equal (inferior_ptid, null_ptid))
- {
- inferior_ptid = null_ptid;
- es1800_mourn_inferior ();
- }
-}
-
-
-/* Load a file to the ES1800 emulator.
- Converts the file from a.out format into Extended Tekhex format
- before the file is loaded.
- Also loads the trap routine, and sets the ES1800 breakpoint on it
- filename - the a.out to be loaded
- from_tty - says whether to be verbose or not
- FIXME Uses emulator overlay memory for trap routine */
-
-static void
-es1800_load (char *filename, int from_tty)
-{
-
- FILE *instream;
- char loadname[15];
- char buf[160];
- struct cleanup *old_chain;
- int es1800_load_format = 5;
-
- if (es1800_desc == NULL)
- {
- printf ("No emulator attached, type emulator-command first\n");
- return;
- }
-
- filename = tilde_expand (filename);
- make_cleanup (xfree, filename);
-
- switch (es1800_load_format)
- {
- case 2: /* Extended Tekhex */
- if (from_tty)
- {
- printf ("Converting \"%s\" to Extended Tekhex Format\n", filename);
- }
- sprintf (buf, "tekhex %s", filename);
- system (buf);
- sprintf (loadname, "out.hex");
- break;
-
- case 5: /* Motorola S-rec */
- if (from_tty)
- {
- printf ("Converting \"%s\" to Motorola S-record format\n",
- filename);
- }
- /* in the future the source code in copy (part of binutils-1.93) will
- be included in this file */
- sprintf (buf,
- "copy -s \"a.out-sunos-big\" -d \"srec\" %s /tmp/out.hex",
- filename);
- system (buf);
- sprintf (loadname, "/tmp/out.hex");
- break;
-
- default:
- error ("Downloading format not defined\n");
- }
-
- breakpoint_init_inferior ();
- inferior_ptid = null_ptid;
- if (from_tty)
- {
- printf ("Downloading \"%s\" to the ES 1800\n", filename);
- }
- if ((instream = fopen (loadname, "r")) == NULL)
- {
- perror_with_name ("fopen:");
- }
-
- old_chain = make_cleanup (fclose, instream);
- immediate_quit++;
-
- es1800_reset (0);
-
- download (instream, from_tty, es1800_load_format);
-
- /* if breakpoint routine is not present anymore we have to check
- whether to download a new breakpoint routine or not */
-
- if ((verify_break (es1800_break_vec) != 0)
- && query ("No breakpoint routine in ES 1800 emulator!\nDownload a breakpoint routine to the emulator? "))
- {
- char buf[128];
- printf ("Using break vector 0x%x\n", es1800_break_vec);
- sprintf (buf, "0x%x ", es1800_break_vec);
- printf ("Give the start address of the breakpoint routine: ");
- fgets (buf + strlen (buf), sizeof (buf) - strlen (buf), stdin);
- es1800_init_break (buf, 0);
- }
-
- do_cleanups (old_chain);
- expect_prompt ();
- readchar (); /* FIXME I am getting a ^G = 7 after the prompt */
- printf ("\n");
-
- if (fclose (instream) == EOF)
- {
- ;
- }
-
- if (es1800_load_format != 2)
- {
- sprintf (buf, "/usr/bin/rm %s", loadname);
- system (buf);
- }
-
- symbol_file_add_main (filename, from_tty); /* reading symbol table */
- immediate_quit--;
-}
-
-#if 0
-
-#define NUMCPYBYTES 20
-
-static void
-bfd_copy (bfd *from_bfd, bfd *to_bfd)
-{
- asection *p, *new;
- int i;
- char buf[NUMCPYBYTES];
-
- for (p = from_bfd->sections; p != NULL; p = p->next)
- {
- printf (" Copying section %s. Size = %x.\n", p->name, p->_cooked_size);
- printf (" vma = %x, offset = %x, output_sec = %x\n",
- p->vma, p->output_offset, p->output_section);
- new = bfd_make_section (to_bfd, p->name);
- if (p->_cooked_size &&
- !bfd_set_section_size (to_bfd, new, p->_cooked_size))
- {
- error ("Wrong BFD size!\n");
- }
- if (!bfd_set_section_flags (to_bfd, new, p->flags))
- {
- error ("bfd_set_section_flags");
- }
- new->vma = p->vma;
-
- for (i = 0; (i + NUMCPYBYTES) < p->_cooked_size; i += NUMCPYBYTES)
- {
- if (!bfd_get_section_contents (from_bfd, p, (PTR) buf, (file_ptr) i,
- (bfd_size_type) NUMCPYBYTES))
- {
- error ("bfd_get_section_contents\n");
- }
- if (!bfd_set_section_contents (to_bfd, new, (PTR) buf, (file_ptr) i,
- (bfd_size_type) NUMCPYBYTES))
- {
- error ("bfd_set_section_contents\n");
- }
- }
- bfd_get_section_contents (from_bfd, p, (PTR) buf, (file_ptr) i,
- (bfd_size_type) (p->_cooked_size - i));
- bfd_set_section_contents (to_bfd, new, (PTR) buf, (file_ptr) i,
- (bfd_size_type) (p->_cooked_size - i));
- }
-}
-
-#endif
-
-/* Start an process on the es1800 and set inferior_ptid to the new
- process' pid.
- execfile - the file to run
- args - arguments passed to the program
- env - the environment vector to pass */
-
-static void
-es1800_create_inferior (char *execfile, char *args, char **env)
-{
- int entry_pt;
- int pid;
-#if 0
- struct expression *expr;
- register struct cleanup *old_chain = 0;
- register value val;
-#endif
-
- if (args && *args)
- {
- error ("Can't pass arguments to remote ES1800 process");
- }
-
-#if 0
- if (query ("Use 'start' as entry point? "))
- {
- expr = parse_c_expression ("start");
- old_chain = make_cleanup (free_current_contents, &expr);
- val = evaluate_expression (expr);
- entry_pt = (val->location).address;
- }
- else
- {
- printf ("Enter the program's entry point (in hexadecimal): ");
- scanf ("%x", &entry_pt);
- }
-#endif
-
- if (execfile == 0 || exec_bfd == 0)
- {
- error ("No executable file specified");
- }
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
- pid = 42;
-
- /* Now that we have a child process, make it our target. */
-
- push_target (&es1800_child_ops);
-
- /* The "process" (board) is already stopped awaiting our commands, and
- the program is already downloaded. We just set its PC and go. */
-
- inferior_ptid = pid_to_ptid (pid); /* Needed for wait_for_inferior below */
-
- clear_proceed_status ();
-
- /* Tell wait_for_inferior that we've started a new process. */
-
- init_wait_for_inferior ();
-
- /* Set up the "saved terminal modes" of the inferior
- based on what modes we are starting it with. */
-
- target_terminal_init ();
-
- /* Install inferior's terminal modes. */
-
- target_terminal_inferior ();
-
- /* remote_start (args); */
- /* trap_expected = 0; */
- /* insert_step_breakpoint (); FIXME, do we need this? */
-
- /* Let 'er rip... */
- proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-
-}
-
-
-/* The process has died, clean up. */
-
-static void
-es1800_mourn_inferior (void)
-{
- remove_breakpoints ();
- unpush_target (&es1800_child_ops);
- generic_mourn_inferior (); /* Do all the proper things now */
-}
-
-/* ES1800-protocol specific routines */
-
-/* Keep discarding input from the remote system, until STRING is found.
- Let the user break out immediately.
- string - the string to expect
- nowait - break out if string not the emulator's first respond otherwise
- read until string is found (== 0) */
-
-static void
-expect (char *string, int nowait)
-{
- char c;
- char *p = string;
-
- immediate_quit++;
- while (1)
- {
- c = readchar ();
- if (isalpha (c))
- {
- c = toupper (c);
- }
- if (c == toupper (*p))
- {
- p++;
- if (*p == '\0')
- {
- immediate_quit--;
- return;
- }
- }
- else if (!nowait)
- {
- p = string;
- }
- else
- {
- printf ("\'%s\' expected\n", string);
- printf ("char %d is %d", p - string, c);
- error ("\n");
- }
- }
-}
-
-/* Keep discarding input until we see the prompt. */
-
-static void
-expect_prompt (void)
-{
- expect (">", 0);
-}
-
-
-/* Read one character */
-
-#ifdef DEBUG_STDIN
-
-/* read from stdin */
-
-static int
-readchar (void)
-{
- char buf[1];
-
- buf[0] = '\0';
- printf ("readchar, give one character\n");
- read (0, buf, 1);
-
-#if defined (LOG_FILE)
- putc (buf[0] & 0x7f, log_file);
-#endif
-
- return (buf[0] & 0x7f);
-}
-
-#else /* !DEBUG_STDIN */
-
-/* Read a character from the remote system, doing all the fancy
- timeout stuff. */
-
-static int
-readchar (void)
-{
- int ch;
-
- ch = serial_readchar (es1800_desc, timeout);
-
- /* FIXME: doing an error() here will probably cause trouble, at least if from
- es1800_wait. */
- if (ch == SERIAL_TIMEOUT)
- error ("Timeout reading from remote system.");
- else if (ch == SERIAL_ERROR)
- perror_with_name ("remote read");
-
-#if defined (LOG_FILE)
- putc (ch & 0x7f, log_file);
- fflush (log_file);
-#endif
-
- return (ch);
-}
-
-#endif /* DEBUG_STDIN */
-
-
-/* Send a command to the emulator and save the reply.
- Report an error if we get an error reply.
- string - the es1800 command
- buf - containing the emulator reply on return
- len - size of buf */
-
-static void
-send_with_reply (char *string, char *buf, int len)
-{
- send (string);
- serial_write (es1800_desc, "\r", 1);
-
-#ifndef DEBUG_STDIN
- expect (string, 1);
- expect ("\r\n", 0);
-#endif
-
- getmessage (buf, len);
-}
-
-
-/* Send the command in STR to the emulator adding \r. check
- the echo for consistency.
- string - the es1800 command */
-
-static void
-send_command (char *string)
-{
- send (string);
- serial_write (es1800_desc, "\r", 1);
-
-#ifndef DEBUG_STDIN
- expect (string, 0);
- expect_prompt ();
-#endif
-
-}
-
-/* Send a string
- string - the es1800 command */
-
-static void
-send (char *string)
-{
- if (kiodebug)
- {
- fprintf_unfiltered (gdb_stderr, "Sending: %s\n", string);
- }
- serial_write (es1800_desc, string, strlen (string));
-}
-
-
-/* Read a message from the emulator and store it in BUF.
- buf - containing the emulator reply on return
- len - size of buf */
-
-static void
-getmessage (char *buf, int len)
-{
- char *bp;
- int c;
- int prompt_found = 0;
- extern kiodebug;
-
-#if defined (LOG_FILE)
- /* This is a convenient place to do this. The idea is to do it often
- enough that we never lose much data if we terminate abnormally. */
- fflush (log_file);
-#endif
-
- bp = buf;
- c = readchar ();
- do
- {
- if (c)
- {
- if (len-- < 2) /* char and terminaling NULL */
- {
- error ("input buffer overrun\n");
- }
- *bp++ = c;
- }
- c = readchar ();
- if ((c == '>') && (*(bp - 1) == ' '))
- {
- prompt_found = 1;
- }
- }
- while (!prompt_found);
- *bp = 0;
-
- if (kiodebug)
- {
- fprintf_unfiltered (gdb_stderr, "message received :%s\n", buf);
- }
-}
-
-static void
-download (FILE *instream, int from_tty, int format)
-{
- char c;
- char buf[160];
- int i = 0;
-
- send_command ("SET #2,$1A"); /* reset char = ^Z */
- send_command ("SET #3,$11,$13"); /* XON XOFF */
- if (format == 2)
- {
- send_command ("SET #26,#2");
- }
- else
- {
- send_command ("SET #26,#5"); /* Format=Extended Tekhex */
- }
- send_command ("DFB = $10");
- send_command ("PUR");
- send_command ("CES");
- send ("DNL\r");
- expect ("DNL", 1);
- if (from_tty)
- {
- printf (" 0 records loaded...\r");
- }
- while (fgets (buf, 160, instream))
- {
- send (buf);
- if (from_tty)
- {
- printf ("%5d\b\b\b\b\b", ++i);
- fflush (stdout);
- }
- if ((c = readchar ()) != 006)
- {
- error ("expected ACK");
- }
- }
- if (from_tty)
- {
- printf ("- All");
- }
-}
-
-/* Additional commands */
-
-#if defined (TIOCGETP) && defined (FNDELAY) && defined (EWOULDBLOCK)
-#define PROVIDE_TRANSPARENT
-#endif
-
-#ifdef PROVIDE_TRANSPARENT
-/* Talk directly to the emulator
- FIXME, uses busy wait, and is SUNOS (or at least BSD) specific */
-
-/*ARGSUSED */
-static void
-es1800_transparent (char *args, int from_tty)
-{
- int console;
- struct sgttyb modebl;
- int fcflag;
- int cc;
- struct sgttyb console_mode_save;
- int console_fc_save;
- int es1800_fc_save;
- int inputcnt = 80;
- char inputbuf[80];
- int consolecnt = 0;
- char consolebuf[80];
- int es1800_cnt = 0;
- char es1800_buf[80];
- int i;
-
- dont_repeat ();
- if (es1800_desc == NULL)
- {
- printf ("No emulator attached, type emulator-command first\n");
- return;
- }
-
- printf ("\n");
- printf ("You are now communicating directly with the ES 1800 emulator.\n");
- printf ("To leave this mode (transparent mode), press ^E.\n");
- printf ("\n");
- printf (" >");
- fflush (stdout);
-
- if ((console = open ("/dev/tty", O_RDWR)) == -1)
- {
- perror_with_name ("/dev/tty:");
- }
-
- if ((fcflag = fcntl (console, F_GETFL, 0)) == -1)
- {
- perror_with_name ("fcntl console");
- }
-
- console_fc_save = fcflag;
- fcflag = fcflag | FNDELAY;
-
- if (fcntl (console, F_SETFL, fcflag) == -1)
- {
- perror_with_name ("fcntl console");
- }
-
- if (ioctl (console, TIOCGETP, &modebl))
- {
- perror_with_name ("ioctl console");
- }
-
- console_mode_save = modebl;
- modebl.sg_flags = RAW;
-
- if (ioctl (console, TIOCSETP, &modebl))
- {
- perror_with_name ("ioctl console");
- }
-
- if ((fcflag = fcntl (deprecated_serial_fd (es1800_desc), F_GETFL, 0)) == -1)
- {
- perror_with_name ("fcntl serial");
- }
-
- es1800_fc_save = fcflag;
- fcflag = fcflag | FNDELAY;
-
- if (fcntl (deprecated_serial_fd (es1800_desc), F_SETFL, fcflag) == -1)
- {
- perror_with_name ("fcntl serial");
- }
-
- while (1)
- {
- cc = read (console, inputbuf, inputcnt);
- if (cc != -1)
- {
- if ((*inputbuf & 0x7f) == 0x05)
- {
- break;
- }
- for (i = 0; i < cc;)
- {
- es1800_buf[es1800_cnt++] = inputbuf[i++];
- }
- if ((cc = serial_write (es1800_desc, es1800_buf, es1800_cnt)) == -1)
- {
- perror_with_name ("FEL! write:");
- }
- es1800_cnt -= cc;
- if (es1800_cnt && cc)
- {
- for (i = 0; i < es1800_cnt; i++)
- {
- es1800_buf[i] = es1800_buf[cc + i];
- }
- }
- }
- else if (errno != EWOULDBLOCK)
- {
- perror_with_name ("FEL! read:");
- }
-
- cc = read (deprecated_serial_fd (es1800_desc), inputbuf, inputcnt);
- if (cc != -1)
- {
- for (i = 0; i < cc;)
- {
- consolebuf[consolecnt++] = inputbuf[i++];
- }
- if ((cc = write (console, consolebuf, consolecnt)) == -1)
- {
- perror_with_name ("FEL! write:");
- }
- consolecnt -= cc;
- if (consolecnt && cc)
- {
- for (i = 0; i < consolecnt; i++)
- {
- consolebuf[i] = consolebuf[cc + i];
- }
- }
- }
- else if (errno != EWOULDBLOCK)
- {
- perror_with_name ("FEL! read:");
- }
- }
-
- console_fc_save = console_fc_save & !FNDELAY;
- if (fcntl (console, F_SETFL, console_fc_save) == -1)
- {
- perror_with_name ("FEL! fcntl");
- }
-
- if (ioctl (console, TIOCSETP, &console_mode_save))
- {
- perror_with_name ("FEL! ioctl");
- }
-
- close (console);
-
- if (fcntl (deprecated_serial_fd (es1800_desc), F_SETFL, es1800_fc_save) == -1)
- {
- perror_with_name ("FEL! fcntl");
- }
-
- printf ("\n");
-
-}
-#endif /* PROVIDE_TRANSPARENT */
-
-static void
-es1800_init_break (char *args, int from_tty)
-{
- CORE_ADDR memaddress = 0;
- char buf[PBUFSIZ];
- char base_addr[4];
- char *space_index;
- char *p;
- int k;
-
- if (args == NULL)
- {
- error_no_arg ("a trap vector");
- }
-
- if (!(space_index = strchr (args, ' ')))
- {
- error ("Two arguments needed (trap vector and address of break routine).\n");
- }
-
- *space_index = '\0';
-
- es1800_break_vec = strtol (args, (char **) NULL, 0);
- es1800_break_address = parse_and_eval_address (space_index + 1);
-
- es1800_create_break_insn (es1800_break_insn, es1800_break_vec);
-
- if (m68020)
- {
- send_with_reply ("VBR ", buf, sizeof (buf));
- p = buf;
- for (k = 0; k < 4; k++)
- {
- if ((p[k * 2 + 1] == 0) || (p[k * 2 + 2] == 0))
- {
- error ("Emulator reply is too short: %s", buf);
- }
- base_addr[k] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
- }
- /* base addr of exception vector table */
- memaddress = *((CORE_ADDR *) base_addr);
- }
-
- memaddress += (es1800_break_vec + 32) * 4; /* address of trap vector */
-
- sprintf (buf, "@.L%lx=$%lx", memaddress, es1800_break_address);
- send_command (buf); /* set the address of the break routine in the */
- /* trap vector */
-
- sprintf (buf, "@.L%lx=$4E714E71", es1800_break_address); /* NOP; NOP */
- send_command (buf);
- sprintf (buf, "@.L%lx=$4E714E73", es1800_break_address + 4); /* NOP; RTE */
- send_command (buf);
-
- sprintf (buf, "AC2=$%lx", es1800_break_address + 4);
- /* breakpoint at es1800-break_address */
- send_command (buf);
- send_command ("WHEN AC2 THEN BRK"); /* ie in exception routine */
-
- if (from_tty)
- {
- printf ("Breakpoint (trap $%x) routine at address: %lx\n",
- es1800_break_vec, es1800_break_address);
- }
-}
-
-static void
-es1800_child_open (char *arg, int from_tty)
-{
- error ("Use the \"run\" command to start a child process.");
-}
-
-static void
-es1800_child_detach (char *args, int from_tty)
-{
- if (args)
- {
- error ("Argument given to \"detach\" when remotely debugging.");
- }
-
- pop_target ();
- if (from_tty)
- {
- printf ("Ending debugging the process %d.\n", PIDGET (inferior_ptid));
- }
-}
-
-
-/* Define the target subroutine names */
-
-struct target_ops es1800_ops;
-
-static void
-init_es1800_ops (void)
-{
- es1800_ops.to_shortname = "es1800";
- es1800_ops.to_longname = "Remote serial target in ES1800-emulator protocol";
- es1800_ops.to_doc = "Remote debugging on the es1800 emulator via a serial line.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- es1800_ops.to_open = es1800_open;
- es1800_ops.to_close = es1800_close;
- es1800_ops.to_attach = es1800_attach;
- es1800_ops.to_detach = es1800_detach;
- es1800_ops.to_resume = es1800_resume;
- es1800_ops.to_prepare_to_store = es1800_prepare_to_store;
- es1800_ops.to_xfer_memory = es1800_xfer_inferior_memory;
- es1800_ops.to_files_info = es1800_files_info;
- es1800_ops.to_insert_breakpoint = es1800_insert_breakpoint;
- es1800_ops.to_remove_breakpoint = es1800_remove_breakpoint;
- es1800_ops.to_load = es1800_load;
- es1800_ops.to_create_inferior = es1800_create_inferior;
- es1800_ops.to_stratum = core_stratum;
- es1800_ops.to_has_memory = 1;
- es1800_ops.to_magic = OPS_MAGIC;
-}
-
-/* Define the target subroutine names */
-
-struct target_ops es1800_child_ops;
-
-static void
-init_es1800_child_ops (void)
-{
- es1800_child_ops.to_shortname = "es1800_process";
- es1800_child_ops.to_longname = "Remote serial target in ES1800-emulator protocol";
- es1800_child_ops.to_doc = "Remote debugging on the es1800 emulator via a serial line.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- es1800_child_ops.to_open = es1800_child_open;
- es1800_child_ops.to_attach = es1800_attach;
- es1800_child_ops.to_detach = es1800_child_detach;
- es1800_child_ops.to_resume = es1800_resume;
- es1800_child_ops.to_wait = es1800_wait;
- es1800_child_ops.to_fetch_registers = es1800_fetch_register;
- es1800_child_ops.to_store_registers = es1800_store_register;
- es1800_child_ops.to_prepare_to_store = es1800_prepare_to_store;
- es1800_child_ops.to_xfer_memory = es1800_xfer_inferior_memory;
- es1800_child_ops.to_files_info = es1800_files_info;
- es1800_child_ops.to_insert_breakpoint = es1800_insert_breakpoint;
- es1800_child_ops.to_remove_breakpoint = es1800_remove_breakpoint;
- es1800_child_ops.to_kill = es1800_kill;
- es1800_child_ops.to_load = es1800_load;
- es1800_child_ops.to_create_inferior = es1800_create_inferior;
- es1800_child_ops.to_mourn_inferior = es1800_mourn_inferior;
- es1800_child_ops.to_stratum = process_stratum;
- es1800_child_ops.to_has_all_memory = 1;
- es1800_child_ops.to_has_memory = 1;
- es1800_child_ops.to_has_stack = 1;
- es1800_child_ops.to_has_registers = 1;
- es1800_child_ops.to_has_execution = 1;
- es1800_child_ops.to_magic = OPS_MAGIC;
-}
-
-void
-_initialize_es1800 (void)
-{
- init_es1800_ops ();
- init_es1800_child_ops ();
- add_target (&es1800_ops);
- add_target (&es1800_child_ops);
-#ifdef PROVIDE_TRANSPARENT
- add_com ("transparent", class_support, es1800_transparent,
- "Start transparent communication with the ES 1800 emulator.");
-#endif /* PROVIDE_TRANSPARENT */
- add_com ("init_break", class_support, es1800_init_break,
- "Download break routine and initialize break facility on ES 1800");
-}
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 044746df9ba..a23f72d4606 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1283,13 +1283,13 @@ mips_request (int cmd,
}
static void
-mips_initialize_cleanups (PTR arg)
+mips_initialize_cleanups (void *arg)
{
mips_initializing = 0;
}
static void
-mips_exit_cleanups (PTR arg)
+mips_exit_cleanups (void *arg)
{
mips_exiting = 0;
}
@@ -1791,7 +1791,7 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
&rpc, &rfp, &rsp, flags);
if (nfields >= 3)
{
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
store_unsigned_integer (buf, REGISTER_RAW_SIZE (PC_REGNUM), rpc);
supply_register (PC_REGNUM, buf);
@@ -1972,7 +1972,7 @@ mips_fetch_registers (int regno)
}
{
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = alloca (max_register_size (current_gdbarch));
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 6797d057071..ac97cde930d 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -66,7 +66,7 @@ static void sds_fetch_registers (int);
static void sds_resume (ptid_t, int, enum target_signal);
-static int sds_start_remote (PTR);
+static int sds_start_remote (void *);
static void sds_open (char *, int);
@@ -160,7 +160,7 @@ sds_close (int quitting)
/* Stub for catch_errors. */
static int
-sds_start_remote (PTR dummy)
+sds_start_remote (void *dummy)
{
int c;
unsigned char buf[200];
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 3e2a7cdd505..cc216493924 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -359,7 +359,7 @@ gdbsim_store_register (int regno)
}
else if (REGISTER_SIM_REGNO (regno) >= 0)
{
- char tmp[MAX_REGISTER_RAW_SIZE];
+ char *tmp = alloca (max_register_size (current_gdbarch));
int nr_bytes;
deprecated_read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 39d18e422d9..19153cf05b7 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -638,7 +638,7 @@ struct find_sect_args
static void find_sect (bfd *, asection *, void *);
static void
-find_sect (bfd *abfd, asection *sect, PTR obj)
+find_sect (bfd *abfd, asection *sect, void *obj)
{
struct find_sect_args *args = (struct find_sect_args *) obj;
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index c065a87a7c1..57c0a182327 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -88,7 +88,7 @@ static char *
rom68k_supply_one_register (int regno, unsigned char *hex)
{
ULONGEST value;
- unsigned char regbuf[MAX_REGISTER_RAW_SIZE];
+ unsigned char *regbuf = alloca (max_register_size (current_gdbarch));
value = 0;
while (*hex != '\0')
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 65256f44711..4aed8d8a939 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -143,8 +143,7 @@ static void fetch_core_registers (char *, unsigned int, int, CORE_ADDR);
static void exec_one_dummy_insn (void);
-extern void
-fixup_breakpoints (CORE_ADDR low, CORE_ADDR high, CORE_ADDR delta);
+extern void fixup_breakpoints (CORE_ADDR low, CORE_ADDR high, CORE_ADDR delta);
/* Given REGNO, a gdb register number, return the corresponding
number suitable for use as a ptrace() parameter. Return -1 if
@@ -685,7 +684,7 @@ objfile_symbol_add (void *arg)
{
struct objfile *obj = (struct objfile *) arg;
- syms_from_objfile (obj, NULL, 0, 0);
+ syms_from_objfile (obj, NULL, 0, 0, 0, 0);
new_symfile_objfile (obj, 0, 0);
return 1;
}
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 98cf2d9f0de..a3a8d3d6fb1 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for GDB, the GNU debugger.
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 part of GDB.
@@ -34,6 +34,7 @@
#include "doublest.h"
#include "value.h"
#include "parser-defs.h"
+#include "osabi.h"
#include "libbfd.h" /* for bfd_default_set_arch_mach */
#include "coff/internal.h" /* for libcoff.h */
@@ -1855,17 +1856,6 @@ rs6000_register_virtual_type (int n)
}
}
-/* For the PowerPC, it appears that the debug info marks float parameters as
- floats regardless of whether the function is prototyped, but the actual
- values are always passed in as doubles. Tell gdb to always assume that
- floats are passed as doubles and then converted in the callee. */
-
-static int
-rs6000_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- return 1;
-}
-
/* Return whether register N requires conversion when moving from raw format
to virtual format.
@@ -2668,7 +2658,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
unsigned long mach;
bfd abfd;
int sysv_abi;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
asection *sect;
from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
@@ -2679,9 +2668,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sysv_abi = info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
- if (info.abfd)
- osabi = gdbarch_lookup_osabi (info.abfd);
-
/* Check word size. If INFO is from a binary file, infer it from
that, else choose a likely default. */
if (from_xcoff_exec)
@@ -2716,7 +2702,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
meaningful, because 64-bit CPUs can run in 32-bit mode. So, perform
separate word size check. */
tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->wordsize == wordsize && tdep->osabi == osabi)
+ if (tdep && tdep->wordsize == wordsize)
return arches->gdbarch;
}
@@ -2742,7 +2728,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
tdep = xmalloc (sizeof (struct gdbarch_tdep));
tdep->wordsize = wordsize;
- tdep->osabi = osabi;
/* For e500 executables, the apuinfo section is of help here. Such
section contains the identifier and revision number of each
@@ -2906,7 +2891,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_push_return_address (gdbarch, ppc_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- set_gdbarch_coerce_float_to_double (gdbarch, rs6000_coerce_float_to_double);
set_gdbarch_register_convertible (gdbarch, rs6000_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
@@ -2944,8 +2928,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_use_struct_convention (gdbarch,
generic_use_struct_convention);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
-
set_gdbarch_frameless_function_invocation (gdbarch,
rs6000_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
@@ -2970,7 +2952,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}
@@ -2983,8 +2965,7 @@ rs6000_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "rs6000_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
+ /* FIXME: Dump gdbarch_tdep. */
}
static struct cmd_list_element *info_powerpc_cmdlist = NULL;
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 964c23a31b5..21efca8fb77 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
for IBM Deutschland Entwicklung GmbH, IBM Corporation.
@@ -285,12 +285,12 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
save_link_regidx = subtract_sp_regidx = 0;
if (fextra_info)
{
- if (fi && fi->frame)
+ if (fi && get_frame_base (fi))
{
- orig_sp = fi->frame;
+ orig_sp = get_frame_base (fi);
if (! init_extra_info && fextra_info->initialised)
orig_sp += fextra_info->stack_bought;
- saved_regs = fi->saved_regs;
+ saved_regs = get_frame_saved_regs (fi);
}
if (init_extra_info || !fextra_info->initialised)
{
@@ -316,18 +316,19 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
if (instr[0] == S390_SYSCALL_OPCODE && test_pc == pc)
{
good_prologue = 1;
- if (saved_regs && fextra_info && fi->next && fi->next->extra_info
- && fi->next->extra_info->sigcontext)
+ if (saved_regs && fextra_info && get_next_frame (fi)
+ && get_frame_extra_info (get_next_frame (fi))
+ && get_frame_extra_info (get_next_frame (fi))->sigcontext)
{
/* We are backtracing from a signal handler */
- save_reg_addr = fi->next->extra_info->sigcontext +
+ save_reg_addr = get_frame_extra_info (get_next_frame (fi))->sigcontext +
REGISTER_BYTE (S390_GP0_REGNUM);
for (regidx = 0; regidx < S390_NUM_GPRS; regidx++)
{
saved_regs[S390_GP0_REGNUM + regidx] = save_reg_addr;
save_reg_addr += S390_GPR_SIZE;
}
- save_reg_addr = fi->next->extra_info->sigcontext +
+ save_reg_addr = get_frame_extra_info (get_next_frame (fi))->sigcontext +
(GDB_TARGET_IS_ESAME ? S390X_SIGREGS_FP0_OFFSET :
S390_SIGREGS_FP0_OFFSET);
for (regidx = 0; regidx < S390_NUM_FPRS; regidx++)
@@ -771,10 +772,10 @@ s390_function_start (struct frame_info *fi)
{
CORE_ADDR function_start = 0;
- if (fi->extra_info && fi->extra_info->initialised)
- function_start = fi->extra_info->function_start;
- else if (fi->pc)
- function_start = get_pc_function_start (fi->pc);
+ if (get_frame_extra_info (fi) && get_frame_extra_info (fi)->initialised)
+ function_start = get_frame_extra_info (fi)->function_start;
+ else if (get_frame_pc (fi))
+ function_start = get_pc_function_start (get_frame_pc (fi));
return function_start;
}
@@ -787,14 +788,14 @@ s390_frameless_function_invocation (struct frame_info *fi)
struct frame_extra_info fextra_info, *fextra_info_ptr;
int frameless = 0;
- if (fi->next == NULL) /* no may be frameless */
+ if (get_next_frame (fi) == NULL) /* no may be frameless */
{
- if (fi->extra_info)
- fextra_info_ptr = fi->extra_info;
+ if (get_frame_extra_info (fi))
+ fextra_info_ptr = get_frame_extra_info (fi);
else
{
fextra_info_ptr = &fextra_info;
- s390_get_frame_info (s390_sniff_pc_function_start (fi->pc, fi),
+ s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
fextra_info_ptr, fi, 1);
}
frameless = ((fextra_info_ptr->stack_bought == 0));
@@ -829,11 +830,10 @@ s390_is_sigreturn (CORE_ADDR pc, struct frame_info *sighandler_fi,
if (sighandler_fi)
{
if (s390_frameless_function_invocation (sighandler_fi))
- orig_sp = sighandler_fi->frame;
+ orig_sp = get_frame_base (sighandler_fi);
else
orig_sp = ADDR_BITS_REMOVE ((CORE_ADDR)
- read_memory_integer (sighandler_fi->
- frame,
+ read_memory_integer (get_frame_base (sighandler_fi),
S390_GPR_SIZE));
if (orig_sp && sigcaller_pc)
{
@@ -904,12 +904,12 @@ s390_init_frame_pc_first (int next_fromleaf, struct frame_info *fi)
void
s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- fi->extra_info = frame_obstack_alloc (sizeof (struct frame_extra_info));
- if (fi->pc)
- s390_get_frame_info (s390_sniff_pc_function_start (fi->pc, fi),
- fi->extra_info, fi, 1);
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+ if (get_frame_pc (fi))
+ s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
+ get_frame_extra_info (fi), fi, 1);
else
- s390_memset_extra_info (fi->extra_info);
+ s390_memset_extra_info (get_frame_extra_info (fi));
}
/* If saved registers of frame FI are not known yet, read and cache them.
@@ -922,17 +922,19 @@ s390_frame_init_saved_regs (struct frame_info *fi)
int quick;
- if (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
{
/* zalloc memsets the saved regs */
frame_saved_regs_zalloc (fi);
- if (fi->pc)
+ if (get_frame_pc (fi))
{
- quick = (fi->extra_info && fi->extra_info->initialised
- && fi->extra_info->good_prologue);
- s390_get_frame_info (quick ? fi->extra_info->function_start :
- s390_sniff_pc_function_start (fi->pc, fi),
- fi->extra_info, fi, !quick);
+ quick = (get_frame_extra_info (fi)
+ && get_frame_extra_info (fi)->initialised
+ && get_frame_extra_info (fi)->good_prologue);
+ s390_get_frame_info (quick
+ ? get_frame_extra_info (fi)->function_start
+ : s390_sniff_pc_function_start (get_frame_pc (fi), fi),
+ get_frame_extra_info (fi), fi, !quick);
}
}
}
@@ -944,33 +946,35 @@ s390_frame_args_address (struct frame_info *fi)
{
/* Apparently gdb already knows gdb_args_offset itself */
- return fi->frame;
+ return get_frame_base (fi);
}
static CORE_ADDR
s390_frame_saved_pc_nofix (struct frame_info *fi)
{
- if (fi->extra_info && fi->extra_info->saved_pc_valid)
- return fi->extra_info->saved_pc;
+ if (get_frame_extra_info (fi) && get_frame_extra_info (fi)->saved_pc_valid)
+ return get_frame_extra_info (fi)->saved_pc;
- if (deprecated_generic_find_dummy_frame (fi->pc, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM);
+ if (deprecated_generic_find_dummy_frame (get_frame_pc (fi),
+ get_frame_base (fi)))
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), S390_PC_REGNUM);
s390_frame_init_saved_regs (fi);
- if (fi->extra_info)
+ if (get_frame_extra_info (fi))
{
- fi->extra_info->saved_pc_valid = 1;
- if (fi->extra_info->good_prologue
- && fi->saved_regs[S390_RETADDR_REGNUM])
- fi->extra_info->saved_pc
+ 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])
+ get_frame_extra_info (fi)->saved_pc
= ADDR_BITS_REMOVE (read_memory_integer
- (fi->saved_regs[S390_RETADDR_REGNUM],
+ (get_frame_saved_regs (fi)[S390_RETADDR_REGNUM],
S390_GPR_SIZE));
else
- fi->extra_info->saved_pc
+ get_frame_extra_info (fi)->saved_pc
= ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
- return fi->extra_info->saved_pc;
+ return get_frame_extra_info (fi)->saved_pc;
}
return 0;
}
@@ -980,19 +984,20 @@ s390_frame_saved_pc (struct frame_info *fi)
{
CORE_ADDR saved_pc = 0, sig_pc;
- if (fi->extra_info && fi->extra_info->sig_fixed_saved_pc_valid)
- return fi->extra_info->sig_fixed_saved_pc;
+ if (get_frame_extra_info (fi)
+ && get_frame_extra_info (fi)->sig_fixed_saved_pc_valid)
+ return get_frame_extra_info (fi)->sig_fixed_saved_pc;
saved_pc = s390_frame_saved_pc_nofix (fi);
- if (fi->extra_info)
+ if (get_frame_extra_info (fi))
{
- fi->extra_info->sig_fixed_saved_pc_valid = 1;
+ get_frame_extra_info (fi)->sig_fixed_saved_pc_valid = 1;
if (saved_pc)
{
if (s390_is_sigreturn (saved_pc, fi, NULL, &sig_pc))
saved_pc = sig_pc;
}
- fi->extra_info->sig_fixed_saved_pc = saved_pc;
+ get_frame_extra_info (fi)->sig_fixed_saved_pc = saved_pc;
}
return saved_pc;
}
@@ -1008,8 +1013,10 @@ s390_frame_chain (struct frame_info *thisframe)
{
CORE_ADDR prev_fp = 0;
- if (deprecated_generic_find_dummy_frame (thisframe->pc, thisframe->frame))
- return deprecated_read_register_dummy (thisframe->pc, thisframe->frame,
+ if (deprecated_generic_find_dummy_frame (get_frame_pc (thisframe),
+ get_frame_base (thisframe)))
+ return deprecated_read_register_dummy (get_frame_pc (thisframe),
+ get_frame_base (thisframe),
S390_SP_REGNUM);
else
{
@@ -1018,7 +1025,7 @@ s390_frame_chain (struct frame_info *thisframe)
struct frame_extra_info prev_fextra_info;
memset (&prev_fextra_info, 0, sizeof (prev_fextra_info));
- if (thisframe->pc)
+ if (get_frame_pc (thisframe))
{
CORE_ADDR saved_pc, sig_pc;
@@ -1042,28 +1049,28 @@ s390_frame_chain (struct frame_info *thisframe)
frame_pointer_saved_pc
? 11 : 15)),
S390_GPR_SIZE);
- thisframe->extra_info->sigcontext = sregs;
+ get_frame_extra_info (thisframe)->sigcontext = sregs;
}
else
{
- if (thisframe->saved_regs)
+ if (get_frame_saved_regs (thisframe))
{
int regno;
if (prev_fextra_info.frame_pointer_saved_pc
- && thisframe->saved_regs[S390_FRAME_REGNUM])
+ && get_frame_saved_regs (thisframe)[S390_FRAME_REGNUM])
regno = S390_FRAME_REGNUM;
else
regno = S390_SP_REGNUM;
- if (thisframe->saved_regs[regno])
+ if (get_frame_saved_regs (thisframe)[regno])
{
/* The SP's entry of `saved_regs' is special. */
if (regno == S390_SP_REGNUM)
- prev_fp = thisframe->saved_regs[regno];
+ prev_fp = get_frame_saved_regs (thisframe)[regno];
else
prev_fp =
- read_memory_integer (thisframe->saved_regs[regno],
+ read_memory_integer (get_frame_saved_regs (thisframe)[regno],
S390_GPR_SIZE);
}
}
@@ -1217,14 +1224,14 @@ s390_pop_frame_regular (struct frame_info *frame)
write_register (S390_PC_REGNUM, FRAME_SAVED_PC (frame));
/* Restore any saved registers. */
- if (frame->saved_regs)
+ if (get_frame_saved_regs (frame))
{
for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->saved_regs[regnum] != 0)
+ if (get_frame_saved_regs (frame)[regnum] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (frame->saved_regs[regnum],
+ value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
REGISTER_RAW_SIZE (regnum));
write_register (regnum, value);
}
@@ -1232,7 +1239,7 @@ s390_pop_frame_regular (struct frame_info *frame)
/* 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, frame->saved_regs[S390_SP_REGNUM]);
+ write_register (S390_SP_REGNUM, get_frame_saved_regs (frame)[S390_SP_REGNUM]);
}
/* Throw away any cached frame information. */
@@ -1741,6 +1748,37 @@ s390_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
return sp;
}
+static int
+s390_address_class_type_flags (int byte_size, int dwarf2_addr_class)
+{
+ if (byte_size == 4)
+ return TYPE_FLAG_ADDRESS_CLASS_1;
+ else
+ return 0;
+}
+
+static const char *
+s390_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
+{
+ if (type_flags & TYPE_FLAG_ADDRESS_CLASS_1)
+ return "mode32";
+ else
+ return NULL;
+}
+
+int
+s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name,
+ int *type_flags_ptr)
+{
+ if (strcmp (name, "mode32") == 0)
+ {
+ *type_flags_ptr = TYPE_FLAG_ADDRESS_CLASS_1;
+ return 1;
+ }
+ else
+ return 0;
+}
+
struct gdbarch *
s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -1815,7 +1853,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_cannot_fetch_register (gdbarch, s390_cannot_fetch_register);
set_gdbarch_cannot_store_register (gdbarch, s390_cannot_fetch_register);
set_gdbarch_use_struct_convention (gdbarch, s390_use_struct_convention);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_register_name (gdbarch, s390_register_name);
set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
@@ -1840,8 +1877,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (s390_call_dummy_words));
set_gdbarch_call_dummy_words (gdbarch, s390_call_dummy_words);
- set_gdbarch_coerce_float_to_double (gdbarch,
- standard_coerce_float_to_double);
switch (info.bfd_arch_info->mach)
{
@@ -1865,6 +1900,12 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_register_bytes (gdbarch, S390X_REGISTER_BYTES);
+ set_gdbarch_address_class_type_flags (gdbarch,
+ s390_address_class_type_flags);
+ set_gdbarch_address_class_type_flags_to_name (gdbarch,
+ s390_address_class_type_flags_to_name);
+ set_gdbarch_address_class_name_to_type_flags (gdbarch,
+ s390_address_class_name_to_type_flags);
break;
}
diff --git a/gdb/saber.suppress b/gdb/saber.suppress
deleted file mode 100644
index 6dda1c5f2da..00000000000
--- a/gdb/saber.suppress
+++ /dev/null
@@ -1,451 +0,0 @@
-
-
-/* Options for project */
-unsetopt ansi
-setopt auto_compile
-unsetopt auto_reload
-setopt auto_replace
-unsetopt batch_load
-unsetopt batch_run
-unsetopt cc_prog
-setopt ccargs -g
-unsetopt create_file
-unsetopt debug_child
-unsetopt echo
-setopt edit_jobs 5
-unsetopt eight_bit
-setopt line_edit
-setopt line_meta
-setopt lint_load 2
-setopt lint_run 2
-setopt list_action
-setopt load_flags -I. -g -I.. -I../vx-share
-unsetopt long_not_int
-unsetopt make_args
-setopt make_hfiles
-unsetopt make_offset
-unsetopt make_prog
-setopt make_symbol #
-setopt mem_config 16384
-unsetopt mem_trace
-setopt num_proc 1
-unsetopt page_cmds
-setopt page_list 19
-unsetopt page_load
-unsetopt path
-setopt proto_path . /s2/saber_dir30/sun4-40/proto /s2/saber_dir30/sun4-40/../common/proto
-unsetopt preprocessor
-setopt program_name a.out
-unsetopt print_custom
-setopt print_pointer
-setopt print_string 20
-unsetopt save_memory
-setopt sbrk_size 1048576
-setopt src_err 3
-setopt src_step 1
-setopt src_stop 3
-setopt sys_load_flags -L/lib -L/usr/lib -L/usr/local/lib -I/usr/include -Dunix -Dsun -Dsparc
-unsetopt tab_stop
-unsetopt terse_suppress
-unsetopt terse_where
-setopt unset_value 191
-unsetopt win_fork_nodup
-setopt win_no_raise
-unsetopt win_message_list
-unsetopt win_project_list
-/* Suppressions for project */
-suppress 6 in read_huge_number
-/* Over/underflow <plus> */
-suppress 8 in read_huge_number
-/* Over/underflow <multiply> */
-suppress 22
-/* Pointer subtraction */
-suppress 22 in free_all_psymtabs
-/* Pointer subtraction */
-suppress 22 in free_all_symtabs
-/* Pointer subtraction */
-suppress 56 in print_string
-/* Information lost <function> */
-suppress 65 "../bfd/bfd.c":379
-/* Too many function arguments */
-suppress 65 on printf_filtered
-/* Too many function arguments */
-suppress 65 on fprintf_filtered
-/* Too many function arguments */
-suppress 65 on vfprintf_filtered
-/* Too many function arguments */
-suppress 65 on query
-/* Too many function arguments */
-suppress 65 on fatal_dump_core
-/* Too many function arguments */
-suppress 65 on fatal
-/* Too many function arguments */
-suppress 65 on error
-/* Too many function arguments */
-suppress 65 on noprocess
-/* Too many function arguments */
-suppress 65
-/* Too many function arguments */
-suppress 66 on say
-/* Too few function arguments */
-suppress 66 on printf_filtered
-/* Too few function arguments */
-suppress 66 on fprintf_filtered
-/* Too few function arguments */
-suppress 66 on vfprintf_filtered
-/* Too few function arguments */
-suppress 66 on query
-/* Too few function arguments */
-suppress 66 on fatal_dump_core
-/* Too few function arguments */
-suppress 66 on fatal
-/* Too few function arguments */
-suppress 66 on error
-/* Too few function arguments */
-suppress 67 on printf_filtered
-/* Signed/unsigned argument mismatch */
-suppress 67 on fprintf_filtered
-/* Signed/unsigned argument mismatch */
-suppress 67 on vfprintf_filtered
-/* Signed/unsigned argument mismatch */
-suppress 67 on query
-/* Signed/unsigned argument mismatch */
-suppress 67 on fatal_dump_core
-/* Signed/unsigned argument mismatch */
-suppress 67 on fatal
-/* Signed/unsigned argument mismatch */
-suppress 67 on error
-/* Signed/unsigned argument mismatch */
-suppress 67
-/* Signed/unsigned argument mismatch */
-suppress 68 on bfd_get_section_contents
-/* Benign argument mismatch */
-suppress 68 on _do_getblong
-/* Benign argument mismatch */
-suppress 68 on supply_register
-/* Benign argument mismatch */
-suppress 68 on target_write_memory
-/* Benign argument mismatch */
-suppress 68 on write_register_bytes
-/* Benign argument mismatch */
-suppress 68 on read_register_bytes
-/* Benign argument mismatch */
-suppress 68 on read_memory
-/* Benign argument mismatch */
-suppress 68 on say
-/* Benign argument mismatch */
-suppress 68 on printf_filtered
-/* Benign argument mismatch */
-suppress 68 on fprintf_filtered
-/* Benign argument mismatch */
-suppress 68 on vfprintf_filtered
-/* Benign argument mismatch */
-suppress 68 on query
-/* Benign argument mismatch */
-suppress 68 on fatal_dump_core
-/* Benign argument mismatch */
-suppress 68 on fatal
-/* Benign argument mismatch */
-suppress 68 on error
-/* Benign argument mismatch */
-suppress 68 in find_solib
-/* Benign argument mismatch */
-suppress 68 on child_wait
-/* Benign argument mismatch */
-suppress 68 on xrealloc
-/* Benign argument mismatch */
-suppress 68 on myread
-/* Benign argument mismatch */
-suppress 68 in do_cleanups
-/* Benign argument mismatch */
-suppress 68 on make_cleanup
-/* Benign argument mismatch */
-suppress 68 on target_read_memory
-/* Benign argument mismatch */
-suppress 69 on printf_filtered
-/* Serious argument mismatch */
-suppress 69 on fprintf_filtered
-/* Serious argument mismatch */
-suppress 69 on vfprintf_filtered
-/* Serious argument mismatch */
-suppress 69 on query
-/* Serious argument mismatch */
-suppress 69 on fatal_dump_core
-/* Serious argument mismatch */
-suppress 69 on fatal
-/* Serious argument mismatch */
-suppress 69 on error
-/* Serious argument mismatch */
-suppress 70 on printf_filtered
-/* Passing illegal enumeration value */
-suppress 70 on fprintf_filtered
-/* Passing illegal enumeration value */
-suppress 70 on vfprintf_filtered
-/* Passing illegal enumeration value */
-suppress 70 on query
-/* Passing illegal enumeration value */
-suppress 70 on fatal_dump_core
-/* Passing illegal enumeration value */
-suppress 70 on fatal
-/* Passing illegal enumeration value */
-suppress 70 on error
-/* Passing illegal enumeration value */
-suppress 80 on first_link_map_member
-/* Returning invalid pointer */
-suppress 110 in printf_filtered
-/* Signed/unsigned memory retrieval */
-suppress 110 in fprintf_filtered
-/* Signed/unsigned memory retrieval */
-suppress 110 in vfprintf_filtered
-/* Signed/unsigned memory retrieval */
-suppress 110 in query
-/* Signed/unsigned memory retrieval */
-suppress 110 in fatal_dump_core
-/* Signed/unsigned memory retrieval */
-suppress 110 in fatal
-/* Signed/unsigned memory retrieval */
-suppress 110 in error
-/* Signed/unsigned memory retrieval */
-suppress 112 in printf_filtered
-/* Memory retrieval */
-suppress 112 in fprintf_filtered
-/* Memory retrieval */
-suppress 112 in vfprintf_filtered
-/* Memory retrieval */
-suppress 112 in query
-/* Memory retrieval */
-suppress 112 in fatal_dump_core
-/* Memory retrieval */
-suppress 112 in fatal
-/* Memory retrieval */
-suppress 112 in error
-/* Memory retrieval */
-suppress 112
-/* Memory retrieval */
-suppress 112 ../symtab.c
-/* Memory retrieval */
-suppress 112 in child_xfer_memory
-/* Memory retrieval */
-suppress 165 in frame_saved_pc
-/* Dereference */
-suppress 165 in get_prev_frame_info
-/* Dereference */
-suppress 167 in get_prev_frame_info
-/* Selection */
-suppress 167 in frame_saved_pc
-/* Selection */
-suppress 442 in try_baudrate
-/* Escape has null value */
-suppress 529 in read_range_type
-/* Statement not reached */
-suppress 529 in process_one_symbol
-/* Statement not reached */
-suppress 529 in unpack_double
-/* Statement not reached */
-suppress 529 in wait_for_inferior
-/* Statement not reached */
-suppress 529 in do_registers_info
-/* Statement not reached */
-suppress 529 in value_from_register
-/* Statement not reached */
-suppress 529 in solib_create_inferior_hook
-/* Constant in conditional */
-suppress 530
-/* Empty body of statement */
-suppress 546 in net_quit
-/* Function exits through bottom */
-suppress 546 in net_wait
-/* Function exits through bottom */
-suppress 546 in vx_remove_breakpoint
-/* Function exits through bottom */
-suppress 546 in vx_insert_breakpoint
-/* Function exits through bottom */
-suppress 546 in value_less
-/* Function exits through bottom */
-suppress 546 in value_equal
-/* Function exits through bottom */
-suppress 546 in unpack_long
-/* Function exits through bottom */
-suppress 558 in solib_create_inferior_hook
-/* Constant in conditional */
-suppress 558 in read_range_type
-/* Constant in conditional */
-suppress 558 in process_one_symbol
-/* Constant in conditional */
-suppress 558 in read_dbx_symtab
-/* Constant in conditional */
-suppress 558 in vx_write_register
-/* Constant in conditional */
-suppress 558 in vx_read_register
-/* Constant in conditional */
-suppress 558 in unpack_double
-/* Constant in conditional */
-suppress 558 in wait_for_inferior
-/* Constant in conditional */
-suppress 558 in do_registers_info
-/* Constant in conditional */
-suppress 558 in value_from_register
-/* Constant in conditional */
-suppress 558 in add_enum_psymbol
-/* Constant in conditional */
-suppress 558 in add_partial_symbol
-/* Constant in conditional */
-suppress 558 mfree.c
-/* Constant in conditional */
-suppress 558 mmalloc.c
-/* Constant in conditional */
-suppress 558 mrealloc.c
-/* Constant in conditional */
-suppress 560 in solib_address
-/* Assignment within conditional */
-suppress 560 in solib_info
-/* Assignment within conditional */
-suppress 560 in solib_add
-/* Assignment within conditional */
-suppress 560 in read_type
-/* Assignment within conditional */
-suppress 560 in type_print_base
-/* Assignment within conditional */
-suppress 560 in type_print_derivation_info
-/* Assignment within conditional */
-suppress 560 in block_depth
-/* Assignment within conditional */
-suppress 560 in select_source_symtab
-/* Assignment within conditional */
-suppress 560 in clear_value_history
-/* Assignment within conditional */
-suppress 560 in clear_displays
-/* Assignment within conditional */
-suppress 560 in initialize_main
-/* Assignment within conditional */
-suppress 560 in echo_command
-/* Assignment within conditional */
-suppress 560 in unset_in_environ
-/* Assignment within conditional */
-suppress 560 in set_in_environ
-/* Assignment within conditional */
-suppress 560 in get_in_environ
-/* Assignment within conditional */
-suppress 560 in do_setshow_command
-/* Assignment within conditional */
-suppress 560 in breakpoint_1
-/* Assignment within conditional */
-suppress 590 on sig
-/* Unused formal parameter */
-suppress 590 in nindy_create_inferior
-/* Unused formal parameter */
-suppress 590 in add_to_section_table
-/* Unused formal parameter */
-suppress 590 in vx_create_inferior
-/* Unused formal parameter */
-suppress 590 in host_convert_from_virtual
-/* Unused formal parameter */
-suppress 590 in host_convert_to_virtual
-/* Unused formal parameter */
-suppress 590 on siggnal
-/* Unused formal parameter */
-suppress 590 in init_sig
-/* Unused formal parameter */
-suppress 590 in nindy_resume
-/* Unused formal parameter */
-suppress 590 in set_history_size_command
-/* Unused formal parameter */
-suppress 590 in not_just_help_class_command
-/* Unused formal parameter */
-suppress 590 on regno
-/* Unused formal parameter */
-suppress 590 on from_tty
-/* Unused formal parameter */
-suppress 590 on args
-/* Unused formal parameter */
-suppress 590 in process_symbol_pair
-/* Unused formal parameter */
-suppress 591 in print_scalar_formatted
-/* Unused automatic variable */
-suppress 592 on rcsid
-/* Unused static */
-suppress 594 in call_function_by_hand
-/* Set but not used */
-suppress 594 in record_latest_value
-/* Set but not used */
-suppress 594 in bpstat_stop_status
-/* Set but not used */
-suppress 595 in coffstrip
-/* Used before set */
-suppress 652 ../include/bfd.h
-/* Declaration has no effect */
-suppress 652 /usr/include/machine/reg.h
-/* Declaration has no effect */
-suppress 652 /usr/include/sun4/reg.h
-/* Declaration has no effect */
-suppress 68 on complain
-/* Benign type mismatch */
-suppress 3 in read_range_type
-/* Over/underflow unary minus */
-suppress 442 ../bfd/archive.c
-/* \0 in string */
-suppress 558 ../bfd/b.out.c
-/* Conditional if always true */
-suppress 558 ../bfd/coffswap.c
-/* Conditional if always true -- bfd_h_put_x */
-suppress 529 ../bfd/coffswap.c
-/* Stmt unreach -- bfd_h_put_x */
-suppress 590 ../bfd/ecoff.c
-/* Formal parameter not used */
-suppress 590 on ignore
-/* Formal param not used */
-suppress 590 on ignore_exec_bfd
-/* Formal param not used */
-suppress 590 on ignore_core_bfd
-/* Formal param not used */
-suppress 590 on ignore_input_section
-/* Formal param not used */
-suppress 590 on ignore_newsect
-/* Formal param not used */
-suppress 590 on ignore_abfd
-/* Formal param not used */
-suppress 590 on ignore_symbol
-/* Formal param not used */
-suppress 590 on ignore_symbols
-/* Formal param not used */
-suppress 590 on signo
-/* Formal param not used */
-suppress 652
-/* The declaration has no effect */
-suppress 442 in ../bfd/archive.c
-/* Escape sequence in string literal has null value */
-
-/* Signals caught and ignored */
-catch HUP
-catch QUIT
-catch ILL
-catch TRAP
-catch IOT
-catch EMT
-catch FPE
-catch KILL
-catch BUS
-catch SEGV
-catch SYS
-catch PIPE
-catch TERM
-catch URG
-catch STOP
-catch TSTP
-catch TTIN
-catch TTOU
-catch IO
-catch XCPU
-catch XFSZ
-catch VTALRM
-catch PROF
-catch LOST
-catch USR1
-catch USR2
-ignore INT
-ignore ALRM
-ignore CONT
-ignore CHLD
-ignore WINCH
-
-/* Status of project */
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 5b2f0c5b665..4bbcd8e5970 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -1,6 +1,7 @@
/* Scheme/Guile language support routines for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -87,7 +88,7 @@ scm_get_field (LONGEST svalue, int index)
or Boolean (CONTEXT == TYPE_CODE_BOOL). */
LONGEST
-scm_unpack (struct type *type, char *valaddr, enum type_code context)
+scm_unpack (struct type *type, const char *valaddr, enum type_code context)
{
if (is_scmvalue_type (type))
{
diff --git a/gdb/scm-lang.h b/gdb/scm-lang.h
index 713b0309028..6e24be56c90 100644
--- a/gdb/scm-lang.h
+++ b/gdb/scm-lang.h
@@ -1,5 +1,7 @@
/* Scheme/Guile language support routines for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+
+ Copyright 1995, 1996, 1998, 1999, 2000, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -67,4 +69,4 @@ extern struct type *builtin_type_scm;
extern int scm_parse (void);
-extern LONGEST scm_unpack (struct type *, char *, enum type_code);
+extern LONGEST scm_unpack (struct type *, const char *, enum type_code);
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
new file mode 100644
index 00000000000..fe11d8a6f43
--- /dev/null
+++ b/gdb/sentinel-frame.c
@@ -0,0 +1,113 @@
+/* Code dealing with register stack frames, for GDB, the GNU debugger.
+
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#include "defs.h"
+#include "regcache.h"
+#include "sentinel-frame.h"
+#include "inferior.h"
+#include "frame-unwind.h"
+
+struct frame_unwind_cache
+{
+ struct regcache *regcache;
+};
+
+void *
+sentinel_frame_cache (struct regcache *regcache)
+{
+ struct frame_unwind_cache *cache =
+ FRAME_OBSTACK_ZALLOC (struct frame_unwind_cache);
+ cache->regcache = regcache;
+ return cache;
+}
+
+/* Here the register value is taken direct from the register cache. */
+
+void
+sentinel_frame_register_unwind (struct frame_info *frame,
+ void **unwind_cache,
+ int regnum, int *optimized,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnum, void *bufferp)
+{
+ struct frame_unwind_cache *cache = *unwind_cache;
+ /* Describe the register's location. A reg-frame maps all registers
+ onto the corresponding hardware register. */
+ *optimized = 0;
+ *lvalp = lval_register;
+ *addrp = REGISTER_BYTE (regnum);
+ *realnum = regnum;
+
+ /* If needed, find and return the value of the register. */
+ if (bufferp != NULL)
+ {
+ /* Return the actual value. */
+ /* Use the regcache_cooked_read() method so that it, on the fly,
+ constructs either a raw or pseudo register from the raw
+ register cache. */
+ regcache_cooked_read (cache->regcache, regnum, bufferp);
+ }
+}
+
+CORE_ADDR
+sentinel_frame_pc_unwind (struct frame_info *frame,
+ void **cache)
+{
+ /* FIXME: cagney/2003-01-08: This should be using a per-architecture
+ method that doesn't suffer from DECR_PC_AFTER_BREAK problems.
+ Such a method would take unwind_cache, regcache and stop reason
+ parameters. */
+ return read_pc ();
+}
+
+void
+sentinel_frame_id_unwind (struct frame_info *frame,
+ void **cache,
+ struct frame_id *id)
+{
+ /* FIXME: cagney/2003-01-08: This should be using a per-architecture
+ method that doesn't suffer from DECR_PC_AFTER_BREAK problems.
+ Such a method would take unwind_cache, regcache and stop reason
+ parameters. */
+ id->base = read_fp ();
+ id->pc = read_pc ();
+}
+
+static void
+sentinel_frame_pop (struct frame_info *frame,
+ void **cache,
+ struct regcache *regcache)
+{
+ internal_error (__FILE__, __LINE__, "Function sentinal_frame_pop called");
+}
+
+const struct frame_unwind sentinel_frame_unwinder =
+{
+ sentinel_frame_pop,
+ sentinel_frame_pc_unwind,
+ sentinel_frame_id_unwind,
+ sentinel_frame_register_unwind
+};
+
+const struct frame_unwind *const sentinel_frame_unwind = &sentinel_frame_unwinder;
diff --git a/gdb/config/m68k/nm-apollo68b.h b/gdb/sentinel-frame.h
index eca8bfa7ce6..9b69f42154b 100644
--- a/gdb/config/m68k/nm-apollo68b.h
+++ b/gdb/sentinel-frame.h
@@ -1,5 +1,6 @@
-/* Macro defintions for an Apollo m68k in BSD mode
- Copyright 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
+/* Code dealing with register stack frames, for GDB, the GNU debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,25 +19,23 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define FETCH_INFERIOR_REGISTERS
+#if !defined (SENTINEL_FRAME_H)
+#define SENTINEL_FRAME_H 1
-/* Tell gdb that we can attach and detach other processes */
-#define ATTACH_DETACH
+struct frame_unwind;
+struct regcache;
-#define U_REGS_OFFSET 6
+/* Implement the sentinel frame. The sentinel frame terminates the
+ inner most end of the frame chain. If unwound, it returns the
+ information need to construct an inner-most frame. */
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
+/* Pump prime the sentinel frame's cache. Since this needs the
+ REGCACHE provide that here. */
-#define KERNEL_U_ADDR 0
+extern void *sentinel_frame_cache (struct regcache *regcache);
-#undef FLOAT_INFO /* No float info yet */
+/* At present there is only one type of sentinel frame. */
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = (6 + 4 * (regno))
+extern const struct frame_unwind *const sentinel_frame_unwind;
-/* Apollos don't really have a USER area,so trying to read it from the
- * process address space will fail. It does support a read from a faked
- * USER area using the "PEEKUSER" ptrace call.
- */
-#define PT_READ_U 3
+#endif /* !defined (SENTINEL_FRAME_H) */
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index 0642b5aa4bd..cea01cdf221 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -356,8 +356,8 @@ dos_comisr (int irq)
#define ISRNAME(x) dos_comisr##x
#define ISR(x) static void ISRNAME(x)(void) {dos_comisr(x);}
-ISR (0) ISR (1) ISR (2) ISR (3)
-ISR (4) ISR (5) ISR (6) ISR (7)
+ISR (0) ISR (1) ISR (2) ISR (3) /* OK */
+ISR (4) ISR (5) ISR (6) ISR (7) /* OK */
typedef void (*isr_t) (void);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index dc68b15fad5..46b7deec1fc 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Hitachi Super-H, for GDB.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -33,12 +33,13 @@
#include "gdbcore.h"
#include "value.h"
#include "dis-asm.h"
-#include "inferior.h" /* for BEFORE_TEXT_END etc. */
+#include "inferior.h"
#include "gdb_string.h"
#include "arch-utils.h"
#include "floatformat.h"
#include "regcache.h"
#include "doublest.h"
+#include "osabi.h"
#include "sh-tdep.h"
@@ -156,6 +157,28 @@ 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",
+ "fpul", "fpscr",
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ };
+ 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_sh_dsp_register_name (int reg_nr)
{
static char *register_names[] =
@@ -928,10 +951,13 @@ gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
static CORE_ADDR
sh_frame_chain (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return frame->frame; /* dummy frame same as caller's frame */
- if (frame->pc && !inside_entry_file (frame->pc))
- return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, 4);
+ 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) && !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;
}
@@ -966,17 +992,21 @@ translate_insn_rn (int rn, int media_mode)
static CORE_ADDR
sh64_frame_chain (struct frame_info *frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- return frame->frame; /* dummy frame same as caller's frame */
- if (frame->pc && !inside_entry_file (frame->pc))
+ 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) && !inside_entry_file (get_frame_pc (frame)))
{
- int media_mode = pc_is_isa32 (frame->pc);
+ int media_mode = pc_is_isa32 (get_frame_pc (frame));
int size;
if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
size = 4;
else
size = REGISTER_RAW_SIZE (translate_insn_rn (FP_REGNUM, media_mode));
- return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, size);
+ return read_memory_integer (get_frame_base (frame)
+ + get_frame_extra_info (frame)->f_offset,
+ size);
}
else
return 0;
@@ -990,18 +1020,20 @@ sh64_frame_chain (struct frame_info *frame)
static CORE_ADDR
sh_find_callers_reg (struct frame_info *fi, int regnum)
{
- for (; fi; fi = fi->next)
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 (fi->pc, fi->frame, regnum);
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), regnum);
else
{
FRAME_INIT_SAVED_REGS (fi);
- if (!fi->pc)
+ if (!get_frame_pc (fi))
return 0;
- if (fi->saved_regs[regnum] != 0)
- return read_memory_integer (fi->saved_regs[regnum],
+ if (get_frame_saved_regs (fi)[regnum] != 0)
+ return read_memory_integer (get_frame_saved_regs (fi)[regnum],
REGISTER_RAW_SIZE (regnum));
}
return read_register (regnum);
@@ -1012,26 +1044,28 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
{
int media_mode = 0;
- for (; fi; fi = fi->next)
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 (fi->pc, fi->frame, pr_regnum);
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), pr_regnum);
else
{
FRAME_INIT_SAVED_REGS (fi);
- if (!fi->pc)
+ if (!get_frame_pc (fi))
return 0;
- media_mode = pc_is_isa32 (fi->pc);
+ media_mode = pc_is_isa32 (get_frame_pc (fi));
- if (fi->saved_regs[pr_regnum] != 0)
+ if (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 (fi->saved_regs[pr_regnum], size);
+ return read_memory_integer (get_frame_saved_regs (fi)[pr_regnum], size);
}
}
return read_register (pr_regnum);
@@ -1053,24 +1087,25 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
int opc;
int insn;
int r3_val = 0;
- char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
+ get_frame_base (fi));
- if (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
else
- memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+ 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 (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+ memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
return;
}
- fi->extra_info->leaf_function = 1;
- fi->extra_info->f_offset = 0;
+ 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;
@@ -1081,10 +1116,10 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
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_pc_function_start (fi->pc);
+ pc = get_pc_function_start (get_frame_pc (fi));
if (!pc)
{
- fi->pc = 0;
+ deprecated_update_frame_pc_hack (fi, 0);
return;
}
@@ -1102,7 +1137,7 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
{
where[gdbarch_tdep (current_gdbarch)->PR_REGNUM] = depth;
/* If we're storing the pr then this isn't a leaf */
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
depth += 4;
}
else if (IS_MOV_R3 (insn))
@@ -1140,24 +1175,24 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
if (rn == FP_REGNUM)
have_fp = 1;
- fi->saved_regs[rn] = fi->frame - where[rn] + depth - 4;
+ get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4;
}
else
{
- fi->saved_regs[rn] = 0;
+ get_frame_saved_regs (fi)[rn] = 0;
}
}
if (have_fp)
{
- fi->saved_regs[SP_REGNUM] = read_memory_integer (fi->saved_regs[FP_REGNUM], 4);
+ get_frame_saved_regs (fi)[SP_REGNUM] = read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4);
}
else
{
- fi->saved_regs[SP_REGNUM] = fi->frame - 4;
+ get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4;
}
- fi->extra_info->f_offset = depth - where[FP_REGNUM] - 4;
+ get_frame_extra_info (fi)->f_offset = depth - where[FP_REGNUM] - 4;
/* Work out the return pc - either from the saved pr or the pr
value */
}
@@ -1392,25 +1427,25 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
int insn_size;
int gdb_register_number;
int register_number;
- char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
+ 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 (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
else
- memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+ 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 (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+ memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
return;
}
- fi->extra_info->leaf_function = 1;
- fi->extra_info->f_offset = 0;
+ 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;
@@ -1421,10 +1456,10 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
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_pc_function_start (fi->pc);
+ pc = get_pc_function_start (get_frame_pc (fi));
if (!pc)
{
- fi->pc = 0;
+ deprecated_update_frame_pc_hack (fi, 0);
return;
}
@@ -1460,7 +1495,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
int reg_nr = tdep->PR_C_REGNUM;
where[reg_nr] = depth - ((((next_insn & 0xf) ^ 0x8) - 0x8) << 2);
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
pc += insn_size;
}
}
@@ -1488,7 +1523,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
int reg_nr = tdep->PR_C_REGNUM;
where[reg_nr] = depth - (r0_val - 4);
r0_val -= 4;
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
}
else if (IS_MOV_R14_R0 (insn))
{
@@ -1516,14 +1551,14 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
{
where[tdep->PR_REGNUM] =
depth - (sign_extend ((insn & 0xffc00) >> 10, 9) << 3);
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
}
else if (IS_STL_R18_R15 (insn))
{
where[tdep->PR_REGNUM] =
depth - (sign_extend ((insn & 0xffc00) >> 10, 9) << 2);
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
}
else if (IS_STQ_R14_R15 (insn))
@@ -1553,11 +1588,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. */
- fi->saved_regs[register_number]= fi->frame - where[rn] + depth;
+ get_frame_saved_regs (fi)[register_number]= get_frame_base (fi) - where[rn] + depth;
}
else
- fi->saved_regs[register_number] = 0;
+ get_frame_saved_regs (fi)[register_number] = 0;
}
if (have_fp)
@@ -1574,12 +1609,12 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
size = 4;
else
size = REGISTER_RAW_SIZE (fp_regnum);
- fi->saved_regs[sp_regnum] = read_memory_integer (fi->saved_regs[fp_regnum], size);
+ get_frame_saved_regs (fi)[sp_regnum] = read_memory_integer (get_frame_saved_regs (fi)[fp_regnum], size);
}
else
- fi->saved_regs[sp_regnum] = fi->frame;
+ get_frame_saved_regs (fi)[sp_regnum] = get_frame_base (fi);
- fi->extra_info->f_offset = depth - where[fp_regnum];
+ get_frame_extra_info (fi)->f_offset = depth - where[fp_regnum];
}
static void
@@ -1593,25 +1628,25 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
int opc;
int insn;
int r3_val = 0;
- char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
+ 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 (fi->saved_regs == NULL)
+ if (get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
else
- memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+ 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 (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+ memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
return;
}
- fi->extra_info->leaf_function = 1;
- fi->extra_info->f_offset = 0;
+ 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;
@@ -1622,10 +1657,10 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
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_pc_function_start (fi->pc);
+ pc = get_pc_function_start (get_frame_pc (fi));
if (!pc)
{
- fi->pc = 0;
+ deprecated_update_frame_pc_hack (fi, 0);
return;
}
@@ -1643,7 +1678,7 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
{
where[tdep->PR_REGNUM] = depth;
/* If we're storing the pr then this isn't a leaf */
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->leaf_function = 0;
depth += 4;
}
else if (IS_MOV_R3 (insn))
@@ -1692,25 +1727,25 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
if (rn == FP_REGNUM)
have_fp = 1;
- fi->saved_regs[rn] = fi->frame - where[rn] + depth - 4;
+ get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4;
}
else
{
- fi->saved_regs[rn] = 0;
+ get_frame_saved_regs (fi)[rn] = 0;
}
}
if (have_fp)
{
- fi->saved_regs[SP_REGNUM] =
- read_memory_integer (fi->saved_regs[FP_REGNUM], 4);
+ get_frame_saved_regs (fi)[SP_REGNUM] =
+ read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4);
}
else
{
- fi->saved_regs[SP_REGNUM] = fi->frame - 4;
+ get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4;
}
- fi->extra_info->f_offset = depth - where[FP_REGNUM] - 4;
+ get_frame_extra_info (fi)->f_offset = depth - where[FP_REGNUM] - 4;
/* Work out the return pc - either from the saved pr or the pr
value */
}
@@ -1720,29 +1755,29 @@ static void
sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
- SP_REGNUM);
- fi->extra_info->return_pc = deprecated_read_register_dummy (fi->pc,
- fi->frame,
+ 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);
- fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
- fi->extra_info->leaf_function = 0;
+ get_frame_extra_info (fi)->f_offset = -(CALL_DUMMY_LENGTH + 4);
+ get_frame_extra_info (fi)->leaf_function = 0;
return;
}
else
{
FRAME_INIT_SAVED_REGS (fi);
- fi->extra_info->return_pc =
+ get_frame_extra_info (fi)->return_pc =
sh_find_callers_reg (fi, gdbarch_tdep (current_gdbarch)->PR_REGNUM);
}
}
@@ -1750,30 +1785,30 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
static void
sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- int media_mode = pc_is_isa32 (fi->pc);
+ int media_mode = pc_is_isa32 (get_frame_pc (fi));
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ 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 run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
- SP_REGNUM);
- fi->extra_info->return_pc =
- deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
- fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
- fi->extra_info->leaf_function = 0;
+ 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 = -(CALL_DUMMY_LENGTH + 4);
+ get_frame_extra_info (fi)->leaf_function = 0;
return;
}
else
{
FRAME_INIT_SAVED_REGS (fi);
- fi->extra_info->return_pc =
+ get_frame_extra_info (fi)->return_pc =
sh64_get_saved_pr (fi, gdbarch_tdep (current_gdbarch)->PR_REGNUM);
}
}
@@ -1805,7 +1840,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
but we are in compact mode, it will become the corresponding
compact pseudo register. If there is no corresponding compact
pseudo-register what do we do?*/
- media_mode = pc_is_isa32 (frame->pc);
+ media_mode = pc_is_isa32 (get_frame_pc (frame));
live_regnum = translate_insn_rn (regnum, media_mode);
/* Note: since the current frame's registers could only have been
@@ -1813,23 +1848,25 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
the current frame itself: otherwise, we would be getting the
previous frame's registers which were saved by the current frame. */
- while (frame && ((frame = frame->next) != NULL))
+ while (frame && ((frame = get_next_frame (frame)) != NULL))
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
{
if (lval) /* found it in a CALL_DUMMY frame */
*lval = not_lval;
if (raw_buffer)
memcpy (raw_buffer,
- (deprecated_generic_find_dummy_frame (frame->pc, frame->frame)
+ (deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame))
+ REGISTER_BYTE (regnum)),
REGISTER_RAW_SIZE (regnum));
return;
}
FRAME_INIT_SAVED_REGS (frame);
- if (frame->saved_regs != NULL
- && frame->saved_regs[regnum] != 0)
+ if (get_frame_saved_regs (frame) != NULL
+ && get_frame_saved_regs (frame)[regnum] != 0)
{
if (lval) /* found it saved on the stack */
*lval = lval_memory;
@@ -1837,13 +1874,13 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
{
if (raw_buffer) /* SP register treated specially */
store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- frame->saved_regs[regnum]);
+ get_frame_saved_regs (frame)[regnum]);
}
else
{ /* any other register */
if (addrp)
- *addrp = frame->saved_regs[regnum];
+ *addrp = get_frame_saved_regs (frame)[regnum];
if (raw_buffer)
{
int size;
@@ -1854,9 +1891,9 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
else
size = REGISTER_RAW_SIZE (live_regnum);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- read_memory (frame->saved_regs[regnum], raw_buffer, size);
+ read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer, size);
else
- read_memory (frame->saved_regs[regnum],
+ read_memory (get_frame_saved_regs (frame)[regnum],
raw_buffer
+ REGISTER_RAW_SIZE (live_regnum)
- size,
@@ -1897,7 +1934,7 @@ sh64_extract_struct_value_address (char *regbuf)
static CORE_ADDR
sh_frame_saved_pc (struct frame_info *frame)
{
- return ((frame)->extra_info->return_pc);
+ return (get_frame_extra_info (frame)->return_pc);
}
/* Discard from the stack the innermost frame,
@@ -1909,7 +1946,9 @@ sh_pop_frame (void)
register CORE_ADDR fp;
register int regnum;
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
generic_pop_dummy_frame ();
else
{
@@ -1918,11 +1957,11 @@ sh_pop_frame (void)
/* Copy regs from where they were saved in the frame */
for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
- if (frame->saved_regs[regnum])
+ if (get_frame_saved_regs (frame)[regnum])
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum], 4));
+ read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
- write_register (PC_REGNUM, frame->extra_info->return_pc);
+ write_register (PC_REGNUM, get_frame_extra_info (frame)->return_pc);
write_register (SP_REGNUM, fp + 4);
}
flush_cached_frames ();
@@ -1937,9 +1976,11 @@ sh64_pop_frame (void)
register int regnum;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- int media_mode = pc_is_isa32 (frame->pc);
+ int media_mode = pc_is_isa32 (get_frame_pc (frame));
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
generic_pop_dummy_frame ();
else
{
@@ -1948,7 +1989,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 (frame->saved_regs[regnum])
+ if (get_frame_saved_regs (frame)[regnum])
{
int size;
if (tdep->sh_abi == SH_ABI_32
@@ -1959,11 +2000,11 @@ sh64_pop_frame (void)
size = REGISTER_RAW_SIZE (translate_insn_rn (regnum,
media_mode));
write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum],
+ read_memory_integer (get_frame_saved_regs (frame)[regnum],
size));
}
- write_register (PC_REGNUM, frame->extra_info->return_pc);
+ write_register (PC_REGNUM, get_frame_extra_info (frame)->return_pc);
write_register (SP_REGNUM, fp + 8);
}
flush_cached_frames ();
@@ -2319,12 +2360,6 @@ sh_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
}
#endif
-static int
-sh_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- return 1;
-}
-
/* Find a function's return value in the appropriate registers (in
regbuf), and copy it into valbuf. Extract from an array REGBUF
containing the (raw) register state a function return value of type
@@ -2612,6 +2647,62 @@ sh3_show_regs (void)
static void
+sh2e_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 (" FPUL=%08lx FPSCR=%08lx",
+ (long) read_register (gdbarch_tdep (current_gdbarch)->FPUL_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->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));
+}
+
+static void
sh3e_show_regs (void)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
@@ -2938,7 +3029,7 @@ sh64_show_compact_regs (void)
static void
sh64_show_regs (void)
{
- if (pc_is_isa32 (deprecated_selected_frame->pc))
+ if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
sh64_show_media_regs ();
else
sh64_show_compact_regs ();
@@ -3996,7 +4087,7 @@ sh64_do_pseudo_register (int regnum)
static void
sh_do_register (int regnum)
{
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
+ char *raw_buffer = alloca (max_register_size (current_gdbarch));
fputs_filtered (REGISTER_NAME (regnum), gdb_stdout);
print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), gdb_stdout);
@@ -4113,7 +4204,7 @@ sh_compact_do_registers_info (int regnum, int fpregs)
void
sh64_do_registers_info (int regnum, int fpregs)
{
- if (pc_is_isa32 (deprecated_selected_frame->pc))
+ if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
sh_do_registers_info (regnum, fpregs);
else
sh_compact_do_registers_info (regnum, fpregs);
@@ -4216,26 +4307,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
gdbarch_register_name_ftype *sh_register_name;
gdbarch_deprecated_store_return_value_ftype *sh_store_return_value;
gdbarch_register_virtual_type_ftype *sh_register_virtual_type;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
-
- /* Try to determine the ABI of the object we are loading. */
-
- if (info.abfd != NULL)
- {
- osabi = gdbarch_lookup_osabi (info.abfd);
- /* If we get "unknown" back, just leave it that way. */
- }
- /* Find a candidate among the list of pre-declared architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- 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;
/* None found, create a new architecture from the information
provided. */
@@ -4246,8 +4322,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
ready to unwind the PC first (see frame.c:get_prev_frame()). */
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
- tdep->osabi = osabi;
-
/* Initialize the register numbers that are not common to all the
variants to -1, if necessary thse will be overwritten in the case
statement below. */
@@ -4333,6 +4407,20 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
break;
+ case bfd_mach_sh2e:
+ sh_register_name = sh_sh2e_register_name;
+ sh_show_regs = sh2e_show_regs;
+ sh_store_return_value = sh3e_sh4_store_return_value;
+ sh_register_virtual_type = sh_sh3e_register_virtual_type;
+ set_gdbarch_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
+ set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_fp0_regnum (gdbarch, 25);
+ tdep->FPUL_REGNUM = 23;
+ tdep->FPSCR_REGNUM = 24;
+ tdep->FP_LAST_REGNUM = 40;
+ break;
case bfd_mach_sh_dsp:
sh_register_name = sh_sh_dsp_register_name;
sh_show_regs = sh_dsp_show_regs;
@@ -4575,8 +4663,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_coerce_float_to_double (gdbarch,
- sh_coerce_float_to_double);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, sh_push_return_address);
@@ -4589,17 +4675,13 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, sh_frame_saved_pc);
set_gdbarch_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- /* Hook in ABI-specific overrides, if they have been registered.
-
- FIXME: if the ABI is unknown, this is probably an embedded target,
- so we should not warn about this situation. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ /* Hook in ABI-specific overrides, if they have been registered. */
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}
@@ -4612,8 +4694,7 @@ sh_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "sh_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
+ /* FIXME: dump the rest of gdbarch_tdep. */
}
void
diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
index cd7f35a8324..1b9c8fe4b69 100644
--- a/gdb/sh-tdep.h
+++ b/gdb/sh-tdep.h
@@ -1,5 +1,5 @@
/* Target-specific definition for a Hitachi Super-H.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,8 +22,6 @@
#ifndef SH_TDEP_H
#define SH_TDEP_H
-#include "osabi.h"
-
/* Contributed by Steve Chamberlain sac@cygnus.com */
/* Information that is dependent on the processor variant. */
@@ -89,7 +87,6 @@ struct gdbarch_tdep
int ARGLAST_REGNUM;
int FLOAT_ARGLAST_REGNUM;
int RETURN_REGNUM;
- enum gdb_osabi osabi; /* OS/ABI of the inferior */
enum sh_abi sh_abi;
};
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index d2f042a16a7..f915d2aa657 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for SuperH running NetBSD, for GDB.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -23,6 +23,7 @@
#include "gdbcore.h"
#include "regcache.h"
#include "value.h"
+#include "osabi.h"
#include "solib-svr4.h"
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 13b95801092..dbff6e26ce1 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -55,7 +55,7 @@
#include "target.h"
#include "inferior.h"
#include <fcntl.h>
-#include <sys/stat.h>
+#include "gdb_stat.h"
#include <dlfcn.h>
#include "gdbcmd.h"
#include "gdbcore.h"
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 8ced5f0129b..78311086a3d 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -197,7 +197,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (xfree, (PTR) symbol_table);
+ back_to = make_cleanup (xfree, symbol_table);
number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
@@ -224,7 +224,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (xfree, (PTR) symbol_table);
+ back_to = make_cleanup (xfree, symbol_table);
number_of_symbols = bfd_canonicalize_dynamic_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
diff --git a/gdb/solib.c b/gdb/solib.c
index 639788b3e50..a49614bbae3 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -1,7 +1,7 @@
/* Handle shared libraries for GDB, the GNU Debugger.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -57,7 +57,7 @@ static int solib_cleanup_queued = 0; /* make_run_cleanup called */
/* Local function prototypes */
-static void do_clear_solib (PTR);
+static void do_clear_solib (void *);
/* If non-zero, this is a prefix that will be added to the front of the name
shared libraries with an absolute filename for loading. */
@@ -207,7 +207,7 @@ solib_open (char *in_pathname, char **found_pathname)
*/
static int
-solib_map_sections (PTR arg)
+solib_map_sections (void *arg)
{
struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
char *filename;
@@ -324,7 +324,7 @@ free_so (struct so_list *so)
/* A small stub to get us past the arg-passing pinhole of catch_errors. */
static int
-symbol_add_stub (PTR arg)
+symbol_add_stub (void *arg)
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
struct section_addr_info *sap;
@@ -387,7 +387,7 @@ update_solib_list (int from_tty, struct target_ops *target)
symbols now! */
if (attach_flag &&
symfile_objfile == NULL)
- catch_errors (TARGET_SO_OPEN_SYMBOL_FILE_OBJECT, (PTR) &from_tty,
+ catch_errors (TARGET_SO_OPEN_SYMBOL_FILE_OBJECT, &from_tty,
"Error reading attached process's symbol file.\n",
RETURN_MASK_ALL);
@@ -755,7 +755,7 @@ clear_solib (void)
}
static void
-do_clear_solib (PTR dummy)
+do_clear_solib (void *dummy)
{
solib_cleanup_queued = 0;
clear_solib ();
@@ -875,6 +875,10 @@ For other (relative) files, you can add values using `set solib-search-path'.",
add_show_from_set (c, &showlist);
set_cmd_completer (c, filename_completer);
+ /* Set the default value of "solib-absolute-prefix" from the sysroot, if
+ one is set. */
+ solib_absolute_prefix = xstrdup (gdb_sysroot);
+
c = add_set_cmd ("solib-search-path", class_support, var_string,
(char *) &solib_search_path,
"Set the search path for loading non-absolute shared library symbol files.\n\
diff --git a/gdb/somread.c b/gdb/somread.c
index 38e35b2e7bb..6ba95a65b94 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -45,11 +45,10 @@ static void som_symfile_read (struct objfile *, int);
static void som_symfile_finish (struct objfile *);
-static void
-som_symtab_read (bfd *, struct objfile *, struct section_offsets *);
+static void som_symtab_read (bfd *, struct objfile *,
+ struct section_offsets *);
-static void
-som_symfile_offsets (struct objfile *, struct section_addr_info *);
+static void som_symfile_offsets (struct objfile *, struct section_addr_info *);
/* FIXME: These should really be in a common header somewhere */
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 6cc9f451657..c66946bfb7d 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -1,7 +1,7 @@
/* Handle HP SOM shared libraries for GDB, the GNU Debugger.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free
- Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -401,6 +401,21 @@ som_solib_load_symbols (struct so_list *so, char *name, int from_tty,
}
+/* FIXME: cagney/2003-02-01: This just isn't right. Given an address
+ within the target's address space, this converts the value into an
+ address within the host's (i.e., GDB's) address space. Given that
+ the host/target address spaces are separate, this can't be right. */
+
+static void *
+hpux_address_to_host_pointer_hack (CORE_ADDR addr)
+{
+ void *ptr;
+
+ gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
+ ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
+ return ptr;
+}
+
/* Add symbols from shared libraries into the symtab list, unless the
size threshold specified by auto_solib_limit (in megabytes) would
be exceeded. */
@@ -418,7 +433,8 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re
int threshold_warning_given = 0;
/* First validate our arguments. */
- if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
+ re_err = re_comp (arg_string ? arg_string : ".");
+ if (re_err != NULL)
{
error ("Invalid regexp: %s", re_err);
}
@@ -714,8 +730,10 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re
if (status != 0)
goto err;
+ /* FIXME: cagney/2003-02-01: I think som_solib.next should be a
+ CORE_ADDR. */
new_so->som_solib.next =
- address_to_host_pointer (extract_unsigned_integer (buf, 4));
+ hpux_address_to_host_pointer_hack (extract_unsigned_integer (buf, 4));
/* Note that we don't re-set "addr" to the next pointer
* until after we've read the trailing data.
diff --git a/gdb/somsolib.h b/gdb/somsolib.h
index 4b23760199c..0840067d997 100644
--- a/gdb/somsolib.h
+++ b/gdb/somsolib.h
@@ -1,6 +1,7 @@
/* HP SOM Shared library declarations for GDB, the GNU Debugger.
- Copyright 1992, 1994, 1995, 1998, 1999, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1994, 1995, 1998, 1999, 2000, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -36,8 +37,8 @@ extern void som_solib_add (char *, int, struct target_ops *, int);
extern CORE_ADDR som_solib_get_got_by_pc (CORE_ADDR);
-extern int
-som_solib_section_offsets (struct objfile *, struct section_offsets *);
+extern int som_solib_section_offsets (struct objfile *,
+ struct section_offsets *);
/* Function to be called when the inferior starts up, to discover the names
of shared libraries that are dynamically linked, the base addresses to
diff --git a/gdb/source.c b/gdb/source.c
index 1cc4dd0a1fc..d98ae8a74a0 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1,6 +1,6 @@
/* List lines of source files for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -674,14 +674,24 @@ openp (const char *path, int try_cwd_first, const char *string,
mode |= O_BINARY;
#endif
- if ((try_cwd_first || IS_ABSOLUTE_PATH (string)) && is_regular_file (string))
+ if (try_cwd_first || IS_ABSOLUTE_PATH (string))
{
int i;
- filename = alloca (strlen (string) + 1);
- strcpy (filename, string);
- fd = open (filename, mode, prot);
- if (fd >= 0)
- goto done;
+
+ if (is_regular_file (string))
+ {
+ filename = alloca (strlen (string) + 1);
+ strcpy (filename, string);
+ fd = open (filename, mode, prot);
+ if (fd >= 0)
+ goto done;
+ }
+ else
+ {
+ filename = NULL;
+ fd = -1;
+ }
+
for (i = 0; string[i]; i++)
if (IS_DIR_SEPARATOR (string[i]))
goto done;
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 5970b5a039f..b634f6c87dd 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -1,7 +1,7 @@
/* Functions specific to running gdb native on a SPARC running SunOS4.
- Copyright 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002
- Free Software Foundation, Inc.
+
+ Copyright 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -31,7 +31,7 @@
#endif
#include <signal.h>
#include <sys/ptrace.h>
-#include <sys/wait.h>
+#include "gdb_wait.h"
#ifdef __linux__
#include <asm/reg.h>
#else
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 45fce0b2191..3fe4dfcf309 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for the SPARC for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
This file is part of GDB.
@@ -111,8 +111,6 @@ struct gdbarch_tdep
int reg_save_offset;
int call_dummy_call_offset;
int print_insn_mach;
-
- enum gdb_osabi osabi;
};
/* Now make GDB_TARGET_IS_SPARC64 a runtime test. */
@@ -294,18 +292,19 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
CORE_ADDR prologue_start, prologue_end;
int insn;
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
frame_saved_regs_zalloc (fi);
- fi->extra_info->bottom =
- (fi->next ?
- (fi->frame == fi->next->frame ? fi->next->extra_info->bottom :
- fi->next->frame) : read_sp ());
+ get_frame_extra_info (fi)->bottom =
+ (get_next_frame (fi)
+ ? (get_frame_base (fi) == get_frame_base (get_next_frame (fi))
+ ? get_frame_extra_info (get_next_frame (fi))->bottom
+ : get_frame_base (get_next_frame (fi)))
+ : read_sp ());
/* If fi->next is NULL, then we already set ->frame by passing read_fp()
to create_new_frame. */
- if (fi->next)
+ if (get_next_frame (fi))
{
char *buf;
@@ -313,32 +312,33 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Compute ->frame as if not flat. If it is flat, we'll change
it later. */
- if (fi->next->next != NULL
- && ((get_frame_type (fi->next->next) == SIGTRAMP_FRAME)
- || deprecated_frame_in_dummy (fi->next->next))
- && frameless_look_for_prologue (fi->next))
+ if (get_next_frame (get_next_frame (fi)) != NULL
+ && ((get_frame_type (get_next_frame (get_next_frame (fi))) == SIGTRAMP_FRAME)
+ || deprecated_frame_in_dummy (get_next_frame (get_next_frame (fi))))
+ && frameless_look_for_prologue (get_next_frame (fi)))
{
/* A frameless function interrupted by a signal did not change
the frame pointer, fix up frame pointer accordingly. */
- fi->frame = get_frame_base (fi->next);
- fi->extra_info->bottom = fi->next->extra_info->bottom;
+ deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
+ get_frame_extra_info (fi)->bottom =
+ get_frame_extra_info (get_next_frame (fi))->bottom;
}
else
{
/* Should we adjust for stack bias here? */
get_saved_register (buf, 0, 0, fi, FP_REGNUM, 0);
- fi->frame = extract_address (buf, REGISTER_RAW_SIZE (FP_REGNUM));
+ deprecated_update_frame_base_hack (fi, extract_address (buf, REGISTER_RAW_SIZE (FP_REGNUM)));
- if (GDB_TARGET_IS_SPARC64 && (fi->frame & 1))
- fi->frame += 2047;
+ if (GDB_TARGET_IS_SPARC64 && (get_frame_base (fi) & 1))
+ deprecated_update_frame_base_hack (fi, get_frame_base (fi) + 2047);
}
}
/* Decide whether this is a function with a ``flat register window''
frame. For such functions, the frame pointer is actually in %i7. */
- fi->extra_info->flat = 0;
- fi->extra_info->in_prologue = 0;
- if (find_pc_partial_function (fi->pc, &name, &prologue_start, &prologue_end))
+ get_frame_extra_info (fi)->flat = 0;
+ get_frame_extra_info (fi)->in_prologue = 0;
+ if (find_pc_partial_function (get_frame_pc (fi), &name, &prologue_start, &prologue_end))
{
/* See if the function starts with an add (which will be of a
negative number if a flat frame) to the sp. FIXME: Does not
@@ -362,30 +362,30 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
buf = alloca (MAX_REGISTER_RAW_SIZE);
/* We definitely have a flat frame now. */
- fi->extra_info->flat = 1;
+ get_frame_extra_info (fi)->flat = 1;
- fi->extra_info->sp_offset = offset;
+ get_frame_extra_info (fi)->sp_offset = offset;
/* Overwrite the frame's address with the value in %i7. */
get_saved_register (buf, 0, 0, fi, I7_REGNUM, 0);
- fi->frame = extract_address (buf, REGISTER_RAW_SIZE (I7_REGNUM));
+ deprecated_update_frame_base_hack (fi, extract_address (buf, REGISTER_RAW_SIZE (I7_REGNUM)));
- if (GDB_TARGET_IS_SPARC64 && (fi->frame & 1))
- fi->frame += 2047;
+ if (GDB_TARGET_IS_SPARC64 && (get_frame_base (fi) & 1))
+ deprecated_update_frame_base_hack (fi, get_frame_base (fi) + 2047);
/* Record where the fp got saved. */
- fi->extra_info->fp_addr =
- fi->frame + fi->extra_info->sp_offset + X_SIMM13 (insn);
+ get_frame_extra_info (fi)->fp_addr =
+ get_frame_base (fi) + get_frame_extra_info (fi)->sp_offset + X_SIMM13 (insn);
/* Also try to collect where the pc got saved to. */
- fi->extra_info->pc_addr = 0;
+ get_frame_extra_info (fi)->pc_addr = 0;
insn = fetch_instruction (prologue_start + 12);
if (X_OP (insn) == 3
&& X_RD (insn) == 15
&& X_OP3 (insn) == 4
&& X_RS1 (insn) == 14)
- fi->extra_info->pc_addr =
- fi->frame + fi->extra_info->sp_offset + X_SIMM13 (insn);
+ get_frame_extra_info (fi)->pc_addr =
+ get_frame_base (fi) + get_frame_extra_info (fi)->sp_offset + X_SIMM13 (insn);
}
}
else
@@ -399,30 +399,30 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
sal = find_pc_line (prologue_start, 0);
if (sal.line == 0) /* no line info, use PC */
- prologue_end = fi->pc;
+ prologue_end = get_frame_pc (fi);
else if (sal.end < prologue_end)
prologue_end = sal.end;
- if (fi->pc < prologue_end)
+ if (get_frame_pc (fi) < prologue_end)
{
- for (addr = prologue_start; addr < fi->pc; addr += 4)
+ for (addr = prologue_start; addr < get_frame_pc (fi); addr += 4)
{
insn = read_memory_integer (addr, 4);
if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3c)
break; /* SAVE seen, stop searching */
}
- if (addr >= fi->pc)
+ if (addr >= get_frame_pc (fi))
{
- fi->extra_info->in_prologue = 1;
- fi->frame = read_register (SP_REGNUM);
+ get_frame_extra_info (fi)->in_prologue = 1;
+ deprecated_update_frame_base_hack (fi, read_register (SP_REGNUM));
}
}
}
}
- if (fi->next && fi->frame == 0)
+ if (get_next_frame (fi) && get_frame_base (fi) == 0)
{
/* Kludge to cause init_prev_frame_info to destroy the new frame. */
- fi->frame = fi->next->frame;
- fi->pc = fi->next->pc;
+ deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
+ deprecated_update_frame_pc_hack (fi, get_frame_pc (get_next_frame (fi)));
}
}
@@ -469,7 +469,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
/* Solaris2 ucbsigvechandler passes a pointer to a sigcontext
as the third parameter. The offset to the saved pc is 12. */
- find_pc_partial_function (frame->pc, &name,
+ find_pc_partial_function (get_frame_pc (frame), &name,
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
if (name && STREQ (name, "ucbsigvechandler"))
saved_pc_offset = 12;
@@ -485,10 +485,10 @@ sparc_frame_saved_pc (struct frame_info *frame)
scbuf, sizeof (scbuf));
return extract_address (scbuf, sizeof (scbuf));
}
- else if (frame->extra_info->in_prologue ||
- (frame->next != NULL &&
- ((get_frame_type (frame->next) == SIGTRAMP_FRAME) ||
- deprecated_frame_in_dummy (frame->next)) &&
+ else if (get_frame_extra_info (frame)->in_prologue ||
+ (get_next_frame (frame) != NULL &&
+ ((get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME) ||
+ deprecated_frame_in_dummy (get_next_frame (frame))) &&
frameless_look_for_prologue (frame)))
{
/* A frameless function interrupted by a signal did not save
@@ -497,10 +497,10 @@ sparc_frame_saved_pc (struct frame_info *frame)
frame, O7_REGNUM, (enum lval_type *) NULL);
return PC_ADJUST (extract_address (buf, SPARC_INTREG_SIZE));
}
- if (frame->extra_info->flat)
- addr = frame->extra_info->pc_addr;
+ if (get_frame_extra_info (frame)->flat)
+ addr = get_frame_extra_info (frame)->pc_addr;
else
- addr = frame->extra_info->bottom + FRAME_SAVED_I0 +
+ addr = get_frame_extra_info (frame)->bottom + FRAME_SAVED_I0 +
SPARC_INTREG_SIZE * (I7_REGNUM - I0_REGNUM);
if (addr == 0)
@@ -534,8 +534,8 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
internal_error (__FILE__, __LINE__,
"create_new_frame returned invalid frame");
- frame->extra_info->bottom = argv[1];
- frame->pc = FRAME_SAVED_PC (frame);
+ get_frame_extra_info (frame)->bottom = argv[1];
+ deprecated_update_frame_pc_hack (frame, FRAME_SAVED_PC (frame));
return frame;
}
@@ -676,7 +676,7 @@ examine_prologue (CORE_ADDR start_pc, int frameless_p, struct frame_info *fi,
{
if (saved_regs && X_I (insn))
saved_regs[X_RD (insn)] =
- fi->frame + fi->extra_info->sp_offset + X_SIMM13 (insn);
+ get_frame_base (fi) + get_frame_extra_info (fi)->sp_offset + X_SIMM13 (insn);
}
else
break;
@@ -825,7 +825,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
}
- frame1 = frame->next;
+ frame1 = get_next_frame (frame);
/* Get saved PC from the frame info if not in innermost frame. */
if (regnum == PC_REGNUM && frame1 != NULL)
@@ -835,7 +835,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (raw_buffer != NULL)
{
/* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), frame->pc);
+ store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), get_frame_pc (frame));
}
if (addrp != NULL)
*addrp = 0;
@@ -846,15 +846,16 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
{
/* FIXME MVS: wrong test for dummy frame at entry. */
- if (frame1->pc >= (frame1->extra_info->bottom ?
- frame1->extra_info->bottom : read_sp ())
- && frame1->pc <= get_frame_base (frame1))
+ if (get_frame_pc (frame1) >= (get_frame_extra_info (frame1)->bottom
+ ? get_frame_extra_info (frame1)->bottom
+ : read_sp ())
+ && get_frame_pc (frame1) <= get_frame_base (frame1))
{
/* Dummy frame. All but the window regs are in there somewhere.
The window registers are saved on the stack, just like in a
normal frame. */
if (regnum >= G1_REGNUM && regnum < G1_REGNUM + 7)
- addr = frame1->frame + (regnum - G0_REGNUM) * SPARC_INTREG_SIZE
+ addr = get_frame_base (frame1) + (regnum - G0_REGNUM) * SPARC_INTREG_SIZE
- (FP_REGISTER_BYTES + 8 * SPARC_INTREG_SIZE);
else if (regnum >= I0_REGNUM && regnum < I0_REGNUM + 8)
/* NOTE: cagney/2002-05-04: The call to get_prev_frame()
@@ -862,7 +863,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
This is because frame1 is initialized to frame->next
(frame1->prev == frame) and is then advanced towards
the innermost (next) frame. */
- addr = (get_prev_frame (frame1)->extra_info->bottom
+ addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+ (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
+ FRAME_SAVED_I0);
else if (regnum >= L0_REGNUM && regnum < L0_REGNUM + 8)
@@ -871,31 +872,31 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
This is because frame1 is initialized to frame->next
(frame1->prev == frame) and is then advanced towards
the innermost (next) frame. */
- addr = (get_prev_frame (frame1)->extra_info->bottom
+ addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+ (regnum - L0_REGNUM) * SPARC_INTREG_SIZE
+ FRAME_SAVED_L0);
else if (regnum >= O0_REGNUM && regnum < O0_REGNUM + 8)
- addr = frame1->frame + (regnum - O0_REGNUM) * SPARC_INTREG_SIZE
+ addr = get_frame_base (frame1) + (regnum - O0_REGNUM) * SPARC_INTREG_SIZE
- (FP_REGISTER_BYTES + 16 * SPARC_INTREG_SIZE);
else if (SPARC_HAS_FPU &&
regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32)
- addr = frame1->frame + (regnum - FP0_REGNUM) * 4
+ addr = get_frame_base (frame1) + (regnum - FP0_REGNUM) * 4
- (FP_REGISTER_BYTES);
else if (GDB_TARGET_IS_SPARC64 && SPARC_HAS_FPU &&
regnum >= FP0_REGNUM + 32 && regnum < FP_MAX_REGNUM)
- addr = frame1->frame + 32 * 4 + (regnum - FP0_REGNUM - 32) * 8
+ addr = get_frame_base (frame1) + 32 * 4 + (regnum - FP0_REGNUM - 32) * 8
- (FP_REGISTER_BYTES);
else if (regnum >= Y_REGNUM && regnum < NUM_REGS)
- addr = frame1->frame + (regnum - Y_REGNUM) * SPARC_INTREG_SIZE
+ addr = get_frame_base (frame1) + (regnum - Y_REGNUM) * SPARC_INTREG_SIZE
- (FP_REGISTER_BYTES + 24 * SPARC_INTREG_SIZE);
}
- else if (frame1->extra_info->flat)
+ else if (get_frame_extra_info (frame1)->flat)
{
if (regnum == RP_REGNUM)
- addr = frame1->extra_info->pc_addr;
+ addr = get_frame_extra_info (frame1)->pc_addr;
else if (regnum == I7_REGNUM)
- addr = frame1->extra_info->fp_addr;
+ addr = get_frame_extra_info (frame1)->fp_addr;
else
{
CORE_ADDR func_start;
@@ -904,7 +905,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
regs = alloca (NUM_REGS * sizeof (CORE_ADDR));
memset (regs, 0, NUM_REGS * sizeof (CORE_ADDR));
- find_pc_partial_function (frame1->pc, NULL, &func_start, NULL);
+ find_pc_partial_function (get_frame_pc (frame1), NULL, &func_start, NULL);
examine_prologue (func_start, 0, frame1, regs);
addr = regs[regnum];
}
@@ -913,11 +914,11 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
{
/* Normal frame. Local and In registers are saved on stack. */
if (regnum >= I0_REGNUM && regnum < I0_REGNUM + 8)
- addr = (get_prev_frame (frame1)->extra_info->bottom
+ addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+ (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
+ FRAME_SAVED_I0);
else if (regnum >= L0_REGNUM && regnum < L0_REGNUM + 8)
- addr = (get_prev_frame (frame1)->extra_info->bottom
+ addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+ (regnum - L0_REGNUM) * SPARC_INTREG_SIZE
+ FRAME_SAVED_L0);
else if (regnum >= O0_REGNUM && regnum < O0_REGNUM + 8)
@@ -930,7 +931,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
}
if (addr != 0)
break;
- frame1 = frame1->next;
+ frame1 = get_next_frame (frame1);
}
if (addr != 0)
{
@@ -1120,9 +1121,10 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
memset (saved_regs_addr, 0, NUM_REGS * sizeof (CORE_ADDR));
- if (fi->pc >= (fi->extra_info->bottom ?
- fi->extra_info->bottom : read_sp ())
- && fi->pc <= get_frame_base (fi))
+ if (get_frame_pc (fi) >= (get_frame_extra_info (fi)->bottom
+ ? get_frame_extra_info (fi)->bottom
+ : read_sp ())
+ && get_frame_pc (fi) <= get_frame_base (fi))
{
/* Dummy frame. All but the window regs are in there somewhere. */
for (regnum = G1_REGNUM; regnum < G1_REGNUM + 7; regnum++)
@@ -1157,24 +1159,26 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
frame_addr + (regnum - Y_REGNUM) * SPARC_INTREG_SIZE
- DUMMY_STACK_REG_BUF_SIZE;
- frame_addr = fi->extra_info->bottom ?
- fi->extra_info->bottom : read_sp ();
+ frame_addr = (get_frame_extra_info (fi)->bottom
+ ? get_frame_extra_info (fi)->bottom
+ : read_sp ());
}
- else if (fi->extra_info->flat)
+ else if (get_frame_extra_info (fi)->flat)
{
CORE_ADDR func_start;
- find_pc_partial_function (fi->pc, NULL, &func_start, NULL);
+ find_pc_partial_function (get_frame_pc (fi), NULL, &func_start, NULL);
examine_prologue (func_start, 0, fi, saved_regs_addr);
/* Flat register window frame. */
- saved_regs_addr[RP_REGNUM] = fi->extra_info->pc_addr;
- saved_regs_addr[I7_REGNUM] = fi->extra_info->fp_addr;
+ saved_regs_addr[RP_REGNUM] = get_frame_extra_info (fi)->pc_addr;
+ saved_regs_addr[I7_REGNUM] = get_frame_extra_info (fi)->fp_addr;
}
else
{
/* Normal frame. Just Local and In registers */
- frame_addr = fi->extra_info->bottom ?
- fi->extra_info->bottom : read_sp ();
+ frame_addr = (get_frame_extra_info (fi)->bottom
+ ? get_frame_extra_info (fi)->bottom
+ : read_sp ());
for (regnum = L0_REGNUM; regnum < L0_REGNUM + 8; regnum++)
saved_regs_addr[regnum] =
(frame_addr + (regnum - L0_REGNUM) * SPARC_INTREG_SIZE
@@ -1184,18 +1188,19 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
(frame_addr + (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
+ FRAME_SAVED_I0);
}
- if (fi->next)
+ if (get_next_frame (fi))
{
- if (fi->extra_info->flat)
+ if (get_frame_extra_info (fi)->flat)
{
- saved_regs_addr[O7_REGNUM] = fi->extra_info->pc_addr;
+ saved_regs_addr[O7_REGNUM] = get_frame_extra_info (fi)->pc_addr;
}
else
{
/* Pull off either the next frame pointer or the stack pointer */
CORE_ADDR next_next_frame_addr =
- (fi->next->extra_info->bottom ?
- fi->next->extra_info->bottom : read_sp ());
+ (get_frame_extra_info (get_next_frame (fi))->bottom
+ ? get_frame_extra_info (get_next_frame (fi))->bottom
+ : read_sp ());
for (regnum = O0_REGNUM; regnum < O0_REGNUM + 8; regnum++)
saved_regs_addr[regnum] =
(next_next_frame_addr
@@ -1264,7 +1269,7 @@ sparc_pop_frame (void)
7 * SPARC_INTREG_SIZE);
}
- if (frame->extra_info->flat)
+ if (get_frame_extra_info (frame)->flat)
{
/* Each register might or might not have been saved, need to test
individually. */
@@ -1287,7 +1292,7 @@ sparc_pop_frame (void)
read_memory_integer (fsr[O0_REGNUM + 7],
SPARC_INTREG_SIZE));
- write_sp (frame->frame);
+ write_sp (get_frame_base (frame));
}
else if (fsr[I0_REGNUM])
{
@@ -1341,11 +1346,11 @@ sparc_pop_frame (void)
read_memory_integer (fsr[NPC_REGNUM],
REGISTER_RAW_SIZE (NPC_REGNUM)));
}
- else if (frame->extra_info->flat)
+ else if (get_frame_extra_info (frame)->flat)
{
- if (frame->extra_info->pc_addr)
+ if (get_frame_extra_info (frame)->pc_addr)
pc = PC_ADJUST ((CORE_ADDR)
- read_memory_integer (frame->extra_info->pc_addr,
+ read_memory_integer (get_frame_extra_info (frame)->pc_addr,
REGISTER_RAW_SIZE (PC_REGNUM)));
else
{
@@ -1857,8 +1862,7 @@ decode_asi (int val)
}
}
-/* PRINT_REGISTER_HOOK routine.
- Pretty print various registers. */
+/* Pretty print various registers. */
/* FIXME: Would be nice if this did some fancy things for 32 bit sparc. */
static void
@@ -2686,10 +2690,10 @@ sparc64_stack_align (CORE_ADDR addr)
extern void
sparc_print_extra_frame_info (struct frame_info *fi)
{
- if (fi && fi->extra_info && fi->extra_info->flat)
+ if (fi && get_frame_extra_info (fi) && get_frame_extra_info (fi)->flat)
printf_filtered (" flat, pc saved at 0x%s, fp saved at 0x%s\n",
- paddr_nz (fi->extra_info->pc_addr),
- paddr_nz (fi->extra_info->fp_addr));
+ paddr_nz (get_frame_extra_info (fi)->pc_addr),
+ paddr_nz (get_frame_extra_info (fi)->fp_addr));
}
/* MULTI_ARCH support */
@@ -3007,14 +3011,6 @@ sparc_gdbarch_fix_call_dummy (char *dummy,
sparc_fix_call_dummy (dummy, pc, fun, type, gcc_p);
}
-/* Coerce float to double: a no-op. */
-
-static int
-sparc_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- return 1;
-}
-
/* CALL_DUMMY_ADDRESS: fetch the breakpoint address for a call dummy. */
static CORE_ADDR
@@ -3077,7 +3073,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
static LONGEST call_dummy_32[] =
{ 0xbc100001, 0x9de38000, 0xbc100002, 0xbe100003,
@@ -3103,27 +3098,18 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Try to determine the OS ABI of the object we are loading. */
- if (info.abfd != NULL)
+ if (info.abfd != NULL
+ && info.osabi == GDB_OSABI_UNKNOWN)
{
- osabi = gdbarch_lookup_osabi (info.abfd);
- if (osabi == GDB_OSABI_UNKNOWN)
- {
- /* If it's an ELF file, assume it's Solaris. */
- if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
- osabi = GDB_OSABI_SOLARIS;
- }
+ /* If it's an ELF file, assume it's Solaris. */
+ if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
+ info.osabi = GDB_OSABI_SOLARIS;
}
/* First see if there is already a gdbarch that can satisfy the request. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- return arches->gdbarch;
- }
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return arches->gdbarch;
/* None found: is the request for a sparc architecture? */
if (info.bfd_arch_info->arch != bfd_arch_sparc)
@@ -3133,13 +3119,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
- tdep->osabi = osabi;
-
/* First set settings that are common for all sparc architectures. */
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
- set_gdbarch_coerce_float_to_double (gdbarch,
- sparc_coerce_float_to_double);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 1);
@@ -3356,7 +3338,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
case bfd_mach_sparc:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3367,7 +3348,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_sparclet:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparclet_register_name);
@@ -3378,7 +3358,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_sparclite:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparclite_register_name);
@@ -3389,7 +3368,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v8plus:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3400,7 +3378,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v8plusa:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3411,7 +3388,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_sparclite_le:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparclite_register_name);
@@ -3422,7 +3398,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v9:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
@@ -3433,7 +3408,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_sparc_v9a:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
@@ -3445,7 +3419,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
/* Hook in OS ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}
@@ -3458,6 +3432,20 @@ sparc_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "sparc_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
+ fprintf_unfiltered (file, "sparc_dump_tdep: has_fpu = %d\n",
+ tdep->has_fpu);
+ 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",
+ tdep->y_regnum);
+ fprintf_unfiltered (file, "sparc_dump_tdep: fp_max_regnum = %d\n",
+ tdep->fp_max_regnum);
+ fprintf_unfiltered (file, "sparc_dump_tdep: intreg_size = %d\n",
+ tdep->intreg_size);
+ fprintf_unfiltered (file, "sparc_dump_tdep: reg_save_offset = %d\n",
+ tdep->reg_save_offset);
+ fprintf_unfiltered (file, "sparc_dump_tdep: call_dummy_call_offset = %d\n",
+ tdep->call_dummy_call_offset);
+ fprintf_unfiltered (file, "sparc_dump_tdep: print_insn_match = %d\n",
+ tdep->print_insn_mach);
}
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 1b81eb89ffd..17a2fc501e7 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1,6 +1,6 @@
/* Support routines for decoding "stabs" debugging information format.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -134,8 +134,8 @@ read_tilde_fields (struct field_info *, char **, struct type *,
static int attach_fn_fields_to_type (struct field_info *, struct type *);
-static int
-attach_fields_to_type (struct field_info *, struct type *, struct objfile *);
+static int attach_fields_to_type (struct field_info *, struct type *,
+ struct objfile *);
static struct type *read_struct_type (char **, struct type *,
enum type_code,
@@ -149,32 +149,33 @@ static struct field *read_args (char **, int, struct objfile *, int *, int *);
static int
read_cpp_abbrev (struct field_info *, char **, struct type *,
struct objfile *);
+#if 0 /* OBSOLETE CFront */
+// OBSOLETE /* new functions added for cfront support */
-/* new functions added for cfront support */
+// OBSOLETE static int
+// OBSOLETE copy_cfront_struct_fields (struct field_info *, struct type *,
+// OBSOLETE struct objfile *);
-static int
-copy_cfront_struct_fields (struct field_info *, struct type *,
- struct objfile *);
+// OBSOLETE static char *get_cfront_method_physname (char *);
-static char *get_cfront_method_physname (char *);
+// OBSOLETE static int
+// OBSOLETE read_cfront_baseclasses (struct field_info *, char **,
+// OBSOLETE struct type *, struct objfile *);
-static int
-read_cfront_baseclasses (struct field_info *, char **,
- 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 *);
-static int
-read_cfront_static_fields (struct field_info *, char **,
- struct type *, struct objfile *);
-static int
-read_cfront_member_functions (struct field_info *, char **,
- struct type *, struct objfile *);
+// OBSOLETE /* end new functions added for cfront support */
+#endif /* OBSOLETE CFront */
static char *find_name_end (char *name);
-/* end new functions added for cfront support */
-
-static void
-add_live_range (struct objfile *, struct symbol *, CORE_ADDR, CORE_ADDR);
+static void add_live_range (struct objfile *, struct symbol *, CORE_ADDR,
+ CORE_ADDR);
static int resolve_live_range (struct objfile *, struct symbol *, char *);
@@ -182,8 +183,8 @@ static int process_reference (char **string);
static CORE_ADDR ref_search_value (int refnum);
-static int
-resolve_symbol_reference (struct objfile *, struct symbol *, char *);
+static int resolve_symbol_reference (struct objfile *, struct symbol *,
+ char *);
void stabsread_clear_cache (void);
@@ -198,9 +199,6 @@ static const char vb_name[] = "_vb$";
#if !defined (BELIEVE_PCC_PROMOTION)
#define BELIEVE_PCC_PROMOTION 0
#endif
-#if !defined (BELIEVE_PCC_PROMOTION_TYPE)
-#define BELIEVE_PCC_PROMOTION_TYPE 0
-#endif
static void
invalid_cpp_abbrev_complaint (const char *arg1)
@@ -242,36 +240,6 @@ static struct symbol *current_symbol = NULL;
*(pp) = next_symbol_text (objfile); \
} while (0)
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE /* FIXME: These probably should be our own types (like rs6000_builtin_type
-// OBSOLETE has its own types) rather than builtin_type_*. */
-// OBSOLETE static struct type **os9k_type_vector[] =
-// OBSOLETE {
-// OBSOLETE 0,
-// OBSOLETE &builtin_type_int,
-// OBSOLETE &builtin_type_char,
-// OBSOLETE &builtin_type_long,
-// OBSOLETE &builtin_type_short,
-// OBSOLETE &builtin_type_unsigned_char,
-// OBSOLETE &builtin_type_unsigned_short,
-// OBSOLETE &builtin_type_unsigned_long,
-// OBSOLETE &builtin_type_unsigned_int,
-// OBSOLETE &builtin_type_float,
-// OBSOLETE &builtin_type_double,
-// OBSOLETE &builtin_type_void,
-// OBSOLETE &builtin_type_long_double
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static void os9k_init_type_vector (struct type **);
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_init_type_vector (struct type **tv)
-// OBSOLETE {
-// OBSOLETE unsigned int i;
-// OBSOLETE for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
-// OBSOLETE tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
-// OBSOLETE }
-#endif /* OBSOLETE OS9K */
/* Look up a dbx type-number pair. Return the address of the slot
where the type for that number-pair is stored.
@@ -336,12 +304,6 @@ dbx_lookup_type (int typenums[2])
(type_vector_length * sizeof (struct type *)));
memset (&type_vector[old_len], 0,
(type_vector_length - old_len) * sizeof (struct type *));
-
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs)
-// OBSOLETE /* Deal with OS9000 fundamental types. */
-// OBSOLETE os9k_init_type_vector (type_vector);
-#endif /* OBSOLETE OS9K */
}
return (&type_vector[index]);
}
@@ -531,487 +493,488 @@ read_type_number (register char **pp, register int *typenums)
#define VISIBILITY_PUBLIC '2' /* Stabs character for public field */
#define VISIBILITY_IGNORE '9' /* Optimized out or zero length */
-#define CFRONT_VISIBILITY_PRIVATE '2' /* Stabs character for private field */
-#define CFRONT_VISIBILITY_PUBLIC '1' /* Stabs character for public field */
-
-/* This code added to support parsing of ARM/Cfront stabs strings */
-
-/* Get substring from string up to char c, advance string pointer past
- suibstring. */
-
-static char *
-get_substring (char **p, int c)
-{
- char *str;
- str = *p;
- *p = strchr (*p, c);
- if (*p)
- {
- **p = 0;
- (*p)++;
- }
- else
- str = 0;
- return str;
-}
-
-/* Physname gets strcat'd onto sname in order to recreate the mangled
- name (see funtion gdb_mangle_name in gdbtypes.c). For cfront, make
- the physname look like that of g++ - take out the initial mangling
- eg: for sname="a" and fname="foo__1aFPFs_i" return "FPFs_i" */
-
-static char *
-get_cfront_method_physname (char *fname)
-{
- int len = 0;
- /* FIXME would like to make this generic for g++ too, but
- that is already handled in read_member_funcctions */
- char *p = fname;
-
- /* search ahead to find the start of the mangled suffix */
- if (*p == '_' && *(p + 1) == '_') /* compiler generated; probably a ctor/dtor */
- p += 2;
- while (p && (unsigned) ((p + 1) - fname) < strlen (fname) && *(p + 1) != '_')
- p = strchr (p, '_');
- if (!(p && *p == '_' && *(p + 1) == '_'))
- error ("Invalid mangled function name %s", fname);
- p += 2; /* advance past '__' */
-
- /* struct name length and name of type should come next; advance past it */
- while (isdigit (*p))
- {
- len = len * 10 + (*p - '0');
- p++;
- }
- p += len;
-
- return p;
-}
-
-static void
-msg_unknown_complaint (const char *arg1)
-{
- complaint (&symfile_complaints, "Unsupported token in stabs string %s", arg1);
-}
-
-/* Read base classes within cfront class definition.
- eg: A:ZcA;1@Bpub v2@Bvirpri;__ct__1AFv func__1AFv *sfunc__1AFv ;as__1A ;;
- ^^^^^^^^^^^^^^^^^^
-
- A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
- ^
- */
-
-static int
-read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
- struct objfile *objfile)
-{
- int bnum = 0;
- char *p;
- int i;
- struct nextfield *new;
-
- if (**pp == ';') /* no base classes; return */
- {
- ++(*pp);
- return 1;
- }
-
- /* first count base classes so we can allocate space before parsing */
- for (p = *pp; p && *p && *p != ';'; p++)
- {
- if (*p == ' ')
- bnum++;
- }
- bnum++; /* add one more for last one */
-
- /* now parse the base classes until we get to the start of the methods
- (code extracted and munged from read_baseclasses) */
- ALLOCATE_CPLUS_STRUCT_TYPE (type);
- TYPE_N_BASECLASSES (type) = bnum;
-
- /* allocate space */
- {
- int num_bytes = B_BYTES (TYPE_N_BASECLASSES (type));
- char *pointer;
-
- pointer = (char *) TYPE_ALLOC (type, num_bytes);
- TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer;
- }
- B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), TYPE_N_BASECLASSES (type));
-
- for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
- {
- new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (xfree, new);
- memset (new, 0, sizeof (struct nextfield));
- new->next = fip->list;
- fip->list = new;
- FIELD_BITSIZE (new->field) = 0; /* this should be an unpacked field! */
-
- STABS_CONTINUE (pp, objfile);
-
- /* virtual? eg: v2@Bvir */
- if (**pp == 'v')
- {
- SET_TYPE_FIELD_VIRTUAL (type, i);
- ++(*pp);
- }
-
- /* access? eg: 2@Bvir */
- /* Note: protected inheritance not supported in cfront */
- switch (*(*pp)++)
- {
- case CFRONT_VISIBILITY_PRIVATE:
- new->visibility = VISIBILITY_PRIVATE;
- break;
- case CFRONT_VISIBILITY_PUBLIC:
- new->visibility = VISIBILITY_PUBLIC;
- break;
- default:
- /* Bad visibility format. Complain and treat it as
- public. */
- {
- complaint (&symfile_complaints,
- "Unknown visibility `%c' for baseclass",
- new->visibility);
- new->visibility = VISIBILITY_PUBLIC;
- }
- }
-
- /* "@" comes next - eg: @Bvir */
- if (**pp != '@')
- {
- msg_unknown_complaint (*pp);
- return 1;
- }
- ++(*pp);
-
-
- /* Set the bit offset of the portion of the object corresponding
- to this baseclass. Always zero in the absence of
- multiple inheritance. */
- /* Unable to read bit position from stabs;
- Assuming no multiple inheritance for now FIXME! */
- /* We may have read this in the structure definition;
- now we should fixup the members to be the actual base classes */
- FIELD_BITPOS (new->field) = 0;
-
- /* Get the base class name and type */
- {
- char *bname; /* base class name */
- struct symbol *bsym; /* base class */
- char *p1, *p2;
- p1 = strchr (*pp, ' ');
- p2 = strchr (*pp, ';');
- if (p1 < p2)
- bname = get_substring (pp, ' ');
- else
- bname = get_substring (pp, ';');
- if (!bname || !*bname)
- {
- msg_unknown_complaint (*pp);
- return 1;
- }
- /* FIXME! attach base info to type */
- bsym = lookup_symbol (bname, 0, STRUCT_NAMESPACE, 0, 0); /*demangled_name */
- if (bsym)
- {
- new->field.type = SYMBOL_TYPE (bsym);
- new->field.name = type_name_no_tag (new->field.type);
- }
- else
- {
- complaint (&symfile_complaints, "Unable to find base type for %s",
- *pp);
- return 1;
- }
- }
-
- /* If more base classes to parse, loop again.
- We ate the last ' ' or ';' in get_substring,
- so on exit we will have skipped the trailing ';' */
- /* if invalid, return 0; add code to detect - FIXME! */
- }
- return 1;
-}
-
-/* read cfront member functions.
- pp points to string starting with list of functions
- eg: A:ZcA;1@Bpub v2@Bvirpri;__ct__1AFv func__1AFv *sfunc__1AFv ;as__1A ;;
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- */
-
-static int
-read_cfront_member_functions (struct field_info *fip, char **pp,
- struct type *type, struct objfile *objfile)
-{
- /* This code extracted from read_member_functions
- so as to do the similar thing for our funcs */
-
- int nfn_fields = 0;
- int length = 0;
- /* Total number of member functions defined in this class. If the class
- defines two `f' functions, and one `g' function, then this will have
- the value 3. */
- int total_length = 0;
- int i;
- struct next_fnfield
- {
- struct next_fnfield *next;
- struct fn_field fn_field;
- }
- *sublist;
- struct type *look_ahead_type;
- struct next_fnfieldlist *new_fnlist;
- struct next_fnfield *new_sublist;
- char *main_fn_name;
- char *fname;
- struct symbol *ref_func = 0;
-
- /* Process each list until we find the end of the member functions.
- eg: p = "__ct__1AFv foo__1AFv ;;;" */
-
- STABS_CONTINUE (pp, objfile); /* handle \\ */
-
- while (**pp != ';' && (fname = get_substring (pp, ' '), fname))
- {
- int is_static = 0;
- int sublist_count = 0;
- char *pname;
- if (fname[0] == '*') /* static member */
- {
- is_static = 1;
- sublist_count++;
- fname++;
- }
- ref_func = lookup_symbol (fname, 0, VAR_NAMESPACE, 0, 0); /* demangled name */
- if (!ref_func)
- {
- complaint (&symfile_complaints,
- "Unable to find function symbol for %s", fname);
- continue;
- }
- sublist = NULL;
- look_ahead_type = NULL;
- length = 0;
-
- new_fnlist = (struct next_fnfieldlist *)
- xmalloc (sizeof (struct next_fnfieldlist));
- make_cleanup (xfree, new_fnlist);
- memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
-
- /* The following is code to work around cfront generated stabs.
- The stabs contains full mangled name for each field.
- We try to demangle the name and extract the field name out of it. */
- {
- char *dem, *dem_p, *dem_args;
- int dem_len;
- dem = cplus_demangle (fname, DMGL_ANSI | DMGL_PARAMS);
- if (dem != NULL)
- {
- dem_p = strrchr (dem, ':');
- if (dem_p != 0 && *(dem_p - 1) == ':')
- dem_p++;
- /* get rid of args */
- dem_args = strchr (dem_p, '(');
- if (dem_args == NULL)
- dem_len = strlen (dem_p);
- else
- dem_len = dem_args - dem_p;
- main_fn_name =
- obsavestring (dem_p, dem_len, &objfile->type_obstack);
- }
- else
- {
- main_fn_name =
- obsavestring (fname, strlen (fname), &objfile->type_obstack);
- }
- } /* end of code for cfront work around */
-
- new_fnlist->fn_fieldlist.name = main_fn_name;
-
-/*-------------------------------------------------*/
- /* Set up the sublists
- Sublists are stuff like args, static, visibility, etc.
- so in ARM, we have to set that info some other way.
- Multiple sublists happen if overloading
- eg: foo::26=##1;:;2A.;
- In g++, we'd loop here thru all the sublists... */
-
- new_sublist =
- (struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
- make_cleanup (xfree, new_sublist);
- memset (new_sublist, 0, sizeof (struct next_fnfield));
-
- /* eat 1; from :;2A.; */
- new_sublist->fn_field.type = SYMBOL_TYPE (ref_func); /* normally takes a read_type */
- /* Make this type look like a method stub for gdb */
- TYPE_FLAGS (new_sublist->fn_field.type) |= TYPE_FLAG_STUB;
- TYPE_CODE (new_sublist->fn_field.type) = TYPE_CODE_METHOD;
-
- /* If this is just a stub, then we don't have the real name here. */
- if (TYPE_STUB (new_sublist->fn_field.type))
- {
- if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
- TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
- new_sublist->fn_field.is_stub = 1;
- }
-
- /* physname used later in mangling; eg PFs_i,5 for foo__1aFPFs_i
- physname gets strcat'd in order to recreate the onto mangled name */
- pname = get_cfront_method_physname (fname);
- new_sublist->fn_field.physname = savestring (pname, strlen (pname));
-
-
- /* Set this member function's visibility fields.
- Unable to distinguish access from stabs definition!
- Assuming public for now. FIXME!
- (for private, set new_sublist->fn_field.is_private = 1,
- for public, set new_sublist->fn_field.is_protected = 1) */
-
- /* Unable to distinguish const/volatile from stabs definition!
- Assuming normal for now. FIXME! */
-
- new_sublist->fn_field.is_const = 0;
- new_sublist->fn_field.is_volatile = 0; /* volatile not implemented in cfront */
-
- /* Set virtual/static function info
- How to get vtable offsets ?
- Assuming normal for now FIXME!!
- For vtables, figure out from whence this virtual function came.
- It may belong to virtual function table of
- one of its baseclasses.
- set:
- new_sublist -> fn_field.voffset = vtable offset,
- new_sublist -> fn_field.fcontext = look_ahead_type;
- where look_ahead_type is type of baseclass */
- if (is_static)
- new_sublist->fn_field.voffset = VOFFSET_STATIC;
- else /* normal member function. */
- new_sublist->fn_field.voffset = 0;
- new_sublist->fn_field.fcontext = 0;
-
-
- /* Prepare new sublist */
- new_sublist->next = sublist;
- sublist = new_sublist;
- length++;
-
- /* In g++, we loop thu sublists - now we set from functions. */
- new_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
- obstack_alloc (&objfile->type_obstack,
- sizeof (struct fn_field) * length);
- memset (new_fnlist->fn_fieldlist.fn_fields, 0,
- sizeof (struct fn_field) * length);
- for (i = length; (i--, sublist); sublist = sublist->next)
- {
- new_fnlist->fn_fieldlist.fn_fields[i] = sublist->fn_field;
- }
-
- new_fnlist->fn_fieldlist.length = length;
- new_fnlist->next = fip->fnlist;
- fip->fnlist = new_fnlist;
- nfn_fields++;
- total_length += length;
- STABS_CONTINUE (pp, objfile); /* handle \\ */
- } /* end of loop */
-
- if (nfn_fields)
- {
- /* type should already have space */
- TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
- TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * nfn_fields);
- memset (TYPE_FN_FIELDLISTS (type), 0,
- sizeof (struct fn_fieldlist) * nfn_fields);
- TYPE_NFN_FIELDS (type) = nfn_fields;
- TYPE_NFN_FIELDS_TOTAL (type) = total_length;
- }
-
- /* end of scope for reading member func */
-
- /* eg: ";;" */
-
- /* Skip trailing ';' and bump count of number of fields seen */
- if (**pp == ';')
- (*pp)++;
- else
- return 0;
- return 1;
-}
-
-/* This routine fixes up partial cfront types that were created
- while parsing the stabs. The main need for this function is
- to add information such as methods to classes.
- Examples of "p": "sA;;__ct__1AFv foo__1AFv ;;;" */
-int
-resolve_cfront_continuation (struct objfile *objfile, struct symbol *sym,
- char *p)
-{
- struct symbol *ref_sym = 0;
- char *sname;
- /* snarfed from read_struct_type */
- struct field_info fi;
- struct type *type;
- struct cleanup *back_to;
-
- /* Need to make sure that fi isn't gunna conflict with struct
- in case struct already had some fnfs */
- fi.list = NULL;
- fi.fnlist = NULL;
- back_to = make_cleanup (null_cleanup, 0);
-
- /* We only accept structs, classes and unions at the moment.
- Other continuation types include t (typedef), r (long dbl), ...
- We may want to add support for them as well;
- right now they are handled by duplicating the symbol information
- into the type information (see define_symbol) */
- if (*p != 's' /* structs */
- && *p != 'c' /* class */
- && *p != 'u') /* union */
- return 0; /* only handle C++ types */
- p++;
-
- /* Get symbol typs name and validate
- eg: p = "A;;__ct__1AFv foo__1AFv ;;;" */
- sname = get_substring (&p, ';');
- if (!sname || strcmp (sname, SYMBOL_NAME (sym)))
- error ("Internal error: base symbol type name does not match\n");
-
- /* Find symbol's internal gdb reference using demangled_name.
- This is the real sym that we want;
- sym was a temp hack to make debugger happy */
- ref_sym = lookup_symbol (SYMBOL_NAME (sym), 0, STRUCT_NAMESPACE, 0, 0);
- type = SYMBOL_TYPE (ref_sym);
-
-
- /* Now read the baseclasses, if any, read the regular C struct or C++
- class member fields, attach the fields to the type, read the C++
- member functions, attach them to the type, and then read any tilde
- field (baseclass specifier for the class holding the main vtable). */
-
- if (!read_cfront_baseclasses (&fi, &p, type, objfile)
- /* g++ does this next, but cfront already did this:
- || !read_struct_fields (&fi, &p, type, objfile) */
- || !copy_cfront_struct_fields (&fi, type, objfile)
- || !read_cfront_member_functions (&fi, &p, type, objfile)
- || !read_cfront_static_fields (&fi, &p, type, objfile)
- || !attach_fields_to_type (&fi, type, objfile)
- || !attach_fn_fields_to_type (&fi, type)
- /* g++ does this next, but cfront doesn't seem to have this:
- || !read_tilde_fields (&fi, &p, type, objfile) */
- )
- {
- type = error_type (&p, objfile);
- }
-
- do_cleanups (back_to);
- return 0;
-}
-/* End of code added to support parsing of ARM/Cfront stabs strings */
-
+#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_NAMESPACE, 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_NAMESPACE, 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, 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 (SYMBOL_NAME (sym), 0, STRUCT_NAMESPACE, 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. */
@@ -1366,23 +1329,13 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (refnum >= 0)
{
if (nlen > 0)
- {
- SYMBOL_NAME (sym) = (char *)
- obstack_alloc (&objfile->symbol_obstack, nlen);
- strncpy (SYMBOL_NAME (sym), s, nlen);
- SYMBOL_NAME (sym)[nlen] = '\0';
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
- }
+ SYMBOL_SET_NAMES (sym, s, nlen, objfile);
else
/* FIXME! Want SYMBOL_NAME (sym) = 0;
Get error if leave name 0. So give it something. */
{
nlen = p - string;
- SYMBOL_NAME (sym) = (char *)
- obstack_alloc (&objfile->symbol_obstack, nlen);
- strncpy (SYMBOL_NAME (sym), string, nlen);
- SYMBOL_NAME (sym)[nlen] = '\0';
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
+ SYMBOL_SET_NAMES (sym, string, nlen, objfile);
}
}
/* Advance STRING beyond the reference id. */
@@ -1392,29 +1345,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
{
normal:
SYMBOL_LANGUAGE (sym) = current_subfile->language;
- SYMBOL_NAME (sym) = (char *)
- obstack_alloc (&objfile->symbol_obstack, ((p - string) + 1));
- /* Open-coded memcpy--saves function call time. */
- /* FIXME: Does it really? Try replacing with simple strcpy and
- try it on an executable with a large symbol table. */
- /* FIXME: considering that gcc can open code memcpy anyway, I
- doubt it. xoxorich. */
- {
- register char *p1 = string;
- register char *p2 = SYMBOL_NAME (sym);
- while (p1 != p)
- {
- *p2++ = *p1++;
- }
- *p2++ = '\0';
- }
-
- /* If this symbol is from a C++ compilation, then attempt to cache the
- demangled form for future reference. This is a typical time versus
- space tradeoff, that was decided in favor of time because it sped up
- C++ symbol lookups by a factor of about 20. */
-
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
+ SYMBOL_SET_NAMES (sym, string, p - string, objfile);
}
p++;
@@ -1569,9 +1500,13 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_FUNC)
SYMBOL_TYPE (sym) = lookup_function_type (SYMBOL_TYPE (sym));
- /* All functions in C++ have prototypes. */
- if (SYMBOL_LANGUAGE (sym) == language_cplus)
- TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;
+ /* All functions in C++ have prototypes. Stabs does not offer an
+ explicit way to identify prototyped or unprototyped functions,
+ but both GCC and Sun CC emit stabs for the "call-as" type rather
+ than the "declared-as" type for unprototyped functions, so
+ we treat all functions as if they were prototyped. This is used
+ primarily for promotion when calling the function from GDB. */
+ TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;
/* fall into process_prototype_types */
@@ -1676,13 +1611,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
else
SYMBOL_TYPE (sym) = read_type (&p, objfile);
- /* Normally this is a parameter, a LOC_ARG. On the i960, it
- can also be a LOC_LOCAL_ARG depending on symbol type. */
-#ifndef DBX_PARM_SYMBOL_CLASS
-#define DBX_PARM_SYMBOL_CLASS(type) LOC_ARG
-#endif
-
- SYMBOL_CLASS (sym) = DBX_PARM_SYMBOL_CLASS (type);
+ SYMBOL_CLASS (sym) = LOC_ARG;
SYMBOL_VALUE (sym) = valu;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
add_symbol_to_list (sym, &local_symbols);
@@ -1980,16 +1909,18 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (synonym)
p++;
- /* The semantics of C++ state that "struct foo { ... }" also defines
- a typedef for "foo". Unfortunately, cfront never makes the typedef
- when translating C++ into C. We make the typedef here so that
- "ptype foo" works as expected for cfront translated code. */
- else if ((current_subfile->language == language_cplus)
- || (current_subfile->language == language_objc))
- synonym = 1;
+#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);
-
+
/* For a nameless type, we don't want a create a symbol, thus we
did not use `sym'. Return without further processing. */
if (nameless)
@@ -2037,11 +1968,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
}
#endif
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs)
-// OBSOLETE add_symbol_to_list (sym, &global_symbols);
-// OBSOLETE else
-#endif /* OBSOLETE OS9K */
add_symbol_to_list (sym, &local_symbols);
break;
@@ -2081,31 +2007,32 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
add_symbol_to_list (sym, &local_symbols);
break;
-
- /* New code added to support cfront stabs strings.
- Note: case 'P' already handled above */
- case 'Z':
- /* Cfront type continuation coming up!
- Find the original definition and add to it.
- We'll have to do this for the typedef too,
- since we cloned the symbol to define a type in read_type.
- Stabs info examples:
- __1C :Ztl
- foo__1CFv :ZtF (first def foo__1CFv:F(0,3);(0,24))
- C:ZsC;;__ct__1CFv func1__1CFv func2__1CFv ... ;;;
- where C is the name of the class.
- Unfortunately, we can't lookup the original symbol yet 'cuz
- we haven't finished reading all the symbols.
- Instead, we save it for processing later */
- process_later (sym, p, resolve_cfront_continuation);
- SYMBOL_TYPE (sym) = error_type (&p, objfile); /* FIXME! change later */
- SYMBOL_CLASS (sym) = LOC_CONST;
- SYMBOL_VALUE (sym) = 0;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- /* Don't add to list - we'll delete it later when
- we add the continuation to the real sym */
- return sym;
- /* End of new code added to support cfront stabs strings */
+#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_NAMESPACE (sym) = VAR_NAMESPACE;
+// 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);
@@ -2575,24 +2502,6 @@ again:
break;
case 'f': /* Function returning another type */
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs && **pp == '(')
-// OBSOLETE {
-// OBSOLETE /* Function prototype; parse it.
-// OBSOLETE We must conditionalize this on os9k_stabs because otherwise
-// OBSOLETE it could be confused with a Sun-style (1,3) typenumber
-// OBSOLETE (I think). */
-// OBSOLETE struct type *t;
-// OBSOLETE ++*pp;
-// OBSOLETE while (**pp != ')')
-// OBSOLETE {
-// OBSOLETE t = read_type (pp, objfile);
-// OBSOLETE if (**pp == ',')
-// OBSOLETE ++ * pp;
-// OBSOLETE }
-// OBSOLETE }
-#endif /* OBSOLETE OS9K */
-
type1 = read_type (pp, objfile);
type = make_function_type (type1, dbx_lookup_type (typenums));
break;
@@ -2671,36 +2580,12 @@ again:
}
case 'k': /* Const qualifier on some type (Sun) */
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE /* ezannoni 2002-07-16: This can be safely deleted, because 'c'
-// OBSOLETE means complex type in AIX stabs, while it means const qualifier
-// OBSOLETE in os9k stabs. Obviously we were supporting only the os9k meaning.
-// OBSOLETE We were erroring out if we were reading AIX stabs. Right now the
-// OBSOLETE erroring out will happen in the default clause of the switch. */
-// OBSOLETE case 'c': /* Const qualifier on some type (OS9000) */
-// OBSOLETE /* Because 'c' means other things to AIX and 'k' is perfectly good,
-// OBSOLETE only accept 'c' in the os9k_stabs case. */
-// OBSOLETE if (type_descriptor == 'c' && !os9k_stabs)
-// OBSOLETE return error_type (pp, objfile);
-#endif /* OBSOLETE OS9K */
type = read_type (pp, objfile);
type = make_cv_type (1, TYPE_VOLATILE (type), type,
dbx_lookup_type (typenums));
break;
case 'B': /* Volatile qual on some type (Sun) */
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE /* ezannoni 2002-07-16: This can be safely deleted, because 'i'
-// OBSOLETE means imported type in AIX stabs, while it means volatile qualifier
-// OBSOLETE in os9k stabs. Obviously we were supporting only the os9k meaning.
-// OBSOLETE We were erroring out if we were reading AIX stabs. Right now the
-// OBSOLETE erroring out will happen in the default clause of the switch. */
-// OBSOLETE case 'i': /* Volatile qual on some type (OS9000) */
-// OBSOLETE /* Because 'i' means other things to AIX and 'B' is perfectly good,
-// OBSOLETE only accept 'i' in the os9k_stabs case. */
-// OBSOLETE if (type_descriptor == 'i' && !os9k_stabs)
-// OBSOLETE return error_type (pp, objfile);
-#endif /* OBSOLETE OS9K */
type = read_type (pp, objfile);
type = make_cv_type (TYPE_CONST (type), 1, type,
dbx_lookup_type (typenums));
@@ -2807,12 +2692,6 @@ again:
break;
case 'b':
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs)
-// OBSOLETE /* Const and volatile qualified type. */
-// OBSOLETE type = read_type (pp, objfile);
-// OBSOLETE else
-#endif /* OBSOLETE OS9K */
{
/* Sun ACC builtin int type */
type = read_sun_builtin_type (pp, typenums, objfile);
@@ -3070,7 +2949,11 @@ update_method_name_from_physname (char **old_name, char *physname)
method_name = method_name_from_physname (physname);
if (method_name == NULL)
- error ("bad physname %s\n", physname);
+ {
+ complaint (&symfile_complaints,
+ "Method has bad physname %s\n", physname);
+ return;
+ }
if (strcmp (*old_name, method_name) != 0)
{
@@ -3671,35 +3554,37 @@ static void
read_one_struct_field (struct field_info *fip, char **pp, char *p,
struct type *type, struct objfile *objfile)
{
- /* The following is code to work around cfront generated stabs.
- The stabs contains full mangled name for each field.
- We try to demangle the name and extract the field name out of it.
- */
- if (ARM_DEMANGLING && current_subfile->language == language_cplus)
- {
- char save_p;
- char *dem, *dem_p;
- save_p = *p;
- *p = '\0';
- dem = cplus_demangle (*pp, DMGL_ANSI | DMGL_PARAMS);
- if (dem != NULL)
- {
- dem_p = strrchr (dem, ':');
- if (dem_p != 0 && *(dem_p - 1) == ':')
- dem_p++;
- FIELD_NAME (fip->list->field) =
- obsavestring (dem_p, strlen (dem_p), &objfile->type_obstack);
- }
- else
- {
- FIELD_NAME (fip->list->field) =
- obsavestring (*pp, p - *pp, &objfile->type_obstack);
- }
- *p = save_p;
- }
- /* end of code for cfront work around */
+#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 */
- else
+// OBSOLETE else
+#endif /* OBSOLETE CFront */
fip->list->field.name =
obsavestring (*pp, p - *pp, &objfile->type_obstack);
*pp = p + 1;
@@ -3853,10 +3738,6 @@ read_struct_fields (struct field_info *fip, char **pp, struct type *type,
while (**pp != ';' && **pp != '\0')
{
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs && **pp == ',')
-// OBSOLETE break;
-#endif /* OBSOLETE OS9K */
STABS_CONTINUE (pp, objfile);
/* Get space to record the next field's data. */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
@@ -3901,9 +3782,9 @@ read_struct_fields (struct field_info *fip, char **pp, struct type *type,
}
if (p[0] == ':' && p[1] == ':')
{
- /* (OBSOLETE) chill (OBSOLETE) the list of fields: the last
- entry (at the head) is a partially constructed entry which we
- now scrub. */
+ /* (the deleted) chill the list of fields: the last entry (at
+ the head) is a partially constructed entry which we now
+ scrub. */
fip->list = fip->list->next;
}
return 1;
@@ -4156,135 +4037,137 @@ attach_fn_fields_to_type (struct field_info *fip, register struct type *type)
return 1;
}
-/* read cfront class static data.
- pp points to string starting with the list of static data
- eg: A:ZcA;1@Bpub v2@Bvirpri;__ct__1AFv func__1AFv *sfunc__1AFv ;as__1A ;;
- ^^^^^^^^
-
- A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
- ^
- */
-
-static int
-read_cfront_static_fields (struct field_info *fip, char **pp, struct type *type,
- struct objfile *objfile)
-{
- struct nextfield *new;
- struct type *stype;
- char *sname;
- struct symbol *ref_static = 0;
-
- if (**pp == ';') /* no static data; return */
- {
- ++(*pp);
- return 1;
- }
-
- /* Process each field in the list until we find the terminating ";" */
-
- /* eg: p = "as__1A ;;;" */
- STABS_CONTINUE (pp, objfile); /* handle \\ */
- while (**pp != ';' && (sname = get_substring (pp, ' '), sname))
- {
- ref_static = lookup_symbol (sname, 0, VAR_NAMESPACE, 0, 0); /*demangled_name */
- if (!ref_static)
- {
- complaint (&symfile_complaints,
- "Unable to find symbol for static data field %s", sname);
- continue;
- }
- stype = SYMBOL_TYPE (ref_static);
-
- /* allocate a new fip */
- new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (xfree, new);
- memset (new, 0, sizeof (struct nextfield));
- new->next = fip->list;
- fip->list = new;
-
- /* set visibility */
- /* FIXME! no way to tell visibility from stabs??? */
- new->visibility = VISIBILITY_PUBLIC;
-
- /* set field info into fip */
- fip->list->field.type = stype;
-
- /* set bitpos & bitsize */
- SET_FIELD_PHYSNAME (fip->list->field, savestring (sname, strlen (sname)));
-
- /* set name field */
- /* The following is code to work around cfront generated stabs.
- The stabs contains full mangled name for each field.
- We try to demangle the name and extract the field name out of it.
- */
- if (ARM_DEMANGLING)
- {
- char *dem, *dem_p;
- dem = cplus_demangle (sname, DMGL_ANSI | DMGL_PARAMS);
- if (dem != NULL)
- {
- dem_p = strrchr (dem, ':');
- if (dem_p != 0 && *(dem_p - 1) == ':')
- dem_p++;
- fip->list->field.name =
- obsavestring (dem_p, strlen (dem_p), &objfile->type_obstack);
- }
- else
- {
- fip->list->field.name =
- obsavestring (sname, strlen (sname), &objfile->type_obstack);
- }
- } /* end of code for cfront work around */
- } /* loop again for next static field */
- return 1;
-}
-
-/* Copy structure fields to fip so attach_fields_to_type will work.
- type has already been created with the initial instance data fields.
- Now we want to be able to add the other members to the class,
- so we want to add them back to the fip and reattach them again
- once we have collected all the class members. */
-
-static int
-copy_cfront_struct_fields (struct field_info *fip, struct type *type,
- struct objfile *objfile)
-{
- int nfields = TYPE_NFIELDS (type);
- int i;
- struct nextfield *new;
-
- /* Copy the fields into the list of fips and reset the types
- to remove the old fields */
-
- for (i = 0; i < nfields; i++)
- {
- /* allocate a new fip */
- new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (xfree, new);
- memset (new, 0, sizeof (struct nextfield));
- new->next = fip->list;
- fip->list = new;
-
- /* copy field info into fip */
- new->field = TYPE_FIELD (type, i);
- /* set visibility */
- if (TYPE_FIELD_PROTECTED (type, i))
- new->visibility = VISIBILITY_PROTECTED;
- else if (TYPE_FIELD_PRIVATE (type, i))
- new->visibility = VISIBILITY_PRIVATE;
- else
- new->visibility = VISIBILITY_PUBLIC;
- }
- /* Now delete the fields from the type since we will be
- allocing new space once we get the rest of the fields
- in attach_fields_to_type.
- The pointer TYPE_FIELDS(type) is left dangling but should
- be freed later by objstack_free */
- TYPE_FIELDS (type) = 0;
- TYPE_NFIELDS (type) = 0;
-
- 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_NAMESPACE, 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
@@ -4510,11 +4393,6 @@ read_array_type (register char **pp, register struct type *type,
Fortran adjustable arrays use Adigits or Tdigits for lower or upper;
for these, produce a type like float[][]. */
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs)
-// OBSOLETE index_type = builtin_type_int;
-// OBSOLETE else
-#endif /* OBSOLETE OS9K */
{
index_type = read_type (pp, objfile);
if (**pp != ';')
@@ -4528,11 +4406,7 @@ read_array_type (register char **pp, register struct type *type,
(*pp)++;
adjustable = 1;
}
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
-#else /* OBSOLETE OS9K */
lower = read_huge_number (pp, ';', &nbits);
-#endif /* OBSOLETE OS9K */
if (nbits != 0)
return error_type (pp, objfile);
@@ -4593,18 +4467,6 @@ read_enum_type (register char **pp, register struct type *type,
osyms = *symlist;
o_nsyms = osyms ? osyms->nsyms : 0;
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs)
-// OBSOLETE {
-// OBSOLETE /* Size. Perhaps this does not have to be conditionalized on
-// OBSOLETE os9k_stabs (assuming the name of an enum constant can't start
-// OBSOLETE with a digit). */
-// OBSOLETE read_huge_number (pp, 0, &nbits);
-// OBSOLETE if (nbits != 0)
-// OBSOLETE return error_type (pp, objfile);
-// OBSOLETE }
-#endif /* OBSOLETE OS9K */
-
/* The aix4 compiler emits an extra field before the enum members;
my guess is it's a type of some sort. Just ignore it. */
if (**pp == '-')
@@ -4842,12 +4704,7 @@ read_huge_number (char **pp, int end, int *bits)
p++;
}
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE if (os9k_stabs)
-// OBSOLETE upper_limit = ULONG_MAX / radix;
-// OBSOLETE else
-#endif /* OBSOLETE OS9K */
- upper_limit = LONG_MAX / radix;
+ upper_limit = LONG_MAX / radix;
while ((c = *p++) >= '0' && c < ('0' + radix))
{
@@ -5041,13 +4898,7 @@ read_range_type (char **pp, int typenums[2], struct objfile *objfile)
/* Special case: char is defined (Who knows why) as a subrange of
itself with range 0-127. */
else if (self_subrange && n2 == 0 && n3 == 127)
- return init_type (TYPE_CODE_INT, 1, 0, NULL, objfile);
-
-#if 0
- /* OBSOLETE else if (current_symbol && SYMBOL_LANGUAGE (current_symbol) == language_chill */
- /* OBSOLETE && !self_subrange) */
- /* OBSOLETE goto handle_true_range; */
-#endif
+ return init_type (TYPE_CODE_INT, 1, TYPE_FLAG_NOSIGN, NULL, objfile);
/* We used to do this only for subrange of self or subrange of int. */
else if (n2 == 0)
@@ -5553,10 +5404,6 @@ start_stabs (void)
/* FIXME: If common_block_name is not already NULL, we should complain(). */
common_block_name = NULL;
-
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE os9k_stabs = 0;
-#endif /* OBSOLETE OS9K */
}
/* Call after end_symtab() */
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 017074bf53d..62fd77601ad 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -1,6 +1,6 @@
/* Include file for stabs debugging format support functions.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ 1996, 1997, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -151,10 +151,6 @@ extern void end_stabs (void);
extern void finish_global_stabs (struct objfile *objfile);
-#if 0 /* OBSOLETE OS9K */
-// OBSOLETE EXTERN int os9k_stabs;
-#endif /* OBSOLETE OS9K */
-
/* COFF files can have multiple .stab sections, if they are linked
using --split-by-reloc. This linked list is used to pass the
information into the functions in dbxread.c. */
@@ -185,7 +181,7 @@ extern void process_one_symbol (int, int, CORE_ADDR, char *,
extern void elfstab_build_psymtabs (struct objfile *objfile,
int mainline,
- file_ptr staboff, unsigned int stabsize,
+ asection *stabsect,
file_ptr stabstroffset,
unsigned int stabstrsize);
@@ -202,10 +198,11 @@ extern void stabsect_build_psymtabs
extern void elfstab_offset_sections (struct objfile *,
struct partial_symtab *);
-
-extern void process_later
- (struct symbol *, char *,
- int (*f) (struct objfile *, struct symbol *, char *));
+#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 **);
@@ -213,9 +210,10 @@ extern void ref_add (int, struct symbol *, char *, CORE_ADDR);
extern struct symbol *ref_search (int);
-extern int resolve_cfront_continuation
- (struct objfile *objfile, struct symbol *sym, char *p);
-
+#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 40bc316bc09..d31fe64a167 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1,7 +1,7 @@
/* Print and select stack frames for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -100,10 +100,6 @@ static void print_frame (struct frame_info *fi,
int args,
struct symtab_and_line sal);
-static void print_frame_info_base (struct frame_info *, int, int, int);
-
-static void print_stack_frame_base (struct frame_info *, int, int);
-
static void backtrace_command (char *, int);
struct frame_info *parse_frame_specification (char *);
@@ -129,21 +125,6 @@ struct print_stack_frame_args
int args;
};
-static int print_stack_frame_base_stub (char *);
-
-/* Show and print the frame arguments.
- Pass the args the way catch_errors wants them. */
-static int show_and_print_stack_frame_stub (void *args);
-static int
-show_and_print_stack_frame_stub (void *args)
-{
- struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
-
- print_frame_info (p->fi, p->level, p->source, p->args);
-
- return 0;
-}
-
/* Show or print the frame arguments.
Pass the args the way catch_errors wants them. */
static int print_stack_frame_stub (void *args);
@@ -152,83 +133,10 @@ print_stack_frame_stub (void *args)
{
struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
- print_frame_info_base (p->fi, p->level, p->source, p->args);
- return 0;
-}
-
-/* Print a stack frame briefly. FRAME_INFI should be the frame info
- and LEVEL should be its level in the stack (or -1 for level not
- defined). */
-
-/* Pass the args the way catch_errors wants them. */
-static int
-print_stack_frame_base_stub (char *args)
-{
- struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
-
- print_frame_info_base (p->fi, p->level, p->source, p->args);
- return 0;
-}
-
-/* print the frame arguments to the terminal.
- Pass the args the way catch_errors wants them. */
-static int print_only_stack_frame_stub (void *);
-static int
-print_only_stack_frame_stub (void *args)
-{
- struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
-
- print_frame_info_base (p->fi, p->level, p->source, p->args);
+ print_frame_info (p->fi, p->level, p->source, p->args);
return 0;
}
-/* Print a stack frame briefly. FRAME_INFI should be the frame info
- and LEVEL should be its level in the stack (or -1 for level not defined).
- This prints the level, the function executing, the arguments,
- and the file name and line number.
- If the pc is not at the beginning of the source line,
- the actual pc is printed at the beginning.
-
- If SOURCE is 1, print the source line as well.
- If SOURCE is -1, print ONLY the source line. */
-
-static void
-print_stack_frame_base (struct frame_info *fi, int level, int source)
-{
- struct print_stack_frame_args args;
-
- args.fi = fi;
- args.level = level;
- args.source = source;
- args.args = 1;
-
- catch_errors (print_stack_frame_stub, &args, "", RETURN_MASK_ALL);
-}
-
-/* Show and print a stack frame briefly. FRAME_INFI should be the frame info
- and LEVEL should be its level in the stack (or -1 for level not defined).
- This prints the level, the function executing, the arguments,
- and the file name and line number.
- If the pc is not at the beginning of the source line,
- the actual pc is printed at the beginning.
-
- If SOURCE is 1, print the source line as well.
- If SOURCE is -1, print ONLY the source line. */
-
-void
-show_and_print_stack_frame (struct frame_info *fi, int level, int source)
-{
- struct print_stack_frame_args args;
-
- args.fi = fi;
- args.level = level;
- args.source = source;
- args.args = 1;
-
- catch_errors (show_and_print_stack_frame_stub, &args, "", RETURN_MASK_ALL);
-}
-
-
/* Show or print a stack frame briefly. FRAME_INFI should be the frame info
and LEVEL should be its level in the stack (or -1 for level not defined).
This prints the level, the function executing, the arguments,
@@ -250,30 +158,7 @@ print_stack_frame (struct frame_info *fi, int level, int source)
args.args = 1;
catch_errors (print_stack_frame_stub, (char *) &args, "", RETURN_MASK_ALL);
-}
-
-/* Print a stack frame briefly. FRAME_INFI should be the frame info
- and LEVEL should be its level in the stack (or -1 for level not defined).
- This prints the level, the function executing, the arguments,
- and the file name and line number.
- If the pc is not at the beginning of the source line,
- the actual pc is printed at the beginning.
-
- If SOURCE is 1, print the source line as well.
- If SOURCE is -1, print ONLY the source line. */
-
-void
-print_only_stack_frame (struct frame_info *fi, int level, int source)
-{
- struct print_stack_frame_args args;
-
- args.fi = fi;
- args.level = level;
- args.source = source;
- args.args = 1;
-
- catch_errors (print_only_stack_frame_stub, &args, "", RETURN_MASK_ALL);
-}
+}
struct print_args_args
{
@@ -282,12 +167,12 @@ struct print_args_args
struct ui_file *stream;
};
-static int print_args_stub (PTR);
+static int print_args_stub (void *);
/* Pass the args the way catch_errors wants them. */
static int
-print_args_stub (PTR args)
+print_args_stub (void *args)
{
int numargs;
struct print_args_args *p = (struct print_args_args *) args;
@@ -307,15 +192,19 @@ print_args_stub (PTR args)
LOCATION: Print only location
LOC_AND_SRC: Print location and source line. */
-static void
-print_frame_info_base (struct frame_info *fi, int level, int source, int args)
+void
+print_frame_info (struct frame_info *fi, int level, int source, int args)
{
struct symtab_and_line sal;
int source_print;
int location_print;
- if (get_frame_type (fi) == DUMMY_FRAME)
+ if (get_frame_type (fi) == DUMMY_FRAME
+ || get_frame_type (fi) == SIGTRAMP_FRAME)
{
+ struct cleanup *uiout_cleanup
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
+
annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
/* Do this regardless of SOURCE because we don't have any source
@@ -325,25 +214,27 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
ui_out_text (uiout, "#");
ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
}
- annotate_function_call ();
- printf_filtered ("<function called from gdb>\n");
- annotate_frame_end ();
- return;
- }
- if ((get_frame_type (fi) == SIGTRAMP_FRAME))
- {
- annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
+ if (ui_out_is_mi_like_p (uiout))
+ {
+ annotate_frame_address ();
+ ui_out_field_core_addr (uiout, "addr", fi->pc);
+ annotate_frame_address_end ();
+ }
- /* Do this regardless of SOURCE because we don't have any source
- to list for this frame. */
- if (level >= 0)
+ if (get_frame_type (fi) == DUMMY_FRAME)
{
- ui_out_text (uiout, "#");
- ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
+ annotate_function_call ();
+ ui_out_field_string (uiout, "func", "<function called from gdb>");
+ }
+ else if (get_frame_type (fi) == SIGTRAMP_FRAME)
+ {
+ annotate_signal_handler_caller ();
+ ui_out_field_string (uiout, "func", "<signal handler called>");
}
- annotate_signal_handler_caller ();
- printf_filtered ("<signal handler called>\n");
+ ui_out_text (uiout, "\n");
annotate_frame_end ();
+
+ do_cleanups (uiout_cleanup);
return;
}
@@ -583,16 +474,6 @@ print_frame (struct frame_info *fi,
do_cleanups (old_chain);
}
-
-/* Show or print the frame info. If this is the tui, it will be shown in
- the source display */
-void
-print_frame_info (struct frame_info *fi, register int level, int source,
- int args)
-{
- print_frame_info_base (fi, level, source, args);
-}
-
/* Show the frame info. If this is the tui, it will be shown in
the source display otherwise, nothing is done */
void
@@ -902,7 +783,8 @@ frame_info (char *addr_exp, int from_tty)
}
}
- if (get_frame_saved_regs (fi) == NULL)
+ if (FRAME_INIT_SAVED_REGS_P ()
+ && get_frame_saved_regs (fi) == NULL)
FRAME_INIT_SAVED_REGS (fi);
/* Print as much information as possible on the location of all the
registers. */
@@ -1100,7 +982,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty)
means further attempts to backtrace would fail (on the other
hand, perhaps the code does or could be fixed to make sure
the frame->prev field gets set to NULL in that case). */
- print_frame_info_base (fi, trailing_level + i, 0, 1);
+ print_frame_info (fi, trailing_level + i, 0, 1);
if (show_locals)
print_frame_local_vars (fi, 1, gdb_stdout);
}
@@ -1601,8 +1483,8 @@ void
frame_command (char *level_exp, int from_tty)
{
select_frame_command (level_exp, from_tty);
- show_and_print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
/* The XDB Compatibility command to print the current frame. */
@@ -1612,7 +1494,7 @@ current_frame_command (char *level_exp, int from_tty)
{
if (target_has_stack == 0 || deprecated_selected_frame == 0)
error ("No stack.");
- print_only_stack_frame (deprecated_selected_frame,
+ print_stack_frame (deprecated_selected_frame,
frame_relative_level (deprecated_selected_frame), 1);
}
@@ -1649,8 +1531,8 @@ static void
up_command (char *count_exp, int from_tty)
{
up_silently_base (count_exp);
- show_and_print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
/* Select the frame down one or COUNT stack levels
@@ -1696,8 +1578,8 @@ static void
down_command (char *count_exp, int from_tty)
{
down_silently_base (count_exp);
- show_and_print_stack_frame (deprecated_selected_frame,
- frame_relative_level (deprecated_selected_frame), 1);
+ print_stack_frame (deprecated_selected_frame,
+ frame_relative_level (deprecated_selected_frame), 1);
}
void
@@ -1752,6 +1634,10 @@ return_command (char *retval_exp, int from_tty)
error ("Not confirmed.");
}
+ /* 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 POP_FRAME. The pc comparison makes this work even if the
@@ -1759,11 +1645,11 @@ return_command (char *retval_exp, int from_tty)
while (selected_frame_addr != get_frame_base (frame = get_current_frame ())
|| selected_frame_pc != get_frame_pc (frame))
- POP_FRAME;
+ frame_pop (get_current_frame ());
/* Then pop that frame. */
- POP_FRAME;
+ frame_pop (get_current_frame ());
/* Compute the return value (if any) and store in the place
for return values. */
@@ -1773,9 +1659,14 @@ return_command (char *retval_exp, int from_tty)
/* If we are at the end of a call dummy now, pop the dummy frame too. */
+ /* 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 ())))
- POP_FRAME;
+ frame_pop (get_current_frame ());
/* If interactive, print the frame that is now current. */
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 6372aa4c987..58edbf3ffe3 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1,7 +1,7 @@
/* Generic symbol file reading for the GNU debugger, GDB.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
@@ -23,6 +23,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "bfdlink.h"
#include "symtab.h"
#include "block.h"
#include "gdbtypes.h"
@@ -39,11 +40,14 @@
#include "complaints.h"
#include "demangle.h"
#include "inferior.h" /* for write_pc */
+#include "filenames.h" /* for DOSish file names */
#include "gdb-stabs.h"
#include "gdb_obstack.h"
#include "completer.h"
#include "bcache.h"
+#include "hashtab.h"
#include <readline/readline.h>
+#include "gdb_assert.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -105,6 +109,8 @@ static void add_symbol_file_command (char *, int);
static void add_shared_symbol_files_command (char *, int);
+static void reread_separate_symbols (struct objfile *objfile);
+
static void cashier_psymtab (struct partial_symtab *);
bfd *symfile_bfd_open (char *);
@@ -115,9 +121,6 @@ static void find_sym_fns (struct objfile *);
static void decrement_reading_symtab (void *);
-static void psymbol_init_demangled_name (struct partial_symbol *psymbol,
- struct bcache *bcache);
-
static void overlay_invalidate_all (void);
static int overlay_is_mapped (struct obj_section *);
@@ -152,6 +155,8 @@ static void set_ext_lang_command (char *args, int from_tty);
static void info_ext_lang_command (char *args, int from_tty);
+static char *find_separate_debug_file (struct objfile *objfile);
+
static void init_filename_language_table (void);
void _initialize_symfile (void);
@@ -383,7 +388,7 @@ entry_point_address (void)
lowest-addressed loadable section. */
void
-find_lowest_section (bfd *abfd, asection *sect, PTR obj)
+find_lowest_section (bfd *abfd, asection *sect, void *obj)
{
asection **lowest = (asection **) obj;
@@ -544,8 +549,26 @@ default_symfile_offsets (struct objfile *objfile,
OBJFILE is where the symbols are to be read from.
- ADDR is the address where the text segment was loaded, unless the
- objfile is the main symbol file, in which case it is zero.
+ ADDRS is the list of section load addresses. If the user has given
+ an 'add-symbol-file' command, then this is the list of offsets and
+ addresses he or she provided as arguments to the command; or, if
+ we're handling a shared library, these are the actual addresses the
+ sections are loaded at, according to the inferior's dynamic linker
+ (as gleaned by GDB's shared library code). We convert each address
+ into an offset from the section VMA's as it appears in the object
+ file, and then call the file's sym_offsets function to convert this
+ into a format-specific offset table --- a `struct section_offsets'.
+ If ADDRS is non-zero, OFFSETS must be zero.
+
+ OFFSETS is a table of section offsets already in the right
+ format-specific representation. NUM_OFFSETS is the number of
+ elements present in OFFSETS->offsets. If OFFSETS is non-zero, we
+ assume this is the proper table the call to sym_offsets described
+ above would produce. Instead of calling sym_offsets, we just dump
+ it right into objfile->section_offsets. (When we're re-reading
+ symbols from an objfile, we don't have the original load address
+ list any more; all we have is the section offset table.) If
+ OFFSETS is non-zero, ADDRS must be zero.
MAINLINE is nonzero if this is the main symbol file, or zero if
it's an extra symbol file such as dynamically loaded code.
@@ -554,8 +577,12 @@ default_symfile_offsets (struct objfile *objfile,
the symbol reading (and complaints can be more terse about it). */
void
-syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
- int mainline, int verbo)
+syms_from_objfile (struct objfile *objfile,
+ struct section_addr_info *addrs,
+ struct section_offsets *offsets,
+ int num_offsets,
+ int mainline,
+ int verbo)
{
asection *lower_sect;
asection *sect;
@@ -564,16 +591,19 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
struct cleanup *old_chain;
int i;
- /* If ADDRS is NULL, initialize the local section_addr_info struct and
- point ADDRS to it. We now establish the convention that an addr of
- zero means no load address was specified. */
+ gdb_assert (! (addrs && offsets));
- if (addrs == NULL)
+ /* If ADDRS and OFFSETS are both NULL, put together a dummy address
+ list. We now establish the convention that an addr of zero means
+ no load address was specified. */
+ if (! addrs && ! offsets)
{
memset (&local_addr, 0, sizeof (local_addr));
addrs = &local_addr;
}
+ /* Now either addrs or offsets is non-zero. */
+
init_entry_point_info (objfile);
find_sym_fns (objfile);
@@ -620,7 +650,7 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
if (lower_sect == NULL)
bfd_map_over_sections (objfile->obfd, find_lowest_section,
- (PTR) &lower_sect);
+ &lower_sect);
if (lower_sect == NULL)
warning ("no loadable sections found in added symbol-file %s",
objfile->name);
@@ -646,30 +676,32 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
this_offset = lower_offset = lower_addr - lower_orig_addr */
/* Calculate offsets for sections. */
- for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
- {
- if (addrs->other[i].addr != 0)
- {
- sect = bfd_get_section_by_name (objfile->obfd,
- addrs->other[i].name);
- if (sect)
- {
- addrs->other[i].addr
- -= bfd_section_vma (objfile->obfd, sect);
- lower_offset = addrs->other[i].addr;
- /* This is the index used by BFD. */
- addrs->other[i].sectindex = sect->index ;
- }
- else
- {
- warning ("section %s not found in %s", addrs->other[i].name,
- objfile->name);
- addrs->other[i].addr = 0;
- }
- }
- else
- addrs->other[i].addr = lower_offset;
- }
+ if (addrs)
+ for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ {
+ if (addrs->other[i].addr != 0)
+ {
+ sect = bfd_get_section_by_name (objfile->obfd,
+ addrs->other[i].name);
+ if (sect)
+ {
+ addrs->other[i].addr
+ -= bfd_section_vma (objfile->obfd, sect);
+ lower_offset = addrs->other[i].addr;
+ /* This is the index used by BFD. */
+ addrs->other[i].sectindex = sect->index ;
+ }
+ else
+ {
+ warning ("section %s not found in %s",
+ addrs->other[i].name,
+ objfile->name);
+ addrs->other[i].addr = 0;
+ }
+ }
+ else
+ addrs->other[i].addr = lower_offset;
+ }
}
/* Initialize symbol reading routines for this objfile, allow complaints to
@@ -679,7 +711,21 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
(*objfile->sf->sym_init) (objfile);
clear_complaints (&symfile_complaints, 1, verbo);
- (*objfile->sf->sym_offsets) (objfile, addrs);
+ if (addrs)
+ (*objfile->sf->sym_offsets) (objfile, addrs);
+ else
+ {
+ size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets);
+
+ /* Just copy in the offset table directly as given to us. */
+ objfile->num_sections = num_offsets;
+ objfile->section_offsets
+ = ((struct section_offsets *)
+ obstack_alloc (&objfile->psymbol_obstack, size));
+ memcpy (objfile->section_offsets, offsets, size);
+
+ init_objfile_sect_indices (objfile);
+ }
#ifndef IBM6000_TARGET
/* This is a SVR4/SunOS specific hack, I think. In any event, it
@@ -733,13 +779,6 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
(*objfile->sf->sym_read) (objfile, mainline);
- if (!have_partial_symbols () && !have_full_symbols ())
- {
- wrap_here ("");
- printf_filtered ("(no debugging symbols found)...");
- wrap_here ("");
- }
-
/* Don't allow char * to have a typename (else would get caddr_t).
Ditto void *. FIXME: Check whether this is now done by all the
symbol readers themselves (many of them now do), and if so remove
@@ -797,21 +836,33 @@ new_symfile_objfile (struct objfile *objfile, int mainline, int verbo)
NAME is the file name (which will be tilde-expanded and made
absolute herein) (but we don't free or modify NAME itself).
- FROM_TTY says how verbose to be. MAINLINE specifies whether this
- is the main symbol file, or whether it's an extra symbol file such
- as dynamically loaded code. If !mainline, ADDR is the address
- where the text segment was loaded.
+
+ FROM_TTY says how verbose to be.
+
+ MAINLINE specifies whether this is the main symbol file, or whether
+ it's an extra symbol file such as dynamically loaded code.
+
+ ADDRS, OFFSETS, and NUM_OFFSETS are as described for
+ syms_from_objfile, above. ADDRS is ignored when MAINLINE is
+ non-zero.
Upon success, returns a pointer to the objfile that was added.
Upon failure, jumps back to command level (never returns). */
-
-struct objfile *
-symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
- int mainline, int flags)
+static struct objfile *
+symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
+ struct section_addr_info *addrs,
+ struct section_offsets *offsets,
+ int num_offsets,
+ int mainline, int flags)
{
struct objfile *objfile;
struct partial_symtab *psymtab;
+ char *debugfile;
bfd *abfd;
+ struct section_addr_info orig_addrs;
+
+ if (addrs)
+ orig_addrs = *addrs;
/* Open a bfd for the file, and give user a chance to burp if we'd be
interactively wiping out any existing symbols. */
@@ -860,7 +911,8 @@ symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
gdb_flush (gdb_stdout);
}
}
- syms_from_objfile (objfile, addrs, mainline, from_tty);
+ syms_from_objfile (objfile, addrs, offsets, num_offsets,
+ mainline, from_tty);
}
/* We now have at least a partial symbol table. Check to see if the
@@ -885,6 +937,36 @@ symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
}
}
+ debugfile = find_separate_debug_file (objfile);
+ if (debugfile)
+ {
+ if (addrs != NULL)
+ {
+ objfile->separate_debug_objfile
+ = symbol_file_add (debugfile, from_tty, &orig_addrs, 0, flags);
+ }
+ else
+ {
+ objfile->separate_debug_objfile
+ = symbol_file_add (debugfile, from_tty, NULL, 0, flags);
+ }
+ objfile->separate_debug_objfile->separate_debug_objfile_backlink
+ = objfile;
+
+ /* Put the separate debug object before the normal one, this is so that
+ usage of the ALL_OBJFILES_SAFE macro will stay safe. */
+ put_objfile_before (objfile->separate_debug_objfile, objfile);
+
+ xfree (debugfile);
+ }
+
+ if (!have_partial_symbols () && !have_full_symbols ())
+ {
+ wrap_here ("");
+ printf_filtered ("(no debugging symbols found)...");
+ wrap_here ("");
+ }
+
if (from_tty || info_verbose)
{
if (post_add_symbol_hook)
@@ -911,6 +993,19 @@ symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
return (objfile);
}
+
+/* Process a symbol file, as either the main file or as a dynamically
+ loaded file. See symbol_file_add_with_addrs_or_offsets's comments
+ for details. */
+struct objfile *
+symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
+ int mainline, int flags)
+{
+ return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0,
+ mainline, flags);
+}
+
+
/* Call symbol_file_add() with default values and update whatever is
affected by the loading of a new main().
Used when the file is supplied in the gdb command line
@@ -967,6 +1062,144 @@ symbol_file_clear (int from_tty)
#endif
}
+static char *
+get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
+{
+ asection *sect;
+ bfd_size_type debuglink_size;
+ unsigned long crc32;
+ char *contents;
+ int crc_offset;
+ unsigned char *p;
+
+ sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink");
+
+ if (sect == NULL)
+ return NULL;
+
+ debuglink_size = bfd_section_size (objfile->obfd, sect);
+
+ contents = xmalloc (debuglink_size);
+ bfd_get_section_contents (objfile->obfd, sect, contents,
+ (file_ptr)0, (bfd_size_type)debuglink_size);
+
+ /* Crc value is stored after the filename, aligned up to 4 bytes. */
+ crc_offset = strlen (contents) + 1;
+ crc_offset = (crc_offset + 3) & ~3;
+
+ crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset));
+
+ *crc32_out = crc32;
+ return contents;
+}
+
+static int
+separate_debug_file_exists (const char *name, unsigned long crc)
+{
+ unsigned long file_crc = 0;
+ int fd;
+ char buffer[8*1024];
+ int count;
+
+ fd = open (name, O_RDONLY | O_BINARY);
+ if (fd < 0)
+ return 0;
+
+ while ((count = read (fd, buffer, sizeof (buffer))) > 0)
+ file_crc = gnu_debuglink_crc32 (file_crc, buffer, count);
+
+ close (fd);
+
+ return crc == file_crc;
+}
+
+static char *debug_file_directory = NULL;
+
+#if ! defined (DEBUG_SUBDIRECTORY)
+#define DEBUG_SUBDIRECTORY ".debug"
+#endif
+
+static char *
+find_separate_debug_file (struct objfile *objfile)
+{
+ asection *sect;
+ char *basename;
+ char *dir;
+ char *debugfile;
+ char *name_copy;
+ bfd_size_type debuglink_size;
+ unsigned long crc32;
+ int i;
+
+ basename = get_debug_link_info (objfile, &crc32);
+
+ if (basename == NULL)
+ return NULL;
+
+ dir = xstrdup (objfile->name);
+
+ /* Strip off the final filename part, leaving the directory name,
+ followed by a slash. Objfile names should always be absolute and
+ tilde-expanded, so there should always be a slash in there
+ somewhere. */
+ for (i = strlen(dir) - 1; i >= 0; i--)
+ {
+ if (IS_DIR_SEPARATOR (dir[i]))
+ break;
+ }
+ gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
+ dir[i+1] = '\0';
+
+ debugfile = alloca (strlen (debug_file_directory) + 1
+ + strlen (dir)
+ + strlen (DEBUG_SUBDIRECTORY)
+ + strlen ("/")
+ + strlen (basename)
+ + 1);
+
+ /* First try in the same directory as the original file. */
+ strcpy (debugfile, dir);
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32))
+ {
+ xfree (basename);
+ xfree (dir);
+ return xstrdup (debugfile);
+ }
+
+ /* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
+ strcpy (debugfile, dir);
+ strcat (debugfile, DEBUG_SUBDIRECTORY);
+ strcat (debugfile, "/");
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32))
+ {
+ xfree (basename);
+ xfree (dir);
+ return xstrdup (debugfile);
+ }
+
+ /* Then try in the global debugfile directory. */
+ strcpy (debugfile, debug_file_directory);
+ strcat (debugfile, "/");
+ strcat (debugfile, dir);
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32))
+ {
+ xfree (basename);
+ xfree (dir);
+ return xstrdup (debugfile);
+ }
+
+ xfree (basename);
+ xfree (dir);
+ return NULL;
+}
+
+
/* This is the symbol-file command. Read the file, analyze its
symbols, and add a struct symtab to a symtab list. The syntax of
the command is rather bizarre--(1) buildargv implements various
@@ -1389,11 +1622,11 @@ generic_load (char *args, int from_tty)
for other targets too. */
write_pc (entry);
- /* FIXME: are we supposed to call symbol_file_add or not? According to
- a comment from remote-mips.c (where a call to symbol_file_add was
- commented out), making the call confuses GDB if more than one file is
- loaded in. remote-nindy.c had no call to symbol_file_add, but remote-vx.c
- does. */
+ /* FIXME: are we supposed to call symbol_file_add or not? According
+ to a comment from remote-mips.c (where a call to symbol_file_add
+ was commented out), making the call confuses GDB if more than one
+ file is loaded in. Some targets do (e.g., remote-vx.c) but
+ others don't (or didn't - perhaphs they have all been deleted). */
print_transfer_performance (gdb_stdout, cbdata.data_count,
cbdata.write_count, end_time - start_time);
@@ -1720,6 +1953,11 @@ reread_symbols (void)
objfile->psymbol_cache = bcache_xmalloc ();
bcache_xfree (objfile->macro_cache);
objfile->macro_cache = bcache_xmalloc ();
+ if (objfile->demangled_names_hash != NULL)
+ {
+ htab_delete (objfile->demangled_names_hash);
+ objfile->demangled_names_hash = NULL;
+ }
obstack_free (&objfile->psymbol_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
obstack_free (&objfile->type_obstack, 0);
@@ -1813,6 +2051,8 @@ reread_symbols (void)
needs to keep track of (such as _sigtramp, or whatever). */
TARGET_SYMFILE_POSTREAD (objfile);
+
+ reread_separate_symbols (objfile);
}
}
}
@@ -1820,6 +2060,73 @@ reread_symbols (void)
if (reread_one)
clear_symtab_users ();
}
+
+
+/* Handle separate debug info for OBJFILE, which has just been
+ re-read:
+ - If we had separate debug info before, but now we don't, get rid
+ of the separated objfile.
+ - If we didn't have separated debug info before, but now we do,
+ read in the new separated debug info file.
+ - If the debug link points to a different file, toss the old one
+ and read the new one.
+ This function does *not* handle the case where objfile is still
+ using the same separate debug info file, but that file's timestamp
+ has changed. That case should be handled by the loop in
+ reread_symbols already. */
+static void
+reread_separate_symbols (struct objfile *objfile)
+{
+ char *debug_file;
+ unsigned long crc32;
+
+ /* Does the updated objfile's debug info live in a
+ separate file? */
+ debug_file = find_separate_debug_file (objfile);
+
+ if (objfile->separate_debug_objfile)
+ {
+ /* There are two cases where we need to get rid of
+ the old separated debug info objfile:
+ - if the new primary objfile doesn't have
+ separated debug info, or
+ - if the new primary objfile has separate debug
+ info, but it's under a different filename.
+
+ If the old and new objfiles both have separate
+ debug info, under the same filename, then we're
+ okay --- if the separated file's contents have
+ changed, we will have caught that when we
+ visited it in this function's outermost
+ loop. */
+ if (! debug_file
+ || strcmp (debug_file, objfile->separate_debug_objfile->name) != 0)
+ free_objfile (objfile->separate_debug_objfile);
+ }
+
+ /* If the new objfile has separate debug info, and we
+ haven't loaded it already, do so now. */
+ if (debug_file
+ && ! objfile->separate_debug_objfile)
+ {
+ /* Use the same section offset table as objfile itself.
+ Preserve the flags from objfile that make sense. */
+ objfile->separate_debug_objfile
+ = (symbol_file_add_with_addrs_or_offsets
+ (debug_file,
+ info_verbose, /* from_tty: Don't override the default. */
+ 0, /* No addr table. */
+ objfile->section_offsets, objfile->num_sections,
+ 0, /* Not mainline. See comments about this above. */
+ objfile->flags & (OBJF_MAPPED | OBJF_REORDERED
+ | OBJF_SHARED | OBJF_READNOW
+ | OBJF_USERLOADED)));
+ objfile->separate_debug_objfile->separate_debug_objfile_backlink
+ = objfile;
+ }
+}
+
+
@@ -1939,9 +2246,6 @@ init_filename_language_table (void)
add_filename_language (".c++", language_cplus);
add_filename_language (".java", language_java);
add_filename_language (".class", language_java);
- /* OBSOLETE add_filename_language (".ch", language_chill); */
- /* OBSOLETE add_filename_language (".c186", language_chill); */
- /* OBSOLETE add_filename_language (".c286", language_chill); */
add_filename_language (".m", language_objc);
add_filename_language (".f", language_fortran);
add_filename_language (".F", language_fortran);
@@ -2362,7 +2666,6 @@ add_psymbol_to_list (char *name, int namelength, namespace_enum namespace,
/* Create local copy of the partial symbol */
memcpy (buf, name, namelength);
buf[namelength] = '\0';
- SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, objfile->psymbol_cache);
/* val and coreaddr are mutually exclusive, one of them *will* be zero */
if (val != 0)
{
@@ -2376,7 +2679,8 @@ add_psymbol_to_list (char *name, int namelength, namespace_enum namespace,
SYMBOL_LANGUAGE (&psymbol) = language;
PSYMBOL_NAMESPACE (&psymbol) = namespace;
PSYMBOL_CLASS (&psymbol) = class;
- psymbol_init_demangled_name (&psymbol, objfile->psymbol_cache);
+
+ SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile);
/* Stash the partial symbol away in the cache */
psym = bcache (&psymbol, sizeof (struct partial_symbol), objfile->psymbol_cache);
@@ -2392,50 +2696,6 @@ add_psymbol_to_list (char *name, int namelength, namespace_enum namespace,
return psym;
}
-/* Initialize the demangled name for PSYMBOL, using bcache CACHE to
- store the demangle name if necessary. */
-
-static void
-psymbol_init_demangled_name (struct partial_symbol *psymbol,
- struct bcache *cache)
-{
- char *demangled;
-
- SYMBOL_CPLUS_DEMANGLED_NAME (psymbol) = NULL;
-
- if (SYMBOL_LANGUAGE (psymbol) == language_unknown)
- SYMBOL_LANGUAGE (psymbol) = language_auto;
-
- switch (SYMBOL_LANGUAGE (psymbol))
- {
- case language_cplus:
- case language_auto:
- demangled = cplus_demangle (SYMBOL_NAME (psymbol),
- DMGL_PARAMS | DMGL_ANSI);
- if (demangled != NULL)
- {
- SYMBOL_LANGUAGE (psymbol) = language_cplus;
- SYMBOL_CPLUS_DEMANGLED_NAME (psymbol)
- = bcache (demangled, strlen (demangled) + 1, cache);
- xfree (demangled);
- }
- break;
- case language_java:
- demangled =
- cplus_demangle (SYMBOL_NAME (psymbol),
- DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA);
- if (demangled != NULL)
- {
- SYMBOL_LANGUAGE (psymbol) = language_java;
- SYMBOL_CPLUS_DEMANGLED_NAME (psymbol)
- = bcache (demangled, strlen (demangled) + 1, cache);
- xfree (demangled);
- }
- default:
- break;
- }
-}
-
/* Add a symbol with a long value to a psymtab. This differs from
* add_psymbol_to_list above in taking both a mangled and a demangled
* name. */
@@ -2473,10 +2733,6 @@ add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name,
SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) =
bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
break;
- /* OBSOLETE case language_chill: */
- /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) = */
- /* OBSOLETE bcache (buf, dem_namelength + 1, objfile->psymbol_cache); */
-
/* FIXME What should be done for the default case? Ignoring for now. */
}
@@ -2516,11 +2772,11 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
if (objfile->global_psymbols.list)
{
- xmfree (objfile->md, (PTR) objfile->global_psymbols.list);
+ xmfree (objfile->md, objfile->global_psymbols.list);
}
if (objfile->static_psymbols.list)
{
- xmfree (objfile->md, (PTR) objfile->static_psymbols.list);
+ xmfree (objfile->md, objfile->static_psymbols.list);
}
/* Current best guess is that approximately a twentieth
@@ -3292,6 +3548,45 @@ simple_overlay_update (struct obj_section *osect)
}
}
+/* Set the output sections and output offsets for section SECTP in
+ ABFD. The relocation code in BFD will read these offsets, so we
+ need to be sure they're initialized. We map each section to itself,
+ with no offset; this means that SECTP->vma will be honored. */
+
+static void
+symfile_dummy_outputs (bfd *abfd, asection *sectp, void *dummy)
+{
+ sectp->output_section = sectp;
+ sectp->output_offset = 0;
+}
+
+/* Relocate the contents of a debug section SECTP in ABFD. The
+ contents are stored in BUF if it is non-NULL, or returned in a
+ malloc'd buffer otherwise.
+
+ For some platforms and debug info formats, shared libraries contain
+ relocations against the debug sections (particularly for DWARF-2;
+ one affected platform is PowerPC GNU/Linux, although it depends on
+ the version of the linker in use). Also, ELF object files naturally
+ have unresolved relocations for their debug sections. We need to apply
+ the relocations in order to get the locations of symbols correct. */
+
+bfd_byte *
+symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf)
+{
+ /* We're only interested in debugging sections with relocation
+ information. */
+ if ((sectp->flags & SEC_RELOC) == 0)
+ return NULL;
+ if ((sectp->flags & SEC_DEBUGGING) == 0)
+ return NULL;
+
+ /* We will handle section offsets properly elsewhere, so relocate as if
+ all sections begin at 0. */
+ bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL);
+
+ return bfd_simple_get_relocated_section_contents (abfd, sectp, buf);
+}
void
_initialize_symfile (void)
@@ -3381,4 +3676,18 @@ Usage: set extension-language .foo bar",
"cache.\n",
&setlist),
&showlist);
+
+ debug_file_directory = xstrdup (DEBUGDIR);
+ c = (add_set_cmd
+ ("debug-file-directory", class_support, var_string,
+ (char *) &debug_file_directory,
+ "Set the directory where separate debug symbols are searched for.\n"
+ "Separate debug symbols are first searched for in the same\n"
+ "directory as the binary, then in the `" DEBUG_SUBDIRECTORY
+ "' subdirectory,\n"
+ "and lastly at the path of the directory of the binary with\n"
+ "the global debug-file directory prepended\n",
+ &setlist));
+ add_show_from_set (c, &showlist);
+ set_cmd_completer (c, filename_completer);
}
diff --git a/gdb/symfile.h b/gdb/symfile.h
index c9352a93fbe..157552ada5d 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -1,6 +1,6 @@
/* Definitions for reading symbol files into GDB.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -136,12 +136,12 @@ struct sym_fns
/* The default version of sym_fns.sym_offsets for readers that don't
do anything special. */
-extern void
-default_symfile_offsets (struct objfile *objfile, struct section_addr_info *);
+extern void default_symfile_offsets (struct objfile *objfile,
+ struct section_addr_info *);
-extern void
-extend_psymbol_list (struct psymbol_allocation_list *, struct objfile *);
+extern void extend_psymbol_list (struct psymbol_allocation_list *,
+ struct objfile *);
/* Add any kind of symbol to a psymbol_allocation_list. */
@@ -174,8 +174,10 @@ extern void add_symtab_fns (struct sym_fns *);
extern void init_entry_point_info (struct objfile *);
-extern void
-syms_from_objfile (struct objfile *, struct section_addr_info *, int, int);
+extern void syms_from_objfile (struct objfile *,
+ struct section_addr_info *,
+ struct section_offsets *, int,
+ int, int);
extern void new_symfile_objfile (struct objfile *, int, int);
@@ -192,8 +194,7 @@ build_section_addr_info_from_section_table (const struct section_table *start,
/* Free all memory allocated by build_section_addr_info_from_section_table. */
-extern void
-free_section_addr_info (struct section_addr_info *);
+extern void free_section_addr_info (struct section_addr_info *);
extern struct partial_symtab *start_psymtab_common (struct objfile *,
@@ -246,7 +247,7 @@ extern struct partial_symtab *allocate_psymtab (char *, struct objfile *);
extern void discard_psymtab (struct partial_symtab *);
-extern void find_lowest_section (bfd *, asection *, PTR);
+extern void find_lowest_section (bfd *, asection *, void *);
extern bfd *symfile_bfd_open (char *);
@@ -293,6 +294,9 @@ extern void symbol_file_add_main (char *args, int from_tty);
/* Clear GDB symbol tables. */
extern void symbol_file_clear (int from_tty);
+extern bfd_byte *symfile_relocate_debug_section (bfd *abfd, asection *sectp,
+ bfd_byte *buf);
+
/* From dwarfread.c */
extern void
diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c
index fb52754d4e7..79caf5a938e 100644
--- a/gdb/symm-nat.c
+++ b/gdb/symm-nat.c
@@ -1,7 +1,7 @@
/* Sequent Symmetry host interface, for GDB when running under Unix.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1999, 2000,
- 2001
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1999,
+ 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,7 +34,7 @@
#define _INKERNEL
#include <signal.h>
#undef _INKERNEL
-#include <sys/wait.h>
+#include "gdb_wait.h"
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 835071ad0ea..8e456bf5530 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -80,7 +80,7 @@ struct print_symbol_args
struct ui_file *outfile;
};
-static int print_symbol (PTR);
+static int print_symbol (void *);
static void free_symtab_block (struct objfile *, struct block *);
@@ -102,16 +102,16 @@ free_symtab_block (struct objfile *objfile, struct block *b)
sym = dict_iterator_next (&iter))
{
xmfree (objfile->md, SYMBOL_NAME (prev_sym));
- xmfree (objfile->md, (PTR) prev_sym);
+ xmfree (objfile->md, prev_sym);
prev_sym = sym;
}
xmfree (objfile->md, SYMBOL_NAME (prev_sym));
- xmfree (objfile->md, (PTR) prev_sym);
+ xmfree (objfile->md, prev_sym);
}
dict_free (BLOCK_DICT (b));
- xmfree (objfile->md, (PTR) b);
+ xmfree (objfile->md, b);
}
/* Free all the storage associated with the struct symtab <- S.
@@ -145,7 +145,7 @@ free_symtab (register struct symtab *s)
for (i = 0; i < n; i++)
free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
/* Free the blockvector itself. */
- xmfree (s->objfile->md, (PTR) bv);
+ xmfree (s->objfile->md, bv);
/* Also free the linetable. */
case free_linetable:
@@ -153,7 +153,7 @@ free_symtab (register struct symtab *s)
or by some other symtab, except for our linetable.
Free that now. */
if (LINETABLE (s))
- xmfree (s->objfile->md, (PTR) LINETABLE (s));
+ xmfree (s->objfile->md, LINETABLE (s));
break;
}
@@ -163,12 +163,12 @@ free_symtab (register struct symtab *s)
/* Free source-related stuff */
if (s->line_charpos != NULL)
- xmfree (s->objfile->md, (PTR) s->line_charpos);
+ xmfree (s->objfile->md, s->line_charpos);
if (s->fullname != NULL)
xmfree (s->objfile->md, s->fullname);
if (s->debugformat != NULL)
xmfree (s->objfile->md, s->debugformat);
- xmfree (s->objfile->md, (PTR) s);
+ xmfree (s->objfile->md, s);
}
void
@@ -378,7 +378,7 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
" Full symtab was read (at ");
gdb_print_host_address (psymtab->symtab, outfile);
fprintf_filtered (outfile, " by function at ");
- gdb_print_host_address ((PTR) psymtab->read_symtab, outfile);
+ gdb_print_host_address (psymtab->read_symtab, outfile);
fprintf_filtered (outfile, ")\n");
}
@@ -583,7 +583,7 @@ Arguments missing: an output file name and an optional symbol file name");
1 for success. */
static int
-print_symbol (PTR args)
+print_symbol (void *args)
{
struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
int depth = ((struct print_symbol_args *) args)->depth;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 332eb16973c..07cb841fc82 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1,8 +1,8 @@
/* Symbol table lookup for the GNU debugger, GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
- Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -43,6 +43,8 @@
#include "filenames.h" /* for FILENAME_CMP */
#include "dictionary.h"
+#include "hashtab.h"
+
#include "gdb_obstack.h"
#include <sys/types.h>
@@ -456,10 +458,6 @@ symbol_init_language_specific (struct general_symbol_info *gsymbol,
{
gsymbol->language_specific.objc_specific.demangled_name = NULL;
}
- /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */
- /* OBSOLETE { */
- /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */
- /* OBSOLETE } */
else
{
memset (&gsymbol->language_specific, 0,
@@ -467,22 +465,35 @@ symbol_init_language_specific (struct general_symbol_info *gsymbol,
}
}
-/* Initialize a symbol's mangled name. */
+/* Functions to initialize a symbol's mangled name. */
+
+/* Create the hash table used for demangled names. Each hash entry is
+ a pair of strings; one for the mangled name and one for the demangled
+ name. The entry is hashed via just the mangled name. */
-/* Try to initialize the demangled name for a symbol, based on the
+static void
+create_demangled_names_hash (struct objfile *objfile)
+{
+ /* Choose 256 as the starting size of the hash table, somewhat arbitrarily.
+ The hash table code will round this up to the next prime number.
+ Choosing a much larger table size wastes memory, and saves only about
+ 1% in symbol reading. */
+
+ objfile->demangled_names_hash = htab_create_alloc_ex
+ (256, htab_hash_string, (int (*) (const void *, const void *)) streq,
+ NULL, objfile->md, xmcalloc, xmfree);
+}
+
+/* Try to determine the demangled name for a symbol, based on the
language of that symbol. If the language is set to language_auto,
it will attempt to find any demangling algorithm that works and
- then set the language appropriately. If no demangling of any kind
- is found, the language is set back to language_unknown, so we can
- avoid doing this work again the next time we encounter the symbol.
- Any required space to store the name is obtained from the specified
- obstack. */
+ then set the language appropriately. The returned name is allocated
+ by the demangler and should be xfree'd. */
-void
-symbol_init_demangled_name (struct general_symbol_info *gsymbol,
- struct obstack *obstack)
+static char *
+symbol_find_demangled_name (struct general_symbol_info *gsymbol,
+ const char *mangled)
{
- const char *mangled = gsymbol->name;
char *demangled = NULL;
if (gsymbol->language == language_unknown)
@@ -490,55 +501,118 @@ symbol_init_demangled_name (struct general_symbol_info *gsymbol,
if (gsymbol->language == language_cplus
|| gsymbol->language == language_auto)
{
- demangled = cplus_demangle (gsymbol->name, DMGL_PARAMS | DMGL_ANSI);
+ demangled =
+ cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI);
if (demangled != NULL)
{
gsymbol->language = language_cplus;
- gsymbol->language_specific.cplus_specific.demangled_name =
- obsavestring (demangled, strlen (demangled), obstack);
- xfree (demangled);
- }
- else
- {
- gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+ return demangled;
}
}
if (gsymbol->language == language_java)
{
demangled =
- cplus_demangle (gsymbol->name, DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA);
+ cplus_demangle (mangled,
+ DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA);
if (demangled != NULL)
{
gsymbol->language = language_java;
- gsymbol->language_specific.cplus_specific.demangled_name =
- obsavestring (demangled, strlen (demangled), obstack);
- xfree (demangled);
+ return demangled;
+ }
+ }
+ return NULL;
+}
+
+/* Set both the mangled and demangled (if any) names for GSYMBOL based on
+ NAME and LEN. The hash table corresponding to OBJFILE is used, and the
+ memory comes from that objfile's symbol_obstack. NAME is copied, so the
+ pointer can be discarded after calling this function. */
+
+void
+symbol_set_names (struct general_symbol_info *gsymbol,
+ const char *name, int len, struct objfile *objfile)
+{
+ char **slot;
+ const char *tmpname;
+
+ if (objfile->demangled_names_hash == NULL)
+ create_demangled_names_hash (objfile);
+
+ /* The stabs reader generally provides names that are not NULL-terminated;
+ most of the other readers don't do this, so we can just use the given
+ copy. */
+ if (name[len] != 0)
+ {
+ char *alloc_name = alloca (len + 1);
+ memcpy (alloc_name, name, len);
+ alloc_name[len] = 0;
+ tmpname = alloc_name;
+ }
+ else
+ tmpname = name;
+
+ slot = (char **) htab_find_slot (objfile->demangled_names_hash, tmpname, INSERT);
+
+ /* If this name is not in the hash table, add it. */
+ if (*slot == NULL)
+ {
+ char *demangled_name = symbol_find_demangled_name (gsymbol, tmpname);
+ int demangled_len = demangled_name ? strlen (demangled_name) : 0;
+
+ /* If there is a demangled name, place it right after the mangled name.
+ Otherwise, just place a second zero byte after the end of the mangled
+ name. */
+ *slot = obstack_alloc (&objfile->symbol_obstack,
+ len + demangled_len + 2);
+ memcpy (*slot, tmpname, len + 1);
+ if (demangled_name)
+ {
+ memcpy (*slot + len + 1, demangled_name, demangled_len + 1);
+ xfree (demangled_name);
}
else
+ (*slot)[len + 1] = 0;
+ }
+
+ gsymbol->name = *slot;
+ if ((*slot)[len + 1])
+ gsymbol->language_specific.cplus_specific.demangled_name
+ = &(*slot)[len + 1];
+ else
+ gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+}
+
+/* Initialize the demangled name of GSYMBOL if possible. Any required space
+ to store the name is obtained from the specified obstack. The function
+ symbol_set_names, above, should be used instead where possible for more
+ efficient memory usage. */
+
+void
+symbol_init_demangled_name (struct general_symbol_info *gsymbol,
+ struct obstack *obstack)
+{
+ char *mangled = gsymbol->name;
+ char *demangled = NULL;
+
+ demangled = symbol_find_demangled_name (gsymbol, mangled);
+ if (gsymbol->language == language_cplus
+ || gsymbol->language == language_java)
+ {
+ if (demangled)
{
- gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+ gsymbol->language_specific.cplus_specific.demangled_name
+ = obsavestring (demangled, strlen (demangled), obstack);
+ xfree (demangled);
}
+ else
+ gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+ }
+ else
+ {
+ /* Unknown language; just clean up quietly. */
+ if (demangled)
+ xfree (demangled);
}
-#if 0
- /* OBSOLETE if (demangled == NULL */
- /* OBSOLETE && (gsymbol->language == language_chill */
- /* OBSOLETE || gsymbol->language == language_auto)) */
- /* OBSOLETE { */
- /* OBSOLETE demangled = */
- /* OBSOLETE chill_demangle (gsymbol->name); */
- /* OBSOLETE if (demangled != NULL) */
- /* OBSOLETE { */
- /* OBSOLETE gsymbol->language = language_chill; */
- /* OBSOLETE gsymbol->language_specific.chill_specific.demangled_name = */
- /* OBSOLETE obsavestring (demangled, strlen (demangled), obstack); */
- /* OBSOLETE xfree (demangled); */
- /* OBSOLETE } */
- /* OBSOLETE else */
- /* OBSOLETE { */
- /* OBSOLETE gsymbol->language_specific.chill_specific.demangled_name = NULL; */
- /* OBSOLETE } */
- /* OBSOLETE } */
-#endif
}
@@ -556,9 +630,6 @@ symbol_demangled_name (const struct general_symbol_info *gsymbol)
else
return NULL;
-
- /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */
- /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */
}
/* Initialize the structure fields to zero values. */
@@ -781,11 +852,11 @@ fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile)
attractive to put in some QUIT's (though I'm not really sure
whether it can run long enough to be really important). But there
are a few calls for which it would appear to be bad news to quit
- out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c, and
- nindy_frame_chain_valid in nindy-tdep.c. (Note that there is C++
- code below which can error(), but that probably doesn't affect
- these calls since they are looking for a known variable and thus
- can probably assume it will never hit the C++ code). */
+ out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c. (Note
+ that there is C++ code below which can error(), but that probably
+ doesn't affect these calls since they are looking for a known
+ variable and thus can probably assume it will never hit the C++
+ code). */
/* NOTE: carlton/2002-12-23: I'm updating this to no longer demangle
names on demand. I hope that I've tracked down everywhere in GDB
@@ -2103,9 +2174,11 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
the first line, prev will not be set. */
/* Is this file's best line closer than the best in the other files?
- If so, record this file, and its best line, as best so far. */
+ If so, record this file, and its best line, as best so far. Don't
+ save prev if it represents the end of a function (i.e. line number
+ 0) instead of a real line. */
- if (prev && (!best || prev->pc > best->pc))
+ if (prev && prev->line && (!best || prev->pc > best->pc))
{
best = prev;
best_symtab = s;
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 8ae48300e9f..5be264eb4b6 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1,7 +1,8 @@
/* Symbol table definitions for GDB.
- Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1986, 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.
@@ -98,13 +99,6 @@ struct general_symbol_info
const char *demangled_name;
}
objc_specific;
-#if 0
-/* OBSOLETE struct chill_specific *//* For Chill */
- /* OBSOLETE { */
- /* OBSOLETE char *demangled_name; */
- /* OBSOLETE } */
- /* OBSOLETE chill_specific; */
-#endif
}
language_specific;
@@ -166,10 +160,16 @@ extern void symbol_init_language_specific (struct general_symbol_info *symbol,
enum language language);
#define SYMBOL_INIT_DEMANGLED_NAME(symbol,obstack) \
- (symbol_init_demangled_name (&symbol->ginfo, (obstack)))
+ (symbol_init_demangled_name (&(symbol)->ginfo, (obstack)))
extern void symbol_init_demangled_name (struct general_symbol_info *symbol,
struct obstack *obstack);
+#define SYMBOL_SET_NAMES(symbol,name,len,objfile) \
+ symbol_set_names (&(symbol)->ginfo, name, len, objfile)
+extern void symbol_set_names (struct general_symbol_info *symbol,
+ const char *name, int len,
+ struct objfile *objfile);
+
/* Return the demangled name for a symbol based on the language for
that symbol. If no demangled name exists, return NULL. */
#define SYMBOL_DEMANGLED_NAME(symbol) \
@@ -191,9 +191,6 @@ extern const char *symbol_demangled_name (const struct general_symbol_info
#define SYMBOL_LINKAGE_NAME(symbol) SYMBOL_NAME (symbol)
-/* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
-/* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
-
#define SYMBOL_OBJC_DEMANGLED_NAME(symbol) \
(symbol)->ginfo.language_specific.objc_specific.demangled_name
@@ -994,8 +991,8 @@ extern struct symbol *find_pc_sect_function (CORE_ADDR, asection *);
/* lookup function from address, return name, start addr and end addr */
-extern int
-find_pc_partial_function (CORE_ADDR, char **, CORE_ADDR *, CORE_ADDR *);
+extern int find_pc_partial_function (CORE_ADDR, char **, CORE_ADDR *,
+ CORE_ADDR *);
extern void clear_pc_function_cache (void);
@@ -1179,8 +1176,8 @@ extern struct symtab_and_line find_pc_sect_line (CORE_ADDR, asection *, int);
extern int find_line_pc (struct symtab *, int, CORE_ADDR *);
-extern int
-find_line_pc_range (struct symtab_and_line, CORE_ADDR *, CORE_ADDR *);
+extern int find_line_pc_range (struct symtab_and_line, CORE_ADDR *,
+ CORE_ADDR *);
extern void resolve_sal_pc (struct symtab_and_line *);
diff --git a/gdb/target.c b/gdb/target.c
index e19ad6dbbbf..683561f3a90 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -82,8 +82,8 @@ static void normal_target_post_startup_inferior (ptid_t ptid);
partial transfers, try either target_read_memory_partial or
target_write_memory_partial). */
-static int
-target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write);
+static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
+ int write);
static void init_dummy_target (void);
diff --git a/gdb/target.h b/gdb/target.h
index 8c6dce17c63..80e65381db1 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -488,11 +488,11 @@ extern int child_xfer_memory (CORE_ADDR, char *, int, int,
of bytes actually transfered is not defined) and ERR is set to a
non-zero error indication. */
-extern int
-target_read_memory_partial (CORE_ADDR addr, char *buf, int len, int *err);
+extern int target_read_memory_partial (CORE_ADDR addr, char *buf, int len,
+ int *err);
-extern int
-target_write_memory_partial (CORE_ADDR addr, char *buf, int len, int *err);
+extern int target_write_memory_partial (CORE_ADDR addr, char *buf, int len,
+ int *err);
extern char *child_pid_to_exec_file (int);
@@ -1101,8 +1101,8 @@ struct section_table
/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
Returns 0 if OK, 1 on error. */
-extern int
-build_section_table (bfd *, struct section_table **, struct section_table **);
+extern int build_section_table (bfd *, struct section_table **,
+ struct section_table **);
/* From mem-break.c */
@@ -1134,8 +1134,8 @@ extern struct target_ops *find_core_target (void);
extern struct target_ops *find_target_beneath (struct target_ops *);
-extern int
-target_resize_to_sections (struct target_ops *target, int num_added);
+extern int target_resize_to_sections (struct target_ops *target,
+ int num_added);
extern void remove_target_sections (bfd *abfd);
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5489bb6f91b..5f2126c47a1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,333 @@
+2003-02-06 Jason Molenda (jason-cl@molenda.com)
+
+ * gdb.mi/mi-syn-frame.c (subroutine): Add a comment explaining
+ why the code is written that way.
+
+2003-02-05 Michael Chastain <mec@shout.net>
+
+ * gdb.base/dump.exp: Add missing copyright line.
+
+2003-02-05 Jason Molenda (jason-cl@molenda.com)
+
+ * gdb.mi/mi-syn-frame.c (subroutine): Add an extra statement
+ at the beginning so the breakpoint doesn't get set on the loop.
+
+2003-02-05 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/local.exp: Relax the test for PR gdb/825 to accept
+ output for configurations with gcc 2.95.3.
+
+2003-02-05 Keith Seitz <keiths@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.mi/mi-cli.exp: New file.
+
+2003-02-04 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/anon-union.exp: Do not call gdb_suppress_entire_file.
+ Call perror and then continue.
+
+2003-02-03 Michael Chastain <mec@shout.net>
+
+ * gdb.c++/pr-1023.cc: New file.
+ * gdb.c++/pr-1023.exp: New file.
+
+2003-02-05 Jim Blandy <jimb@redhat.com>
+
+ * gdb.c++/local.exp: Don't expect Local to be in scope in main;
+ it's local to foobar. Check for it there, and check that it's not
+ present in main.
+ * gdb.c++/local.cc (marker2): New function.
+ (foobar): Call marker1.
+ (main): Call marker2 instead of marker1.
+
+2003-02-04 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.disasm/mn10200.exp: Obsolete file.
+ * gdb.trace/Makefile.in (clean mostlyclean): Remove mn10200.
+ * gdb.disasm/Makefile.in (clean mostlyclean): Remove mn10200.
+ * gdb.base/watchpoint.exp: Mark the mn10200 xfails as obsolete.
+
+2003-02-04 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/overload.exp: Test intToChar(1).
+ * gdb.c++/overload.cc (intToChar): New.
+ (main): Call intToChar.
+
+2003-02-03 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/ovldbreak.exp (continue_to_bp_overloaded): Add
+ 'might_kfail' arg.
+ KFAIL some of the continue_to_bp_overloaded calls, according to
+ PR c++/1025.
+
+2003-02-01 Michael Chastain <mec@shout.net>
+
+ * gdb.base/advance.c (marker1): New marker function.
+ * gdb.base/advance.exp: When the 'advance' command lands on the
+ return breakpoint, it can legitimately stop on either the
+ current line or the next line. Accommodate both outcomes.
+ * gdb.base/until.exp: Likewise.
+
+2003-02-02 Andrew Cagney <ac131313@redhat.com>
+
+ 2002-11-10 Jason Molenda (jason-cl@molenda.com):
+ * gdb.mi/mi-var-child.exp: -var-list-children's CHILDREN field is
+ now a list, not a tuple.
+ * gdb.mi/mi-var-display.exp: Ditto.
+ * gdb.mi/gdb792.exp: Ditto.
+
+2003-02-01 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-11-09 Jason Molenda (jason-cl@molenda.com):
+ * gdb.mi/mi-syn-frame.exp: New tests for synthetic frames in
+ stack backtraces.
+ * gdb.mi/mi-syn-frame.c: Part of same.
+
+2003-02-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.mi/gdb669.exp, gdb.mi/mi-pthreads.exp,
+ gdb.mi/mi1-pthreads.exp: Return instead of calling
+ gdb_suppress_entire_file.
+
+2003-02-01 Mark Salter <msalter@redhat.com>
+
+ * gdb.asm/arm.inc (gdbasm_startup): Clear frame pointer, not sp.
+
+2003-01-31 Mark Salter <msalter@redhat.com>
+
+ * lib/mi-support.exp (mi_gdb_load): Support remote targets.
+ Support empty arg.
+
+2003-01-30 Michael Chastain <mec@shout.net>
+
+ * lib/gdb.exp: Revert patch of 2003-01-06, which set LC_ALL.
+ This was a workaround for a UTF-8 bug in readline 4.3. The bug
+ has been fixed in gdb/readline on 2003-01-09.
+
+2003-01-29 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/args.exp: Skip if target does not support args passing.
+
+2003-01-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * lib/gdb.exp (gdb_test_multiple): New function, cloned from
+ gdb_test. Accept a list of expect arguments as the third
+ parameter.
+ (gdb_test): Use it.
+
+2003-01-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.arch/altivec-abi.exp: Set variable 'srcfile' differently, to
+ allow for different test tree configurations. Update some
+ tescases accordingly.
+ * gdb.arch/altivec-regs.exp: Ditto.
+ * gdb.asm/asm-source.exp: Ditto.
+ * gdb.base/advance.exp: Ditto.
+ * gdb.base/display.exp: Ditto.
+ * gdb.base/long_long.exp: Ditto.
+ * gdb.base/mips_pro.exp: Ditto.
+ * gdb.base/overlays.exp: Ditto.
+ * gdb.base/relocate.exp: Ditto.
+ * gdb.base/setshow.exp: Ditto.
+ * gdb.base/step-line.exp: Ditto.
+ * gdb.base/step-test.exp: Ditto.
+ * gdb.base/until.exp: Ditto.
+ * gdb.c++/virtfunc.exp: Get rid of variable 'src'.
+
+2003-01-17 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/demangle.exp (test_lucid_style_demangling): KFAIL test
+ corresponding to PR c++/945.
+ Update copyright.
+
+2003-01-17 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/inherit.exp (test_print_mi_members): KFAIL tests
+ corresponding to PR c++/68.
+
+2003-01-17 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/cplusfuncs.exp (print_addr_2_kfail): New procedure.
+ (test_paddr_hairy_functions): Call print_addr_2_kfail for
+ hairyfunc5 through hairyfunc7. KFAIL for PR c++/19.
+
+2003-01-15 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/break.exp: Fix change of default location, because of
+ removal of until tests.
+ * gdb.base/help.exp: Update test for new 'until' help message.
+ Add test for help on 'advance'.
+ * gdb.base/args.exp: Fix foobar with GDBFLAGS global.
+
+2003-01-15 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/default.exp: Adapt "info float" test for recent changes
+ to that command. Add test for "info vector".
+ * gdb.base/float.exp: New file. Add test for "info float" that
+ resembles the old test in gdb.base/default.exp.
+
+2003-01-15 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.base/selftest.exp (do_steps_and_nexts): Allow gdb_sysroot.
+
+2003-01-15 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/break.exp: Move the tests of until command from here...
+ * gdb.base/until.exp: ... to here. New file. Add other tests.
+ * gdb.base/advance.c: New file.
+ * gdb.base/advance.exp: New file.
+
+2003-01-14 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/args.c: New file.
+ * gdb.base/args.exp: New file.
+
+2003-01-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.c++/virtfunc.exp: Remove fixed XFAIL.
+
+2003-01-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/killed.exp: Use KFAIL for gdb/568.
+
+2003-01-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/constvars.exp: Remove two extra XFAILs. Update copyright
+ dates.
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.c++/printmethod.exp (print virtual method): Accept "(void)".
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/printcmds.exp: Enable setup_kfail for gdb/538
+ (ptype &*"foo").
+ * gdb.c++/local.exp: Enable setup_kfail for gdb/482.
+
+2002-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.mi/mi-console.exp: Remove extra "(known bug)".
+ * gdb.mi/mi1-console.exp: Likewise.
+
+2002-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.mi/mi-console.exp: Add KFAIL for "Hello message (known bug)".
+ * gdb.mi/mi1-console.exp: Likewise.
+
+2003-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.c++/overload.exp: Remove some fixed XFAILs.
+
+2003-01-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/detach.exp: New test.
+
+2003-01-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (ALL_SUBDIRS): New variable.
+ (subdirs, clean, distclean): Use it.
+ * gdb.arch/Makefile.in: Clean up Makefile. Remove rules for
+ regenerating Makefile, since it is generated from the top level.
+ * gdb.asm/Makefile.in: Likewise.
+ * gdb.base/Makefile.in: Likewise.
+ * gdb.c++/Makefile.in: Likewise.
+ * gdb.disasm/Makefile.in: Likewise.
+ * gdb.java/Makefile.in: Likewise.
+ * gdb.mi/Makefile.in: Likewise.
+ * gdb.threads/Makefile.in: Likewise.
+ * gdb.trace/Makefile.in: Likewise.
+
+2003-01-09 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.c++/annota2.exp: KFAIL "watch triggered on a.x".
+ Add copyright year 2003.
+
+2003-01-06 Michael Chastain <mec@shout.net>
+
+ * gdb.mi/mi-pthreads.exp (check_mi_thread_command_set):
+ When selecting a thread, 'line' and 'file' are optional.
+ * gdb.mi/mi1-pthreads.exp: Likewise.
+
+2003-01-06 Andreas Schwab <schwab@suse.de>
+
+ * lib/gdb.exp: Set LC_ALL to "C" to avoid spurious testsuite
+ failures.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/844
+ * lib/gdb.exp (gdb_compile): Handle "quiet" option.
+ (gdb_compile_pthreads): Pass "quiet" to gdb_compile.
+
+ * gdb.threads/gcore-thread.exp: Use gdb_compile_pthreads. Return
+ instead of calling gdb_suppress_entire_file.
+ * gdb.threads/print-threads.exp: Likewise.
+ * gdb.threads/schedlock.exp: Likewise.
+
+ * gdb.threads/killed.exp: Return instead of calling
+ gdb_suppress_entire_file.
+ * gdb.threads/linux-dp.exp: Likewise.
+ * gdb.threads/pthreads.exp: Likewise.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/callfuncs.exp: Don't XFAIL unprototyped functions for
+ stabs.
+ * gdb.base/completion.exp: Allow marker1(void) as well as marker1().
+ * gdb.base/whatis.exp: Always allow (void) after function names.
+
+2003-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.c++/casts.exp: Correct regexp.
+
+2003-01-04 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Call AC_CONFIG_HEADER. Don't call
+ AC_CONFIG_SUBDIRS on gdb.arch, gdb.asm, gdb.base gdb.c++ gdb.java,
+ gdb.disasm, gdb.mi, gdb.threads and gdb.trace. Call
+ AC_CHECK_HEADERS on pthread.h. Put Makefiles in the
+ aforementioned directories in the AC_OUPUT call.
+ * config.hin: New file.
+ * gdb.mi/gdb669.exp, gdb.mi/mi-pthreads.exp,
+ gdb.mi/mi1-pthreads.exp, gdb.threads/gcore-thread.exp,
+ gdb.threads/killed.exp, gdb.threads/print-threads.exp,
+ gdb.threads/pthreads.exp, gdb.threads/schedlock.exp: Make sure we
+ pass -I$objdir instead of -I$objdir/$subdir in compilation.
+ * gdb.arch/configure.in, gdb.arch/configure, gdb.asm/configure.in,
+ gdb.asm/configure, gdb.base/configure.in, gdb.base/configure,
+ gdb.c++/configure.in, gdb.c++/configure, gdb.disasm/configure.in,
+ gdb.disasm/configure, gdb.java/configure.in, gdb.java/configure,
+ gdb.mi/configure.in, gdb.mi/configure, gdb.mi/config.in,
+ gdb.threads/configure.in, gdb.threads/configure,
+ gdb.threads/config.in, gdb.trace/configure.in,
+ gdb.trace/configure: Removed.
+
+2003-01-03 Michael Chastain <mec@shout.net>
+
+ * gdb.base/miscexprs.c: Fix PR gdb/697, "buglet in
+ testsuite/gdb.base/miscexprs.c, off-by-1 array reference".
+
+2003-01-03 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/store.exp: Fix regular expressions.
+
+2002-12-28 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Rewrite.
+ * configure: Regenerated.
+
+2003-01-03 David Carlton <carlton@math.stanford.edu>
+
+ * gdb.base/psymtab.exp: New file.
+ * gdb.base/psymtab1.c: Ditto.
+ * gdb.base/psymtab2.c: Ditto.
+
+2002-12-23 Adam Fedor <fedor@gnu.org>
+
+ * gdb.base/maint.exp: Update expect output to include 'ObjC'.
+
2003-01-24 David Carlton <carlton@math.stanford.edu>
* gdb.c++/overload.exp: Add tests involving overloadNamespace.
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index f7f610ae1f5..29079d4b84f 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -35,6 +35,8 @@ SHELL = @SHELL@
EXEEXT = @EXEEXT@
SUBDIRS = @subdirs@
RPATH_ENVVAR = @RPATH_ENVVAR@
+ALL_SUBDIRS = gdb.arch gdb.asm gdb.base gdb.c++ gdb.disasm gdb.java gdb.mi \
+ gdb.threads gdb.trace $(SUBDIRS)
EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
echo $${rootme}/../../expect/expect ; \
@@ -145,7 +147,7 @@ subdir_do: force
force:;
subdirs:
- for dir in ${SUBDIRS} ; \
+ for dir in ${ALL_SUBDIRS} ; \
do \
echo "$$dir:" ; \
if [ -d $$dir ] ; then \
@@ -157,8 +159,8 @@ subdirs:
clean mostlyclean:
-rm -f *~ core *.o a.out xgdb *.x *.grt
- if [ x"${SUBDIRS}" != x ] ; then \
- for dir in ${SUBDIRS}; \
+ if [ x"${ALL_SUBDIRS}" != x ] ; then \
+ for dir in ${ALL_SUBDIRS}; \
do \
echo "$$dir:"; \
if [ -d $$dir ]; then \
@@ -171,8 +173,8 @@ distclean maintainer-clean realclean: clean
-rm -f *~ core
-rm -f Makefile config.status *-init.exp
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
- if [ x"${SUBDIRS}" != x ] ; then \
- for dir in ${SUBDIRS}; \
+ if [ x"${ALL_SUBDIRS}" != x ] ; then \
+ for dir in ${ALL_SUBDIRS}; \
do \
echo "$$dir:"; \
if [ -d $$dir ]; then \
diff --git a/gdb/testsuite/gdb.threads/config.in b/gdb/testsuite/config.hin
index 37bfc2ba592..1333b971c53 100644
--- a/gdb/testsuite/gdb.threads/config.in
+++ b/gdb/testsuite/config.hin
@@ -1,4 +1,4 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.hin. Generated automatically from configure.in by autoheader. */
/* Define if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index 26d555e029a..2a2494e886a 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -12,9 +12,11 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared use shared libraries"
+ --with-stabs arrange to use stabs instead of host debug format"
ac_help="$ac_help
- --enable-gdbtk "
+ --enable-gtk enable gdbtk graphical user interface (GUI)"
+ac_help="$ac_help
+ --enable-shared build shared libraries [deault=yes]"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -32,6 +34,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -146,6 +149,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -316,6 +320,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -481,12 +490,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -526,10 +539,9 @@ fi
-CC=${CC-cc}
ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -541,33 +553,30 @@ for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:564: checking build system type" >&5
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
esac
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
@@ -575,7 +584,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:579: checking host system type" >&5
+echo "configure:588: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -596,7 +605,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:600: checking target system type" >&5
+echo "configure:609: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -613,137 +622,231 @@ target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:618: checking build system type" >&5
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+# Directories that need to be configured in all configurations.
+configdirs=
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
+# Add HP-specific tests when appropriate.
+case $target in
+ hppa*-*-hpux*)
+ configdirs="$configdirs gdb.hp" ;;
+esac
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-# Directories to use in all configurations.
-configdirs="gdb.arch \
- gdb.asm \
- gdb.base \
- gdb.c++ \
- gdb.java \
- gdb.disasm \
- gdb.mi \
- gdb.threads \
- gdb.trace"
-
-
-# Directories to use for a configuration which uses stabs.
-stabsdirs="gdb.stabs"
-
- # this section is for targets that use stabs
-# add stabs tests for appropriate targets
-case "${target}" in
- powerpc-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- rs6000-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-bsd*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-go32*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-linux*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-lynxos*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-sun-*) configdirs="${configdirs} ${stabsdirs}" ;;
- hppa*-*-*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-elf*) configdirs="${configdirs} ${stabsdirs}" ;;
- *) if test "x${with_stabs}" = x"yes" ; then
- configdirs="${configdirs} ${stabsdirs}"
- fi ;;
+# With stabs.
+# Check whether --with-stabs or --without-stabs was given.
+if test "${with_stabs+set}" = set; then
+ withval="$with_stabs"
+ :
+else
+ # We enable stabs tests by default on selected targets.
+case $target in
+ powerpc-*-aix* \
+ | rs6000-*-aix* \
+ | *-*-bsd* \
+ | *-*-go32* \
+ | *-*-linux* \
+ | *-*-lynxos* \
+ | *-sun-* \
+ | hppa*-*-* \
+ | *-*-elf* \
+ )
+ with_stabs=yes ;;
+ *)
+ with_stabs=no ;;
esac
+fi
-# Directory with HP specific tests. They will run only with HP's compilers.
-# These tests will not work on other platforms and compilers.
-hpdir="gdb.hp"
+# Add stabs tests when appropriate.
+if test $with_stabs = yes; then
+ configdirs="$configdirs gdb.stabs"
+fi
+
+# Enable gdbtk.
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+ enableval="$enable_gdbtk"
+ :
+else
+ if test -d $srcdir/gdb.gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi
+fi
-case "${target}" in
- hppa*-*-hpux*) configdirs="${configdirs} ${hpdir}" ;;
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ enable_gdbtk=no ;;
esac
+# Add gdbtk tests when appropriate.
+if test $enable_gdbtk = yes; then
+ configdirs="$configdirs gdb.gdbtk"
+fi
-# Begin stuff to support --enable-shared
+# Enable shared libraries.
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
- case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *) shared=true ;;
-esac
+ :
+else
+ enable_shared=yes
fi
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- RPATH_ENVVAR=SHLIB_PATH
- ;;
+
+
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
+# such that we can find the shared libraries in the build tree.
+if test $enable_shared = no; then
+ # The variable `RPATH_ENVVAR' itself is not likely to be used on any
+ # platform.
+ RPATH_ENVVAR=RPATH_ENVVAR
+else
+ # The variable `LD_LIBRARY_PATH' is used on most platforms.
+ RPATH_ENVVAR=LD_LIBRARY_PATH
+ # The following exceptions are taken from Libtool 1.4.3.
+ case $host_os in
+ aix*)
+ if test $host_cpu != ia64; then
+ RPATH_ENVVAR=LIBPATH
+ fi ;;
+ darwin* | rhapsody*)
+ RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+ hpux*)
+ RPATH_ENVVAR=SHLIB_PATH ;;
esac
fi
-# End stuff to support --enable-shared
-# Start stuff to support --enable-gdbtk
-# Check whether --enable-gdbtk or --disable-gdbtk was given.
-if test "${enable_gdbtk+set}" = set; then
- enableval="$enable_gdbtk"
- case "${enableval}" in
- yes)
- case "$host" in
- *go32*)
- enable_gdbtk=no ;;
- *windows*)
- enable_gdbtk=no ;;
- *)
- enable_gdbtk=yes ;;
- esac ;;
- no)
- enable_gdbtk=no ;;
- *)
- { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
-esac
-else
-
-# Default is on for everything but go32 and windows
-case "$host" in
- *go32* | *windows*)
- ;;
- *)
- enable_gdbtk=yes ;;
- esac
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:724: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 739 "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:745: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 756 "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:762: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 773 "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:779: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
-
-if test "${enable_gdbtk}" = "yes"; then
- configdirs="${configdirs} gdb.gdbtk"
+for ac_hdr in pthread.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:807: 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 812 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
fi
-# End stuff to support --enable-shared
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:742: checking for Cygwin environment" >&5
+echo "configure:845: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 747 "configure"
+#line 850 "configure"
#include "confdefs.h"
int main() {
@@ -754,7 +857,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -771,19 +874,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:775: checking for mingw32 environment" >&5
+echo "configure:878: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 780 "configure"
+#line 883 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -802,7 +905,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:806: checking for executable suffix" >&5
+echo "configure:909: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -812,10 +915,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -833,10 +936,8 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
-# configure the subdirectories too
subdirs="$configdirs"
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -900,19 +1001,7 @@ fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
+DEFS=-DHAVE_CONFIG_H
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
@@ -949,7 +1038,9 @@ done
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+ gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+ gdb.threads/Makefile gdb.trace/Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -981,7 +1072,11 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
-s%@CC@%$CC%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
@@ -992,12 +1087,8 @@ s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
+s%@CPP@%$CPP%g
s%@EXEEXT@%$EXEEXT%g
s%@subdirs@%$subdirs%g
@@ -1041,7 +1132,9 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+ gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+ gdb.threads/Makefile gdb.trace/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1095,6 +1188,113 @@ s%@top_srcdir@%$top_srcdir%g
fi; done
rm -f conftest.s*
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h:config.hin"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
EOF
cat >> $CONFIG_STATUS <<EOF
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index ab37e6de4ed..70bbee2fe7e 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -1,116 +1,118 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.12.1)
-AC_INIT(gdb.base)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
-AC_CANONICAL_SYSTEM
+# Copyright (C) 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
+# 02111-1307, USA.
-# Directories to use in all configurations.
-configdirs="gdb.arch \
- gdb.asm \
- gdb.base \
- gdb.c++ \
- gdb.java \
- gdb.disasm \
- gdb.mi \
- gdb.threads \
- gdb.trace"
+AC_PREREQ(2.13)
+AC_INIT(gdb.base)
+AC_CONFIG_HEADER(config.h:config.hin)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
-# Directories to use for a configuration which uses stabs.
-stabsdirs="gdb.stabs"
+# Directories that need to be configured in all configurations.
+configdirs=
- # this section is for targets that use stabs
-# add stabs tests for appropriate targets
-case "${target}" in
- powerpc-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- rs6000-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-bsd*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-go32*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-linux*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-lynxos*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-sun-*) configdirs="${configdirs} ${stabsdirs}" ;;
- hppa*-*-*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-elf*) configdirs="${configdirs} ${stabsdirs}" ;;
- *) if test "x${with_stabs}" = x"yes" ; then
- configdirs="${configdirs} ${stabsdirs}"
- fi ;;
+# Add HP-specific tests when appropriate.
+case $target in
+ hppa*-*-hpux*)
+ configdirs="$configdirs gdb.hp" ;;
esac
-# Directory with HP specific tests. They will run only with HP's compilers.
-# These tests will not work on other platforms and compilers.
+# With stabs.
+AC_ARG_WITH(stabs,
+[ --with-stabs arrange to use stabs instead of host debug format],,
+[# We enable stabs tests by default on selected targets.
+case $target in
+ powerpc-*-aix* \
+ | rs6000-*-aix* \
+ | *-*-bsd* \
+ | *-*-go32* \
+ | *-*-linux* \
+ | *-*-lynxos* \
+ | *-sun-* \
+ | hppa*-*-* \
+ | *-*-elf* \
+ )
+ with_stabs=yes ;;
+ *)
+ with_stabs=no ;;
+esac])
-hpdir="gdb.hp"
+# Add stabs tests when appropriate.
+if test $with_stabs = yes; then
+ configdirs="$configdirs gdb.stabs"
+fi
-case "${target}" in
- hppa*-*-hpux*) configdirs="${configdirs} ${hpdir}" ;;
+# Enable gdbtk.
+AC_ARG_ENABLE(gdbtk,
+[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
+ [if test -d $srcdir/gdb.gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi])
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ enable_gdbtk=no ;;
esac
+# Add gdbtk tests when appropriate.
+if test $enable_gdbtk = yes; then
+ configdirs="$configdirs gdb.gdbtk"
+fi
-# Begin stuff to support --enable-shared
+# Enable shared libraries.
AC_ARG_ENABLE(shared,
-[ --enable-shared use shared libraries],
-[case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *) shared=true ;;
-esac])dnl
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- RPATH_ENVVAR=SHLIB_PATH
- ;;
+[ --enable-shared build shared libraries [deault=yes]],,
+ enable_shared=yes)
+
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
+# such that we can find the shared libraries in the build tree.
+if test $enable_shared = no; then
+ # The variable `RPATH_ENVVAR' itself is not likely to be used on any
+ # platform.
+ RPATH_ENVVAR=RPATH_ENVVAR
+else
+ # The variable `LD_LIBRARY_PATH' is used on most platforms.
+ RPATH_ENVVAR=LD_LIBRARY_PATH
+ # The following exceptions are taken from Libtool 1.4.3.
+ case $host_os in
+ aix*)
+ if test $host_cpu != ia64; then
+ RPATH_ENVVAR=LIBPATH
+ fi ;;
+ darwin* | rhapsody*)
+ RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+ hpux*)
+ RPATH_ENVVAR=SHLIB_PATH ;;
esac
fi
AC_SUBST(RPATH_ENVVAR)
-# End stuff to support --enable-shared
-# Start stuff to support --enable-gdbtk
-AC_ARG_ENABLE(gdbtk,
-[ --enable-gdbtk ],
-[case "${enableval}" in
- yes)
- case "$host" in
- *go32*)
- enable_gdbtk=no ;;
- *windows*)
- enable_gdbtk=no ;;
- *)
- enable_gdbtk=yes ;;
- esac ;;
- no)
- enable_gdbtk=no ;;
- *)
- AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
-esac],
-[
-# Default is on for everything but go32 and windows
-case "$host" in
- *go32* | *windows*)
- ;;
- *)
- enable_gdbtk=yes ;;
- esac
-])
-if test "${enable_gdbtk}" = "yes"; then
- configdirs="${configdirs} gdb.gdbtk"
-fi
-# End stuff to support --enable-shared
+AC_CHECK_HEADERS(pthread.h)
-dnl Check for exe extension set on certain hosts (e.g. Win32)
AC_EXEEXT
-# configure the subdirectories too
AC_CONFIG_SUBDIRS($configdirs)
-
-dnl AC_SUBST(gdb_target_cpu)
-AC_OUTPUT(Makefile)
+AC_OUTPUT([Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+ gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+ gdb.threads/Makefile gdb.trace/Makefile])
diff --git a/gdb/testsuite/gdb.arch/Makefile.in b/gdb/testsuite/gdb.arch/Makefile.in
index f2dc1a930ab..2b6f494158c 100644
--- a/gdb/testsuite/gdb.arch/Makefile.in
+++ b/gdb/testsuite/gdb.arch/Makefile.in
@@ -5,16 +5,8 @@ EXECUTABLES = altivec-abi altivec-regs
MISCELLANEOUS =
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f *~ *.o a.out *.x *.ci *.tmp
@@ -26,6 +18,3 @@ distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-rm -f *-init.exp
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index 2e4504a1a30..70fc3e01b21 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -39,10 +39,9 @@ if ![istarget "powerpc-*altivec"] then {
set testfile "altivec-abi"
set binfile ${objdir}/${subdir}/${testfile}
+set srcfile ${testfile}.c
-set src1 ${srcdir}/${subdir}/${testfile}.c
-
-if { [gdb_compile ${src1} ${binfile} executable {debug additional_flags=-w}] != "" } {
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 80433bff155..fe8ec21ebcd 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -39,9 +39,9 @@ if ![istarget "powerpc-*altivec"] then {
set testfile "altivec-regs"
set binfile ${objdir}/${subdir}/${testfile}
-set src1 ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
-if { [gdb_compile ${src1} ${binfile} executable {debug additional_flags=-w}] != "" } {
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.arch/configure b/gdb/testsuite/gdb.arch/configure
deleted file mode 100755
index 205116b09da..00000000000
--- a/gdb/testsuite/gdb.arch/configure
+++ /dev/null
@@ -1,913 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=Makefile.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:586: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:607: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:625: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.arch/configure.in b/gdb/testsuite/gdb.arch/configure.in
deleted file mode 100644
index d72edff83a5..00000000000
--- a/gdb/testsuite/gdb.arch/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(Makefile.in)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.asm/Makefile.in b/gdb/testsuite/gdb.asm/Makefile.in
index 05ed656a387..d1c71b434da 100644
--- a/gdb/testsuite/gdb.asm/Makefile.in
+++ b/gdb/testsuite/gdb.asm/Makefile.in
@@ -2,35 +2,18 @@ VPATH = @srcdir@
srcdir = @srcdir@
EXECUTABLES =
+MISCELLANEOUS = arch.inc
-# uuencoded format to avoid SCCS/RCS problems with binary files.
-CROSS_EXECUTABLES =
-
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
- -rm -f *~ *.o a.out xgdb *.x $(CROSS_EXECUTABLES) *.ci *.tmp
+ -rm -f *~ *.o a.out *.x *.ci *.tmp
-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
- -rm -f twice-tmp.c
+ -rm -f $(MISCELLANEOUS)
distclean maintainer-clean realclean: clean
-rm -f *~ core
-rm -f Makefile config.status config.log
- -rm -f arch.inc
-rm -f *-init.exp
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in config.status
- $(SHELL) ./config.status
-
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.asm/arm.inc b/gdb/testsuite/gdb.asm/arm.inc
index 701ecbf56bc..65502277bfd 100644
--- a/gdb/testsuite/gdb.asm/arm.inc
+++ b/gdb/testsuite/gdb.asm/arm.inc
@@ -29,6 +29,7 @@
comment "crt0 startup"
.macro gdbasm_startup
- mov sp, #0
+ mov fp, #0
+ mov r7, #0
.endm
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 641a7c1056e..a42c61a575a 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 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
@@ -99,8 +99,8 @@ if [board_info $dest exists multilib_flags] {
set testfile "asm-source"
set binfile ${objdir}/${subdir}/${testfile}
-set src1 ${srcdir}/${subdir}/asmsrc1.s
-set src2 ${srcdir}/${subdir}/asmsrc2.s
+set srcfile1 asmsrc1.s
+set srcfile2 asmsrc2.s
remote_exec build "rm -f ${subdir}/arch.inc"
remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
@@ -110,10 +110,10 @@ if { "${asm-flags}" == "" } {
set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}"
}
-if {[target_assemble ${src1} asmsrc1.o "${asm-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags}"] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[target_assemble ${src2} asmsrc2.o "${asm-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags}"] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.asm/configure b/gdb/testsuite/gdb.asm/configure
deleted file mode 100755
index 1dd81387d9c..00000000000
--- a/gdb/testsuite/gdb.asm/configure
+++ /dev/null
@@ -1,913 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=asm-source.exp
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:586: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:607: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:625: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.asm/configure.in b/gdb/testsuite/gdb.asm/configure.in
deleted file mode 100644
index bded89e9693..00000000000
--- a/gdb/testsuite/gdb.asm/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(asm-source.exp)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.base/Makefile.in b/gdb/testsuite/gdb.base/Makefile.in
index c878f15de7c..e59f57b6639 100644
--- a/gdb/testsuite/gdb.base/Makefile.in
+++ b/gdb/testsuite/gdb.base/Makefile.in
@@ -17,16 +17,8 @@ EXECUTABLES = all-types annota1 bitfields break \
MISCELLANEOUS = coremmap.data ../foobar.baz \
shr1.sl shr2.sl solib_sl.sl solib1.sl solib2.sl
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
@@ -38,6 +30,3 @@ distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-rm -f *-init.exp
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c
new file mode 100644
index 00000000000..8066deec421
--- /dev/null
+++ b/gdb/testsuite/gdb.base/advance.c
@@ -0,0 +1,50 @@
+
+static int x;
+
+int foo (int a)
+{
+ int b = a + 10;
+ return b;
+}
+
+int bar (int y)
+{
+ int z = y + 20;
+ return z;
+}
+
+void func()
+{
+ x = x + 5;
+ func2 ();
+}
+
+int func2 ()
+{
+ x = 6;
+}
+
+int func3 ()
+{
+ x = 4;
+}
+
+void marker1 ()
+{
+}
+
+int
+main ()
+{
+ int result;
+ int b, c;
+ c = 5;
+ b = 3; /* advance this location */
+
+ func (c); /* stop here after leaving current frame */
+ marker1 (); /* stop here after leaving current frame */
+ func3 (); /* break here */
+ result = bar (b + foo (c));
+ return 0; /* advance malformed */
+}
+
diff --git a/gdb/testsuite/gdb.base/advance.exp b/gdb/testsuite/gdb.base/advance.exp
new file mode 100644
index 00000000000..e5061d8fbf6
--- /dev/null
+++ b/gdb/testsuite/gdb.base/advance.exp
@@ -0,0 +1,95 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# advance.exp -- Expect script to test 'advance' in gdb
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile advance
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+remote_exec build "rm -f ${binfile}"
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+# Verify that "advance <location>" works. (This is really just syntactic
+# sugar for "tbreak <location>; continue".)
+#
+gdb_test "advance [gdb_get_line_number "advance this location"]" \
+ "main .* at .*:.*b = 3.*advance this location.*" \
+ "advance line number"
+
+# Verify that a malformed "advance" is gracefully caught.
+#
+gdb_test "advance [gdb_get_line_number "advance malformed"] then stop" \
+ "Junk at end of arguments." "malformed advance"
+
+# Verify that "advance <funcname>" works.
+#
+gdb_test "advance func" \
+ "func.*at.*x = x \\+ 5." \
+ "advance func"
+
+# Verify that "advance <funcname>" when funcname is NOT called by the current
+# frame, stops at the end of the current frame.
+#
+# gdb can legitimately stop on either the current line or the next line,
+# depending on whether the machine instruction for 'call' on the current
+# line has more instructions after it or not.
+#
+gdb_test "advance func3" \
+ "(in main|).*(func \\(c\\)|marker1 \\(\\)).*stop here after leaving current frame..."\
+ "advance function not called by current frame"
+
+# break at main again
+#
+gdb_test "break [gdb_get_line_number "break here"]" \
+ ".*Breakpoint.* at .*" \
+ "set breakpoint at call to func3"
+gdb_test "continue" \
+ ".*Breakpoint ${decimal}, main.*func3.*break here.*" \
+ "continue to call to func3 in main"
+
+# Verify that "advance <funcname>" when funcname is called as parameter to
+# another function works.
+#
+gdb_test "advance foo" \
+ "foo \\(a=5\\).*int b = a \\+ 10;"\
+ "advance function called as param"
+
+# Verify that we get an error if we use 'advance' w/o argument
+#
+gdb_test "advance" \
+ "Argument required \\(a location\\)."\
+ "advance with no argument"
+
diff --git a/gdb/testsuite/gdb.base/args.c b/gdb/testsuite/gdb.base/args.c
new file mode 100644
index 00000000000..d564120a607
--- /dev/null
+++ b/gdb/testsuite/gdb.base/args.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ int i = 0;
+ printf ("%d\n", argc);
+ while (i < argc)
+ printf ("%s\n", argv[i++]);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp
new file mode 100644
index 00000000000..ff7ccab741b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/args.exp
@@ -0,0 +1,77 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This is a test for the gdb invocation option --args.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+
+global GDBFLAGS
+
+# Skip test if target does not support argument passing.
+if [target_info exists noargs] {
+ return;
+}
+
+set testfile "args"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+#
+# Test that the --args are processed correctly.
+#
+set old_gdbflags $GDBFLAGS
+set GDBFLAGS "--args $binfile 1 3"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_test "run" \
+ "Starting program.*args 1 3.*3\r\n.*args\r\n1\r\n3.*Program exited normally." \
+ "correct args printed"
+
+#
+# Test that the --args are processed correctly even if one of them is empty.
+#
+set GDBFLAGS "--args $binfile 1 '' 3"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_test "run" \
+ "Starting program.*args 1 \\\\'\\\\' 3.*4\r\n.*args\r\n1\r\n''\r\n3.*Program exited normally." \
+ "correct args printed, one empty"
+
+#
+# try with 2 empty args
+#
+set GDBFLAGS "--args $binfile 1 '' '' 3"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_test "run" \
+ "Starting program.*args 1 \\\\'\\\\' \\\\'\\\\' 3.*5\r\n.*args\r\n1\r\n''\r\n''\r\n3.*Program exited normally." \
+ "correct args printed, two empty"
+
+set GDBFLAGS $old_gdbflags
+
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index e3aa922bc50..fbc0e117e0a 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -1,5 +1,5 @@
# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2002
+# 2000, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -154,6 +154,7 @@ if {$hp_aCC_compiler} {
} else {
set proto ""
}
+
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
@@ -166,7 +167,6 @@ gdb_test "info break" \
\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:124" \
"breakpoint info"
-
# FIXME: The rest of this test doesn't work with anything that can't
# handle arguments.
# Huh? There doesn't *appear* to be anything that passes arguments
@@ -363,29 +363,6 @@ gdb_expect {
timeout {fail "(timeout) $name"}
}
-# Verify that "until <location>" works. (This is really just syntactic
-# sugar for "tbreak <location>; continue".)
-#
-send_gdb "until 79\n"
-gdb_expect {
- -re "main .* at .*:79.*$gdb_prompt $"\
- {pass "until 79"}
- -re "$gdb_prompt $"\
- {fail "until 79"}
- timeout {fail "(timeout) until 79"}
-}
-
-# Verify that a malformed "until" is gracefully caught.
-#
-send_gdb "until 80 then stop\n"
-gdb_expect {
- -re "Junk at end of arguments..*$gdb_prompt $"\
- {pass "malformed until"}
- -re "$gdb_prompt $"\
- {fail "malformed until"}
- timeout {fail "(timeout) malformed until"}
-}
-
# Verify that GDB responds gracefully when asked to set a breakpoint
# on a nonexistent source line.
#
@@ -398,6 +375,12 @@ gdb_expect {
timeout {fail "(timeout) break on non-existent source line"}
}
+# Run to the desired default location. If not positioned here, the
+# tests below don't work.
+#
+gdb_test "until 79" "main .* at .*:79.*" "until 79"
+
+
# Verify that GDB allows one to just say "break", which is treated
# as the "default" breakpoint. Note that GDB gets cute when printing
# the informational message about other breakpoints at the same
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 90f83434f43..9183fe46b82 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -143,9 +143,6 @@ proc do_function_calls {} {
gdb_test "p t_float_values(float_val1,-2.3765)" " = 1"
# Test passing of arguments which might not be widened.
- # Under stabs, GCC doesn't tell us whether the function was
- # prototyped or not.
- if {$gcc_compiled} { setup_xfail_format "stabs" }
gdb_test "p t_float_values2(0.0,0.0)" " = 0"
# Although PR 5318 mentions SunOS specifically, this seems
@@ -157,9 +154,6 @@ proc do_function_calls {} {
}
}
- # Under stabs, GCC doesn't tell us whether the function was
- # prototyped or not.
- if {$gcc_compiled} { setup_xfail_format "stabs" }
gdb_test "p t_float_values2(3.14159,float_val2)" " = 1"
gdb_test "p t_small_values(1,2,3,4,5,6,7,8,9,10)" " = 55"
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 332e1697a7f..512bbdbcd2e 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 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
@@ -705,7 +705,7 @@ gdb_expect {
-re "marker1.*$gdb_prompt info func marker$"\
{ send_gdb "\n"
gdb_expect {
- -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
+ -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
{ pass "complete 'info func mar'"}
-re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
timeout {fail "(timeout) complete 'info func mar'"}
diff --git a/gdb/testsuite/gdb.base/configure b/gdb/testsuite/gdb.base/configure
deleted file mode 100644
index 77d2d144ada..00000000000
--- a/gdb/testsuite/gdb.base/configure
+++ /dev/null
@@ -1,902 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=gdbvars.exp
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:575: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:596: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:614: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.base/configure.in b/gdb/testsuite/gdb.base/configure.in
deleted file mode 100644
index 7c4e397caa2..00000000000
--- a/gdb/testsuite/gdb.base/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(gdbvars.exp)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 897a025af0c..d58b9b65847 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -1,4 +1,5 @@
-# Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1997, 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
@@ -146,12 +147,10 @@ proc do_constvar_tests {} {
gdb_test "print lax" " = 20"
gdb_test "ptype lax" "type = short.*"
gdb_test "print lecherous" " = 30"
- local_compiler_xfail_check
gdb_test "ptype lecherous" "type = (unsigned short|short unsigned)( int)?"
gdb_test "print lechery" " = 40"
gdb_test "ptype lechery" "type = long.*"
gdb_test "print lectern" " = 50"
- local_compiler_xfail_check
gdb_test "ptype lectern" "type = (unsigned long|long unsigned)( int)?"
gdb_test "print leeway" " = 60"
gdb_test "ptype leeway" "type = float"
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 3fc6f0d1f5f..7e3ed445645 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -1,5 +1,5 @@
# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002
+# 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -320,15 +320,7 @@ gdb_test "info frame" "No stack.|No selected frame." "info frame"
#test info files
gdb_test "info files" "" "info files"
#test info float
-if { [istarget "arm*-*-*"] || \
- [istarget "xscale*-*-*"] || \
- [istarget "strongarm*-*-*"] } then {
- gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
-} elseif [istarget "i\[3456\]86-*-*"] then {
- gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
-} else {
- gdb_test "info float" "No floating.point info available for this processor." "info float"
-}
+gdb_test "info float" "The program has no registers now." "info float"
#test info functions
gdb_test "info functions" "All defined functions:" "info functions"
#test info locals
@@ -359,6 +351,8 @@ gdb_test "info terminal" "No saved terminal information." "info terminal"
gdb_test "info types" "All defined types:" "info types"
#test info variables
gdb_test "info variables" "All defined variables:" "info variables"
+#test info vector
+gdb_test "info vector" "The program has no registers now." "info vector"
#test info warranty
gdb_test "info warranty" "NO WARRANTY(\[^\r\n\]*\[\r\n\])+ *11. *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY(\[^\r\n\]*\[\r\n\])+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN(\[^\r\n\]*\[\r\n\])+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES(\[^\r\n\]*\[\r\n\])+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED(\[^\r\n\]*\[\r\n\])+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF(\[^\r\n\]*\[\r\n\])+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS(\[^\r\n\]*\[\r\n\])+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE(\[^\r\n\]*\[\r\n\])+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,(\[^\r\n\]*\[\r\n\])+REPAIR OR CORRECTION.(\[^\r\n\]*\[\r\n\])+ *12. *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING(\[^\r\n\]*\[\r\n\])+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR(\[^\r\n\]*\[\r\n\])+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,(\[^\r\n\]*\[\r\n\])+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING(\[^\r\n\]*\[\r\n\])+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED(\[^\r\n\]*\[\r\n\])+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY(\[^\r\n\]*\[\r\n\])+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER(\[^\r\n\]*\[\r\n\])+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE(\[^\r\n\]*\[\r\n\])+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"
#test info watchpoints
diff --git a/gdb/testsuite/gdb.base/detach.exp b/gdb/testsuite/gdb.base/detach.exp
new file mode 100644
index 00000000000..1556cf9cb53
--- /dev/null
+++ b/gdb/testsuite/gdb.base/detach.exp
@@ -0,0 +1,75 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Test running a program from the GDB prompt and then detaching it.
+# NOTE: This test could be much more thorough.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# Only GNU/Linux is known to support this.
+if { ! [istarget "*-*-linux*"] } {
+ return 0
+}
+
+# Are we on a target board?
+if [is_remote target] then {
+ return 0
+}
+
+set testfile "attach"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+proc do_detach_tests {} {
+ global srcdir
+ global binfile
+ global subdir
+ global pass
+
+ runto_main
+ gdb_test "set should_exit = 1" "" "set should_exit, $pass"
+ gdb_test "detach" "Detaching from program: .*$binfile, .*" "detach, $pass"
+}
+
+# Start with a fresh gdb
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+global pass
+set pass "one"
+do_detach_tests
+
+# Wait a moment and do it again.
+exec sleep 1
+
+set pass "two"
+do_detach_tests
+
+return 0
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index e285729adab..c39ee366169 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000
+# Copyright 1997, 1998, 1999, 2000, 2001, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -26,12 +26,12 @@ if $tracelevel then {
}
set testfile display
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [target_info exists gdb_stub] {
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 826fdfb0bfd..5885307cea7 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -1,3 +1,4 @@
+# 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
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
new file mode 100644
index 00000000000..66943eff7dd
--- /dev/null
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -0,0 +1,62 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+#
+# Test floating-point related functionality.
+#
+
+set prms_id 0
+set bug_id 0
+
+set testfile "run"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Set it up at a breakpoint so we have its registers.
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# Test "info float".
+
+if { [istarget "arm*-*-*"] || \
+ [istarget "xscale*-*-*"] || \
+ [istarget "strongarm*-*-*"] } then {
+ gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
+} elseif [istarget "i?86-*-*"] then {
+ gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
+} else {
+ gdb_test "info float" "No floating.point info available for this processor." "info float"
+}
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index 50da6774373..69cf40db748 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -36,6 +36,8 @@ gdb_test "set height 400" "" "test set height"
# use a larger expect input buffer for long help outputs.
# test help add-symbol-file
gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR \\\[-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR> \.\.\.\\\]\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded\.\[\r\n\]+ADDR is the starting address of the file's text\.\[\r\n\]+The optional arguments are section-name section-address pairs and\[\r\n\]+should be specified if the data and bss segments are not contiguous\[\r\n\]+with the text\. SECT is a section name to be loaded at SECT_ADDR\." "help add-symbol-file"
+# test help advance
+gdb_test "help advance" "Continue the program up to the given location \\(same form as args for break command\\)\.\[\r\n]+Execution will also stop upon exit from the current stack frame\." "help advance"
# test help aliases
gdb_test "help aliases" "Aliases of other commands\.\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help aliases"
# test help append
@@ -562,9 +564,9 @@ gdb_test "help tbreak" "Set a temporary breakpoint.*" "help tbreak"
# test help tty
gdb_test "help tty" "Set terminal for future runs of program being debugged\." "help tty"
# test help until "u" abbreviation
-gdb_test "help u" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified line or address or function \\(same args as break command\\)\.\[\r\n\]+Execution will also stop upon exit from the current stack frame\." "help until \"u\" abbreviation"
+gdb_test "help u" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified location \\(same args as break command\\) within the current frame\." "help until \"u\" abbreviation"
# test help until
-gdb_test "help until" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified line or address or function \\(same args as break command\\)\.\[\r\n\]+Execution will also stop upon exit from the current stack frame\." "help until"
+gdb_test "help until" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified location \\(same args as break command\\) within the current frame\." "help until"
# test help undisplay
gdb_test "help undisplay" "Cancel some expressions to be displayed when program stops\.\[\r\n\]+Arguments are the code numbers of the expressions to stop displaying\.\[\r\n\]+No argument means cancel all automatic-display expressions\.\[\r\n\]+\"delete display\" has the same effect as this command\.\[\r\n\]+Do \"info display\" to see current list of code numbers\." "help undisplay"
# test help unset environment
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 55086d76755..11308dbac61 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -1,4 +1,5 @@
-# Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1997, 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
@@ -30,7 +31,7 @@ if [target_info exists no_long_long] {
}
set testfile long_long
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# What compiler are we using?
@@ -45,7 +46,7 @@ if {$hp_cc_compiler} {
set flag ""
}
-if { [gdb_compile "${srcfile}" "${binfile}" executable [concat debug "additional_flags=$flag -w"]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug "additional_flags=$flag -w"]] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 9dbc509182a..69fecaddf17 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -449,7 +449,7 @@ set timeout $oldtimeout
send_gdb "help maint\n"
gdb_expect {
- -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*(maintenance dump-me.*)?maintenance info.*maintenance internal-error.*maintenance print.*maintenance set.*maintenance show.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+ -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C../ObjC demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*(maintenance dump-me.*)?maintenance info.*maintenance internal-error.*maintenance print.*maintenance set.*maintenance show.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
{ pass "help maint" }
-re ".*$gdb_prompt $" { fail "help maint" }
timeout { fail "(timeout) help maint" }
@@ -482,7 +482,7 @@ gdb_expect {
send_gdb "help maint demangle\n"
gdb_expect {
- -re "Demangle a C\\+\\+ mangled name\\.\r\nCall internal GDB demangler routine to demangle a C\\+\\+ link name\r\nand prints the result\\..*$gdb_prompt $"\
+ -re "Demangle a C\\+\\+/ObjC mangled name\\.\r\nCall internal GDB demangler routine to demangle a C\\+\\+ link name\r\nand prints the result\\..*$gdb_prompt $"\
{ pass "help maint demangle" }
-re ".*$gdb_prompt $" { fail "help maint demangle" }
timeout { fail "(timeout) help maint demangle" }
@@ -617,7 +617,7 @@ gdb_expect {
send_gdb "help maint\n"
gdb_expect {
- -re "Commands for use by GDB maintainers\\.\[\r\n\]+Includes commands to dump specific internal GDB structures in\[\r\n\]+a human readable form, to cause GDB to deliberately dump core,\[\r\n\]+to test internal functions such as the C\\+\\+ demangler, etc\\..*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+ -re "Commands for use by GDB maintainers\\.\[\r\n\]+Includes commands to dump specific internal GDB structures in\[\r\n\]+a human readable form, to cause GDB to deliberately dump core,\[\r\n\]+to test internal functions such as the C\\+\\+/ObjC demangler, etc\\..*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
{ pass "help maint" }
-re ".*$gdb_prompt $" { fail "help maint" }
timeout { fail "(timeout) help maint" }
diff --git a/gdb/testsuite/gdb.base/mips_pro.exp b/gdb/testsuite/gdb.base/mips_pro.exp
index 1697eee136a..a860e6335d0 100644
--- a/gdb/testsuite/gdb.base/mips_pro.exp
+++ b/gdb/testsuite/gdb.base/mips_pro.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ set prms_id 0
set bug_id 0
set testfile mips_pro
-set srcfile ${srcdir}/$subdir/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Create and source the file that provides information about the compiler
@@ -38,11 +38,11 @@ if [get_compiler_info ${binfile}] {
# This test must be compiled with -O2 if using gcc.
if {$gcc_compiled} then {
- if { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-O2}] != "" } {
+ if { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug additional_flags=-O2}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
} else {
- if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+ if { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
diff --git a/gdb/testsuite/gdb.base/miscexprs.c b/gdb/testsuite/gdb.base/miscexprs.c
index 580255d27cf..fe88fb2f8e8 100644
--- a/gdb/testsuite/gdb.base/miscexprs.c
+++ b/gdb/testsuite/gdb.base/miscexprs.c
@@ -33,7 +33,7 @@ main ()
ibig.i[100] = 5;
cbig.c[0] = '\0';
- cbig.c[100] = 'A';
+ cbig.c[99] = 'A';
fbig.f[100] = 11.99999;
dbig.d[202] = 9.99999999;
sbig.s[90] = 255;
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index c31da4e5ad4..37bfbaa1aa0 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 2002 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 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
@@ -41,29 +41,25 @@ if [istarget "d10v-*-*"] then {
set testfile "overlays"
set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${srcdir}/${subdir}/${testfile}.c
-set foo ${srcdir}/${subdir}/foo.c
-set bar ${srcdir}/${subdir}/bar.c
-set baz ${srcdir}/${subdir}/baz.c
-set grbx ${srcdir}/${subdir}/grbx.c
+set srcfile ${testfile}.c
-if {[gdb_compile "${srcfile}" "${testfile}.o" object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if {[gdb_compile "${srcdir}/${subdir}/ovlymgr.c" ovlymgr.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${foo}" foo.o object {debug} ] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/foo.c" foo.o object {debug} ] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${bar}" bar.o object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/bar.c" bar.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${baz}" baz.o object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/baz.c" baz.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${grbx}" grbx.o object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/grbx.c" grbx.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if {[gdb_compile "${testfile}.o ovlymgr.o foo.o bar.o baz.o grbx.o" ${binfile} executable "ldscript=-Wl,-T$linker_script"] != "" } {
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index b0232dd62a3..8f3ba89eb99 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002 Free
+# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -627,7 +627,7 @@ proc test_print_string_constants {} {
gdb_test "p *\"foo\"" " = 102 'f'"
gdb_test "ptype *\"foo\"" " = char"
gdb_test "p &*\"foo\"" " = \"foo\""
- # setup_kfail "gdb/538"
+ setup_kfail "gdb/538" *-*-*
gdb_test "ptype &*\"foo\"" "type = char \\*"
gdb_test "p (char *)\"foo\"" " = \"foo\""
}
diff --git a/gdb/testsuite/gdb.base/psymtab.exp b/gdb/testsuite/gdb.base/psymtab.exp
new file mode 100644
index 00000000000..8c2abffa345
--- /dev/null
+++ b/gdb/testsuite/gdb.base/psymtab.exp
@@ -0,0 +1,72 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file is part of the gdb testsuite
+
+# This is intended to be a repository for tests that partial symbols
+# are working properly. If multiple tests are added, make sure that
+# you exit and restart GDB between tests.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+
+set prms_id 0
+set bug_id 0
+
+if { [skip_cplus_tests] } { continue }
+
+set testfile "psymtab"
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# This test is looking for a bug that manifested itself when GDB was
+# looking for a partial symbol such that there wasn't such a partial
+# symbol in the psymtab, but such that the last psym in the psymtab
+# had the right name but the wrong namespace. Here, searching for
+# zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE
+# without a preceding search for 'zzz' in VAR_NAMESPACE.
+
+gdb_test "break zzz::dummy" "Can't find member of namespace, class, struct, or union named \"zzz::dummy\"\r\n.*" "Don't search past end of psymtab."
diff --git a/gdb/testsuite/gdb.base/psymtab1.c b/gdb/testsuite/gdb.base/psymtab1.c
new file mode 100644
index 00000000000..1482f27e53c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/psymtab1.c
@@ -0,0 +1,4 @@
+int main ()
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/psymtab2.c b/gdb/testsuite/gdb.base/psymtab2.c
new file mode 100644
index 00000000000..eeaa5eda55d
--- /dev/null
+++ b/gdb/testsuite/gdb.base/psymtab2.c
@@ -0,0 +1,3 @@
+extern int zzz;
+
+int zzz = 123;
diff --git a/gdb/testsuite/gdb.base/relocate.exp b/gdb/testsuite/gdb.base/relocate.exp
index c4e25ded7ca..bcaa48adbc2 100644
--- a/gdb/testsuite/gdb.base/relocate.exp
+++ b/gdb/testsuite/gdb.base/relocate.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
@@ -25,11 +25,11 @@ if $tracelevel then {
}
set testfile relocate
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}.o
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" object {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp
index bf71c49cbae..5d9419ed298 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.base/selftest.exp
@@ -170,6 +170,12 @@ proc do_steps_and_nexts {} {
set description "step over current_directory initialization"
set command "step"
}
+ -re ".*gdb_sysroot = .*$gdb_prompt $" {
+ # NOTE: carlton/2003-01-15: More optimization reordering,
+ # observed on GCC 3.1.
+ set description "step over gdb_sysroot initialization"
+ set command "step"
+ }
-re "\[ \t\]+\{\r\n$gdb_prompt $" {
setup_xfail "mips-*-irix5*"
fail "$description ended up at odd location"
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index a1070fd986f..a406824eeba 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -1,4 +1,5 @@
-# Copyright 1992, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1996, 1997, 1998, 2001, 2003
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,9 +28,9 @@ set prms_id 0
set bug_id 0
set testfile "setshow"
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile ${srcfile} ${binfile} executable {debug}] != "" } {
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/step-line.exp b/gdb/testsuite/gdb.base/step-line.exp
index cac3128fcec..9754fddcee0 100644
--- a/gdb/testsuite/gdb.base/step-line.exp
+++ b/gdb/testsuite/gdb.base/step-line.exp
@@ -1,4 +1,4 @@
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,11 +28,11 @@ if $tracelevel then {
}
set testfile step-line
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/step-test.exp b/gdb/testsuite/gdb.base/step-test.exp
index 32af949cf28..7a6bd19ff29 100644
--- a/gdb/testsuite/gdb.base/step-test.exp
+++ b/gdb/testsuite/gdb.base/step-test.exp
@@ -1,4 +1,5 @@
-# Copyright 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2002, 2001, 2003
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,11 +29,11 @@ if $tracelevel then {
}
set testfile step-test
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index 64a87490228..d6e941a19b6 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.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
@@ -105,10 +105,10 @@ proc check_struct { t old new } {
gdb_test "print u" " = ${new}" "new check struct ${t}"
}
-check_struct "1" "{s = {0}}" "{s = {1}}"
-check_struct "2" "{s = {0, 0}}" "{s = {1, 2}}"
-check_struct "3" "{s = {0, 0, 0}}" "{s = {1, 2, 3}}"
-check_struct "4" "{s = {0, 0, 0, 0}}" "{s = {1, 2, 3, 4}}"
+check_struct "1" "{s = \\{0}}" "{s = \\{1}}"
+check_struct "2" "{s = \\{0, 0}}" "{s = \\{1, 2}}"
+check_struct "3" "{s = \\{0, 0, 0}}" "{s = \\{1, 2, 3}}"
+check_struct "4" "{s = \\{0, 0, 0, 0}}" "{s = \\{1, 2, 3, 4}}"
proc up_struct { t old new } {
global gdb_prompt
@@ -121,10 +121,10 @@ proc up_struct { t old new } {
gdb_test "print u" " = ${new}" "new up struct ${t}"
}
-up_struct "1" "{s = {0}}" "{s = {1}}"
-up_struct "2" "{s = {0, 0}}" "{s = {1, 2}}"
-up_struct "3" "{s = {0, 0, 0}}" "{s = {1, 2, 3}}"
-up_struct "4" "{s = {0, 0, 0, 0}}" "{s = {1, 2, 3, 4}}"
+up_struct "1" "{s = \\{0}}" "{s = \\{1}}"
+up_struct "2" "{s = \\{0, 0}}" "{s = \\{1, 2}}"
+up_struct "3" "{s = \\{0, 0, 0}}" "{s = \\{1, 2, 3}}"
+up_struct "4" "{s = \\{0, 0, 0, 0}}" "{s = \\{1, 2, 3, 4}}"
#
diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp
new file mode 100644
index 00000000000..f646c6d36ae
--- /dev/null
+++ b/gdb/testsuite/gdb.base/until.exp
@@ -0,0 +1,81 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# until.exp -- Expect script to test 'until' in gdb
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile break
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+remote_exec build "rm -f ${binfile}"
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+# Verify that "until <location>" works. (This is really just syntactic
+# sugar for "tbreak <location>; continue".)
+#
+gdb_test "until 79" \
+ "main .* at .*:79.*" \
+ "until line number"
+
+# Verify that a malformed "advance" is gracefully caught.
+#
+gdb_test "until 80 then stop" \
+ "Junk at end of arguments." "malformed until"
+
+# Rerun up to factorial, outer invocation
+if { ![runto factorial] } then { gdb_suppress_tests; }
+delete_breakpoints
+
+# At this point, 'until' should continue the inferior up to when all the
+# inner invocations of factorial() are completed and we are back at this
+# frame.
+#
+gdb_test "until 99" \
+ "factorial.*value=720.*at.*${srcfile}:99.*return \\(value\\)." \
+ "until factorial, recursive function"
+
+# Run to a function called by main
+#
+if { ![runto marker2] } then { gdb_suppress_tests; }
+delete_breakpoints
+
+# Now issue an until with another function, not called by the current
+# frame, as argument. This should not work, i.e. the program should
+# stop at main, the caller, where we put the 'guard' breakpoint.
+#
+gdb_test "until marker3" \
+ "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:(82.*marker2 \\(43\\)|83.*marker3 \\(.stack., .trace.\\))." \
+ "until func, not called by current frame"
+
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index e150d555e60..f10955fce5a 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -394,7 +394,7 @@ proc test_stepping {} {
clear_xfail "sparc-*-*"
clear_xfail "hppa*-*-*bsd*"
# It works with the generic inferior function calling code too.
- clear_xfail "mn10200*-*-*"
+ # 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.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
index 79c48e4da70..98af77a3417 100644
--- a/gdb/testsuite/gdb.base/whatis.exp
+++ b/gdb/testsuite/gdb.base/whatis.exp
@@ -1,4 +1,4 @@
-# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999, 2002
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -301,15 +301,13 @@ gdb_test "whatis v_union2" \
"whatis unnamed union"
-if { [istarget "hppa*-hp-hpux*"] && $hp_aCC_compiler } {
- # HP-UX: HP aCC compiler w/ +objdebug option detects language as
- # c++, so we need the 'void' pattern here.
- # Without +objdebug compilation option we still need to match ''.
- # - guo
- set void "(void|)"
-} else {
- set void ""
-}
+# HP-UX: HP aCC compiler w/ +objdebug option detects language as
+# c++, so we need the 'void' pattern here.
+# Without +objdebug compilation option we still need to match ''.
+# - guo
+# Also, using stabs we will mark these functions as prototyped. This
+# is harmless but causes an extra VOID to be printed.
+set void "(void|)"
# test whatis command with functions return type
gdb_test "whatis v_char_func" \
diff --git a/gdb/testsuite/gdb.c++/Makefile.in b/gdb/testsuite/gdb.c++/Makefile.in
index 82672598750..8f4a90e2bb2 100644
--- a/gdb/testsuite/gdb.c++/Makefile.in
+++ b/gdb/testsuite/gdb.c++/Makefile.in
@@ -5,16 +5,8 @@ EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \
derivation inherit local member-ptr method misc \
overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace ref-types
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f *~ *.o *.ci
@@ -22,6 +14,3 @@ clean mostlyclean:
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-
-Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.c++/annota2.exp b/gdb/testsuite/gdb.c++/annota2.exp
index 0e585ececc6..0446eb3b63f 100644
--- a/gdb/testsuite/gdb.c++/annota2.exp
+++ b/gdb/testsuite/gdb.c++/annota2.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2001, 2002
+# Copyright 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -197,6 +197,8 @@ gdb_expect {
{ 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" }
+ -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\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { kfail "gdb/38" "watch triggered on a.x" }
-re ".*$gdb_prompt$" { fail "watch triggered on a.x" }
timeout { fail "watch triggered on a.x (timeout)" }
}
diff --git a/gdb/testsuite/gdb.c++/anon-union.exp b/gdb/testsuite/gdb.c++/anon-union.exp
index 9b86b5d94ab..0d5c7777319 100644
--- a/gdb/testsuite/gdb.c++/anon-union.exp
+++ b/gdb/testsuite/gdb.c++/anon-union.exp
@@ -1,5 +1,5 @@
# Tests for anonymous union support.
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 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
@@ -40,7 +40,8 @@ set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ perror "Testcase compile failed" 0
+ continue
}
# Start with a fresh gdb
diff --git a/gdb/testsuite/gdb.c++/casts.exp b/gdb/testsuite/gdb.c++/casts.exp
index 68ce704bc13..859755f66b7 100644
--- a/gdb/testsuite/gdb.c++/casts.exp
+++ b/gdb/testsuite/gdb.c++/casts.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
@@ -59,7 +59,7 @@ gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \
"Breakpoint.*at.* file .*" \
""
-gdb_test "run" "Breakpoint .* at casts.cc" ""
+gdb_test "run" "Breakpoint .* at .*casts.cc.*" ""
# Casting a pointer to a base class to a pointer to a derived class
# should yield the entire derived class. Until August 2002, GDB got
diff --git a/gdb/testsuite/gdb.c++/configure b/gdb/testsuite/gdb.c++/configure
deleted file mode 100644
index 6d0b517b4a6..00000000000
--- a/gdb/testsuite/gdb.c++/configure
+++ /dev/null
@@ -1,899 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=cplusfuncs.cc
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.c++/configure.in b/gdb/testsuite/gdb.c++/configure.in
deleted file mode 100644
index f989cb82865..00000000000
--- a/gdb/testsuite/gdb.c++/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(cplusfuncs.cc)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.exp b/gdb/testsuite/gdb.c++/cplusfuncs.exp
index 9057cc290fc..6f92817efd9 100644
--- a/gdb/testsuite/gdb.c++/cplusfuncs.exp
+++ b/gdb/testsuite/gdb.c++/cplusfuncs.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1992, 1997, 1999, 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
@@ -269,7 +269,9 @@ proc info_func { name demangled } {
# Print the address of a function.
# This checks that I can lookup a fully qualified C++ function.
# This also checks the argument types on the return string.
-#
+
+# Note: carlton/2003-01-16: If you modify this, make a corresponding
+# modification to print_addr_2_kfail.
proc print_addr_2 { name good } {
global gdb_prompt
@@ -291,6 +293,37 @@ proc print_addr_2 { name good } {
}
}
+# NOTE: carlton/2003-01-16: hairyfunc5-6 fail on GCC 3.x (for at least
+# x=1 and x=2.1). So I'm modifying print_addr_2 to accept a failure
+# condition. FIXME: It would be nice if the failure condition were
+# conditional on the compiler version, but I'm not sufficiently
+# motivated. I did hardwire in the versions of char * and int *,
+# which will give some compiler-specificity to the failure.
+
+proc print_addr_2_kfail { name good bad bugid } {
+ global gdb_prompt
+ global hex
+
+ set good_pattern [string_to_regexp $good]
+ set bad_pattern [string_to_regexp $bad]
+
+ send_gdb "print &'$name'\n"
+ gdb_expect {
+ -re ".* = .* $hex <$good_pattern>\r\n$gdb_prompt $" {
+ pass "print &'$name'"
+ }
+ -re ".* = .* $hex <$bad_pattern>\r\n$gdb_prompt $" {
+ kfail $bugid "print &'$name'"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "print &'$name'"
+ }
+ timeout {
+ fail "print &'$name' (timeout)"
+ }
+ }
+}
+
#
# Simple interfaces to print_addr_2.
#
@@ -490,9 +523,9 @@ proc test_paddr_hairy_functions {} {
# gdb-gnats bug gdb/19:
# "gdb v3 demangler fails on hairyfunc5 hairyfunc6 hairyfunc7"
- print_addr_2 "hairyfunc5" "hairyfunc5(int (*(*)($dm_type_char_star))(long))"
- print_addr_2 "hairyfunc6" "hairyfunc6(int (*(*)($dm_type_int_star))(long))"
- print_addr_2 "hairyfunc7" "hairyfunc7(int (*(*)(int (*)($dm_type_char_star)))(long))"
+ print_addr_2_kfail "hairyfunc5" "hairyfunc5(int (*(*)($dm_type_char_star))(long))" "hairyfunc5(int (*)(long) (*)(char*))" "gdb/19"
+ print_addr_2_kfail "hairyfunc6" "hairyfunc6(int (*(*)($dm_type_int_star))(long))" "hairyfunc6(int (*)(long) (*)(int*))" "gdb/19"
+ print_addr_2_kfail "hairyfunc7" "hairyfunc7(int (*(*)(int (*)($dm_type_char_star)))(long))" "hairyfunc7(int (*)(long) (*)(int (*)(char*)))" "gdb/19"
}
proc do_tests {} {
diff --git a/gdb/testsuite/gdb.c++/demangle.exp b/gdb/testsuite/gdb.c++/demangle.exp
index 45a89bd83c9..7bd9fc54d00 100644
--- a/gdb/testsuite/gdb.c++/demangle.exp
+++ b/gdb/testsuite/gdb.c++/demangle.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1997, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1997, 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
@@ -694,7 +694,10 @@ proc test_lucid_style_demangling {} {
# GDB 930701 gets into an infinite loop.
# GDB 930727 says "Can't demangle".
# What is the correct demangling? FIXME.
- setup_xfail "*-*-*"
+
+ # NOTE: carlton/2003-01-17: No, don't FIXME, just obsolete lucid.
+ # I'm KFAILing this rather than deleting it for form's sake.
+ setup_kfail "gdb/945" "*-*-*"
test_demangling_exact "lucid: __vtbl__3foo__vt_cc_main_" ""
test_demangling_exact "lucid: abs__F7complex" "abs(complex)"
diff --git a/gdb/testsuite/gdb.c++/inherit.exp b/gdb/testsuite/gdb.c++/inherit.exp
index 286c27b09f3..66c2a52adae 100644
--- a/gdb/testsuite/gdb.c++/inherit.exp
+++ b/gdb/testsuite/gdb.c++/inherit.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -349,7 +349,6 @@ proc test_print_mi_members {} {
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print g_D.A::a\n"
gdb_expect {
-re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 15$nl$gdb_prompt $" {
@@ -359,10 +358,10 @@ proc test_print_mi_members {} {
pass "print g_D.A::a (using B)"
}
-re ".* = 15$nl$gdb_prompt $" {
- fail "print g_D.A::a (FIXME)"
+ kfail "gdb/68" "print g_D.A::a"
}
-re ".* = 11$nl$gdb_prompt $" {
- fail "print g_D.A::a (FIXME)"
+ kfail "gdb/68" "print g_D.A::a"
}
-re ".*$gdb_prompt $" { fail "print g_D.A::a" }
timeout { fail "print g_D.A::a (timeout)" ; return }
@@ -372,7 +371,6 @@ proc test_print_mi_members {} {
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print g_D.A::x\n"
gdb_expect {
-re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 16$nl$gdb_prompt $" {
@@ -382,10 +380,10 @@ proc test_print_mi_members {} {
pass "print g_D.A::x (using B)"
}
-re ".* = 16$nl$gdb_prompt $" {
- fail "print g_D.A::x (FIXME)"
+ kfail "gdb/68" "print g_D.A::x"
}
-re ".* = 12$nl$gdb_prompt $" {
- fail "print g_D.A::x (FIXME)"
+ kfail "gdb/68" "print g_D.A::x"
}
-re ".*$gdb_prompt $" { fail "print g_D.A::x" }
timeout { fail "print g_D.A::x (timeout)" ; return }
@@ -411,14 +409,13 @@ proc test_print_mi_members {} {
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
- setup_xfail "*-*-*"
send_gdb "print g_E.A::a\n"
gdb_expect {
-re ".* = 21$nl$gdb_prompt $" {
- fail "print g_E.A::a (FIXME)"
+ kfail "gdb/68" "print g_E.A::a"
}
-re ".* = 25$nl$gdb_prompt $" {
- fail "print g_E.A::a (FIXME)"
+ kfail "gdb/68" "print g_E.A::a"
}
-re ".*$gdb_prompt $" { fail "print g_E.A::a" }
timeout { fail "print g_E.A::a (timeout)" ; return }
@@ -428,7 +425,6 @@ proc test_print_mi_members {} {
# For now, accept gdb's behavior as an expected failure if it
# simply prints either member correctly.
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "print g_E.A::x\n"
gdb_expect {
-re "warning: A ambiguous; using E::D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 26$nl$gdb_prompt $" {
@@ -438,10 +434,10 @@ proc test_print_mi_members {} {
pass "print g_E.A::x (using B)"
}
-re ".* = 26$nl$gdb_prompt $" {
- fail "print g_E.A::x (FIXME)"
+ kfail "gdb/68" "print g_E.A::x"
}
-re ".* = 22$nl$gdb_prompt $" {
- fail "print g_E.A::x (FIXME)"
+ kfail "gdb/68" "print g_E.A::x"
}
-re ".*$gdb_prompt $" { fail "print g_E.A::x" }
timeout { fail "print g_E.A::x (timeout)" ; return }
diff --git a/gdb/testsuite/gdb.c++/local.cc b/gdb/testsuite/gdb.c++/local.cc
index 5bfc44ac43b..85fd6e14a87 100644
--- a/gdb/testsuite/gdb.c++/local.cc
+++ b/gdb/testsuite/gdb.c++/local.cc
@@ -4,6 +4,9 @@ void marker1 (void)
{
}
+void marker2 (void)
+{
+}
int foobar (int x)
{
@@ -20,6 +23,8 @@ int foobar (int x)
static Local l1;
char c;
+ marker1 ();
+
l.loc1 = 23;
c = l.loc_foo('x');
@@ -56,6 +61,6 @@ int main()
il.ilc = 'b';
il.ip = &c;
- marker1();
+ marker2();
}
}
diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.c++/local.exp
index 3ec2d5ef8b5..21ceb7ae3db 100644
--- a/gdb/testsuite/gdb.c++/local.exp
+++ b/gdb/testsuite/gdb.c++/local.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
@@ -67,7 +67,7 @@ if ![runto 'marker1'] then {
continue
}
-gdb_test "up" ".*main.*" "up from marker1"
+gdb_test "up" ".*foobar.*" "up from marker1"
# Local classes in g++ get names like "main.1::InnerLocal", just like local
# static variables. Some targets use "___" instead of ".".
@@ -102,8 +102,7 @@ send_gdb "ptype Local\n"
gdb_expect {
-re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
-re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" {
- # setup_kfail "gdb/483"
- fail "ptype Local (gdb/483)"
+ kfail "gdb/483" "ptype Local"
}
-re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*Local & operator *=\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((void|)\\);\[\r\n\t \]*char loc_foo\\(char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\)\r\n\}.*$gdb_prompt $" { xpass "ptype Local (old aCC)" }
@@ -111,6 +110,36 @@ gdb_expect {
timeout { fail "(timeout) ptype Local" }
}
+gdb_test "break marker2"
+gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker2.*" \
+ "continuing to marker2"
+
+gdb_test "up" ".*main.*" "up from marker2"
+
+# Make sure that `Local' isn't in scope here; it's local to foobar.
+# setup_kfail "gdb/825"
+send_gdb "ptype Local\n"
+set eol "\[\t \]*\[\r\n\]+\[\t \]*"
+gdb_expect {
+ -re "No symbol \"Local\" in current context.*${gdb_prompt} $" {
+ pass "Local out of scope"
+ }
+ -re "ptype Local${eol}type = class Local {${eol} public:${eol} int loc1;${eol}.*${eol} char loc_foo\\(char\\);${eol}}${eol}${gdb_prompt} " {
+ # GCC emits STABS debugging information in a way that doesn't
+ # properly preserve the scoping of local classes. I think
+ # we'd need to start using Sun's extensions to stabs to get
+ # this right.
+ kfail gdb/825 "Local out of scope"
+ }
+ -re ".*${gdb_prompt} $" {
+ fail "Local out of scope"
+ }
+ timeout {
+ fail "Local out of scope (timeout)"
+ }
+}
+
+
# DTS CLLbs14316 and CLLbs17058
# coulter - I added a clause for HP's aCC compiler. We print out the type
# as xx instead of const unsigned char, but we still have an expected failure
@@ -190,8 +219,8 @@ gdb_expect {
-re "type = class InnerLocal::NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
-re "type = class InnerLocal::NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
-re "There is no field named NestedInnerLocal.*$gdb_prompt $" {
- # setup_kfail "gdb/482"
- fail "ptype InnerLocal::NestedInnerLocal (gdb/482)"
+ setup_kfail "gdb/482" *-*-*
+ fail "ptype InnerLocal::NestedInnerLocal"
}
-re "No symbol .*NestedInnerLocal.* in current context.*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal (bogus symbol lookup)" }
-re ".*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal" }
diff --git a/gdb/testsuite/gdb.c++/overload.cc b/gdb/testsuite/gdb.c++/overload.cc
index 6d6fa10dd89..9ac0d22e569 100644
--- a/gdb/testsuite/gdb.c++/overload.cc
+++ b/gdb/testsuite/gdb.c++/overload.cc
@@ -45,6 +45,11 @@ int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
};
+int intToChar (char c)
+{
+ return 297;
+}
+
void marker1()
{}
@@ -97,6 +102,8 @@ int main ()
breakpoint();
#endif
+ // Verify that intToChar should work:
+ intToChar(1);
marker1();
XXX::marker2();
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
index 4a7c564524f..c41e3f2c972 100644
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ b/gdb/testsuite/gdb.c++/overload.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
@@ -260,13 +260,6 @@ gdb_expect {
}
-# The overload resolver added by HP (valops.c:find_overload_match) doesn't
-# work right for G++ output, since the list of parameters seems not to
-# be filled in correctly. Until this gets fixed, don't expect to pass
-# some of these tests.
-
-setup_xfail "*-*-*" CLLbs16901
-
send_gdb "print foo_instance1.overload1arg((short)arg5)\n"
gdb_expect {
-re ".\[0-9\]* = 5\r\n$gdb_prompt $" {
@@ -277,8 +270,6 @@ gdb_expect {
}
-setup_xfail "*-*-*" CLLbs16901
-
send_gdb "print foo_instance1.overload1arg((unsigned short)arg6)\n"
gdb_expect {
-re ".\[0-9\]* = 6\r\n$gdb_prompt $" {
@@ -309,8 +300,6 @@ gdb_expect {
}
-setup_xfail "*-*-*" CLLbs16901
-
send_gdb "print foo_instance1.overload1arg((long)arg9)\n"
gdb_expect {
-re ".\[0-9\]* = 9\r\n$gdb_prompt $" {
@@ -321,8 +310,6 @@ gdb_expect {
}
-setup_xfail "*-*-*" CLLbs16901
-
send_gdb "print foo_instance1.overload1arg((unsigned long)arg10)\n"
gdb_expect {
-re ".\[0-9\]* = 10\r\n$gdb_prompt $" {
@@ -391,6 +378,8 @@ gdb_test "list \"foo::overloadfnarg(int, int (*)(int))\"" \
"int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \
"list overloaded function with function ptr args - quotes around argument"
+gdb_test "print intToChar(1)" ".\[0-9\]* = 297"
+
# Now some tests to see how overloading and namespaces interact.
# FIXME: carlton/2003-01-24: It would be nice to throw using
diff --git a/gdb/testsuite/gdb.c++/ovldbreak.exp b/gdb/testsuite/gdb.c++/ovldbreak.exp
index 9852cb597b1..043243d23ff 100644
--- a/gdb/testsuite/gdb.c++/ovldbreak.exp
+++ b/gdb/testsuite/gdb.c++/ovldbreak.exp
@@ -312,7 +312,11 @@ gdb_test "info break" \
# Run through each breakpoint.
-proc continue_to_bp_overloaded {bpnumber argtype actuals} {
+# NOTE: carlton/2003-02-03: I'm seeing failures on some of the tests,
+# with the wrong arg being printed out. Michael Chastain sees
+# failures at times, too, albeit fewer than I do.
+
+proc continue_to_bp_overloaded {might_kfail bpnumber argtype actuals} {
global gdb_prompt hex decimal srcfile
send_gdb "continue\n"
@@ -320,6 +324,13 @@ proc continue_to_bp_overloaded {bpnumber argtype actuals} {
-re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}(, )?${actuals}\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
pass "continue to bp overloaded : ${argtype}"
}
+ -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}, arg=.*\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
+ if $might_kfail {
+ kfail "gdb/1025" "continue to bp overloaded : ${argtype}"
+ } else {
+ fail "continue to bp overloaded : ${argtype}"
+ }
+ }
-re ".*$gdb_prompt $" {
fail "continue to bp overloaded : ${argtype}"
}
@@ -329,18 +340,18 @@ proc continue_to_bp_overloaded {bpnumber argtype actuals} {
}
}
-continue_to_bp_overloaded 25 "(void|)" ""
-continue_to_bp_overloaded 24 "char" "arg=2 \\'\\\\002\\'"
-continue_to_bp_overloaded 23 "signed char" "arg=3 \\'\\\\003\\'"
-continue_to_bp_overloaded 22 "unsigned char" "arg=4 \\'\\\\004\\'"
-continue_to_bp_overloaded 21 "short" "arg=5"
-continue_to_bp_overloaded 20 "unsigned short" "arg=6"
-continue_to_bp_overloaded 19 "int" "arg=7"
-continue_to_bp_overloaded 18 "(unsigned|unsigned int)" "arg=8"
-continue_to_bp_overloaded 17 "long" "arg=9"
-continue_to_bp_overloaded 16 "unsigned long" "arg=10"
-continue_to_bp_overloaded 15 "float" "arg=100"
-continue_to_bp_overloaded 14 "double" "arg=200"
+continue_to_bp_overloaded 0 25 "(void|)" ""
+continue_to_bp_overloaded 1 24 "char" "arg=2 \\'\\\\002\\'"
+continue_to_bp_overloaded 1 23 "signed char" "arg=3 \\'\\\\003\\'"
+continue_to_bp_overloaded 1 22 "unsigned char" "arg=4 \\'\\\\004\\'"
+continue_to_bp_overloaded 1 21 "short" "arg=5"
+continue_to_bp_overloaded 1 20 "unsigned short" "arg=6"
+continue_to_bp_overloaded 0 19 "int" "arg=7"
+continue_to_bp_overloaded 0 18 "(unsigned|unsigned int)" "arg=8"
+continue_to_bp_overloaded 0 17 "long" "arg=9"
+continue_to_bp_overloaded 0 16 "unsigned long" "arg=10"
+continue_to_bp_overloaded 0 15 "float" "arg=100"
+continue_to_bp_overloaded 1 14 "double" "arg=200"
diff --git a/gdb/testsuite/gdb.c++/pr-1023.cc b/gdb/testsuite/gdb.c++/pr-1023.cc
new file mode 100644
index 00000000000..758308481dc
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/pr-1023.cc
@@ -0,0 +1,20 @@
+class myClass
+{
+ public:
+ myClass() {};
+ ~myClass() {};
+ void performUnblocking( short int cell_index );
+ void performBlocking( int cell_index );
+};
+
+void myClass::performUnblocking( short int cell_index ) {}
+
+void myClass::performBlocking( int cell_index ) {}
+
+int main ()
+{
+ myClass mc;
+ mc.performBlocking (0);
+ mc.performUnblocking (0);
+}
+
diff --git a/gdb/testsuite/gdb.c++/pr-1023.exp b/gdb/testsuite/gdb.c++/pr-1023.exp
new file mode 100644
index 00000000000..c8c98027471
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/pr-1023.exp
@@ -0,0 +1,79 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Tests for PR gdb/1023.
+# 2003-02-03 Michael Chastain <mec@shout.net>
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_cplus_tests] } { continue }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile "pr-1023"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+send_gdb "break myClass::performBlocking\n"
+gdb_expect {
+ -re "Breakpoint $decimal at $hex: file .*$srcfile, line 12.*$gdb_prompt $" {
+ pass "break myClass::performBlocking"
+ }
+ -re "the class myClass does not have any method named performBlocking.*$gdb_prompt $" {
+ # fails with gcc 2.95.3 -gstabs+, native i686-pc-linux-gnu
+ # -- chastain 2003-02-03
+ kfail "gdb/1023" "break myClass::performBlocking"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "break myClass::performBlocking"
+ }
+ timeout {
+ fail "break myClass::performBlocking (timeout)"
+ }
+}
+
+gdb_test \
+ "break myClass::performUnblocking" \
+ "Breakpoint $decimal at $hex: file .*$srcfile, line 10.*"
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.c++/printmethod.exp b/gdb/testsuite/gdb.c++/printmethod.exp
index 9b96cbfc468..a45393f34d9 100644
--- a/gdb/testsuite/gdb.c++/printmethod.exp
+++ b/gdb/testsuite/gdb.c++/printmethod.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
@@ -62,7 +62,7 @@ gdb_continue_to_breakpoint "end of constructors"
# The first of these is for PR gdb/653.
-gdb_test "print theA->virt" "\\$\[0-9\]* = &A::virt\\(\\)" "print virtual method."
+gdb_test "print theA->virt" "\\$\[0-9\]* = &A::virt\\((void|)\\)" "print virtual method."
gdb_test "print theA->nonvirt" "Cannot take address of a method" "print nonvirtual method."
gdb_exit
diff --git a/gdb/testsuite/gdb.c++/virtfunc.exp b/gdb/testsuite/gdb.c++/virtfunc.exp
index e2befd35a98..2741cf6293a 100644
--- a/gdb/testsuite/gdb.c++/virtfunc.exp
+++ b/gdb/testsuite/gdb.c++/virtfunc.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -39,8 +39,7 @@ if [get_compiler_info ${binfile} "c++"] {
source ${binfile}.ci
-set src "${srcdir}/${subdir}/${srcfile}"
-if { [gdb_compile "${src}" "${binfile}" executable {c++ debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -836,12 +835,6 @@ proc test_virtual_calls {} {
eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gdwarf-2.
- # -- chastain 2002-02-20
-
- if {$gcc_compiled} then { setup_xfail "*-*-*" }
-
send_gdb "print pBe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
diff --git a/gdb/testsuite/gdb.disasm/Makefile.in b/gdb/testsuite/gdb.disasm/Makefile.in
index 7bb5eef69c4..0db2a26ca1b 100644
--- a/gdb/testsuite/gdb.disasm/Makefile.in
+++ b/gdb/testsuite/gdb.disasm/Makefile.in
@@ -1,18 +1,13 @@
-#### host, target, and site specific Makefile frags come in here.
-
VPATH = @srcdir@
srcdir = @srcdir@
.PHONY: all clean mostlyclean distclean realclean
-all:
- @echo "Nothing to be done for all..."
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
- -rm -f *.o *.diff *~ *.bad core h8300s hppa mn10200 mn10300 sh3
+ -rm -f *.o *.diff *~ *.bad core h8300s hppa mn10300 sh3
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-
-Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.disasm/configure b/gdb/testsuite/gdb.disasm/configure
deleted file mode 100644
index 0e6cbf20749..00000000000
--- a/gdb/testsuite/gdb.disasm/configure
+++ /dev/null
@@ -1,899 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=sh3.s
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.disasm/configure.in b/gdb/testsuite/gdb.disasm/configure.in
deleted file mode 100644
index 508636ff2c6..00000000000
--- a/gdb/testsuite/gdb.disasm/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(sh3.s)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.disasm/mn10200.exp b/gdb/testsuite/gdb.disasm/mn10200.exp
index 33cdb47c5c7..a47b341545f 100644
--- a/gdb/testsuite/gdb.disasm/mn10200.exp
+++ b/gdb/testsuite/gdb.disasm/mn10200.exp
@@ -1,478 +1,478 @@
-
-# Copyright 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Jeff Law. (law@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if ![istarget "mn10200*-*-*"] {
- verbose "Tests ignored for all but mn10200 based targets."
- return
-}
-
-global exec_output
-set prms_id 0
-set bug_id 0
-
-set testfile "mn10200"
-set srcfile ${srcdir}/${subdir}/${testfile}.s
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-proc add_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/12i add_tests\n"
- gdb_expect {
- -re "
-.*add d1,d2.*
-.*add d2,a3.*
-.*add a2,d1.*
-.*add a3,a2.*
-.*add 16,d1.*
-.*add 256,d2.*
-.*add 131071,d3.*
-.*add 16,a1.*
-.*add 256,a2.*
-.*add 131071,a3.*
-.*addc d1,d2.*
-.*addnf 16,a2.*
-.*$gdb_prompt $" { pass "add tests" }
- -re "$gdb_prompt $" { fail "add tests" }
- timeout { fail "(timeout) add tests" }
- }
-}
-
-proc bcc_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/15i bCC_tests\n"
- gdb_expect {
- -re "
-.*beq 0x\[0-9a-f]+ <bCC_tests>.*
-.*bne 0x\[0-9a-f]+ <bCC_tests>.*
-.*bgt 0x\[0-9a-f]+ <bCC_tests>.*
-.*bge 0x\[0-9a-f]+ <bCC_tests>.*
-.*ble 0x\[0-9a-f]+ <bCC_tests>.*
-.*blt 0x\[0-9a-f]+ <bCC_tests>.*
-.*bhi 0x\[0-9a-f]+ <bCC_tests>.*
-.*bcc 0x\[0-9a-f]+ <bCC_tests>.*
-.*bls 0x\[0-9a-f]+ <bCC_tests>.*
-.*bcs 0x\[0-9a-f]+ <bCC_tests>.*
-.*bvc 0x\[0-9a-f]+ <bCC_tests>.*
-.*bvs 0x\[0-9a-f]+ <bCC_tests>.*
-.*bnc 0x\[0-9a-f]+ <bCC_tests>.*
-.*bns 0x\[0-9a-f]+ <bCC_tests>.*
-.*bra 0x\[0-9a-f]+ <bCC_tests>.*
-.*$gdb_prompt $" { pass "bCC tests" }
- -re "$gdb_prompt $" { fail "bCC tests" }
- timeout { fail "(timeout) bCC tests" }
- }
-}
-
-proc bccx_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/14i bCCx_tests\n"
- gdb_expect {
- -re "
-.*beqx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bnex 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bgtx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bgex 0x\[0-9a-f]+ <bCCx_tests>.*
-.*blex 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bltx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bhix 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bccx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*blsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bcsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bvcx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bvsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bncx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*bnsx 0x\[0-9a-f]+ <bCCx_tests>.*
-.*$gdb_prompt $" { pass "bCCx tests" }
- -re "$gdb_prompt $" { fail "bCCx tests" }
- timeout { fail "(timeout) bCCx tests" }
- }
-}
-
-proc bit_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/4 bit_tests\n"
- gdb_expect {
- -re "
-.*btst 64,d1.*
-.*btst 8192,d2.*
-.*bset d1,\\(a2\\).*
-.*bclr d1,\\(a2\\).*
-.*$gdb_prompt $" { pass "bit tests" }
- -re "$gdb_prompt $" { fail "bit tests" }
- timeout { fail "(timeout) bit tests" }
- }
-}
-
-proc cmp_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9i cmp_tests\n"
- gdb_expect {
- -re "
-.*cmp d1,d2.*
-.*cmp d2,a3.*
-.*cmp a3,d3.*
-.*cmp a3,a2.*
-.*cmp 16,d3.*
-.*cmp 256,d2.*
-.*cmp 131071,d1.*
-.*cmp 256,a2.*
-.*cmp 131071,a1.*
-.*$gdb_prompt $" { pass "cmp tests" }
- -re "$gdb_prompt $" { fail "cmp tests" }
- timeout { fail "(timeout) cmp tests" }
- }
-}
-
-proc extend_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/5i extend_tests\n"
- gdb_expect {
- -re "
-.*ext d1.*
-.*extx d2.*
-.*extxu d3.*
-.*extxb d2.*
-.*extxbu d1.*
-.*$gdb_prompt $" { pass "extend tests" }
- -re "$gdb_prompt $" { fail "extend tests" }
- timeout { fail "(timeout) extend tests" }
- }
-}
-
-proc logical_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/11i logical_tests\n"
- gdb_expect {
- -re "
-.*and d1,d2.*
-.*and 127,d2.*
-.*and 32767,d3.*
-.*and 32767,psw.*
-.*or d1,d2.*
-.*or 127,d2.*
-.*or 32767,d3.*
-.*or 32767,psw.*
-.*xor d1,d2.*
-.*xor 32767,d3.*
-.*not d3.*
-.*$gdb_prompt $" { pass "logical tests" }
- -re "$gdb_prompt $" { fail "logical tests" }
- timeout { fail "(timeout) logical tests" }
- }
-}
-
-proc mov_tests_1 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/12i mov_tests_1\n"
- gdb_expect {
- -re "
-.*mov d1,a2.*
-.*mov a2,d1.*
-.*mov d1,d2.*
-.*mov a2,a1.*
-.*mov psw,d3.*
-.*mov d2,psw.*
-.*mov mdr,d1.*
-.*mov d2,mdr.*
-.*mov \\(a2\\),d1.*
-.*mov \\(8,a2\\),d1.*
-.*mov \\(256,a2\\),d1.*
-.*mov \\(131071,a2\\),d1.*
-.*$gdb_prompt $" { pass "mov1 tests" }
- -re "$gdb_prompt $" { fail "mov1 tests" }
- timeout { fail "(timeout) mov1 tests" }
- }
-}
-
-proc mov_tests_2 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9 mov_tests_2\n"
- gdb_expect {
- -re "
-.*mov \\(d1,a1\\),d2.*
-.*mov \\(0x8000.*\\),d1.*
-.*mov \\(0x1ffff.*\\),d1.*
-.*mov \\(8,a2\\),a1.*
-.*mov \\(256,a2\\),a1.*
-.*mov \\(131071,a2\\),a1.*
-.*mov \\(d1,a1\\),a2.*
-.*mov \\(0x8000.*\\),a1.*
-.*mov \\(0x1ffff.*\\),a1.*
-.*$gdb_prompt $" { pass "mov2 tests" }
- -re "$gdb_prompt $" { fail "mov2 tests" }
- timeout { fail "(timeout) mov2 tests" }
- }
-}
-
-proc mov_tests_3 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/10 mov_tests_3\n"
- gdb_expect {
- -re "
-.*mov d1,\\(a2\\).*
-.*mov d1,\\(32,a2\\).*
-.*mov d1,\\(256,a2\\).*
-.*mov d1,\\(131071,a2\\).*
-.*mov d1,\\(d2,a2\\).*
-.*mov d1,\\(0x80.*\\).*
-.*mov d1,\\(0x1ffff.*\\).*
-.*mov a1,\\(32,a2\\).*
-.*mov a1,\\(256,a2\\).*
-.*mov a1,\\(131071,a2\\).*
-.*$gdb_prompt $" { pass "mov3 tests" }
- -re "$gdb_prompt $" { fail "mov3 tests" }
- timeout { fail "(timeout) mov3 tests" }
- }
-}
-
-proc mov_tests_4 { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/8 mov_tests_4\n"
- gdb_expect {
- -re "
-.*mov a1,\\(d2,a2\\).*
-.*mov a1,\\(0x80.*\\).*
-.*mov a1,\\(0x1ffff.*\\).*
-.*mov 8,d1.*
-.*mov 256,d1.*
-.*mov 131071,d1.*
-.*mov 256,a1.*
-.*mov 131071,a1.*
-.*$gdb_prompt $" { pass "mov4 tests" }
- -re "$gdb_prompt $" { fail "mov4 tests" }
- timeout { fail "(timeout) mov4 tests" }
- }
-}
-
-proc movb_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/12 movb_tests\n"
- gdb_expect {
- -re "
-.*movb \\(8,a2\\),d1.*
-.*movb \\(256,a2\\),d1.*
-.*movb \\(131071,a2\\),d1.*
-.*movb \\(d2,a2\\),d3.*
-.*movb \\(0x1ffff.*\\),d2.*
-.*movb d1,\\(a2\\).*
-.*movb d1,\\(8,a2\\).*
-.*movb d1,\\(256,a2\\).*
-.*movb d1,\\(131071,a2\\).*
-.*movb d1,\\(d2,a2\\).*
-.*movb d1,\\(0x100.*\\).*
-.*movb d1,\\(0x1ffff.*\\).*
-.*$gdb_prompt $" { pass "movb tests" }
- -re "$gdb_prompt $" { fail "movb tests" }
- timeout { fail "(timeout) movb tests" }
- }
-}
-
-proc movbu_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/7 movbu_tests\n"
- gdb_expect {
- -re "
-.*movbu \\(a2\\),d1.*
-.*movbu \\(8,a2\\),d1.*
-.*movbu \\(256,a2\\),d1.*
-.*movbu \\(131071,a2\\),d1.*
-.*movbu \\(d1,a1\\),d2.*
-.*movbu \\(0x8000.*\\),d1.*
-.*movbu \\(0x1ffff.*\\),d1.*
-.*$gdb_prompt $" { pass "movbu tests" }
- -re "$gdb_prompt $" { fail "movbu tests" }
- timeout { fail "(timeout) movbu tests" }
- }
-}
-
-proc movx_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/6 movx_tests\n"
- gdb_expect {
- -re "
-.*movx \\(8,a2\\),d1.*
-.*movx \\(256,a2\\),d1.*
-.*movx \\(131071,a2\\),d1.*
-.*movx d1,\\(8,a2\\).*
-.*movx d1,\\(256,a2\\).*
-.*movx d1,\\(131071,a2\\).*
-.*$gdb_prompt $" { pass "movx tests" }
- -re "$gdb_prompt $" { fail "movx tests" }
- timeout { fail "(timeout) movx tests" }
- }
-}
-
-proc muldiv_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/3 muldiv_tests\n"
- gdb_expect {
- -re "
-.*mul d1,d2.*
-.*mulu d2,d3.*
-.*divu d3,d2.*
-.*$gdb_prompt $" { pass "muldiv tests" }
- -re "$gdb_prompt $" { fail "muldiv tests" }
- timeout { fail "(timeout) muldiv tests" }
- }
-}
-
-proc misc_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9 misc_tests\n"
- gdb_expect {
- -re "
-.*jmp 0x\[0-9a-f]+ <main>.*
-.*jmp 0x\[0-9a-f]+ <start>.*
-.*jmp \\(a2\\).*
-.*jsr 0x\[0-9a-f]+ <main>.*
-.*jsr 0x\[0-9a-f]+ <start>.*
-.*jsr \\(a2\\).*
-.*rts.*
-.*rti.*
-.*nop.*
-.*$gdb_prompt $" { pass "misc tests" }
- -re "$gdb_prompt $" { fail "misc tests" }
- timeout { fail "(timeout) misc tests" }
- }
-}
-
-proc shift_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/4i shift_tests\n"
- gdb_expect {
- -re "
-.*asr d2.*
-.*lsr d3.*
-.*ror d1.*
-.*rol d2.*
-.*$gdb_prompt $" { pass "shift tests" }
- -re "$gdb_prompt $" { fail "shift tests" }
- timeout { fail "(timeout) shift tests" }
- }
-}
-
-proc sub_tests { } {
- global gdb_prompt
- global hex
- global decimal
-
- send_gdb "x/9i sub_tests\n"
- gdb_expect {
- -re "
-.*sub d1,d2.*
-.*sub d2,a3.*
-.*sub a3,d3.*
-.*sub a3,a2.*
-.*sub 32767,d2.*
-.*sub 131071,d2.*
-.*sub 32767,a2.*
-.*sub 131071,a2.*
-.*subc d1,d2.*
-.*$gdb_prompt $" { pass "sub tests" }
- -re "$gdb_prompt $" { fail "sub tests" }
- timeout { fail "(timeout) sub tests" }
- }
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
-add_tests
-bcc_tests
-bccx_tests
-bit_tests
-cmp_tests
-extend_tests
-logical_tests
-mov_tests_1
-mov_tests_2
-mov_tests_3
-mov_tests_4
-movb_tests
-movbu_tests
-movx_tests
-muldiv_tests
-misc_tests
-shift_tests
-sub_tests
+# 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.java/Makefile.in b/gdb/testsuite/gdb.java/Makefile.in
index 0954369c092..5072ee19a6a 100644
--- a/gdb/testsuite/gdb.java/Makefile.in
+++ b/gdb/testsuite/gdb.java/Makefile.in
@@ -1,10 +1,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
-all:
- @echo "Nothing to be done for all..."
-
-#### host, target, and site specific Makefile frags come in here.
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
.SUFFIXES: .java .class .o .exe .exp .check
@@ -21,6 +19,3 @@ clean mostlyclean:
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-
-Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.java/configure b/gdb/testsuite/gdb.java/configure
deleted file mode 100755
index 6a417911735..00000000000
--- a/gdb/testsuite/gdb.java/configure
+++ /dev/null
@@ -1,913 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=jmisc.exp
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:586: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:607: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:625: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.java/configure.in b/gdb/testsuite/gdb.java/configure.in
deleted file mode 100644
index 12fd4c7be50..00000000000
--- a/gdb/testsuite/gdb.java/configure.in
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(jmisc.exp)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.mi/Makefile.in b/gdb/testsuite/gdb.mi/Makefile.in
index 67a0f5d39b5..7bd9d5aa2d3 100644
--- a/gdb/testsuite/gdb.mi/Makefile.in
+++ b/gdb/testsuite/gdb.mi/Makefile.in
@@ -5,20 +5,11 @@ PROGS = basics c_variable cpp_variable var-cmd
MISCELLANEOUS = testcmds
-all:
- @echo "Nothing to be done for all..."
-
-#### host, target, and site specific Makefile frags come in here.
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f *.ci *.o $(OBJS) $(PROGS) *~ core
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-
-Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
-
-# Local variables:
-# change-log-default-name: "ChangeLog-mi"
-# End:
diff --git a/gdb/testsuite/gdb.mi/config.in b/gdb/testsuite/gdb.mi/config.in
deleted file mode 100644
index d8418babb22..00000000000
--- a/gdb/testsuite/gdb.mi/config.in
+++ /dev/null
@@ -1,4 +0,0 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
diff --git a/gdb/testsuite/gdb.mi/configure b/gdb/testsuite/gdb.mi/configure
deleted file mode 100755
index 48628f50136..00000000000
--- a/gdb/testsuite/gdb.mi/configure
+++ /dev/null
@@ -1,1121 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=mi-basics.exp
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:576: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:597: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:615: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-# Check for pthread.h
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:640: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 655 "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:661: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 672 "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:678: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 689 "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:695: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-for ac_hdr in pthread.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:723: 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 728 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CPP@%$CPP%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.mi/configure.in b/gdb/testsuite/gdb.mi/configure.in
deleted file mode 100644
index 3204867b3fa..00000000000
--- a/gdb/testsuite/gdb.mi/configure.in
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(mi-basics.exp)
-AC_CONFIG_HEADER(config.h:config.in)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-# Check for pthread.h
-AC_CHECK_HEADERS(pthread.h)
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.mi/gdb669.exp b/gdb/testsuite/gdb.mi/gdb669.exp
index 4f294b964ea..d03ce35293c 100644
--- a/gdb/testsuite/gdb.mi/gdb669.exp
+++ b/gdb/testsuite/gdb.mi/gdb669.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
@@ -178,11 +178,9 @@ set testfile "pthreads"
set srcfile "$testfile.c"
set binfile "$objdir/$subdir/$testfile"
-set options [list debug incdir=$subdir]
-if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
- != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so all tests in this file will automatically fail."
+set options [list debug incdir=$objdir]
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+ return -1
}
mi_gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp
index ce5ac313ce5..3fc6df00ab4 100644
--- a/gdb/testsuite/gdb.mi/gdb792.exp
+++ b/gdb/testsuite/gdb.mi/gdb792.exp
@@ -51,31 +51,31 @@ mi_gdb_test "-var-create - * a" \
"create var for class A"
mi_gdb_test "-var-list-children var1" \
- "(&\".*\"\r\n)*\\^done,numchild=\"3\",children=\{child=\{name=\"var1\.public\",exp=\"public\",numchild=\"2\"\},child=\{name=\"var1\.private\",exp=\"private\",numchild=\"2\"\},child=\{name=\"var1\.protected\",exp=\"protected\",numchild=\"2\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"3\",children=\\\[child=\{name=\"var1\.public\",exp=\"public\",numchild=\"2\"\},child=\{name=\"var1\.private\",exp=\"private\",numchild=\"2\"\},child=\{name=\"var1\.protected\",exp=\"protected\",numchild=\"2\"\}\\\]" \
"list children of class A"
mi_gdb_test "-var-list-children var1.public" \
- "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\{child=\{name=\"var1\.public\.x\",exp=\"x\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.public\.buffer\",exp=\"buffer\",numchild=\"10\",type=\"char \\\[10\\\]\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\\\[child=\{name=\"var1\.public\.x\",exp=\"x\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.public\.buffer\",exp=\"buffer\",numchild=\"10\",type=\"char \\\[10\\\]\"\}\\\]" \
"list children of A.public"
mi_gdb_test "-var-list-children var1.private" \
- "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\{child=\{name=\"var1\.private\.u\",exp=\"u\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.private\.z\",exp=\"z\",numchild=\"0\",type=\"float\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\\\[child=\{name=\"var1\.private\.u\",exp=\"u\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.private\.z\",exp=\"z\",numchild=\"0\",type=\"float\"\}\\\]" \
"list children of A.private"
mi_gdb_test "-var-list-children var1.protected" \
- "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\{child=\{name=\"var1\.protected\.y\",exp=\"y\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.protected\.b\",exp=\"b\",numchild=\"2\",type=\"B\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\\\[child=\{name=\"var1\.protected\.y\",exp=\"y\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.protected\.b\",exp=\"b\",numchild=\"2\",type=\"B\"\}\\\]" \
"list children of A.protected"
mi_gdb_test "-var-list-children var1.protected.b" \
- "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\{child=\{name=\"var1\.protected\.b\.public\",exp=\"public\",numchild=\"2\"\},child=\{name=\"var1\.protected\.b\.private\",exp=\"private\",numchild=\"1\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\\\[child=\{name=\"var1\.protected\.b\.public\",exp=\"public\",numchild=\"2\"\},child=\{name=\"var1\.protected\.b\.private\",exp=\"private\",numchild=\"1\"\}\\\]" \
"list children of A.protected.b"
mi_gdb_test "-var-list-children var1.protected.b.public" \
- "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\{child=\{name=\"var1\.protected\.b\.public\.bx\",exp=\"bx\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.protected\.b\.public\.by\",exp=\"by\",numchild=\"0\",type=\"int\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"2\",children=\\\[child=\{name=\"var1\.protected\.b\.public\.bx\",exp=\"bx\",numchild=\"0\",type=\"int\"\},child=\{name=\"var1\.protected\.b\.public\.by\",exp=\"by\",numchild=\"0\",type=\"int\"\}\\\]" \
"list children of A.protected.b.public"
mi_gdb_test "-var-list-children var1.protected.b.private" \
- "(&\".*\"\r\n)*\\^done,numchild=\"1\",children=\{child=\{name=\"var1\.protected\.b\.private\.k\",exp=\"k\",numchild=\"0\",type=\"int\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"1\",children=\\\[child=\{name=\"var1\.protected\.b\.private\.k\",exp=\"k\",numchild=\"0\",type=\"int\"\}\\\]" \
"list children of A.protected.b.private"
mi_gdb_test "-var-create - * c" \
@@ -83,7 +83,7 @@ mi_gdb_test "-var-create - * c" \
"create var for class C which has baseclass A"
mi_gdb_test "-var-list-children var2" \
- "(&\".*\"\r\n)*\\^done,numchild=\"3\",children=\{child=\{name=\"var2\.A\",exp=\"A\",numchild=\"3\",type=\"A\"\},child=\{name=\"var2\.public\",exp=\"public\",numchild=\"1\"\},child=\{name=\"var2\.private\",exp=\"private\",numchild=\"1\"\}\}" \
+ "(&\".*\"\r\n)*\\^done,numchild=\"3\",children=\\\[child=\{name=\"var2\.A\",exp=\"A\",numchild=\"3\",type=\"A\"\},child=\{name=\"var2\.public\",exp=\"public\",numchild=\"1\"\},child=\{name=\"var2\.private\",exp=\"private\",numchild=\"1\"\}\\\]" \
"list children of class C"
mi_gdb_exit
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
new file mode 100644
index 00000000000..62501e03a19
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -0,0 +1,208 @@
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file tests that GDB's console can be accessed via the MI.
+# Specifically, we are testing the "interpreter-exec" command and that
+# the commands that are executed via this command are properly executed.
+# Console commands executed via MI should use MI output wrappers, MI event
+# handlers, etc.
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+gdb_exit
+if [mi_gdb_start] {
+ continue
+}
+
+set testfile "basics"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+mi_gdb_reinitialize_dir $srcdir/$subdir
+
+mi_gdb_test "-interpreter-exec" \
+ {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ "-interpreter-exec with no arguments"
+
+mi_gdb_test "-interpreter-exec console" \
+ {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ "-interpreter-exec with one argument"
+
+mi_gdb_test "-interpreter-exec bogus command" \
+ {\^error,msg="mi_cmd_interpreter_exec: could not find interpreter \\\"bogus\\\""} \
+ "-interpreter-exec with bogus interpreter"
+
+set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.}
+mi_gdb_test "-interpreter-exec console bogus" \
+ "&\\\"$msg\\\\n\\\".*\\^error,msg=\\\"$msg\\\".*" \
+ "-interpreter-exec console bogus"
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
+# {(=.*)+\^done} \
+# "-interpreter-exec console \"file \$binfile\""
+mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
+ {\^done} \
+ "-interpreter-exec console \"file \$binfile\""
+
+mi_run_to_main
+
+mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
+ {\^done} \
+ "-interpreter-exec console \"set args foobar\""
+
+mi_gdb_test "-interpreter-exec console \"show args\"" \
+ {\~"Argument list to give program being debugged when it is started is \\\"foobar\\\"\.\\n".*\^done} \
+ "-interpreter-exec console \"show args\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"break callee4\"" \
+# {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \
+# "-interpreter-exec console \"break callee4\""
+mi_gdb_test "-interpreter-exec console \"break callee4\"" \
+ {(&.*)*.*~"Breakpoint 2 at.*\\n".*\^done} \
+ "-interpreter-exec console \"break callee4\""
+
+mi_gdb_test "-interpreter-exec console \"info break\"" \
+ {\~"Num[ \t]*Type[ \t]*Disp[ \t]*Enb[ \t]*Address[ \t]*What\\n".*~"2[ \t]*breakpoint[ \t]*keep[ \t]*y[ \t]*0x[0-9A-Fa-f]+[ \t]*in callee4 at .*basics.c:[0-9]+\\n".*\^done} \
+ "-interpreter-exec console \"info break\""
+
+mi_gdb_test "-interpreter-exec console \"set listsize 1\"" \
+ {\^done} \
+ "-interpreter-exec console \"set listsize 1\""
+
+mi_gdb_test "-interpreter-exec console \"list\"" \
+ {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \
+ "-interpreter-exec console \"list\""
+
+# # NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-exec-continue" \
+# {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \
+# "-interpreter-exec console \"continue to callee4\""
+send_gdb "999-exec-continue\n"
+gdb_expect {
+ -re "999\\^running\[\r\n\]+$mi_gdb_prompt.*999\\*stopped,reason=.breakpoint-hit.*$mi_gdb_prompt$" {
+ pass "continue to callee4"
+ }
+ timeout {
+ fail "continue to callee4 (timeout)"
+ }
+}
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
+# {.*=breakpoint-delete,number=\"2\".*\^done} \
+# "-interpreter-exec console \"delete 2\""
+mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
+ {100\^done} \
+ "-interpreter-exec console \"delete 2\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "200-interpreter-exec console \"up\"" \
+# {.*=selected-frame-level-changed,level="1".*\^done} \
+# "-interpreter-exec console \"up\""
+mi_gdb_test "200-interpreter-exec console \"up\"" \
+ {200\^done} \
+ "-interpreter-exec console \"up\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "300-interpreter-exec console \"down\"" \
+# {.*=selected-frame-level-changed,level="0".*\^done} \
+# "-interpreter-exec console \"down\""
+mi_gdb_test "300-interpreter-exec console \"down\"" \
+ {300\^done} \
+ "-interpreter-exec console \"down\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"frame 2\"" \
+# {.*=selected-frame-level-changed,level="2".*\^done} \
+# "-interpreter-exec console \"frame 2\""
+mi_gdb_test "400-interpreter-exec console \"frame 2\"" \
+ {400\^done} \
+ "-interpreter-exec console \"frame 2\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-stack-select-frame 0" \
+# {.*=selected-frame-level-changed,level="0".*\^done} \
+# "-stack-select-frame 0"
+mi_gdb_test "500-stack-select-frame 0" \
+ {500\^done} \
+ "-stack-select-frame 0"
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-break-insert -t basics.c:35" \
+# {.*=breakpoint-create,number="3".*\^done} \
+# "-break-insert -t basics.c:35"
+mi_gdb_test "600-break-insert -t basics.c:35" \
+ {600\^done,bkpt=.number="3",type="breakpoint".*\}} \
+ "-break-insert -t basics.c:35"
+
+# mi_gdb_test "-exec-continue" \
+# {.*\*stopped.*,file=".*basics.c",line="35"\}} \
+# "-exec-continue to line 35"
+send_gdb "700-exec-continue\n"
+gdb_expect {
+ -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" {
+ pass "-exec-continue to line 35"
+ }
+ timeout {
+ fail "-exec-continue to line 35"
+ }
+}
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-exec-next" \
+# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \
+# "-exec-next to line 37"
+send_gdb "800-exec-next\n"
+gdb_expect {
+ -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" {
+ pass "-exec-next to line 37"
+ }
+ timeout {
+ fail "-exec-next to line 37"
+ }
+}
+
+mi_gdb_test "-interpreter-exec console \"list\"" \
+ {\~"37[ \t(\\t)]*return 0;\\n".*\^done} \
+ "-interpreter-exec console \"list\" at basics.c:37"
+
+mi_gdb_test "-interpreter-exec console \"help set args\"" \
+ {\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \
+ "-interpreter-exec console \"help set args\""
+
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \
+# {.*=target-changed.*\^done} \
+# "-interpreter-exec console \"set \$pc=0x0\""
+mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \
+ {888\^done} \
+ "-interpreter-exec console \"set \$pc=0x0\""
+
+#mi_gdb_test "-interpreter-exec console \"\"" \
+ {} \
+ "-interpreter-exec console \"\""
+
+mi_gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index f611aa7046e..0fb85e0dda1 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -77,7 +77,7 @@ gdb_expect {
# multiple event sources to channel the output back through the
# MI.
- fail "Hello message (known bug)"
+ kfail "gdb/623" "Hello message"
}
timeout {
fail "Hello message (timeout)"
diff --git a/gdb/testsuite/gdb.mi/mi-pthreads.exp b/gdb/testsuite/gdb.mi/mi-pthreads.exp
index a26d434758c..532134acc04 100644
--- a/gdb/testsuite/gdb.mi/mi-pthreads.exp
+++ b/gdb/testsuite/gdb.mi/mi-pthreads.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
@@ -191,8 +191,11 @@ proc check_mi_thread_command_set {} {
"check_mi_thread_command_set: -thread-select 123456789"
foreach thread $thread_list {
+ # line and file are optional.
+ # many of the threads are blocked in libc calls,
+ # and many people have libc's with no symbols.
mi_gdb_test "-thread-select $thread" \
- "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
+ "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
"check_mi_thread_command_set: -thread-select $thread"
}
}
@@ -204,11 +207,9 @@ set testfile "pthreads"
set srcfile "$testfile.c"
set binfile "$objdir/$subdir/$testfile"
-set options [list debug incdir=$subdir]
-if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
- != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so all tests in this file will automatically fail."
+set options [list debug incdir=$objdir]
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+ return -1
}
mi_gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.c b/gdb/testsuite/gdb.mi/mi-syn-frame.c
new file mode 100644
index 00000000000..580b5342716
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.c
@@ -0,0 +1,66 @@
+#include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+void foo (void);
+void bar (void);
+
+void subroutine (int);
+void handler (int);
+void have_a_very_merry_interrupt (void);
+
+main ()
+{
+ puts ("Starting up");
+
+ foo (); /* Put a breakpoint on foo() and call it to see a dummy frame */
+
+
+ have_a_very_merry_interrupt ();
+
+ puts ("Shutting down");
+}
+
+void
+foo (void)
+{
+ puts ("hi in foo");
+}
+
+void
+bar (void)
+{
+ char *nuller = 0;
+
+ puts ("hi in bar");
+
+ *nuller = 'a'; /* try to cause a segfault */
+}
+
+void
+handler (int sig)
+{
+ subroutine (sig);
+}
+
+/* The first statement in subroutine () is a place for a breakpoint.
+ Without it, the breakpoint is put on the while comparison and will
+ be hit at each iteration. */
+
+void
+subroutine (int in)
+{
+ int count = in;
+ while (count < 100)
+ count++;
+}
+
+void
+have_a_very_merry_interrupt (void)
+{
+ puts ("Waiting to get a signal");
+ signal (SIGALRM, handler);
+ alarm (1);
+ sleep (2); /* We'll receive that signal while sleeping */
+}
+
diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
new file mode 100644
index 00000000000..49f97721e80
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
@@ -0,0 +1,106 @@
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Test MI output with synthetic frames on the stack (call dummies,
+# signal handlers).
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+set testfile "mi-syn-frame"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+set my_mi_gdb_prompt "\\(gdb\\)\[ \]*\[\r\n\]*"
+
+mi_gdb_exit
+mi_gdb_start
+mi_delete_breakpoints
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_load ${binfile}
+mi_run_to_main
+
+mi_gdb_test "400-break-insert foo" "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}"
+
+
+#
+# Call foo() by hand, where we'll hit a breakpoint.
+#
+
+mi_gdb_test "401-data-evaluate-expression foo()" "\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(foo\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+401\\^error,msg=\"The program being debugged stopped while in a function called from GDB.*\"" "call inferior's function with a breakpoint set in it"
+
+mi_gdb_test "402-stack-list-frames" "402\\^done,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]" "backtrace from inferior function stopped at bp, showing gdb dummy frame"
+
+#
+# Continue back to main()
+#
+
+send_gdb "403-exec-continue\n"
+gdb_expect {
+ -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
+ pass "403-exec-continue"
+ }
+ timeout {
+ fail "403-exec-continue"
+ }
+}
+
+mi_gdb_test "404-stack-list-frames 0 0" "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]"
+
+
+#
+# Call have_a_very_merry_interrupt() which will eventually raise a signal
+# that's caught by handler() which calls subroutine().
+
+mi_gdb_test "405-break-insert subroutine" "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}"
+
+mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\""
+
+# We should have both a signal handler and a call dummy frame
+# in this next output.
+
+mi_gdb_test "407-stack-list-frames" "407\\^done,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"subroutine\",args=\\\[\{name=\"in\",value=\"$decimal\"\}\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]"
+
+
+send_gdb "408-exec-continue\n"
+gdb_expect {
+ -re "408\\^running\[\r\n\]+${my_mi_gdb_prompt}408\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
+ pass "408-exec-continue"
+ }
+ timeout {
+ fail "408-exec-continue"
+ }
+}
+
+mi_gdb_test "409-stack-list-frames 0 0" "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]"
+
+#
+# Call bar() by hand, which should get an exception while running.
+#
+
+mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+
+mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
+
+mi_gdb_exit
+
+return 0
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index af058d5170d..15e3f795aa1 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -62,7 +62,7 @@ mi_gdb_test "-var-create struct_declarations * struct_declarations" \
# STABS doesn't give us argument types for the func ptr structs, but
# Dwarf 2 does.
mi_gdb_test "-var-list-children struct_declarations" \
- "\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
+ "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
"get children of struct_declarations"
#gdbtk_test c_variable-4.3 {children of struct_declarations} {
@@ -102,7 +102,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.character" \
# Test: c_variable-4.9
# Desc: children of struct_declarations.char_ptr
mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of struct_declarations.char_ptr"
# Test: c_variable-4.10
@@ -126,7 +126,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
# Test: c_variable-4.13
# Desc: children of int_ptr_ptr
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \
"get children of struct_declarations.int_ptr_ptr"
#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
@@ -143,7 +143,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
# Test: c_variable-4.15
# Desc: children of struct_declarations.long_array
mi_gdb_test "-var-list-children struct_declarations.long_array" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
+ "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \
"get children of struct_declarations.long_array"
# Test: c_variable-4.16
@@ -195,7 +195,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
# Test: c_variable-4.23
# Desc: children of struct_declarations.u1
mi_gdb_test "-var-list-children struct_declarations.u1" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
+ "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\\\]" \
"get children of struct_declarations.u1"
# Test: c_variable-4.24
@@ -207,7 +207,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1" \
# Test: c_variable-4.25
# Desc: children of struct_declarations.s2
mi_gdb_test "-var-list-children struct_declarations.s2" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\}" \
+ "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\\\]" \
"get children of struct_declarations.s2"
#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
# get_children struct_declarations.s2
@@ -344,7 +344,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
# Test: c_variable-4.47
# Desc: children of struct_declarations.u1.b
mi_gdb_test "-var-list-children struct_declarations.u1.b" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of struct_declarations.u1.b"
# Test: c_variable-4.48
@@ -382,7 +382,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
# Test: c_variable-4.53
# Desc: children of struct_declarations.s2.u2
mi_gdb_test "-var-list-children struct_declarations.s2.u2" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
+ "\\^done,numchild=\"3\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
"get children of struct_declarations.s2.u2"
# Test: c_variable-4.54
@@ -420,7 +420,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
# Test: c_variable-4.59
# Desc: children of struct_declarations.s2.i
mi_gdb_test "-var-list-children struct_declarations.s2.i" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
+ "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \
"get children of struct_declarations.s2.i"
# Test: c_variable-4.60
@@ -432,7 +432,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
# Test: c_variable-4.61
# Desc: children of struct_declarations.s2.u2.u1s1
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
+ "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\\\]" \
"get children of struct_declarations.s2.u2.u1s1"
# Test: c_variable-4.62
@@ -456,7 +456,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
# Test: c_variable-4.65
# Desc: children of struct_declarations.s2.u2.u1s2
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \
- "\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\((int, char \\*)?\\)\"\}\}" \
+ "\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\((int, char \\*)?\\)\"\}\\\]" \
"get children of struct_declarations.s2.u2.u1s2"
# Test: c_variable-4.66
@@ -480,7 +480,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
# Test: c_variable-4.69
# Desc: children of struct_declarations.s2.u2.u1s1.e
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of struct_declarations.s2.u2.u1s1.e"
# Test: c_variable-4.70
@@ -519,7 +519,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
# Test: c_variable-4.75
# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \
- "\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of struct_declarations.s2.u2.u1s2.array_ptr"
# Test: c_variable-4.76
@@ -543,7 +543,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
# Test: c_variable-4.79
# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \
"get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
#} {**int_ptr_ptr}
@@ -567,7 +567,7 @@ mi_gdb_test "-var-create weird * weird" \
# Test: c_variable-4.82
# Desc: children of weird
mi_gdb_test "-var-list-children weird" \
- "\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
+ "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
"get children of weird"
# Test: c_variable-4.83
@@ -580,7 +580,7 @@ mi_gdb_test "-var-info-num-children weird" \
# Test: c_variable-4.84
# Desc: children of weird->long_array
mi_gdb_test "-var-list-children weird.long_array" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
+ "\\^done,numchild=\"10\",children=\\\[child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \
"get children of weird.long_array"
#gdbtk_test c_variable-4.84 {children of weird->long_array} {
# get_children weird.long_array
@@ -595,7 +595,7 @@ mi_gdb_test "-var-info-num-children weird.long_array" \
# Test: c_variable-4.86
# Desc: children of weird.int_ptr_ptr
mi_gdb_test "-var-list-children weird.int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \
"get children of weird.int_ptr_ptr"
#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
# get_children weird.int_ptr_ptr
@@ -610,7 +610,7 @@ mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
# Test: c_variable-4.88
# Desc: children of *weird->int_ptr_ptr
mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \
"get children of weird.int_ptr_ptr.*int_ptr_ptr"
#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
# get_children weird.int_ptr_ptr.*int_ptr_ptr
@@ -631,7 +631,7 @@ mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
# Test: c_variable-4.91
# Desc: children of weird->int_ptr_ptr
mi_gdb_test "-var-list-children weird->int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \
"get children of weird->int_ptr_ptr"
@@ -644,7 +644,7 @@ mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
# Test: c_variable-4.93
# Desc: children of *(weird->int_ptr_ptr)
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \
"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
# Test: c_variable-4.94
@@ -868,7 +868,7 @@ mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \
# Test: c_variable-5.11
# Desc: children of psnp->char_ptr
mi_gdb_test "-var-list-children psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\\\]" \
"get children of psnp->char_ptr"
# Test: c_variable-5.12
@@ -880,7 +880,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr" \
# Test: c_variable-5.13
# Desc: children of *(psnp->char_ptr)
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\\\]" \
"get children of psnp->char_ptr.*psnp->char_ptr"
# Test: c_variable-5.14
@@ -892,13 +892,13 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
# Test: c_variable-5.15
# Desc: children of *(*(psnp->char_ptr))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \
"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
# Test: c_variable-5.15B
# Desc: children of *(*(*(psnp->char_ptr)))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
# Test: c_variable-5.16
@@ -910,7 +910,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_
# Test: c_variable-5.17
# Desc: children of *(*(*(psnp->char_ptr)))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
# Test: c_variable-5.18
@@ -941,7 +941,7 @@ mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \
# Test: c_variable-5.20
# Desc: children of psnp->long_ptr
mi_gdb_test "-var-list-children psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\\\]" \
"get children of psnp->long_ptr"
# Test: c_variable-5.21
@@ -953,7 +953,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr" \
# Test: c_variable-5.22
# Desc: children of *(psnp->long_ptr)
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\\\]" \
"get children of psnp->long_ptr.*psnp->long_ptr"
@@ -966,7 +966,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
# Test: c_variable-5.24
# Desc: children of *(*(psnp->long_ptr))
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\\\]" \
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
# Test: c_variable-5.25
@@ -978,7 +978,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_
# Test: c_variable-5.26
# Desc: children of *(*(*(psnp->long_ptr)))
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\\\]" \
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
# Test: c_variable-5.27
@@ -1008,7 +1008,7 @@ mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \
# Test: c_variable-5.31
# Desc: children of psnp->ptrs
mi_gdb_test "-var-list-children psnp->ptrs" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
+ "\\^done,numchild=\"3\",children=\\\[child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
"get children of psnp->ptrs"
# Test: c_variable-5.32
@@ -1020,7 +1020,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs" \
# Test: c_variable-5.33
# Desc: children of psnp->ptrs[0]
mi_gdb_test "-var-list-children psnp->ptrs.0" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
+ "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
"get children of psnp->ptrs.0"
# Test: c_variable-5.34
@@ -1032,7 +1032,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
# Test: c_variable-5.35
# Desc: children of psnp->ptrs[0]->next
mi_gdb_test "-var-list-children psnp->ptrs.0.next" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
+ "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
"get children of psnp->ptrs.0.next"
#} {char_ptr long_ptr ptrs next}
@@ -1047,7 +1047,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
# Test: c_variable-5.37
# Desc: children of psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\\\]" \
"get children of psnp->ptrs.0.next.char_ptr"
#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
@@ -1063,7 +1063,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
# Test: c_variable-5.39
# Desc: children of *psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\\\]" \
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
# Test: c_variable-5.40
@@ -1075,13 +1075,13 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
# Test: c_variable-5.41
# Desc: children of **psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
# Test: c_variable-5.41B
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
# Test: c_variable-5.42
@@ -1093,7 +1093,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
# Test: c_variable-5.43
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
# Test: c_variable-5.44
@@ -1117,13 +1117,13 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
# Test: c_variable-5.45
# Desc: children of psnp->ptrs[0]->next->next
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
+ "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
"get children of psnp->ptrs.0.next.next"
# Test: c_variable-5.46
# Desc: children of psnp->ptrs[0]->next->next->ptrs
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
+ "\\^done,numchild=\"3\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index 82ce1f85d1e..fafa79a3390 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -183,7 +183,7 @@ mi_gdb_test "-var-create weird * weird" \
"create local variable weird"
mi_gdb_test "-var-list-children weird" \
- "\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
+ "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
"get children local variable weird"
@@ -371,7 +371,7 @@ mi_gdb_test "-var-info-num-children u" \
# Test: c_variable-7.15
# Desc: children of u
mi_gdb_test "-var-list-children u" \
- "\\^done,numchild=\"2\",children=\{child=\{name=\"u.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"u.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
+ "\\^done,numchild=\"2\",children=\\\[child=\{name=\"u.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"u.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \
"get children of u"
# Test: c_variable-7.20
@@ -407,7 +407,7 @@ mi_gdb_test "-var-info-num-children anonu" \
# Test: c_variable-7.25
# Desc: children of anonu
mi_gdb_test "-var-list-children anonu" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \
+ "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\\\]" \
"get children of anonu"
# Test: c_variable-7.30
@@ -444,7 +444,7 @@ mi_gdb_test "-var-info-num-children s" \
# Test: c_variable-7.35
# Desc: children of s
mi_gdb_test "-var-list-children s" \
- "\\^done,numchild=\"6\",children=\{child=\{name=\"s.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"s.unsigned_integer\",exp=\"unsigned_integer\",numchild=\"0\",type=\"unsigned int\"\},child=\{name=\"s.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"s.signed_character\",exp=\"signed_character\",numchild=\"0\",type=\"signed char\"\},child=\{name=\"s.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"s.array_of_10\",exp=\"array_of_10\",numchild=\"10\",type=\"int \\\[10\\\]\"\}\}" \
+ "\\^done,numchild=\"6\",children=\\\[child=\{name=\"s.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"s.unsigned_integer\",exp=\"unsigned_integer\",numchild=\"0\",type=\"unsigned int\"\},child=\{name=\"s.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"s.signed_character\",exp=\"signed_character\",numchild=\"0\",type=\"signed char\"\},child=\{name=\"s.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"s.array_of_10\",exp=\"array_of_10\",numchild=\"10\",type=\"int \\\[10\\\]\"\}\\\]" \
"get children of s"
#} {integer unsigned_integer character signed_character char_ptr array_of_10}
@@ -481,7 +481,7 @@ mi_gdb_test "-var-info-num-children anons" \
# Test: c_variable-7.45
# Desc: children of anons
mi_gdb_test "-var-list-children anons" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \
+ "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\\\]" \
"get children of anons"
diff --git a/gdb/testsuite/gdb.mi/mi1-console.exp b/gdb/testsuite/gdb.mi/mi1-console.exp
index 25af50a31d1..ab7f5ac5d3f 100644
--- a/gdb/testsuite/gdb.mi/mi1-console.exp
+++ b/gdb/testsuite/gdb.mi/mi1-console.exp
@@ -77,7 +77,7 @@ gdb_expect {
# multiple event sources to channel the output back through the
# MI.
- fail "Hello message (known bug)"
+ kfail "gdb/623" "Hello message"
}
timeout {
fail "Hello message (timeout)"
diff --git a/gdb/testsuite/gdb.mi/mi1-pthreads.exp b/gdb/testsuite/gdb.mi/mi1-pthreads.exp
index aea4f582836..f84f1fe1460 100644
--- a/gdb/testsuite/gdb.mi/mi1-pthreads.exp
+++ b/gdb/testsuite/gdb.mi/mi1-pthreads.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
@@ -191,8 +191,11 @@ proc check_mi_thread_command_set {} {
"check_mi_thread_command_set: -thread-select 123456789"
foreach thread $thread_list {
+ # line and file are optional.
+ # many of the threads are blocked in libc calls,
+ # and many people have libc's with no symbols.
mi_gdb_test "-thread-select $thread" \
- "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
+ "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
"check_mi_thread_command_set: -thread-select $thread"
}
}
@@ -204,11 +207,9 @@ set testfile "pthreads"
set srcfile "$testfile.c"
set binfile "$objdir/$subdir/$testfile"
-set options [list debug incdir=$subdir]
-if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
- != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so all tests in this file will automatically fail."
+set options [list debug incdir=$objdir]
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+ return -1
}
mi_gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/gdb.threads/Makefile.in b/gdb/testsuite/gdb.threads/Makefile.in
index 34f22b53bb3..6bd7279e536 100644
--- a/gdb/testsuite/gdb.threads/Makefile.in
+++ b/gdb/testsuite/gdb.threads/Makefile.in
@@ -3,29 +3,11 @@ srcdir = @srcdir@
EXECUTABLES = pthreads
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp core* $(EXECUTABLES)
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log config.h
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
-
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
- CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
diff --git a/gdb/testsuite/gdb.threads/configure b/gdb/testsuite/gdb.threads/configure
deleted file mode 100755
index 6649098712b..00000000000
--- a/gdb/testsuite/gdb.threads/configure
+++ /dev/null
@@ -1,1098 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=pthreads.exp
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:574: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:595: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:613: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:637: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 652 "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:658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 669 "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:675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-for ac_hdr in pthread.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:701: 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 706 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CPP@%$CPP%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.threads/configure.in b/gdb/testsuite/gdb.threads/configure.in
deleted file mode 100644
index 1afe91ac4e1..00000000000
--- a/gdb/testsuite/gdb.threads/configure.in
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(pthreads.exp)
-AC_CONFIG_HEADER(config.h:config.in)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_CHECK_HEADERS(pthread.h)
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index b56697be434..8184fa52d0b 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.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
@@ -32,38 +32,13 @@ set testfile "pthreads"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-set built_binfile 0
if [istarget "*-*-linux"] then {
set target_cflags "-D_MIT_POSIX_THREADS"
} else {
set target_cflags ""
}
-set why_msg "unrecognized error"
-foreach lib {-lpthreads -lpthread -lthread} {
- set options "debug"
- lappend options "incdir=${objdir}/${subdir}"
- lappend options "libs=$lib"
- set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
- switch -regexp -- $ccout {
- ".*no posix threads support.*" {
- set why_msg "missing threads include file"
- break
- }
- ".*cannot open -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- ".*Can't find library for -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- {^$} {
- pass "successfully compiled posix threads test case"
- set built_binfile 1
- break
- }
- }
-}
-if {$built_binfile == "0"} {
- unsupported "Couldn't compile ${srcfile}, ${why_msg}"
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
return -1
}
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index 21e03aab5ec..2e61e7cd440 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.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
@@ -66,8 +66,8 @@ set testfile "killed"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
}
@@ -88,8 +88,7 @@ gdb_expect {
pass "GDB exits after multi-threaded program exits messily"
}
-re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" {
- # setup_kfail "gdb/568"
- fail "GDB exits after multi-threaded program exits messily (not a regression; gdb/568)"
+ kfail "gdb/568" "GDB exits after multi-threaded program exits messily"
}
timeout {
fail "GDB exits after multi-threaded program exits messily (timeout)"
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index 67ed122d103..6d48b0dd141 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 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
@@ -50,7 +50,7 @@ set testfile "linux-dp"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug libs=-lpthread}] != ""} {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ return -1
}
gdb_start
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
index 09c3f8ada80..60a106a050b 100644
--- a/gdb/testsuite/gdb.threads/print-threads.exp
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
@@ -38,41 +38,7 @@ set binfile ${objdir}/${subdir}/${testfile}
# carriage return)
set horiz "\[^\n\r\]*"
-set built_binfile 0
-
-# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
-if [istarget "*-*-linux*"] then {
- set possible_libs "-lpthread -lpthreads -lthread"
-} else {
- set possible_libs "-lpthreads -lpthread -lthread"
-}
-
-set why_msg "unrecognized error"
-foreach lib $possible_libs {
- set options "debug"
- lappend options "incdir=${objdir}/${subdir}"
- lappend options "libs=$lib"
- set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
- switch -regexp -- $ccout {
- ".*no posix threads support.*" {
- set why_msg "missing threads include file"
- break
- }
- ".*cannot open -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- ".*Can't find library for -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- {^$} {
- pass "successfully compiled posix threads test case"
- set built_binfile 1
- break
- }
- }
-}
-if {$built_binfile == "0"} {
- unsupported "Couldn't compile ${srcfile}, ${why_msg}"
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
return -1
}
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index dc9b7a838f0..1ab019bbea6 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
@@ -45,8 +45,8 @@ if [istarget "*-*-linux"] then {
set target_cflags ""
}
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
}
diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp
index ea2d8d3fdc6..28298c684a9 100644
--- a/gdb/testsuite/gdb.threads/schedlock.exp
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
@@ -33,41 +33,7 @@ set testfile "schedlock"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-set built_binfile 0
-
-# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
-if [istarget "*-*-linux*"] then {
- set possible_libs "-lpthread -lpthreads -lthread"
-} else {
- set possible_libs "-lpthreads -lpthread -lthread"
-}
-
-set why_msg "unrecognized error"
-foreach lib $possible_libs {
- set options "debug"
- lappend options "incdir=${objdir}/${subdir}"
- lappend options "libs=$lib"
- set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
- switch -regexp -- $ccout {
- ".*no posix threads support.*" {
- set why_msg "missing threads include file"
- break
- }
- ".*cannot open -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- ".*Can't find library for -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- {^$} {
- pass "successfully compiled posix threads test case"
- set built_binfile 1
- break
- }
- }
-}
-if {$built_binfile == "0"} {
- unsupported "Couldn't compile ${srcfile}, ${why_msg}"
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
return -1
}
diff --git a/gdb/testsuite/gdb.trace/Makefile.in b/gdb/testsuite/gdb.trace/Makefile.in
index 601c9e17ff9..89bd1851b77 100644
--- a/gdb/testsuite/gdb.trace/Makefile.in
+++ b/gdb/testsuite/gdb.trace/Makefile.in
@@ -1,21 +1,14 @@
-#### host, target, and site specific Makefile frags come in here.
-
VPATH = @srcdir@
srcdir = @srcdir@
.PHONY: all clean mostlyclean distclean realclean
-all:
- @echo "Nothing to be done for all..."
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f actions circ collection limits
- -rm -f *.o *.diff *~ *.bad core sh3 hppa mn10200 mn10300
+ -rm -f *.o *.diff *~ *.bad core sh3 hppa mn10300
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
-
-Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
-
-
diff --git a/gdb/testsuite/gdb.trace/configure.in b/gdb/testsuite/gdb.trace/configure.in
deleted file mode 100644
index 6d0eae2674b..00000000000
--- a/gdb/testsuite/gdb.trace/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(collection.c)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a3392219bb8..dca41dc9134 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1,4 +1,5 @@
-# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+# 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -360,50 +361,93 @@ proc gdb_continue_to_breakpoint {name} {
-# gdb_test COMMAND PATTERN MESSAGE QUESTION RESPONSE
+# gdb_test_multiple COMMAND MESSAGE EXPECT_ARGUMENTS
# Send a command to gdb; test the result.
#
# COMMAND is the command to execute, send to GDB with send_gdb. If
# this is the null string no command is sent.
-# PATTERN is the pattern to match for a PASS, and must NOT include
-# the \r\n sequence immediately before the gdb prompt.
-# MESSAGE is an optional message to be printed. If this is
-# omitted, then the pass/fail messages use the command string as the
-# message. (If this is the empty string, then sometimes we don't
-# call pass or fail at all; I don't understand this at all.)
-# QUESTION is a question GDB may ask in response to COMMAND, like
-# "are you sure?"
-# RESPONSE is the response to send if QUESTION appears.
+# MESSAGE is a message to be printed with the built-in failure patterns
+# if one of them matches. If MESSAGE is empty COMMAND will be used.
+# EXPECT_ARGUMENTS will be fed to expect in addition to the standard
+# patterns. Pattern elements will be evaluated in the caller's
+# context; action elements will be executed in the caller's context.
+# Unlike patterns for gdb_test, these patterns should generally include
+# the final newline and prompt.
#
# Returns:
-# 1 if the test failed,
-# 0 if the test passes,
+# 1 if the test failed, according to a built-in failure pattern
+# 0 if only user-supplied patterns matched
# -1 if there was an internal error.
#
-proc gdb_test { args } {
+proc gdb_test_multiple { command message user_code } {
global verbose
global gdb_prompt
global GDB
upvar timeout timeout
- if [llength $args]>2 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
+ if { $message == "" } {
+ set message $command
}
- set command [lindex $args 0]
- set pattern [lindex $args 1]
- if [llength $args]==5 {
- set question_string [lindex $args 3];
- set response_string [lindex $args 4];
- } else {
- set question_string "^FOOBAR$"
- }
+ # TCL/EXPECT WART ALERT
+ # Expect does something very strange when it receives a single braced
+ # argument. It splits it along word separators and performs substitutions.
+ # This means that { "[ab]" } is evaluated as "[ab]", but { "\[ab\]" } is
+ # evaluated as "\[ab\]". But that's not how TCL normally works; inside a
+ # double-quoted list item, "\[ab\]" is just a long way of representing
+ # "[ab]", because the backslashes will be removed by lindex.
+
+ # Unfortunately, there appears to be no easy way to duplicate the splitting
+ # that expect will do from within TCL. And many places make use of the
+ # "\[0-9\]" construct, so we need to support that; and some places make use
+ # of the "[func]" construct, so we need to support that too. In order to
+ # get this right we have to substitute quoted list elements differently
+ # from braced list elements.
+
+ # We do this roughly the same way that Expect does it. We have to use two
+ # lists, because if we leave unquoted newlines in the argument to uplevel
+ # they'll be treated as command separators, and if we escape newlines
+ # we mangle newlines inside of command blocks. This assumes that the
+ # input doesn't contain a pattern which contains actual embedded newlines
+ # at this point!
+
+ regsub -all {\n} ${user_code} { } subst_code
+ set subst_code [uplevel list $subst_code]
+
+ set processed_code ""
+ set patterns ""
+ set expecting_action 0
+ foreach item $user_code subst_item $subst_code {
+ if { $item == "-n" || $item == "-notransfer" || $item == "-nocase" } {
+ lappend processed_code $item
+ continue
+ }
+ if {$item == "-indices" || $item == "-re" || $item == "-ex"} {
+ lappend processed_code $item
+ continue
+ }
+ if { $expecting_action } {
+ lappend processed_code "uplevel [list $item]"
+ set expecting_action 0
+ # Cosmetic, no effect on the list.
+ append processed_code "\n"
+ continue
+ }
+ set expecting_action 1
+ lappend processed_code $subst_item
+ if {$patterns != ""} {
+ append patterns "; "
+ }
+ append patterns "\"$subst_item\""
+ }
+
+ # Also purely cosmetic.
+ regsub -all {\r} $patterns {\\r} patterns
+ regsub -all {\n} $patterns {\\n} patterns
if $verbose>2 then {
send_user "Sending \"$command\" to gdb\n"
- send_user "Looking to match \"$pattern\"\n"
+ send_user "Looking to match \"$patterns\"\n"
send_user "Message is \"$message\"\n"
}
@@ -465,13 +509,14 @@ proc gdb_test { args } {
}
}
}
- gdb_expect $tmt {
+
+ set code {
-re "\\*\\*\\* DOSEXIT code.*" {
if { $message != "" } {
fail "$message";
}
gdb_suppress_entire_file "GDB died";
- return -1;
+ set result -1;
}
-re "Ending remote debugging.*$gdb_prompt $" {
if ![isnative] then {
@@ -481,16 +526,9 @@ proc gdb_test { args } {
gdb_start
set result -1
}
- -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" {
- if ![string match "" $message] then {
- pass "$message"
- }
- set result 0
- }
- -re "(${question_string})$" {
- send_gdb "$response_string\n";
- exp_continue;
- }
+ }
+ append code $processed_code
+ append code {
-re "Undefined\[a-z\]* command:.*$gdb_prompt $" {
perror "Undefined command \"$command\"."
fail "$message"
@@ -508,7 +546,7 @@ proc gdb_test { args } {
set errmsg "$command: the program exited"
}
fail "$errmsg"
- return -1
+ set result -1
}
-re "EXIT code \[0-9\r\n\]+Program exited normally.*$gdb_prompt $" {
if ![string match "" $message] then {
@@ -517,7 +555,7 @@ proc gdb_test { args } {
set errmsg "$command: the program exited"
}
fail "$errmsg"
- return -1
+ set result -1
}
-re "The program is not being run.*$gdb_prompt $" {
if ![string match "" $message] then {
@@ -526,7 +564,7 @@ proc gdb_test { args } {
set errmsg "$command: the program is no longer running"
}
fail "$errmsg"
- return -1
+ set result -1
}
-re ".*$gdb_prompt $" {
if ![string match "" $message] then {
@@ -538,11 +576,13 @@ proc gdb_test { args } {
send_gdb "\n"
perror "Window too small."
fail "$message"
+ set result -1
}
-re "\\(y or n\\) " {
send_gdb "n\n"
perror "Got interactive prompt."
fail "$message"
+ set result -1
}
eof {
perror "Process no longer exists"
@@ -554,6 +594,7 @@ proc gdb_test { args } {
full_buffer {
perror "internal buffer is full."
fail "$message"
+ set result -1
}
timeout {
if ![string match "" $message] then {
@@ -562,8 +603,65 @@ proc gdb_test { args } {
set result 1
}
}
+
+ set result 0
+ gdb_expect $tmt $code
return $result
}
+
+# gdb_test COMMAND PATTERN MESSAGE QUESTION RESPONSE
+# Send a command to gdb; test the result.
+#
+# COMMAND is the command to execute, send to GDB with send_gdb. If
+# this is the null string no command is sent.
+# PATTERN is the pattern to match for a PASS, and must NOT include
+# the \r\n sequence immediately before the gdb prompt.
+# MESSAGE is an optional message to be printed. If this is
+# omitted, then the pass/fail messages use the command string as the
+# message. (If this is the empty string, then sometimes we don't
+# call pass or fail at all; I don't understand this at all.)
+# QUESTION is a question GDB may ask in response to COMMAND, like
+# "are you sure?"
+# RESPONSE is the response to send if QUESTION appears.
+#
+# Returns:
+# 1 if the test failed,
+# 0 if the test passes,
+# -1 if there was an internal error.
+#
+proc gdb_test { args } {
+ global verbose
+ global gdb_prompt
+ global GDB
+ upvar timeout timeout
+
+ if [llength $args]>2 then {
+ set message [lindex $args 2]
+ } else {
+ set message [lindex $args 0]
+ }
+ set command [lindex $args 0]
+ set pattern [lindex $args 1]
+
+ if [llength $args]==5 {
+ set question_string [lindex $args 3];
+ set response_string [lindex $args 4];
+ } else {
+ set question_string "^FOOBAR$"
+ }
+
+ return [gdb_test_multiple $command $message {
+ -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" {
+ if ![string match "" $message] then {
+ pass "$message"
+ }
+ }
+ -re "(${question_string})$" {
+ send_gdb "$response_string\n";
+ exp_continue;
+ }
+ }]
+}
# Test that a command gives an error. For pass or fail, return
# a 1 to indicate that more tests can proceed. However a timeout
@@ -1134,7 +1232,7 @@ proc gdb_compile {source dest type options} {
set result [target_compile $source $dest $type $options];
regsub "\[\r\n\]*$" "$result" "" result;
regsub "^\[\r\n\]*" "$result" "" result;
- if { $result != "" } {
+ if { $result != "" && [lsearch $options quiet] == -1} {
clone_output "gdb compile failed, $result"
}
return $result;
@@ -1150,7 +1248,7 @@ proc gdb_compile_pthreads {source dest type options} {
foreach lib {-lpthreads -lpthread -lthread} {
# This kind of wipes out whatever libs the caller may have
# set. Or maybe theirs will override ours. How infelicitous.
- set options_with_lib [concat $options [list libs=$lib]]
+ set options_with_lib [concat $options [list libs=$lib quiet]]
set ccout [gdb_compile $source $dest $type $options_with_lib]
switch -regexp -- $ccout {
".*no posix threads support.*" {
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 399aac6b8e1..4b057d49623 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -291,8 +291,15 @@ proc mi_gdb_load { arg } {
global loadfile
global GDB
global mi_gdb_prompt
+ global last_mi_gdb_file
upvar timeout timeout
+ if { $arg == "" } {
+ set arg $last_mi_gdb_file;
+ }
+
+ set last_mi_gdb_file $arg;
+
# ``gdb_unload''
# ``gdb_file_cmd''
@@ -388,6 +395,26 @@ proc mi_gdb_load { arg } {
return -1
}
}
+ } elseif { [target_info gdb_protocol] == "remote" } {
+ # remote targets
+ send_gdb "target [target_info gdb_protocol] [target_info netport]\n"
+ gdb_expect 60 {
+ -re "\\^done,.*$mi_gdb_prompt$" {
+ }
+ timeout {
+ perror "Unable to connect to remote target"
+ return -1
+ }
+ }
+ send_gdb "48-target-download\n"
+ gdb_expect 10 {
+ -re "48\\^done.*$mi_gdb_prompt$" {
+ }
+ timeout {
+ perror "Unable to download to remote target"
+ return -1
+ }
+ }
}
return 0
}
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 9f4cde7ad75..808c29570f6 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -1,5 +1,6 @@
/* libthread_db assisted debugging support, generic parts.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -126,6 +127,8 @@ static CORE_ADDR td_death_bp_addr;
/* Prototypes for local functions. */
static void thread_db_find_new_threads (void);
+static void attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
+ const td_thrinfo_t *ti_p, int verbose);
/* Building process ids. */
@@ -141,10 +144,17 @@ static void thread_db_find_new_threads (void);
#define BUILD_THREAD(tid, pid) ptid_build (pid, 0, tid)
+/* Use "struct private_thread_info" to cache thread state. This is
+ a substantial optimization. */
+
struct private_thread_info
{
- /* Cached LWP id. Must come first, see lin-lwp.c. */
- lwpid_t lwpid;
+ /* Cached thread state. */
+ unsigned int th_valid : 1;
+ unsigned int ti_valid : 1;
+
+ td_thrhandle_t th;
+ td_thrinfo_t ti;
};
@@ -228,15 +238,100 @@ thread_db_state_str (td_thr_state_e state)
}
}
+/* A callback function for td_ta_thr_iter, which we use to map all
+ threads to LWPs.
+
+ THP is a handle to the current thread; if INFOP is not NULL, the
+ struct thread_info associated with this thread is returned in
+ *INFOP. */
+
+static int
+thread_get_info_callback (const td_thrhandle_t *thp, void *infop)
+{
+ td_thrinfo_t ti;
+ td_err_e err;
+ struct thread_info *thread_info;
+ ptid_t thread_ptid;
+
+ err = td_thr_get_info_p (thp, &ti);
+ if (err != TD_OK)
+ error ("thread_get_info_callback: cannot get thread info: %s",
+ thread_db_err_str (err));
+
+ /* Fill the cache. */
+ thread_ptid = BUILD_THREAD (ti.ti_tid, GET_PID (inferior_ptid));
+ thread_info = find_thread_pid (thread_ptid);
+
+ if (thread_info == NULL)
+ {
+ /* New thread. Attach to it now (why wait?). */
+ attach_thread (thread_ptid, thp, &ti, 1);
+ thread_info = find_thread_pid (thread_ptid);
+ gdb_assert (thread_info != NULL);
+ }
+
+ memcpy (&thread_info->private->th, thp, sizeof (*thp));
+ thread_info->private->th_valid = 1;
+ memcpy (&thread_info->private->ti, &ti, sizeof (ti));
+ thread_info->private->ti_valid = 1;
+
+ if (infop != NULL)
+ *(struct thread_info **) infop = thread_info;
+
+ return 0;
+}
+/* Accessor functions for the thread_db information, with caching. */
+
+static void
+thread_db_map_id2thr (struct thread_info *thread_info, int fatal)
+{
+ td_err_e err;
+
+ if (thread_info->private->th_valid)
+ return;
+
+ err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (thread_info->ptid),
+ &thread_info->private->th);
+ if (err != TD_OK)
+ {
+ if (fatal)
+ error ("Cannot find thread %ld: %s",
+ (long) GET_THREAD (thread_info->ptid), thread_db_err_str (err));
+ }
+ else
+ thread_info->private->th_valid = 1;
+}
+
+static td_thrinfo_t *
+thread_db_get_info (struct thread_info *thread_info)
+{
+ td_err_e err;
+
+ if (thread_info->private->ti_valid)
+ return &thread_info->private->ti;
+
+ if (! thread_info->private->th_valid)
+ thread_db_map_id2thr (thread_info, 1);
+
+ err = td_thr_get_info_p (&thread_info->private->th, &thread_info->private->ti);
+ if (err != TD_OK)
+ error ("thread_db_get_info: cannot get thread info: %s",
+ thread_db_err_str (err));
+
+ thread_info->private->ti_valid = 1;
+ return &thread_info->private->ti;
+}
+
/* Convert between user-level thread ids and LWP ids. */
static ptid_t
thread_from_lwp (ptid_t ptid)
{
- td_thrinfo_t ti;
td_thrhandle_t th;
td_err_e err;
+ struct thread_info *thread_info;
+ ptid_t thread_ptid;
if (GET_LWP (ptid) == 0)
ptid = BUILD_LWP (GET_PID (ptid), GET_PID (ptid));
@@ -248,35 +343,26 @@ thread_from_lwp (ptid_t ptid)
error ("Cannot find user-level thread for LWP %ld: %s",
GET_LWP (ptid), thread_db_err_str (err));
- err = td_thr_get_info_p (&th, &ti);
- if (err != TD_OK)
- error ("thread_from_lwp: cannot get thread info: %s",
- thread_db_err_str (err));
+ thread_info = NULL;
+ thread_get_info_callback (&th, &thread_info);
+ gdb_assert (thread_info && thread_info->private->ti_valid);
- return BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
+ return BUILD_THREAD (thread_info->private->ti.ti_tid, GET_PID (ptid));
}
static ptid_t
lwp_from_thread (ptid_t ptid)
{
- td_thrinfo_t ti;
- td_thrhandle_t th;
- td_err_e err;
+ struct thread_info *thread_info;
+ ptid_t thread_ptid;
if (!is_thread (ptid))
return ptid;
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
- if (err != TD_OK)
- error ("Cannot find thread %ld: %s",
- (long) GET_THREAD (ptid), thread_db_err_str (err));
-
- err = td_thr_get_info_p (&th, &ti);
- if (err != TD_OK)
- error ("lwp_from_thread: cannot get thread info: %s",
- thread_db_err_str (err));
+ thread_info = find_thread_pid (ptid);
+ thread_db_get_info (thread_info);
- return BUILD_LWP (ti.ti_lid, GET_PID (ptid));
+ return BUILD_LWP (thread_info->private->ti.ti_lid, GET_PID (ptid));
}
@@ -581,13 +667,13 @@ attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
check_thread_signals ();
- if (verbose)
- printf_unfiltered ("[New %s]\n", target_pid_to_str (ptid));
-
/* Add the thread to GDB's thread list. */
tp = add_thread (ptid);
tp->private = xmalloc (sizeof (struct private_thread_info));
- tp->private->lwpid = ti_p->ti_lid;
+ memset (tp->private, 0, sizeof (struct private_thread_info));
+
+ if (verbose)
+ printf_unfiltered ("[New %s]\n", target_pid_to_str (ptid));
if (ti_p->ti_state == TD_THR_UNKNOWN || ti_p->ti_state == TD_THR_ZOMBIE)
return; /* A zombie thread -- do not attach. */
@@ -644,6 +730,19 @@ thread_db_detach (char *args, int from_tty)
target_beneath->to_detach (args, from_tty);
}
+static int
+clear_lwpid_callback (struct thread_info *thread, void *dummy)
+{
+ /* If we know that our thread implementation is 1-to-1, we could save
+ a certain amount of information; it's not clear how much, so we
+ are always conservative. */
+
+ thread->private->th_valid = 0;
+ thread->private->ti_valid = 0;
+
+ return 0;
+}
+
static void
thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
{
@@ -654,6 +753,9 @@ thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
else if (is_thread (ptid))
ptid = lwp_from_thread (ptid);
+ /* Clear cached data which may not be valid after the resume. */
+ iterate_over_threads (clear_lwpid_callback, NULL);
+
target_beneath->to_resume (ptid, step, signo);
do_cleanups (old_chain);
@@ -787,7 +889,7 @@ thread_db_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
static void
thread_db_fetch_registers (int regno)
{
- td_thrhandle_t th;
+ struct thread_info *thread_info;
prgregset_t gregset;
gdb_prfpregset_t fpregset;
td_err_e err;
@@ -799,17 +901,15 @@ thread_db_fetch_registers (int regno)
return;
}
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (inferior_ptid), &th);
- if (err != TD_OK)
- error ("Cannot find thread %ld: %s",
- (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+ thread_info = find_thread_pid (inferior_ptid);
+ thread_db_map_id2thr (thread_info, 1);
- err = td_thr_getgregs_p (&th, gregset);
+ err = td_thr_getgregs_p (&thread_info->private->th, gregset);
if (err != TD_OK)
error ("Cannot fetch general-purpose registers for thread %ld: %s",
(long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
- err = td_thr_getfpregs_p (&th, &fpregset);
+ err = td_thr_getfpregs_p (&thread_info->private->th, &fpregset);
if (err != TD_OK)
error ("Cannot get floating-point registers for thread %ld: %s",
(long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
@@ -824,10 +924,10 @@ thread_db_fetch_registers (int regno)
static void
thread_db_store_registers (int regno)
{
- td_thrhandle_t th;
prgregset_t gregset;
gdb_prfpregset_t fpregset;
td_err_e err;
+ struct thread_info *thread_info;
if (!is_thread (inferior_ptid))
{
@@ -836,14 +936,12 @@ thread_db_store_registers (int regno)
return;
}
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (inferior_ptid), &th);
- if (err != TD_OK)
- error ("Cannot find thread %ld: %s",
- (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+ thread_info = find_thread_pid (inferior_ptid);
+ thread_db_map_id2thr (thread_info, 1);
if (regno != -1)
{
- char raw[MAX_REGISTER_RAW_SIZE];
+ char *raw = alloca (max_register_size (current_gdbarch));
deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);
@@ -853,11 +951,11 @@ thread_db_store_registers (int regno)
fill_gregset ((gdb_gregset_t *) gregset, -1);
fill_fpregset (&fpregset, -1);
- err = td_thr_setgregs_p (&th, gregset);
+ err = td_thr_setgregs_p (&thread_info->private->th, gregset);
if (err != TD_OK)
error ("Cannot store general-purpose registers for thread %ld: %s",
(long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
- err = td_thr_setfpregs_p (&th, &fpregset);
+ err = td_thr_setfpregs_p (&thread_info->private->th, &fpregset);
if (err != TD_OK)
error ("Cannot store floating-point registers for thread %ld: %s",
(long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
@@ -915,24 +1013,31 @@ static int
thread_db_thread_alive (ptid_t ptid)
{
td_thrhandle_t th;
- td_thrinfo_t ti;
td_err_e err;
if (is_thread (ptid))
{
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
- if (err != TD_OK)
- return 0;
+ struct thread_info *thread_info;
+ thread_info = find_thread_pid (ptid);
- err = td_thr_validate_p (&th);
- if (err != TD_OK)
+ thread_db_map_id2thr (thread_info, 0);
+ if (! thread_info->private->th_valid)
return 0;
- err = td_thr_get_info_p (&th, &ti);
+ err = td_thr_validate_p (&thread_info->private->th);
if (err != TD_OK)
return 0;
- if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
+ if (! thread_info->private->ti_valid)
+ {
+ err = td_thr_get_info_p (&thread_info->private->th, &thread_info->private->ti);
+ if (err != TD_OK)
+ return 0;
+ thread_info->private->ti_valid = 1;
+ }
+
+ if (thread_info->private->ti.ti_state == TD_THR_UNKNOWN
+ || thread_info->private->ti.ti_state == TD_THR_ZOMBIE)
return 0; /* A zombie thread. */
return 1;
@@ -986,29 +1091,29 @@ thread_db_pid_to_str (ptid_t ptid)
if (is_thread (ptid))
{
static char buf[64];
- td_thrhandle_t th;
- td_thrinfo_t ti;
+ td_thrinfo_t *ti_p;
td_err_e err;
+ struct thread_info *thread_info;
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
- if (err != TD_OK)
- error ("Cannot find thread %ld: %s",
- (long) GET_THREAD (ptid), thread_db_err_str (err));
+ thread_info = find_thread_pid (ptid);
+ thread_db_map_id2thr (thread_info, 0);
+ if (! thread_info->private->th_valid)
+ {
+ snprintf (buf, sizeof (buf), "Thread %ld (Missing)", GET_THREAD (ptid));
+ return buf;
+ }
- err = td_thr_get_info_p (&th, &ti);
- if (err != TD_OK)
- error ("thread_db_pid_to_str: cannot get thread info for %ld: %s",
- (long) GET_THREAD (ptid), thread_db_err_str (err));
+ ti_p = thread_db_get_info (thread_info);
- if (ti.ti_state == TD_THR_ACTIVE && ti.ti_lid != 0)
+ if (ti_p->ti_state == TD_THR_ACTIVE && ti_p->ti_lid != 0)
{
snprintf (buf, sizeof (buf), "Thread %ld (LWP %d)",
- (long) ti.ti_tid, ti.ti_lid);
+ (long) ti_p->ti_tid, ti_p->ti_lid);
}
else
{
snprintf (buf, sizeof (buf), "Thread %ld (%s)",
- (long) ti.ti_tid, thread_db_state_str (ti.ti_state));
+ (long) ti_p->ti_tid, thread_db_state_str (ti_p->ti_state));
}
return buf;
@@ -1031,9 +1136,9 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile,
{
int objfile_is_library = (objfile->flags & OBJF_SHARED);
td_err_e err;
- td_thrhandle_t th;
void *address;
CORE_ADDR lm;
+ struct thread_info *thread_info;
/* glibc doesn't provide the needed interface. */
if (! td_thr_tls_get_addr_p)
@@ -1054,13 +1159,12 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile,
}
/* Get info about the thread. */
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
- if (err != TD_OK)
- error ("Cannot find thread %ld: %s",
- (long) GET_THREAD (ptid), thread_db_err_str (err));
-
+ thread_info = find_thread_pid (ptid);
+ thread_db_map_id2thr (thread_info, 1);
+
/* Finally, get the address of the variable. */
- err = td_thr_tls_get_addr_p (&th, (void *) lm, offset, &address);
+ err = td_thr_tls_get_addr_p (&thread_info->private->th, (void *) lm,
+ offset, &address);
#ifdef THREAD_DB_HAS_TD_NOTALLOC
/* The memory hasn't been allocated, yet. */
diff --git a/gdb/thread.c b/gdb/thread.c
index 6ef484078ef..2c70ee5f955 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -1,7 +1,7 @@
/* Multi-process/thread control for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
@@ -261,11 +261,12 @@ do_captured_list_thread_ids (struct ui_out *uiout,
{
struct thread_info *tp;
int num = 0;
+ struct cleanup *cleanup_chain;
prune_threads ();
target_find_new_threads ();
- ui_out_tuple_begin (uiout, "thread-ids");
+ cleanup_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "thread-ids");
for (tp = thread_list; tp; tp = tp->next)
{
@@ -273,7 +274,7 @@ do_captured_list_thread_ids (struct ui_out *uiout,
ui_out_field_int (uiout, "thread-id", tp->num);
}
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_chain);
ui_out_field_int (uiout, "number-of-threads", num);
return GDB_RC_OK;
}
@@ -457,7 +458,7 @@ info_threads_command (char *arg, int from_tty)
switch_to_thread (tp->ptid);
if (deprecated_selected_frame)
- print_only_stack_frame (deprecated_selected_frame, -1, 0);
+ print_stack_frame (deprecated_selected_frame, -1, 0);
else
printf_filtered ("[No stack.]\n");
}
diff --git a/gdb/top.c b/gdb/top.c
index d25bc3b8a79..fea71dfd87f 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1,7 +1,7 @@
/* Top level stuff for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -1357,7 +1357,7 @@ print_gdb_version (struct ui_file *stream)
/* Second line is a copyright notice. */
- fprintf_filtered (stream, "Copyright 2002 Free Software Foundation, Inc.\n");
+ fprintf_filtered (stream, "Copyright 2003 Free Software Foundation, Inc.\n");
/* Following the copyright is a brief statement that the program is
free software, that users are free to copy and change it on
@@ -2124,19 +2124,4 @@ gdb_init (char *argv0)
it wants GDB to revert to the CLI, it should clear init_ui_hook. */
if (init_ui_hook)
init_ui_hook (argv0);
-
- /* Install the default UI */
- if (!init_ui_hook)
- {
- uiout = cli_out_new (gdb_stdout);
-
- /* All the interpreters should have had a look at things by now.
- Initialize the selected interpreter. */
- if (interpreter_p)
- {
- fprintf_unfiltered (gdb_stderr, "Interpreter `%s' unrecognized.\n",
- interpreter_p);
- exit (1);
- }
- }
}
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 97175260d3c..41afd08304c 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -76,12 +76,6 @@ extern int addressprint; /* Print machine addresses? */
extern void output_command (char *, int);
-/* If this definition isn't overridden by the header files, assume
- that isatty and fileno exist on this system. */
-#ifndef ISATTY
-#define ISATTY(FP) (isatty (fileno (FP)))
-#endif
-
/*
Tracepoint.c:
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 194e48098ed..c094b9ea3ae 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -1,6 +1,7 @@
/* Language independent support for printing types for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
- 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1998,
+ 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -66,15 +67,15 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
fprintf_filtered (stream, "typedef ");
type_print (type, "", stream, 0);
if (TYPE_NAME ((SYMBOL_TYPE (new))) == 0
- || !STREQ (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)))
+ || strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)) != 0)
fprintf_filtered (stream, " %s", SYMBOL_PRINT_NAME (new));
break;
#endif
#ifdef _LANG_m2
case language_m2:
fprintf_filtered (stream, "TYPE ");
- if (!TYPE_NAME (SYMBOL_TYPE (new)) ||
- !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new)))
+ if (!TYPE_NAME (SYMBOL_TYPE (new))
+ || strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)) != 0)
fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new));
else
fprintf_filtered (stream, "<builtin> = ");
@@ -88,17 +89,6 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
type_print (type, "", stream, 0);
break;
#endif
-#ifdef _LANG_chill /* OBSOLETE */
- /* OBSOLETE case language_chill: */
- /* OBSOLETE fprintf_filtered (stream, "SYNMODE "); */
- /* OBSOLETE if (!TYPE_NAME (SYMBOL_TYPE (new)) || */
- /* OBSOLETE !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new))) */
- /* OBSOLETE fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new)); */
- /* OBSOLETE else */
- /* OBSOLETE fprintf_filtered (stream, "<builtin> = "); */
- /* OBSOLETE type_print (type, "", stream, 0); */
- /* OBSOLETE break; */
-#endif
default:
error ("Language not supported.");
}
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index d98cf167e85..ed32da3ded8 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -273,7 +273,7 @@ static void init_ui_out_state (struct ui_out *uiout);
/* Mark beginning of a table */
-void
+static void
ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
int nr_rows,
const char *tblid)
@@ -318,7 +318,7 @@ columns.");
uo_table_body (uiout);
}
-void
+static void
ui_out_table_end (struct ui_out *uiout)
{
if (!uiout->table.flag)
@@ -351,6 +351,22 @@ and before table_body.");
uo_table_header (uiout, width, alignment, col_name, colhdr);
}
+static void
+do_cleanup_table_end (void *data)
+{
+ struct ui_out *ui_out = data;
+
+ ui_out_table_end (ui_out);
+}
+
+struct cleanup *
+make_cleanup_ui_out_table_begin_end (struct ui_out *ui_out, int nr_cols,
+ int nr_rows, const char *tblid)
+{
+ ui_out_table_begin (ui_out, nr_cols, nr_rows, tblid);
+ return make_cleanup (do_cleanup_table_end, ui_out);
+}
+
void
ui_out_begin (struct ui_out *uiout,
enum ui_out_type type,
@@ -388,19 +404,6 @@ specified after table_body.");
}
void
-ui_out_list_begin (struct ui_out *uiout,
- const char *id)
-{
- ui_out_begin (uiout, ui_out_type_list, id);
-}
-
-void
-ui_out_tuple_begin (struct ui_out *uiout, const char *id)
-{
- ui_out_begin (uiout, ui_out_type_tuple, id);
-}
-
-void
ui_out_end (struct ui_out *uiout,
enum ui_out_type type)
{
@@ -408,18 +411,6 @@ ui_out_end (struct ui_out *uiout,
uo_end (uiout, type, old_level);
}
-void
-ui_out_list_end (struct ui_out *uiout)
-{
- ui_out_end (uiout, ui_out_type_list);
-}
-
-void
-ui_out_tuple_end (struct ui_out *uiout)
-{
- ui_out_end (uiout, ui_out_type_tuple);
-}
-
struct ui_out_end_cleanup_data
{
struct ui_out *uiout;
@@ -458,7 +449,7 @@ struct cleanup *
make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
const char *id)
{
- ui_out_tuple_begin (uiout, id);
+ ui_out_begin (uiout, ui_out_type_tuple, id);
return make_cleanup_ui_out_end (uiout, ui_out_type_tuple);
}
@@ -466,7 +457,7 @@ struct cleanup *
make_cleanup_ui_out_list_begin_end (struct ui_out *uiout,
const char *id)
{
- ui_out_list_begin (uiout, id);
+ ui_out_begin (uiout, ui_out_type_list, id);
return make_cleanup_ui_out_end (uiout, ui_out_type_list);
}
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index c8ed9dd504e..a52c3453722 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -88,31 +88,21 @@ extern struct cleanup *ui_out_begin_cleanup_end (struct ui_out *uiout,
implied structure: ``table = { hdr = { header, ... } , body = [ {
field, ... }, ... ] }''. If NR_ROWS is negative then there is at
least one row. */
-
-extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
- int nr_rows, const char *tblid);
-
extern void ui_out_table_header (struct ui_out *uiout, int width,
enum ui_align align, const char *col_name,
const char *colhdr);
extern void ui_out_table_body (struct ui_out *uiout);
-extern void ui_out_table_end (struct ui_out *uiout);
-
+extern struct cleanup *make_cleanup_ui_out_table_begin_end (struct ui_out *ui_out,
+ int nr_cols,
+ int nr_rows,
+ const char *tblid);
/* Compatibility wrappers. */
-extern void ui_out_list_begin (struct ui_out *uiout, const char *id);
-
-extern void ui_out_list_end (struct ui_out *uiout);
-
extern struct cleanup *make_cleanup_ui_out_list_begin_end (struct ui_out *uiout,
const char *id);
-extern void ui_out_tuple_begin (struct ui_out *uiout, const char *id);
-
-extern void ui_out_tuple_end (struct ui_out *uiout);
-
extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
const char *id);
diff --git a/gdb/utils.c b/gdb/utils.c
index 999d5a55b0c..55cef3027c5 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1,7 +1,8 @@
/* General utility routines for GDB, the GNU debugger.
+
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -47,7 +48,7 @@
#include "annotate.h"
#include "filenames.h"
-#include "inferior.h" /* for signed_pointer_to_address */
+#include "inferior.h" /* for signed_pointer_to_address */
#include <sys/param.h> /* For MAXPATHLEN */
@@ -65,10 +66,10 @@
#endif
#ifdef NEED_DECLARATION_MALLOC
-extern PTR malloc ();
+extern PTR malloc (); /* OK: PTR */
#endif
#ifdef NEED_DECLARATION_REALLOC
-extern PTR realloc ();
+extern PTR realloc (); /* OK: PTR */
#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
@@ -113,7 +114,7 @@ static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */
static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */
static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */
/* cleaned up on each error from within an execution command */
-static struct cleanup *exec_error_cleanup_chain;
+static struct cleanup *exec_error_cleanup_chain;
/* Pointer to what is left to do for an execution command after the
target stops. Used only in asynchronous mode, by targets that
@@ -267,7 +268,7 @@ make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function,
void *arg)
{
register struct cleanup *new
- = (struct cleanup *) xmalloc (sizeof (struct cleanup));
+ = (struct cleanup *) xmalloc (sizeof (struct cleanup));
register struct cleanup *old_chain = *pmy_chain;
new->next = *pmy_chain;
@@ -441,7 +442,8 @@ add_continuation (void (*continuation_hook) (struct continuation_arg *),
{
struct continuation *continuation_ptr;
- continuation_ptr = (struct continuation *) xmalloc (sizeof (struct continuation));
+ continuation_ptr =
+ (struct continuation *) xmalloc (sizeof (struct continuation));
continuation_ptr->continuation_hook = continuation_hook;
continuation_ptr->arg_list = arg_list;
continuation_ptr->next = cmd_continuation;
@@ -471,12 +473,12 @@ do_all_continuations (void)
/* Work now on the list we have set aside. */
while (continuation_ptr)
- {
- (continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
- saved_continuation = continuation_ptr;
- continuation_ptr = continuation_ptr->next;
- xfree (saved_continuation);
- }
+ {
+ (continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
+ saved_continuation = continuation_ptr;
+ continuation_ptr = continuation_ptr->next;
+ xfree (saved_continuation);
+ }
}
/* Walk down the cmd_continuation list, and get rid of all the
@@ -503,7 +505,8 @@ add_intermediate_continuation (void (*continuation_hook)
{
struct continuation *continuation_ptr;
- continuation_ptr = (struct continuation *) xmalloc (sizeof (struct continuation));
+ continuation_ptr =
+ (struct continuation *) xmalloc (sizeof (struct continuation));
continuation_ptr->continuation_hook = continuation_hook;
continuation_ptr->arg_list = arg_list;
continuation_ptr->next = intermediate_continuation;
@@ -533,12 +536,12 @@ do_all_intermediate_continuations (void)
/* Work now on the list we have set aside. */
while (continuation_ptr)
- {
- (continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
- saved_continuation = continuation_ptr;
- continuation_ptr = continuation_ptr->next;
- xfree (saved_continuation);
- }
+ {
+ (continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
+ saved_continuation = continuation_ptr;
+ continuation_ptr = continuation_ptr->next;
+ xfree (saved_continuation);
+ }
}
/* Walk down the cmd_continuation list, and get rid of all the
@@ -555,9 +558,9 @@ discard_all_intermediate_continuations (void)
xfree (continuation_ptr);
}
}
-
+
/* Print a warning message. The first argument STRING is the warning
message, used as an fprintf format string, the second is the
va_list of arguments for that string. A warning is unfiltered (not
@@ -589,7 +592,7 @@ vwarning (const char *string, va_list args)
does not force the return to command level. */
void
-warning (const char *string,...)
+warning (const char *string, ...)
{
va_list args;
va_start (args, string);
@@ -611,7 +614,7 @@ verror (const char *string, va_list args)
}
NORETURN void
-error (const char *string,...)
+error (const char *string, ...)
{
va_list args;
va_start (args, string);
@@ -656,7 +659,7 @@ error_last_message (void)
long len;
return ui_file_xstrdup (gdb_lasterr, &len);
}
-
+
/* This is to be called by main() at the very beginning */
void
@@ -684,8 +687,7 @@ struct internal_problem
static void
internal_vproblem (struct internal_problem *problem,
-const char *file, int line,
- const char *fmt, va_list ap)
+ const char *file, int line, const char *fmt, va_list ap)
{
static char msg[] = "Recursive internal problem.\n";
static int dejavu;
@@ -701,7 +703,7 @@ const char *file, int line,
case 1:
dejavu = 2;
fputs_unfiltered (msg, gdb_stderr);
- abort (); /* NOTE: GDB has only three calls to abort(). */
+ abort (); /* NOTE: GDB has only three calls to abort(). */
default:
dejavu = 3;
write (STDERR_FILENO, msg, sizeof (msg));
@@ -728,8 +730,8 @@ debugging may prove unreliable.\n");
{
case AUTO_BOOLEAN_AUTO:
/* Default (yes/batch case) is to quit GDB. When in batch mode
- this lessens the likelhood of GDB going into an infinate
- loop. */
+ this lessens the likelhood of GDB going into an infinate
+ loop. */
quit_p = query ("Quit this debugging session? ");
break;
case AUTO_BOOLEAN_TRUE:
@@ -746,8 +748,8 @@ debugging may prove unreliable.\n");
{
case AUTO_BOOLEAN_AUTO:
/* Default (yes/batch case) is to dump core. This leaves a GDB
- `dropping' so that it is easier to see that something went
- wrong in GDB. */
+ `dropping' so that it is easier to see that something went
+ wrong in GDB. */
dump_core_p = query ("Create a core file of GDB? ");
break;
break;
@@ -764,7 +766,7 @@ debugging may prove unreliable.\n");
if (quit_p)
{
if (dump_core_p)
- abort (); /* NOTE: GDB has only three calls to abort(). */
+ abort (); /* NOTE: GDB has only three calls to abort(). */
else
exit (1);
}
@@ -773,7 +775,7 @@ debugging may prove unreliable.\n");
if (dump_core_p)
{
if (fork () == 0)
- abort (); /* NOTE: GDB has only three calls to abort(). */
+ abort (); /* NOTE: GDB has only three calls to abort(). */
}
}
@@ -785,8 +787,7 @@ static struct internal_problem internal_error_problem = {
};
NORETURN void
-internal_verror (const char *file, int line,
- const char *fmt, va_list ap)
+internal_verror (const char *file, int line, const char *fmt, va_list ap)
{
internal_vproblem (&internal_error_problem, file, line, fmt, ap);
throw_exception (RETURN_ERROR);
@@ -806,8 +807,7 @@ static struct internal_problem internal_warning_problem = {
};
void
-internal_vwarning (const char *file, int line,
- const char *fmt, va_list ap)
+internal_vwarning (const char *file, int line, const char *fmt, va_list ap)
{
internal_vproblem (&internal_warning_problem, file, line, fmt, ap);
}
@@ -831,7 +831,8 @@ safe_strerror (int errnum)
char *msg;
static char buf[32];
- if ((msg = strerror (errnum)) == NULL)
+ msg = strerror (errnum);
+ if (msg == NULL)
{
sprintf (buf, "(undocumented errno %d)", errnum);
msg = buf;
@@ -922,13 +923,13 @@ quit (void)
fprintf_unfiltered (gdb_stderr, "Quit\n");
#else
if (job_control
- /* If there is no terminal switching for this target, then we can't
- possibly get screwed by the lack of job control. */
+ /* If there is no terminal switching for this target, then we can't
+ possibly get screwed by the lack of job control. */
|| current_target.to_terminal_ours == NULL)
fprintf_unfiltered (gdb_stderr, "Quit\n");
else
fprintf_unfiltered (gdb_stderr,
- "Quit (expect signal SIGINT when the program is resumed)\n");
+ "Quit (expect signal SIGINT when the program is resumed)\n");
#endif
throw_exception (RETURN_QUIT);
}
@@ -955,13 +956,10 @@ request_quit (int signo)
#if !defined (USE_MMALLOC)
-/* NOTE: These must use PTR so that their definition matches the
- declaration found in "mmalloc.h". */
-
static void *
mmalloc (void *md, size_t size)
{
- return malloc (size); /* NOTE: GDB's only call to malloc() */
+ return malloc (size); /* NOTE: GDB's only call to malloc() */
}
static void *
@@ -970,19 +968,19 @@ mrealloc (void *md, void *ptr, size_t size)
if (ptr == 0) /* Guard against old realloc's */
return mmalloc (md, size);
else
- return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */
+ return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */
}
static void *
mcalloc (void *md, size_t number, size_t size)
{
- return calloc (number, size); /* NOTE: GDB's only call to calloc() */
+ return calloc (number, size); /* NOTE: GDB's only call to calloc() */
}
static void
mfree (void *md, void *ptr)
{
- free (ptr); /* NOTE: GDB's only call to free() */
+ free (ptr); /* NOTE: GDB's only call to free() */
}
#endif /* USE_MMALLOC */
@@ -1031,9 +1029,10 @@ init_malloc (void *md)
initialize_all_files(). */
fprintf_unfiltered
- (gdb_stderr, "warning: failed to install memory consistency checks; ");
- fprintf_unfiltered
- (gdb_stderr, "configuration should define NO_MMCHECK or MMCHECK_FORCE\n");
+ (gdb_stderr,
+ "warning: failed to install memory consistency checks; ");
+ fprintf_unfiltered (gdb_stderr,
+ "configuration should define NO_MMCHECK or MMCHECK_FORCE\n");
}
mmtrace ();
@@ -1050,12 +1049,12 @@ nomem (long size)
if (size > 0)
{
internal_error (__FILE__, __LINE__,
- "virtual memory exhausted: can't allocate %ld bytes.", size);
+ "virtual memory exhausted: can't allocate %ld bytes.",
+ size);
}
else
{
- internal_error (__FILE__, __LINE__,
- "virtual memory exhausted.");
+ internal_error (__FILE__, __LINE__, "virtual memory exhausted.");
}
}
@@ -1149,19 +1148,19 @@ xmfree (void *md, void *ptr)
/* NOTE: These are declared using PTR to ensure consistency with
"libiberty.h". xfree() is GDB local. */
-PTR
+PTR /* OK: PTR */
xmalloc (size_t size)
{
return xmmalloc (NULL, size);
}
-PTR
-xrealloc (PTR ptr, size_t size)
+PTR /* OK: PTR */
+xrealloc (PTR ptr, size_t size) /* OK: PTR */
{
return xmrealloc (NULL, ptr, size);
}
-PTR
+PTR /* OK: PTR */
xcalloc (size_t number, size_t size)
{
return xmcalloc (NULL, number, size);
@@ -1194,14 +1193,12 @@ xvasprintf (char **ret, const char *format, va_list ap)
badly format string; or something else. */
if ((*ret) == NULL)
internal_error (__FILE__, __LINE__,
- "vasprintf returned NULL buffer (errno %d)",
- errno);
+ "vasprintf returned NULL buffer (errno %d)", errno);
/* A negative status with a non-NULL buffer shouldn't never
happen. But to be sure. */
if (status < 0)
internal_error (__FILE__, __LINE__,
- "vasprintf call failed (errno %d)",
- errno);
+ "vasprintf call failed (errno %d)", errno);
}
@@ -1281,7 +1278,7 @@ gdb_print_host_address (const void *addr, struct ui_file *stream)
/* VARARGS */
int
-query (const char *ctlstr,...)
+query (const char *ctlstr, ...)
{
va_list args;
register int answer;
@@ -1327,7 +1324,7 @@ query (const char *ctlstr,...)
if (answer != '\n')
do
{
- ans2 = fgetc (stdin);
+ ans2 = fgetc (stdin);
clearerr (stdin);
}
while (ans2 != EOF && ans2 != '\n' && ans2 != '\r');
@@ -1367,7 +1364,7 @@ no_control_char_error (const char *start, const char *end)
copy[len] = '\0';
error ("There is no control character `\\%s' in the `%s' character set.",
- copy, target_charset ());
+ copy, target_charset ());
}
/* Parse a C escape sequence. STRING_PTR points to a variable
@@ -1392,86 +1389,87 @@ parse_escape (char **string_ptr)
register int c = *(*string_ptr)++;
if (c_parse_backslash (c, &target_char))
return target_char;
- else switch (c)
- {
- case '\n':
- return -2;
- case 0:
- (*string_ptr)--;
- return 0;
- case '^':
+ else
+ switch (c)
{
- /* Remember where this escape sequence started, for reporting
- errors. */
- char *sequence_start_pos = *string_ptr - 1;
-
- c = *(*string_ptr)++;
-
- if (c == '?')
- {
- /* XXXCHARSET: What is `delete' in the host character set? */
- c = 0177;
-
- if (! host_char_to_target (c, &target_char))
- error ("There is no character corresponding to `Delete' "
- "in the target character set `%s'.",
- host_charset ());
-
- return target_char;
- }
- else if (c == '\\')
- target_char = parse_escape (string_ptr);
- else
- {
- if (! host_char_to_target (c, &target_char))
- no_control_char_error (sequence_start_pos, *string_ptr);
- }
-
- /* Now target_char is something like `c', and we want to find
- its control-character equivalent. */
- if (! target_char_to_control_char (target_char, &target_char))
- no_control_char_error (sequence_start_pos, *string_ptr);
-
- return target_char;
- }
+ case '\n':
+ return -2;
+ case 0:
+ (*string_ptr)--;
+ return 0;
+ case '^':
+ {
+ /* Remember where this escape sequence started, for reporting
+ errors. */
+ char *sequence_start_pos = *string_ptr - 1;
- /* XXXCHARSET: we need to use isdigit and value-of-digit
- methods of the host character set here. */
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- register int i = c - '0';
- register int count = 0;
- while (++count < 3)
- {
- if ((c = *(*string_ptr)++) >= '0' && c <= '7')
- {
- i *= 8;
- i += c - '0';
- }
- else
- {
- (*string_ptr)--;
- break;
- }
- }
- return i;
+ c = *(*string_ptr)++;
+
+ if (c == '?')
+ {
+ /* XXXCHARSET: What is `delete' in the host character set? */
+ c = 0177;
+
+ if (!host_char_to_target (c, &target_char))
+ error ("There is no character corresponding to `Delete' "
+ "in the target character set `%s'.", host_charset ());
+
+ return target_char;
+ }
+ else if (c == '\\')
+ target_char = parse_escape (string_ptr);
+ else
+ {
+ if (!host_char_to_target (c, &target_char))
+ no_control_char_error (sequence_start_pos, *string_ptr);
+ }
+
+ /* Now target_char is something like `c', and we want to find
+ its control-character equivalent. */
+ if (!target_char_to_control_char (target_char, &target_char))
+ no_control_char_error (sequence_start_pos, *string_ptr);
+
+ return target_char;
+ }
+
+ /* XXXCHARSET: we need to use isdigit and value-of-digit
+ methods of the host character set here. */
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ {
+ register int i = c - '0';
+ register int count = 0;
+ while (++count < 3)
+ {
+ c = (**string_ptr);
+ if (c >= '0' && c <= '7')
+ {
+ (*string_ptr)++;
+ i *= 8;
+ i += c - '0';
+ }
+ else
+ {
+ break;
+ }
+ }
+ return i;
+ }
+ default:
+ if (!host_char_to_target (c, &target_char))
+ error
+ ("The escape sequence `\%c' is equivalent to plain `%c', which"
+ " has no equivalent\n" "in the `%s' character set.", c, c,
+ target_charset ());
+ return target_char;
}
- default:
- if (! host_char_to_target (c, &target_char))
- error ("The escape sequence `\%c' is equivalent to plain `%c', which"
- " has no equivalent\n"
- "in the `%s' character set.",
- c, c, target_charset ());
- return target_char;
- }
}
/* Print the character C on STREAM as part of the contents of a literal
@@ -1547,15 +1545,16 @@ fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream)
}
void
-fputstrn_unfiltered (const char *str, int n, int quoter, struct ui_file *stream)
+fputstrn_unfiltered (const char *str, int n, int quoter,
+ struct ui_file *stream)
{
int i;
for (i = 0; i < n; i++)
printchar (str[i], fputs_unfiltered, fprintf_unfiltered, stream, quoter);
}
-
+
/* Number of lines per page or UINT_MAX if paging is disabled. */
static unsigned int lines_per_page;
/* Number of chars per line or UINT_MAX if line folding is disabled. */
@@ -1606,8 +1605,6 @@ init_page_info (void)
chars_per_line = 80;
#if !defined (_WIN32)
- /* No termcap under MPW, although might be cool to do something
- by looking at worksheet or console window sizes. */
/* Initialize the screen height and width from termcap. */
{
char *termtype = getenv ("TERM");
@@ -1643,7 +1640,7 @@ init_page_info (void)
}
}
}
-#endif /* MPW */
+#endif
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
@@ -1905,8 +1902,7 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
while (*lineptr)
{
/* Possible new page. */
- if (filter &&
- (lines_printed >= lines_per_page - 1))
+ if (filter && (lines_printed >= lines_per_page - 1))
prompt_for_continue ();
while (*lineptr && *lineptr != '\n')
@@ -1954,7 +1950,7 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
if (wrap_column)
{
fputs_unfiltered (wrap_indent, stream);
- *wrap_pointer = '\0'; /* Null-terminate saved stuff */
+ *wrap_pointer = '\0'; /* Null-terminate saved stuff */
fputs_unfiltered (wrap_buffer, stream); /* and eject it */
/* FIXME, this strlen is what prevents wrap_indent from
containing tabs. However, if we recurse to print it
@@ -2168,7 +2164,7 @@ vprintf_unfiltered (const char *format, va_list args)
}
void
-fprintf_filtered (struct ui_file * stream, const char *format,...)
+fprintf_filtered (struct ui_file *stream, const char *format, ...)
{
va_list args;
va_start (args, format);
@@ -2177,7 +2173,7 @@ fprintf_filtered (struct ui_file * stream, const char *format,...)
}
void
-fprintf_unfiltered (struct ui_file * stream, const char *format,...)
+fprintf_unfiltered (struct ui_file *stream, const char *format, ...)
{
va_list args;
va_start (args, format);
@@ -2189,7 +2185,8 @@ fprintf_unfiltered (struct ui_file * stream, const char *format,...)
Called as fprintfi_filtered (spaces, stream, format, ...); */
void
-fprintfi_filtered (int spaces, struct ui_file * stream, const char *format,...)
+fprintfi_filtered (int spaces, struct ui_file *stream, const char *format,
+ ...)
{
va_list args;
va_start (args, format);
@@ -2201,7 +2198,7 @@ fprintfi_filtered (int spaces, struct ui_file * stream, const char *format,...)
void
-printf_filtered (const char *format,...)
+printf_filtered (const char *format, ...)
{
va_list args;
va_start (args, format);
@@ -2211,7 +2208,7 @@ printf_filtered (const char *format,...)
void
-printf_unfiltered (const char *format,...)
+printf_unfiltered (const char *format, ...)
{
va_list args;
va_start (args, format);
@@ -2223,7 +2220,7 @@ printf_unfiltered (const char *format,...)
Called as printfi_filtered (spaces, format, ...); */
void
-printfi_filtered (int spaces, const char *format,...)
+printfi_filtered (int spaces, const char *format, ...)
{
va_list args;
va_start (args, format);
@@ -2312,13 +2309,8 @@ fprintf_symbol_filtered (struct ui_file *stream, const char *name,
break;
case language_objc:
/* Commented out until ObjC handling is enabled. */
- /*demangled = objc_demangle (name);*/
- /*break;*/
-#if 0
- /* OBSOLETE case language_chill: */
- /* OBSOLETE demangled = chill_demangle (name); */
- /* OBSOLETE break; */
-#endif
+ /*demangled = objc_demangle (name); */
+ /*break; */
default:
demangled = NULL;
break;
@@ -2366,6 +2358,14 @@ strcmp_iw (const char *string1, const char *string2)
}
return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0');
}
+
+/* A simple comparison function with opposite semantics to strcmp. */
+
+int
+streq (const char *lhs, const char *rhs)
+{
+ return !strcmp (lhs, rhs);
+}
/*
@@ -2378,11 +2378,11 @@ int
subset_compare (char *string_to_compare, char *template_string)
{
int match;
- if (template_string != (char *) NULL && string_to_compare != (char *) NULL &&
- strlen (string_to_compare) <= strlen (template_string))
- match = (strncmp (template_string,
- string_to_compare,
- strlen (string_to_compare)) == 0);
+ if (template_string != (char *) NULL && string_to_compare != (char *) NULL
+ && strlen (string_to_compare) <= strlen (template_string))
+ match =
+ (strncmp
+ (template_string, string_to_compare, strlen (string_to_compare)) == 0);
else
match = 0;
return match;
@@ -2433,15 +2433,13 @@ initialize_utils (void)
add_show_from_set
(add_set_cmd ("demangle", class_support, var_boolean,
(char *) &demangle,
- "Set demangling of encoded C++/ObjC names when displaying symbols.",
- &setprintlist),
- &showprintlist);
+ "Set demangling of encoded C++/ObjC names when displaying symbols.",
+ &setprintlist), &showprintlist);
add_show_from_set
(add_set_cmd ("pagination", class_support,
var_boolean, (char *) &pagination_enabled,
- "Set state of pagination.", &setlist),
- &showlist);
+ "Set state of pagination.", &setlist), &showlist);
if (xdb_commands)
{
@@ -2455,15 +2453,13 @@ initialize_utils (void)
(add_set_cmd ("sevenbit-strings", class_support, var_boolean,
(char *) &sevenbit_strings,
"Set printing of 8-bit characters in strings as \\nnn.",
- &setprintlist),
- &showprintlist);
+ &setprintlist), &showprintlist);
add_show_from_set
(add_set_cmd ("asm-demangle", class_support, var_boolean,
(char *) &asm_demangle,
"Set demangling of C++/ObjC names in disassembly listings.",
- &setprintlist),
- &showprintlist);
+ &setprintlist), &showprintlist);
}
/* Machine specific function to handle SIGWINCH signal. */
@@ -2471,9 +2467,7 @@ initialize_utils (void)
#ifdef SIGWINCH_HANDLER_BODY
SIGWINCH_HANDLER_BODY
#endif
-
/* print routines to handle variable size regs, etc. */
-
/* temporary storage using circular buffer */
#define NUMCELLS 16
#define CELLSIZE 32
@@ -2522,19 +2516,17 @@ decimal2str (char *paddr_str, char *sign, ULONGEST addr)
switch (i)
{
case 1:
- sprintf (paddr_str, "%s%lu",
- sign, temp[0]);
+ sprintf (paddr_str, "%s%lu", sign, temp[0]);
break;
case 2:
- sprintf (paddr_str, "%s%lu%09lu",
- sign, temp[1], temp[0]);
+ sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]);
break;
case 3:
- sprintf (paddr_str, "%s%lu%09lu%09lu",
- sign, temp[2], temp[1], temp[0]);
+ sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]);
break;
default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
+ internal_error (__FILE__, __LINE__,
+ "failed internal consistency check");
}
}
@@ -2600,8 +2592,7 @@ phex_nz (ULONGEST l, int sizeof_l)
if (high == 0)
sprintf (str, "%lx", (unsigned long) (l & 0xffffffff));
else
- sprintf (str, "%lx%08lx",
- high, (unsigned long) (l & 0xffffffff));
+ sprintf (str, "%lx%08lx", high, (unsigned long) (l & 0xffffffff));
break;
}
case 4:
@@ -2620,25 +2611,6 @@ phex_nz (ULONGEST l, int sizeof_l)
}
-/* Convert to / from the hosts pointer to GDB's internal CORE_ADDR
- using the target's conversion routines. */
-CORE_ADDR
-host_pointer_to_address (void *ptr)
-{
- gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
- return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &ptr);
-}
-
-void *
-address_to_host_pointer (CORE_ADDR addr)
-{
- void *ptr;
-
- gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
- ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
- return ptr;
-}
-
/* Convert a CORE_ADDR into a string. */
const char *
core_addr_to_string (const CORE_ADDR addr)
@@ -2671,7 +2643,7 @@ string_to_core_addr (const char *my_string)
{
if (isdigit (my_string[i]))
addr = (my_string[i] - '0') + (addr * 16);
- else if (isxdigit (my_string[i]))
+ else if (isxdigit (my_string[i]))
addr = (tolower (my_string[i]) - 'a' + 0xa) + (addr * 16);
else
internal_error (__FILE__, __LINE__, "invalid hex");
@@ -2790,8 +2762,7 @@ xfullpath (const char *filename)
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
/* We need to be careful when filename is of the form 'd:foo', which
is equivalent of d:./foo, which is totally different from d:/foo. */
- if (strlen (dir_name) == 2 &&
- isalpha (dir_name[0]) && dir_name[1] == ':')
+ if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':')
{
dir_name[2] = '.';
dir_name[3] = '\000';
@@ -2810,3 +2781,74 @@ xfullpath (const char *filename)
xfree (real_path);
return result;
}
+
+
+/* This is the 32-bit CRC function used by the GNU separate debug
+ facility. An executable may contain a section named
+ .gnu_debuglink, which holds the name of a separate executable file
+ containing its debug info, and a checksum of that file's contents,
+ computed using this function. */
+unsigned long
+gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len)
+{
+ static const unsigned long crc32_table[256] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ };
+ unsigned char *end;
+
+ crc = ~crc & 0xffffffff;
+ for (end = buf + len; buf < end; ++buf)
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ return ~crc & 0xffffffff;;
+}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 6872de81a9d..39701458ed4 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1,5 +1,6 @@
/* Target-dependent code for the NEC V850 for GDB, the GNU debugger.
- Copyright 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -799,11 +800,13 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
CORE_ADDR
v850_find_callers_reg (struct frame_info *fi, int regnum)
{
- for (; fi; fi = fi->next)
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
- else if (fi->saved_regs[regnum] != 0)
- return read_memory_unsigned_integer (fi->saved_regs[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)))
+ 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],
v850_register_raw_size (regnum));
return read_register (regnum);
@@ -841,7 +844,7 @@ v850_frame_chain (struct frame_info *fi)
if (pi.framereg == E_FP_RAW_REGNUM)
return v850_find_callers_reg (fi, pi.framereg);
- return fi->frame - pi.frameoffset;
+ return get_frame_base (fi) - pi.frameoffset;
}
/* Function: skip_prologue
@@ -883,16 +886,18 @@ v850_pop_frame (void)
struct frame_info *frame = get_current_frame ();
int regnum;
- if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
generic_pop_dummy_frame ();
else
{
write_register (E_PC_REGNUM, FRAME_SAVED_PC (frame));
for (regnum = 0; regnum < E_NUM_REGS; regnum++)
- if (frame->saved_regs[regnum] != 0)
+ if (get_frame_saved_regs (frame)[regnum] != 0)
write_register (regnum,
- read_memory_unsigned_integer (frame->saved_regs[regnum],
+ read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
v850_register_raw_size (regnum)));
write_register (E_SP_REGNUM, get_frame_base (frame));
@@ -1009,8 +1014,10 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
CORE_ADDR
v850_frame_saved_pc (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, E_PC_REGNUM);
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), E_PC_REGNUM);
else
return v850_find_callers_reg (fi, E_RP_REGNUM);
}
@@ -1105,32 +1112,33 @@ v850_frame_init_saved_regs (struct frame_info *fi)
struct pifsr pifsrs[E_NUM_REGS + 1], *pifsr;
CORE_ADDR func_addr, func_end;
- if (!fi->saved_regs)
+ if (!get_frame_saved_regs (fi))
{
frame_saved_regs_zalloc (fi);
/* The call dummy doesn't save any registers on the stack, so we
can return now. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
return;
/* Find the beginning of this function, so we can analyze its
prologue. */
- if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end))
+ if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
{
pi.pifsrs = pifsrs;
- v850_scan_prologue (fi->pc, &pi);
+ v850_scan_prologue (get_frame_pc (fi), &pi);
- if (!fi->next && pi.framereg == E_SP_REGNUM)
- fi->frame = read_register (pi.framereg) - pi.frameoffset;
+ if (!get_next_frame (fi) && pi.framereg == E_SP_REGNUM)
+ deprecated_update_frame_base_hack (fi, read_register (pi.framereg) - pi.frameoffset);
for (pifsr = pifsrs; pifsr->framereg; pifsr++)
{
- fi->saved_regs[pifsr->reg] = pifsr->offset + fi->frame;
+ get_frame_saved_regs (fi)[pifsr->reg] = pifsr->offset + get_frame_base (fi);
if (pifsr->framereg == E_SP_REGNUM)
- fi->saved_regs[pifsr->reg] += pi.frameoffset;
+ get_frame_saved_regs (fi)[pifsr->reg] += pi.frameoffset;
}
}
/* Else we're out of luck (can't debug completely stripped code).
@@ -1143,7 +1151,7 @@ v850_frame_init_saved_regs (struct frame_info *fi)
registers. Most of the work is done in scan_prologue().
Note that when we are called for the last frame (currently active frame),
- that fi->pc and fi->frame will already be setup. However, fi->frame will
+ that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will
be valid only if this routine uses FP. For previous frames, fi-frame will
always be correct (since that is derived from v850_frame_chain ()).
@@ -1156,8 +1164,8 @@ v850_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
struct prologue_info pi;
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
v850_frame_init_saved_regs (fi);
}
@@ -1240,7 +1248,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_saved_pc_after_call (gdbarch, v850_saved_pc_after_call);
set_gdbarch_frame_saved_pc (gdbarch, v850_frame_saved_pc);
set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
/*
* Miscelany
@@ -1256,8 +1263,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
/* OK to default this value to 'unknown'. */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- /* W/o prototype, coerce float args to double. */
- set_gdbarch_coerce_float_to_double (gdbarch, standard_coerce_float_to_double);
/*
* Call Dummies
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 2e68cff14a2..770e942a8d1 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -289,13 +289,13 @@ v850ice_wndproc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
result = TRUE;
break;
case STATE_CHANGE_STEPI:
- if (!catch_errors ((catch_errors_ftype *) ice_stepi, (PTR) (int) lParam, "",
+ if (!catch_errors ((catch_errors_ftype *) ice_stepi, (int) lParam, "",
RETURN_MASK_ALL))
printf_unfiltered ("stepi errored\n");
result = TRUE;
break;
case STATE_CHANGE_NEXTI:
- if (!catch_errors ((catch_errors_ftype *) ice_nexti, (PTR) (int) lParam, "",
+ if (!catch_errors ((catch_errors_ftype *) ice_nexti, (int) lParam, "",
RETURN_MASK_ALL))
printf_unfiltered ("nexti errored\n");
result = TRUE;
diff --git a/gdb/valarith.c b/gdb/valarith.c
index a793a93310c..e1b4426c3f7 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -1,7 +1,8 @@
/* Perform arithmetic and other operations on values, for GDB.
+
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -859,7 +860,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
/* Integral operations here. */
/* FIXME: Also mixed integral/booleans, with result an integer. */
/* FIXME: This implements ANSI C rules (also correct for C++).
- What about FORTRAN and (OBSOLETE) chill ? */
+ What about FORTRAN and (the deleted) chill ? */
{
unsigned int promoted_len1 = TYPE_LENGTH (type1);
unsigned int promoted_len2 = TYPE_LENGTH (type2);
@@ -946,12 +947,6 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
case BINOP_MOD:
/* Knuth 1.2.4, integer only. Note that unlike the C '%' op,
v1 mod 0 has a defined value, v1. */
- /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
- /* OBSOLETE if (current_language->la_language == language_chill */
- /* OBSOLETE && value_as_long (arg2) <= 0) */
- /* OBSOLETE { */
- /* OBSOLETE error ("Second operand of MOD must be greater than zero."); */
- /* OBSOLETE } */
if (v2 == 0)
{
v = v1;
@@ -1070,12 +1065,6 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
case BINOP_MOD:
/* Knuth 1.2.4, integer only. Note that unlike the C '%' op,
X mod 0 has a defined value, X. */
- /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
- /* OBSOLETE if (current_language->la_language == language_chill */
- /* OBSOLETE && v2 <= 0) */
- /* OBSOLETE { */
- /* OBSOLETE error ("Second operand of MOD must be greater than zero."); */
- /* OBSOLETE } */
if (v2 == 0)
{
v = v1;
@@ -1339,7 +1328,7 @@ value_neg (struct value *arg1)
else if (TYPE_CODE (type) == TYPE_CODE_INT || TYPE_CODE (type) == TYPE_CODE_BOOL)
{
/* Perform integral promotion for ANSI C/C++. FIXME: What about
- FORTRAN and (OBSOLETE) chill ? */
+ FORTRAN and (the deleted) chill ? */
if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin_type_int))
result_type = builtin_type_int;
diff --git a/gdb/valops.c b/gdb/valops.c
index 39eafaacdc9..c86de4cf295 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1,6 +1,6 @@
/* Perform non-arithmetic operations on values, for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -136,8 +136,30 @@ int overload_resolution = 0;
The default is to stop in the frame where the signal was received. */
int unwind_on_signal_p = 0;
-
+/* How you should pass arguments to a function depends on whether it
+ was defined in K&R style or prototype style. If you define a
+ function using the K&R syntax that takes a `float' argument, then
+ callers must pass that argument as a `double'. If you define the
+ function using the prototype syntax, then you must pass the
+ argument as a `float', with no promotion.
+
+ Unfortunately, on certain older platforms, the debug info doesn't
+ indicate reliably how each function was defined. A function type's
+ TYPE_FLAG_PROTOTYPED flag may be clear, even if the function was
+ defined in prototype style. When calling a function whose
+ TYPE_FLAG_PROTOTYPED flag is clear, GDB consults this flag to decide
+ what to do.
+
+ For modern targets, it is proper to assume that, if the prototype
+ flag is clear, that can be trusted: `float' arguments should be
+ promoted to `double'. For some older targets, if the prototype
+ flag is clear, that doesn't tell us anything. The default is to
+ trust the debug information; the user can override this behavior
+ with "set coerce-float-to-double 0". */
+
+static int coerce_float_to_double;
+
/* Find the address of function name NAME in the inferior. */
@@ -423,49 +445,6 @@ value_cast (struct type *type, struct value *arg2)
VALUE_POINTED_TO_OFFSET (arg2) = 0; /* pai: chk_val */
return arg2;
}
- /* OBSOLETE else if (chill_varying_type (type)) */
- /* OBSOLETE { */
- /* OBSOLETE struct type *range1, *range2, *eltype1, *eltype2; */
- /* OBSOLETE struct value *val; */
- /* OBSOLETE int count1, count2; */
- /* OBSOLETE LONGEST low_bound, high_bound; */
- /* OBSOLETE char *valaddr, *valaddr_data; */
- /* OBSOLETE *//* For lint warning about eltype2 possibly uninitialized: */
- /* OBSOLETE eltype2 = NULL; */
- /* OBSOLETE if (code2 == TYPE_CODE_BITSTRING) */
- /* OBSOLETE error ("not implemented: converting bitstring to varying type"); */
- /* OBSOLETE if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING) */
- /* OBSOLETE || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))), */
- /* OBSOLETE eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)), */
- /* OBSOLETE (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2) */
- /* OBSOLETE *//*|| TYPE_CODE (eltype1) != TYPE_CODE (eltype2) *//* ))) */
- /* OBSOLETE error ("Invalid conversion to varying type"); */
- /* OBSOLETE range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0); */
- /* OBSOLETE range2 = TYPE_FIELD_TYPE (type2, 0); */
- /* OBSOLETE if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0) */
- /* OBSOLETE count1 = -1; */
- /* OBSOLETE else */
- /* OBSOLETE count1 = high_bound - low_bound + 1; */
- /* OBSOLETE if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0) */
- /* OBSOLETE count1 = -1, count2 = 0; *//* To force error before */
- /* OBSOLETE else */
- /* OBSOLETE count2 = high_bound - low_bound + 1; */
- /* OBSOLETE if (count2 > count1) */
- /* OBSOLETE error ("target varying type is too small"); */
- /* OBSOLETE val = allocate_value (type); */
- /* OBSOLETE valaddr = VALUE_CONTENTS_RAW (val); */
- /* OBSOLETE valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8; */
- /* OBSOLETE *//* Set val's __var_length field to count2. */
- /* OBSOLETE store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)), */
- /* OBSOLETE count2); */
- /* OBSOLETE *//* Set the __var_data field to count2 elements copied from arg2. */
- /* OBSOLETE memcpy (valaddr_data, VALUE_CONTENTS (arg2), */
- /* OBSOLETE count2 * TYPE_LENGTH (eltype2)); */
- /* OBSOLETE *//* Zero the rest of the __var_data field of val. */
- /* OBSOLETE memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0', */
- /* OBSOLETE (count1 - count2) * TYPE_LENGTH (eltype2)); */
- /* OBSOLETE return val; */
- /* OBSOLETE } */
else if (VALUE_LVAL (arg2) == lval_memory)
{
return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2),
@@ -583,6 +562,7 @@ value_assign (struct value *toval, struct value *fromval)
struct value *val;
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
int use_buffer = 0;
+ struct frame_id old_frame;
if (!toval->modifiable)
error ("Left operand of assignment is not a modifiable lvalue.");
@@ -612,6 +592,11 @@ value_assign (struct value *toval, struct value *fromval)
}
}
+ /* Since modifying a register can trash the frame chain, and modifying memory
+ can trash the frame cache, we save the old frame and then restore the new
+ frame afterwards. */
+ old_frame = get_frame_id (deprecated_selected_frame);
+
switch (VALUE_LVAL (toval))
{
case lval_internalvar:
@@ -680,7 +665,6 @@ value_assign (struct value *toval, struct value *fromval)
case lval_reg_frame_relative:
case lval_register:
{
- struct frame_id old_frame;
/* value is stored in a series of registers in the frame
specified by the structure. Copy that value out, modify
it, and copy it back in. */
@@ -693,11 +677,6 @@ value_assign (struct value *toval, struct value *fromval)
int regno;
struct frame_info *frame;
- /* Since modifying a register can trash the frame chain, we
- save the old frame and then restore the new frame
- afterwards. */
- old_frame = get_frame_id (deprecated_selected_frame);
-
/* Figure out which frame this is in currently. */
if (VALUE_LVAL (toval) == lval_register)
{
@@ -799,26 +778,6 @@ value_assign (struct value *toval, struct value *fromval)
register_changed_hook (-1);
target_changed_event ();
- /* Assigning to the stack pointer, frame pointer, and other
- (architecture and calling convention specific) registers
- may cause the frame cache to be out of date. We just do
- this on all assignments to registers for simplicity; I
- doubt the slowdown matters. */
- reinit_frame_cache ();
-
- /* Having destoroyed the frame cache, restore the selected
- frame. */
- /* FIXME: cagney/2002-11-02: There has to be a better way of
- doing this. Instead of constantly saving/restoring the
- frame. Why not create a get_selected_frame() function
- that, having saved the selected frame's ID can
- automatically re-find the previously selected frame
- automatically. */
- {
- struct frame_info *fi = frame_find_by_id (old_frame);
- if (fi != NULL)
- select_frame (fi);
- }
}
break;
@@ -827,6 +786,38 @@ value_assign (struct value *toval, struct value *fromval)
error ("Left operand of assignment is not an lvalue.");
}
+ /* Assigning to the stack pointer, frame pointer, and other
+ (architecture and calling convention specific) registers may
+ cause the frame cache to be out of date. Assigning to memory
+ also can. We just do this on all assignments to registers or
+ memory, for simplicity's sake; I doubt the slowdown matters. */
+ switch (VALUE_LVAL (toval))
+ {
+ case lval_memory:
+ case lval_register:
+ case lval_reg_frame_relative:
+
+ reinit_frame_cache ();
+
+ /* Having destoroyed the frame cache, restore the selected frame. */
+
+ /* FIXME: cagney/2002-11-02: There has to be a better way of
+ doing this. Instead of constantly saving/restoring the
+ frame. Why not create a get_selected_frame() function that,
+ having saved the selected frame's ID can automatically
+ re-find the previously selected frame automatically. */
+
+ {
+ struct frame_info *fi = frame_find_by_id (old_frame);
+ if (fi != NULL)
+ select_frame (fi);
+ }
+
+ break;
+ default:
+ break;
+ }
+
/* If the field does not entirely fill a LONGEST, then zero the sign bits.
If the field is signed, and is negative, then sign extend. */
if ((VALUE_BITSIZE (toval) > 0)
@@ -1144,49 +1135,6 @@ default_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
return sp;
}
-
-/* Functions to use for the COERCE_FLOAT_TO_DOUBLE gdbarch method.
-
- How you should pass arguments to a function depends on whether it
- was defined in K&R style or prototype style. If you define a
- function using the K&R syntax that takes a `float' argument, then
- callers must pass that argument as a `double'. If you define the
- function using the prototype syntax, then you must pass the
- argument as a `float', with no promotion.
-
- Unfortunately, on certain older platforms, the debug info doesn't
- indicate reliably how each function was defined. A function type's
- TYPE_FLAG_PROTOTYPED flag may be clear, even if the function was
- defined in prototype style. When calling a function whose
- TYPE_FLAG_PROTOTYPED flag is clear, GDB consults the
- COERCE_FLOAT_TO_DOUBLE gdbarch method to decide what to do.
-
- For modern targets, it is proper to assume that, if the prototype
- flag is clear, that can be trusted: `float' arguments should be
- promoted to `double'. You should register the function
- `standard_coerce_float_to_double' to get this behavior.
-
- For some older targets, if the prototype flag is clear, that
- doesn't tell us anything. So we guess that, if we don't have a
- type for the formal parameter (i.e., the first argument to
- COERCE_FLOAT_TO_DOUBLE is null), then we should promote it;
- otherwise, we should leave it alone. The function
- `default_coerce_float_to_double' provides this behavior; it is the
- default value, for compatibility with older configurations. */
-int
-default_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- return formal == NULL;
-}
-
-
-int
-standard_coerce_float_to_double (struct type *formal, struct type *actual)
-{
- return 1;
-}
-
-
/* Perform the standard coercions that are specified
for arguments to be passed to C functions.
@@ -1229,11 +1177,7 @@ value_arg_coerce (struct value *arg, struct type *param_type,
type = builtin_type_int;
break;
case TYPE_CODE_FLT:
- /* FIXME: We should always convert floats to doubles in the
- non-prototyped case. As many debugging formats include
- no information about prototyping, we have to live with
- COERCE_FLOAT_TO_DOUBLE for now. */
- if (!is_prototyped && COERCE_FLOAT_TO_DOUBLE (param_type, arg_type))
+ if (!is_prototyped && coerce_float_to_double)
{
if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin_type_double))
type = builtin_type_double;
@@ -1513,37 +1457,6 @@ hand_function_call (struct value *function, int nargs, struct value **args)
generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
}
- if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END)
- {
- /* Convex Unix prohibits executing in the stack segment. */
- /* Hope there is empty room at the top of the text segment. */
- extern CORE_ADDR text_end;
- static int checked = 0;
- if (!checked)
- for (start_sp = text_end - sizeof_dummy1; start_sp < text_end; ++start_sp)
- if (read_memory_integer (start_sp, 1) != 0)
- error ("text segment full -- no place to put call");
- checked = 1;
- sp = old_sp;
- real_pc = text_end - sizeof_dummy1;
- write_memory (real_pc, (char *) dummy1, sizeof_dummy1);
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
- generic_save_call_dummy_addr (real_pc, real_pc + sizeof_dummy1);
- }
-
- if (CALL_DUMMY_LOCATION == AFTER_TEXT_END)
- {
- extern CORE_ADDR text_end;
- int errcode;
- sp = old_sp;
- real_pc = text_end;
- errcode = target_write_memory (real_pc, (char *) dummy1, sizeof_dummy1);
- if (errcode != 0)
- error ("Cannot write text segment -- call_function failed");
- if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
- generic_save_call_dummy_addr (real_pc, real_pc + sizeof_dummy1);
- }
-
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
real_pc = funaddr;
@@ -1828,8 +1741,9 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
{
/* The user wants the context restored. */
- /* We must get back to the frame we were before the dummy call. */
- POP_FRAME;
+ /* We must get back to the frame we were before the dummy
+ call. */
+ frame_pop (get_current_frame ());
/* FIXME: Insert a bunch of wrap_here; name can be very long if it's
a C++ name with arguments and stuff. */
@@ -2212,22 +2126,23 @@ search_struct_field (const char *name, struct value *arg1, int offset,
/* Look for a match through the fields of an anonymous union,
or anonymous struct. C++ provides anonymous unions.
- In the GNU Chill (OBSOLETE) implementation of
- variant record types, each <alternative field> has
- an (anonymous) union type, each member of the union
- represents a <variant alternative>. Each <variant
- alternative> is represented as a struct, with a
- member for each <variant field>. */
+ In the GNU Chill (now deleted from GDB)
+ implementation of variant record types, each
+ <alternative field> has an (anonymous) union type,
+ each member of the union represents a <variant
+ alternative>. Each <variant alternative> is
+ represented as a struct, with a member for each
+ <variant field>. */
struct value *v;
int new_offset = offset;
/* This is pretty gross. In G++, the offset in an
anonymous union is relative to the beginning of the
- enclosing struct. In the GNU Chill (OBSOLETE)
- implementation of variant records, the bitpos is
- zero in an anonymous union field, so we have to add
- the offset of the union here. */
+ enclosing struct. In the GNU Chill (now deleted
+ from GDB) implementation of variant records, the
+ bitpos is zero in an anonymous union field, so we
+ have to add the offset of the union here. */
if (TYPE_CODE (field_type) == TYPE_CODE_STRUCT
|| (TYPE_NFIELDS (field_type) > 0
&& TYPE_FIELD_BITPOS (field_type, 0) == 0))
@@ -3688,9 +3603,6 @@ value_slice (struct value *array, int lowbound, int length)
error ("slice from bad array or bitstring");
if (lowbound < lowerbound || length < 0
|| lowbound + length - 1 > upperbound)
- /* OBSOLETE Chill allows zero-length strings but not arrays. */
- /* OBSOLETE || (current_language->la_language == language_chill */
- /* OBSOLETE && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY)) */
error ("slice out of range");
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
@@ -3746,19 +3658,6 @@ value_slice (struct value *array, int lowbound, int length)
return slice;
}
-/* Assuming OBSOLETE chill_varying_type (VARRAY) is true, return an
- equivalent value as a fixed-length array. */
-
-struct value *
-varying_to_slice (struct value *varray)
-{
- struct type *vtype = check_typedef (VALUE_TYPE (varray));
- LONGEST length = unpack_long (TYPE_FIELD_TYPE (vtype, 0),
- VALUE_CONTENTS (varray)
- + TYPE_FIELD_BITPOS (vtype, 0) / 8);
- return value_slice (value_primitive_field (varray, 0, 1, vtype), 0, length);
-}
-
/* Create a value for a FORTRAN complex number. Currently most of
the time values are coerced to COMPLEX*16 (i.e. a complex number
composed of 2 doubles. This really should be a smarter routine
@@ -3836,4 +3735,19 @@ is received while in a function called from gdb (call dummy). If set, gdb\n\
unwinds the stack and restore the context to what as it was before the call.\n\
The default is to stop in the frame where the signal was received.", &setlist),
&showlist);
+
+ add_show_from_set
+ (add_set_cmd ("coerce-float-to-double", class_obscure, var_boolean,
+ (char *) &coerce_float_to_double,
+ "Set coercion of floats to doubles when calling functions\n"
+ "Variables of type float should generally be converted to doubles before\n"
+ "calling an unprototyped function, and left alone when calling a prototyped\n"
+ "function. However, some older debug info formats do not provide enough\n"
+ "information to determine that a function is prototyped. If this flag is\n"
+ "set, GDB will perform the conversion for a function it considers\n"
+ "unprototyped.\n"
+ "The default is to perform the conversion.\n",
+ &setlist),
+ &showlist);
+ coerce_float_to_double = 1;
}
diff --git a/gdb/value.h b/gdb/value.h
index a13002b22ac..636f99cd7b5 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -1,6 +1,6 @@
/* Definitions for values of C expressions, for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -241,9 +241,9 @@ do { COERCE_REF(arg); \
#define COERCE_NUMBER(arg) \
do { COERCE_ARRAY(arg); COERCE_ENUM(arg); } while (0)
-#define COERCE_VARYING_ARRAY(arg, real_arg_type) \
-/* OBSOLETE { if (chill_varying_type (real_arg_type)) */ \
-/* OBSOLETE arg = varying_to_slice (arg), real_arg_type = VALUE_TYPE (arg); } */
+/* NOTE: cagney/2002-12-17: This macro was handling a chill language
+ problem but that language has gone away. */
+#define COERCE_VARYING_ARRAY(arg, real_arg_type)
/* If ARG is an enum, convert it to an integer. */
@@ -284,13 +284,14 @@ extern DOUBLEST value_as_double (struct value *val);
extern CORE_ADDR value_as_address (struct value *val);
-extern LONGEST unpack_long (struct type *type, char *valaddr);
+extern LONGEST unpack_long (struct type *type, const char *valaddr);
-extern DOUBLEST unpack_double (struct type *type, char *valaddr, int *invp);
+extern DOUBLEST unpack_double (struct type *type, const char *valaddr,
+ int *invp);
-extern CORE_ADDR unpack_pointer (struct type *type, char *valaddr);
+extern CORE_ADDR unpack_pointer (struct type *type, const char *valaddr);
-extern LONGEST unpack_field_as_long (struct type *type, char *valaddr,
+extern LONGEST unpack_field_as_long (struct type *type, const char *valaddr,
int fieldno);
extern struct value *value_from_longest (struct type *type, LONGEST num);
@@ -488,8 +489,8 @@ extern void release_value (struct value *val);
extern int record_latest_value (struct value *val);
-extern void
-modify_field (char *addr, LONGEST fieldval, int bitpos, int bitsize);
+extern void modify_field (char *addr, LONGEST fieldval, int bitpos,
+ int bitsize);
extern void type_print (struct type * type, const char *varstring,
struct ui_file * stream, int show);
@@ -548,10 +549,6 @@ extern struct value *value_slice (struct value *, int, int);
extern struct value *call_function_by_hand (struct value *, int,
struct value **);
-extern int default_coerce_float_to_double (struct type *, struct type *);
-
-extern int standard_coerce_float_to_double (struct type *, struct type *);
-
extern struct value *value_literal_complex (struct value *, struct value *,
struct type *);
diff --git a/gdb/values.c b/gdb/values.c
index e78ad89ba8f..f2b01ece4c7 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1,7 +1,8 @@
/* Low level packing and unpacking of values for GDB, the GNU Debugger.
+
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2002.
- Free Software Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -406,7 +407,7 @@ lookup_internalvar (char *name)
register struct internalvar *var;
for (var = internalvars; var; var = var->next)
- if (STREQ (var->name, name))
+ if (strcmp (var->name, name) == 0)
return var;
var = (struct internalvar *) xmalloc (sizeof (struct internalvar));
@@ -423,11 +424,6 @@ value_of_internalvar (struct internalvar *var)
{
struct value *val;
-#ifdef IS_TRAPPED_INTERNALVAR
- if (IS_TRAPPED_INTERNALVAR (var->name))
- return VALUE_OF_TRAPPED_INTERNALVAR (var);
-#endif
-
val = value_copy (var->value);
if (VALUE_LAZY (val))
value_fetch_lazy (val);
@@ -442,11 +438,6 @@ set_internalvar_component (struct internalvar *var, int offset, int bitpos,
{
register char *addr = VALUE_CONTENTS (var->value) + offset;
-#ifdef IS_TRAPPED_INTERNALVAR
- if (IS_TRAPPED_INTERNALVAR (var->name))
- SET_TRAPPED_INTERNALVAR (var, newval, bitpos, bitsize, offset);
-#endif
-
if (bitsize)
modify_field (addr, value_as_long (newval),
bitpos, bitsize);
@@ -459,11 +450,6 @@ set_internalvar (struct internalvar *var, struct value *val)
{
struct value *newval;
-#ifdef IS_TRAPPED_INTERNALVAR
- if (IS_TRAPPED_INTERNALVAR (var->name))
- SET_TRAPPED_INTERNALVAR (var, val, 0, 0, 0);
-#endif
-
newval = value_copy (val);
newval->modifiable = 1;
@@ -517,10 +503,6 @@ show_convenience (char *ignore, int from_tty)
for (var = internalvars; var; var = var->next)
{
-#ifdef IS_TRAPPED_INTERNALVAR
- if (IS_TRAPPED_INTERNALVAR (var->name))
- continue;
-#endif
if (!varseen)
{
varseen = 1;
@@ -680,7 +662,7 @@ value_as_address (struct value *val)
to an INT (or some size). After all, it is only an offset. */
LONGEST
-unpack_long (struct type *type, char *valaddr)
+unpack_long (struct type *type, const char *valaddr)
{
register enum type_code code = TYPE_CODE (type);
register int len = TYPE_LENGTH (type);
@@ -729,7 +711,7 @@ unpack_long (struct type *type, char *valaddr)
format, result is in host format. */
DOUBLEST
-unpack_double (struct type *type, char *valaddr, int *invp)
+unpack_double (struct type *type, const char *valaddr, int *invp)
{
enum type_code code;
int len;
@@ -786,7 +768,7 @@ unpack_double (struct type *type, char *valaddr, int *invp)
to an INT (or some size). After all, it is only an offset. */
CORE_ADDR
-unpack_pointer (struct type *type, char *valaddr)
+unpack_pointer (struct type *type, const char *valaddr)
{
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
whether we want this to be true eventually. */
@@ -1039,7 +1021,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *ty
If the field is signed, we also do sign extension. */
LONGEST
-unpack_field_as_long (struct type *type, char *valaddr, int fieldno)
+unpack_field_as_long (struct type *type, const char *valaddr, int fieldno)
{
ULONGEST val;
ULONGEST valmask;
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 359029de676..52438d54b42 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -1,5 +1,5 @@
/* Print VAX instructions for GDB, the GNU debugger.
- Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000, 2002
+ Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -29,6 +29,7 @@
#include "value.h"
#include "arch-utils.h"
#include "gdb_string.h"
+#include "osabi.h"
#include "vax-tdep.h"
@@ -129,32 +130,32 @@ vax_frame_init_saved_regs (struct frame_info *frame)
int regnum, regmask;
CORE_ADDR next_addr;
- if (frame->saved_regs)
+ if (get_frame_saved_regs (frame))
return;
frame_saved_regs_zalloc (frame);
- regmask = read_memory_integer (frame->frame + 4, 4) >> 16;
+ regmask = read_memory_integer (get_frame_base (frame) + 4, 4) >> 16;
- next_addr = frame->frame + 16;
+ next_addr = get_frame_base (frame) + 16;
/* regmask's low bit is for register 0, which is the first one
what would be pushed. */
for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
{
if (regmask & (1 << regnum))
- frame->saved_regs[regnum] = next_addr += 4;
+ get_frame_saved_regs (frame)[regnum] = next_addr += 4;
}
- frame->saved_regs[SP_REGNUM] = next_addr + 4;
+ get_frame_saved_regs (frame)[SP_REGNUM] = next_addr + 4;
if (regmask & (1 << FP_REGNUM))
- frame->saved_regs[SP_REGNUM] +=
+ get_frame_saved_regs (frame)[SP_REGNUM] +=
4 + (4 * read_memory_integer (next_addr + 4, 4));
- frame->saved_regs[PC_REGNUM] = frame->frame + 16;
- frame->saved_regs[FP_REGNUM] = frame->frame + 12;
- frame->saved_regs[VAX_AP_REGNUM] = frame->frame + 8;
- frame->saved_regs[PS_REGNUM] = frame->frame + 4;
+ get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 16;
+ get_frame_saved_regs (frame)[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;
}
/* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp. */
@@ -169,9 +170,10 @@ vax_sigtramp_saved_pc (struct frame_info *frame)
buf = alloca (ptrbytes);
/* Get sigcontext address, it is the third parameter on the stack. */
- if (frame->next)
+ if (get_next_frame (frame))
sigcontext_addr = read_memory_typed_address
- (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
+ (FRAME_ARGS_ADDRESS (get_next_frame (frame))
+ + FRAME_ARGS_SKIP + sigcontext_offs,
builtin_type_void_data_ptr);
else
sigcontext_addr = read_memory_typed_address
@@ -189,7 +191,7 @@ vax_frame_saved_pc (struct frame_info *frame)
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
return (vax_sigtramp_saved_pc (frame)); /* XXXJRT */
- return (read_memory_integer (frame->frame + 16, 4));
+ return (read_memory_integer (get_frame_base (frame) + 16, 4));
}
CORE_ADDR
@@ -204,8 +206,8 @@ vax_frame_args_address_correct (struct frame_info *frame)
(which is one reason that "info frame" exists). So, return 0 (indicating
we don't know the address of the arglist) if we don't know what frame
this frame calls. */
- if (frame->next)
- return (read_memory_integer (frame->next->frame + 8, 4));
+ if (get_next_frame (frame))
+ return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
return (0);
}
@@ -216,8 +218,8 @@ vax_frame_args_address (struct frame_info *frame)
/* In most of GDB, getting the args address is too important to
just say "I don't know". This is sometimes wrong for functions
that aren't on top of the stack, but c'est la vie. */
- if (frame->next)
- return (read_memory_integer (frame->next->frame + 8, 4));
+ if (get_next_frame (frame))
+ return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
return (read_register (VAX_AP_REGNUM));
}
@@ -225,7 +227,7 @@ vax_frame_args_address (struct frame_info *frame)
static CORE_ADDR
vax_frame_locals_address (struct frame_info *frame)
{
- return (frame->frame);
+ return (get_frame_base (frame));
}
static int
@@ -239,10 +241,10 @@ vax_frame_chain (struct frame_info *frame)
{
/* In the case of the VAX, the frame's nominal address is the FP value,
and 12 bytes later comes the saved previous FP value as a 4-byte word. */
- if (inside_entry_file (frame->pc))
+ if (inside_entry_file (get_frame_pc (frame)))
return (0);
- return (read_memory_integer (frame->frame + 12, 4));
+ return (read_memory_integer (get_frame_base (frame) + 12, 4));
}
static void
@@ -609,35 +611,19 @@ print_insn_arg (char *d, register char *p, CORE_ADDR addr,
static struct gdbarch *
vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
- /* Try to determine the ABI of the object we are loading. */
+ /* If there is already a candidate, use it. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return arches->gdbarch;
- if (info.abfd != NULL)
- osabi = gdbarch_lookup_osabi (info.abfd);
-
- /* Find a candidate among extant architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- return arches->gdbarch;
- }
-
- tdep = xmalloc (sizeof (struct gdbarch_tdep));
- gdbarch = gdbarch_alloc (&info, tdep);
+ 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);
- tdep->osabi = osabi;
-
/* Register info */
set_gdbarch_num_regs (gdbarch, VAX_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, VAX_SP_REGNUM);
@@ -665,7 +651,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
generic_frameless_function_invocation_not);
set_gdbarch_frame_chain (gdbarch, vax_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, vax_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
@@ -707,27 +692,15 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return (gdbarch);
}
-static void
-vax_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep == NULL)
- return;
-
- fprintf_unfiltered (file, "vax_dump_tdep: OS ABI = %s\n",
- gdbarch_osabi_name (tdep->osabi));
-}
-
void
_initialize_vax_tdep (void)
{
- gdbarch_register (bfd_arch_vax, vax_gdbarch_init, vax_dump_tdep);
+ gdbarch_register (bfd_arch_vax, vax_gdbarch_init, NULL);
tm_print_insn = vax_print_insn;
}
diff --git a/gdb/vax-tdep.h b/gdb/vax-tdep.h
index ccabdd53557..7529e57d95e 100644
--- a/gdb/vax-tdep.h
+++ b/gdb/vax-tdep.h
@@ -1,5 +1,5 @@
/* Common target dependent code for GDB on VAX systems.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,8 +21,6 @@
#ifndef VAX_TDEP_H
#define VAX_TDEP_H
-#include "osabi.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. */
@@ -54,10 +52,4 @@
#define VAX_PC_REGNUM 15 /* Contains program counter */
#define VAX_PS_REGNUM 16 /* Contains processor status */
-/* Target-dependent structure in gdbarch. */
-struct gdbarch_tdep
-{
- enum gdb_osabi osabi; /* OS/ABI of inferior. */
-};
-
#endif /* VAX_TDEP_H */
diff --git a/gdb/version.in b/gdb/version.in
index 654208a8041..141d9dd11fa 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-12-23-cvs
+2003-02-07-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index f3fb0a7a970..350a9957319 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1,6 +1,6 @@
/* Target-vector operations for controlling win32 child processes, for GDB.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
Software Foundation, Inc.
Contributed by Cygnus Solutions, A Red Hat Company.
@@ -124,7 +124,6 @@ static DEBUG_EVENT current_event; /* The current debug event from
static HANDLE current_process_handle; /* Currently executing process */
static thread_info *current_thread; /* Info on currently selected thread */
static DWORD main_thread_id; /* Thread ID of the main thread */
-static pid_t cygwin_pid; /* pid of cygwin process */
/* Counts of things. */
static int exception_count = 0;
@@ -383,7 +382,7 @@ static void
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- deprecated_read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
+ regcache_collect (r, ((char *) &current_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
@@ -751,11 +750,66 @@ child_clear_solibs (void)
max_dll_name_len = sizeof ("DLL Name") - 1;
}
+/* Get the loaded address of all sections, given that .text was loaded
+ at text_load. Assumes that all sections are subject to the same
+ relocation offset. Returns NULL if problems occur or if the
+ sections were not relocated. */
+
+static struct section_addr_info *
+get_relocated_section_addrs (bfd *abfd, CORE_ADDR text_load)
+{
+ struct section_addr_info *result = NULL;
+ int section_count = bfd_count_sections (abfd);
+ asection *text_section = bfd_get_section_by_name (abfd, ".text");
+ CORE_ADDR text_vma;
+
+ if (!text_section)
+ {
+ /* Couldn't get the .text section. Weird. */
+ }
+
+ else if (text_load == (text_vma = bfd_get_section_vma (abfd, text_section)))
+ {
+ /* DLL wasn't relocated. */
+ }
+
+ else
+ {
+ /* Figure out all sections' loaded addresses. The offset here is
+ such that taking a bfd_get_section_vma() result and adding
+ offset will give the real load address of the section. */
+
+ CORE_ADDR offset = text_load - text_vma;
+
+ struct section_table *table_start = NULL;
+ struct section_table *table_end = NULL;
+ struct section_table *iter = NULL;
+
+ build_section_table (abfd, &table_start, &table_end);
+
+ for (iter = table_start; iter < table_end; ++iter)
+ {
+ /* Relocated addresses. */
+ iter->addr += offset;
+ iter->endaddr += offset;
+ }
+
+ result = build_section_addr_info_from_section_table (table_start,
+ table_end);
+
+ xfree (table_start);
+ }
+
+ return result;
+}
+
/* Add DLL symbol information. */
static struct objfile *
solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
{
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs_ptr = NULL;
+ static struct objfile *result = NULL;
+ bfd *abfd = NULL;
/* The symbols in a dll are offset by 0x1000, which is the
the offset from 0 of the first byte in an image - because
@@ -764,10 +818,46 @@ solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
if (!name || !name[0])
return NULL;
- memset (&section_addrs, 0, sizeof (section_addrs));
- section_addrs.other[0].name = ".text";
- section_addrs.other[0].addr = load_addr;
- return safe_symbol_file_add (name, from_tty, &section_addrs, 0, OBJF_SHARED);
+ abfd = bfd_openr (name, "pei-i386");
+
+ if (!abfd)
+ {
+ /* pei failed - try pe */
+ abfd = bfd_openr (name, "pe-i386");
+ }
+
+ if (abfd)
+ {
+ if (bfd_check_format (abfd, bfd_object))
+ {
+ section_addrs_ptr = get_relocated_section_addrs (abfd, load_addr);
+ }
+
+ bfd_close (abfd);
+ }
+
+ if (section_addrs_ptr)
+ {
+ result = safe_symbol_file_add (name, from_tty, section_addrs_ptr,
+ 0, OBJF_SHARED);
+
+ free_section_addr_info (section_addrs_ptr);
+ }
+
+ else
+ {
+ /* Fallback on handling just the .text section. */
+ struct section_addr_info section_addrs;
+
+ memset (&section_addrs, 0, sizeof (section_addrs));
+ section_addrs.other[0].name = ".text";
+ section_addrs.other[0].addr = load_addr;
+
+ result = safe_symbol_file_add (name, from_tty, &section_addrs,
+ 0, OBJF_SHARED);
+ }
+
+ return result;
}
/* Load DLL symbol info. */
@@ -850,10 +940,10 @@ display_selector (HANDLE thread, DWORD sel)
int base, limit;
printf_filtered ("0x%03lx: ", sel);
if (!info.HighWord.Bits.Pres)
- {
- puts_filtered ("Segment not present\n");
- return 0;
- }
+ {
+ puts_filtered ("Segment not present\n");
+ return 0;
+ }
base = (info.HighWord.Bits.BaseHi << 24) +
(info.HighWord.Bits.BaseMid << 16)
+ info.BaseLow;
@@ -862,46 +952,46 @@ display_selector (HANDLE thread, DWORD sel)
limit = (limit << 12) | 0xfff;
printf_filtered ("base=0x%08x limit=0x%08x", base, limit);
if (info.HighWord.Bits.Default_Big)
- puts_filtered(" 32-bit ");
+ puts_filtered(" 32-bit ");
else
- puts_filtered(" 16-bit ");
+ puts_filtered(" 16-bit ");
switch ((info.HighWord.Bits.Type & 0xf) >> 1)
{
case 0:
- puts_filtered ("Data (Read-Only, Exp-up");
- break;
+ puts_filtered ("Data (Read-Only, Exp-up");
+ break;
case 1:
- puts_filtered ("Data (Read/Write, Exp-up");
- break;
+ puts_filtered ("Data (Read/Write, Exp-up");
+ break;
case 2:
- puts_filtered ("Unused segment (");
- break;
+ puts_filtered ("Unused segment (");
+ break;
case 3:
- puts_filtered ("Data (Read/Write, Exp-down");
- break;
+ puts_filtered ("Data (Read/Write, Exp-down");
+ break;
case 4:
- puts_filtered ("Code (Exec-Only, N.Conf");
- break;
+ puts_filtered ("Code (Exec-Only, N.Conf");
+ break;
case 5:
- puts_filtered ("Code (Exec/Read, N.Conf");
+ puts_filtered ("Code (Exec/Read, N.Conf");
break;
case 6:
- puts_filtered ("Code (Exec-Only, Conf");
+ puts_filtered ("Code (Exec-Only, Conf");
break;
case 7:
- puts_filtered ("Code (Exec/Read, Conf");
+ puts_filtered ("Code (Exec/Read, Conf");
break;
default:
printf_filtered ("Unknown type 0x%x",info.HighWord.Bits.Type);
}
if ((info.HighWord.Bits.Type & 0x1) == 0)
- puts_filtered(", N.Acc");
+ puts_filtered(", N.Acc");
puts_filtered (")\n");
if ((info.HighWord.Bits.Type & 0x10) == 0)
puts_filtered("System selector ");
printf_filtered ("Priviledge level = %d. ", info.HighWord.Bits.Dpl);
if (info.HighWord.Bits.Granularity)
- puts_filtered ("Page granular.\n");
+ puts_filtered ("Page granular.\n");
else
puts_filtered ("Byte granular.\n");
return 1;
@@ -926,22 +1016,22 @@ display_selectors (char * args, int from_tty)
puts_filtered ("Selector $cs\n");
display_selector (current_thread->h,
- current_thread->context.SegCs);
+ current_thread->context.SegCs);
puts_filtered ("Selector $ds\n");
display_selector (current_thread->h,
- current_thread->context.SegDs);
+ current_thread->context.SegDs);
puts_filtered ("Selector $es\n");
display_selector (current_thread->h,
- current_thread->context.SegEs);
+ current_thread->context.SegEs);
puts_filtered ("Selector $ss\n");
display_selector (current_thread->h,
- current_thread->context.SegSs);
+ current_thread->context.SegSs);
puts_filtered ("Selector $fs\n");
display_selector (current_thread->h,
current_thread->context.SegFs);
puts_filtered ("Selector $gs\n");
display_selector (current_thread->h,
- current_thread->context.SegGs);
+ current_thread->context.SegGs);
}
else
{
@@ -1374,6 +1464,83 @@ has_detach_ability (void)
return 0;
}
+/* Try to set or remove a user privilege to the current process. Return -1
+ if that fails, the previous setting of that privilege otherwise.
+
+ This code is copied from the Cygwin source code and rearranged to allow
+ dynamically loading of the needed symbols from advapi32 which is only
+ available on NT/2K/XP. */
+static int
+set_process_privilege (const char *privilege, BOOL enable)
+{
+ static HMODULE advapi32 = NULL;
+ static BOOL WINAPI (*OpenProcessToken)(HANDLE, DWORD, PHANDLE);
+ static BOOL WINAPI (*LookupPrivilegeValue)(LPCSTR, LPCSTR, PLUID);
+ static BOOL WINAPI (*AdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES,
+ DWORD, PTOKEN_PRIVILEGES, PDWORD);
+
+ HANDLE token_hdl = NULL;
+ LUID restore_priv;
+ TOKEN_PRIVILEGES new_priv, orig_priv;
+ int ret = -1;
+ DWORD size;
+
+ if (GetVersion () >= 0x80000000) /* No security availbale on 9x/Me */
+ return 0;
+
+ if (!advapi32)
+ {
+ if (!(advapi32 = LoadLibrary ("advapi32.dll")))
+ goto out;
+ if (!OpenProcessToken)
+ OpenProcessToken = GetProcAddress (advapi32, "OpenProcessToken");
+ if (!LookupPrivilegeValue)
+ LookupPrivilegeValue = GetProcAddress (advapi32,
+ "LookupPrivilegeValueA");
+ if (!AdjustTokenPrivileges)
+ AdjustTokenPrivileges = GetProcAddress (advapi32,
+ "AdjustTokenPrivileges");
+ if (!OpenProcessToken || !LookupPrivilegeValue || !AdjustTokenPrivileges)
+ {
+ advapi32 = NULL;
+ goto out;
+ }
+ }
+
+ if (!OpenProcessToken (GetCurrentProcess (),
+ TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES,
+ &token_hdl))
+ goto out;
+
+ if (!LookupPrivilegeValue (NULL, privilege, &restore_priv))
+ goto out;
+
+ new_priv.PrivilegeCount = 1;
+ new_priv.Privileges[0].Luid = restore_priv;
+ new_priv.Privileges[0].Attributes = enable ? SE_PRIVILEGE_ENABLED : 0;
+
+ if (!AdjustTokenPrivileges (token_hdl, FALSE, &new_priv,
+ sizeof orig_priv, &orig_priv, &size))
+ goto out;
+#if 0
+ /* Disabled, otherwise every `attach' in an unprivileged user session
+ would raise the "Failed to get SE_DEBUG_NAME privilege" warning in
+ child_attach(). */
+ /* AdjustTokenPrivileges returns TRUE even if the privilege could not
+ be enabled. GetLastError () returns an correct error code, though. */
+ if (enable && GetLastError () == ERROR_NOT_ALL_ASSIGNED)
+ goto out;
+#endif
+
+ ret = orig_priv.Privileges[0].Attributes == SE_PRIVILEGE_ENABLED ? 1 : 0;
+
+out:
+ if (token_hdl)
+ CloseHandle (token_hdl);
+
+ return ret;
+}
+
/* Attach to process PID, then initialize for debugging it. */
static void
child_attach (char *args, int from_tty)
@@ -1384,12 +1551,28 @@ child_attach (char *args, int from_tty)
if (!args)
error_no_arg ("process-id to attach");
- pid = strtoul (args, 0, 0);
+ if (set_process_privilege (SE_DEBUG_NAME, TRUE) < 0)
+ {
+ printf_unfiltered ("Warning: Failed to get SE_DEBUG_NAME privilege\n");
+ printf_unfiltered ("This can cause attach to fail on Windows NT/2K/XP\n");
+ }
+
+ pid = strtoul (args, 0, 0); /* Windows pid */
+
ok = DebugActiveProcess (pid);
saw_create = 0;
if (!ok)
+ {
+ /* Try fall back to Cygwin pid */
+ pid = cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid);
+
+ if (pid > 0)
+ ok = DebugActiveProcess (pid);
+
+ if (!ok)
error ("Can't attach to process.");
+ }
if (has_detach_ability ())
{
@@ -1923,11 +2106,11 @@ _initialize_win32_nat (void)
add_info_alias ("sharedlibrary", "dll", 1);
add_prefix_cmd ("w32", class_info, info_w32_command,
- "Print information specific to Win32 debugging.",
- &info_w32_cmdlist, "info w32 ", 0, &infolist);
+ "Print information specific to Win32 debugging.",
+ &info_w32_cmdlist, "info w32 ", 0, &infolist);
add_cmd ("selector", class_info, display_selectors,
- "Display selectors infos.",
+ "Display selectors infos.",
&info_w32_cmdlist);
add_target (&child_ops);
diff --git a/gdb/wrapper.h b/gdb/wrapper.h
index 977a77d04cd..b287b29db1e 100644
--- a/gdb/wrapper.h
+++ b/gdb/wrapper.h
@@ -21,6 +21,8 @@
#include "gdb.h"
struct value;
+struct expression;
+struct block;
/* Use this struct to pass arguments to wrapper routines. */
struct gdb_wrapper_arguments;
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 69495b8e73d..867617698a9 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -1,6 +1,6 @@
/* Native-dependent code for GNU/Linux x86-64.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
@@ -456,17 +456,6 @@ static struct core_fns linux_elf_core_fns = {
#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
#endif
-/* SSE register? */
-/* FIXME: cagney/2002-11-15: Once the i386 and x86-64 are integrated,
- this will go. */
-
-int
-i386_sse_regnum_p (int regnum)
-{
- return (regnum < NUM_REGS
- && (XMM0_REGNUM <= (regnum) && (regnum) < MXCSR_REGNUM));
-}
-
/* Return the address of register REGNUM. BLOCKEND is the value of
u.u_ar0, which should point to the registers. */
CORE_ADDR
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index e43bdbe2630..932e6d6f01b 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for GNU/Linux running on x86-64, for GDB.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2003 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
@@ -28,6 +28,7 @@
#include "regcache.h"
#include "x86-64-tdep.h"
#include "dwarf2cfi.h"
+#include "osabi.h"
#define LINUX_SIGTRAMP_INSN0 (0x48) /* mov $NNNNNNNN,%rax */
#define LINUX_SIGTRAMP_OFFSET0 (0)
@@ -87,14 +88,14 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
CORE_ADDR pc;
ULONGEST rsp;
- pc = x86_64_linux_sigtramp_start (frame->pc);
+ pc = x86_64_linux_sigtramp_start (get_frame_pc (frame));
if (pc)
{
- if (frame->next)
+ if (get_next_frame (frame))
/* If this isn't the top frame, the next frame must be for the
signal handler itself. The sigcontext structure is part of
the user context. */
- return frame->next->frame + LINUX_SIGINFO_SIZE +
+ return get_frame_base (get_next_frame (frame)) + LINUX_SIGINFO_SIZE +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
@@ -146,7 +147,7 @@ int
x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
{
if (name)
- return STREQ ("__restore_rt", name);
+ return strcmp ("__restore_rt", name) == 0;
return (x86_64_linux_sigtramp_start (pc) != 0);
}
@@ -163,10 +164,10 @@ x86_64_linux_frame_chain (struct frame_info *fi)
if (fp)
return fp;
else
- addr = fi->frame;
+ addr = get_frame_base (fi);
}
else
- addr = fi->next->frame;
+ addr = get_frame_base (get_next_frame (fi));
addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
@@ -180,7 +181,8 @@ x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
{
CORE_ADDR addr;
- if (get_next_frame (fi) && (get_frame_type (fi->next) == SIGTRAMP_FRAME))
+ if (get_next_frame (fi)
+ && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
{
addr = get_frame_base (get_next_frame (get_next_frame (fi)))
+ LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 4b3f45b0c19..4ec9279ab18 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the x86-64 for GDB, the GNU debugger.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -968,10 +968,6 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
set_gdbarch_register_virtual_type (gdbarch, x86_64_register_virtual_type);
- /* FIXME: kettenis/20021026: As long as we don't support longjmp,
- that is, as long as we have `tdep->jb_pc_offset == -1', using
- i386_get_longjmp_target is fine. */
-
set_gdbarch_register_convertible (gdbarch, x86_64_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
x86_64_register_convert_to_virtual);
@@ -985,7 +981,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_read_fp (gdbarch, cfi_read_fp);
/* FIXME: kettenis/20021026: Should be undeprecated. */
- set_gdbarch_extract_return_value (gdbarch, NULL);
+ set_gdbarch_extract_return_value (gdbarch, legacy_extract_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch,
x86_64_extract_return_value);
set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
@@ -993,7 +989,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_pop_frame (gdbarch, x86_64_pop_frame);
set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
/* FIXME: kettenis/20021026: Should be undeprecated. */
- set_gdbarch_store_return_value (gdbarch, NULL);
+ set_gdbarch_store_return_value (gdbarch, legacy_store_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch,
x86_64_store_return_value);
/* Override, since this is handled by x86_64_extract_return_value. */
@@ -1006,9 +1002,6 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
x86_64_frameless_function_invocation);
- /* FIXME: kettenis/20021025: Shouldn't this be set to
- generic_file_frame_chain_valid? */
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
/* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
should be moved elsewhere. */
set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index e93f93b75d3..5a2fc55c68e 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1,6 +1,6 @@
/* Read AIX xcoff symbol tables and convert to internal format, for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Derived from coffread.c, dbxread.c, and a lot of hacking.
Contributed by IBM Corporation.
@@ -190,10 +190,10 @@ static void xcoff_new_init (struct objfile *);
static void xcoff_symfile_finish (struct objfile *);
-static void
-xcoff_symfile_offsets (struct objfile *, struct section_addr_info *addrs);
+static void xcoff_symfile_offsets (struct objfile *,
+ struct section_addr_info *addrs);
-static void find_linenos (bfd *, sec_ptr, PTR);
+static void find_linenos (bfd *, sec_ptr, void *);
static char *coff_getfilename (union internal_auxent *, struct objfile *);
@@ -237,7 +237,7 @@ struct find_targ_sec_arg
static void find_targ_sec (bfd *, asection *, void *);
static void
-find_targ_sec (bfd *abfd, asection *sect, PTR obj)
+find_targ_sec (bfd *abfd, asection *sect, void *obj)
{
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
struct objfile *objfile = args->objfile;
@@ -1699,7 +1699,7 @@ gotit:
* mainline code can read the whole thing for efficiency.
*/
static void
-find_linenos (bfd *abfd, sec_ptr asect, PTR vpinfo)
+find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
@@ -2553,7 +2553,7 @@ scan_xcoff_symtab (struct objfile *objfile)
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
@@ -2635,20 +2635,22 @@ scan_xcoff_symtab (struct objfile *objfile)
psymtab_language, objfile);
p += 1;
}
- /* The semantics of C++ state that "struct foo { ... }"
- also defines a typedef for "foo". Unfortuantely, cfront
- never makes the typedef when translating from C++ to C.
- We make the typedef here so that "ptype foo" works as
- expected for cfront translated code. */
- else if (psymtab_language == language_cplus)
- {
- /* Also a typedef with the same name. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- symbol.n_value, 0,
- psymtab_language, objfile);
- }
+#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_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE &objfile->static_psymbols,
+// OBSOLETE symbol.n_value, 0,
+// OBSOLETE psymtab_language, objfile);
+// OBSOLETE }
+#endif /* OBSOLETE CFront */
}
goto check_enum;
@@ -2797,9 +2799,11 @@ scan_xcoff_symtab (struct objfile *objfile)
case '9':
case '-':
case '#': /* for symbol identification (used in live ranges) */
- /* added to support cfront stabs strings */
- case 'Z': /* for definition continuations */
- case 'P': /* for prototypes */
+#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/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index fb7ff3ce013..3ecfd3c6cd2 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -333,7 +333,8 @@ xstormy16_pop_frame (void)
if (fi == NULL)
return; /* paranoia */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
{
generic_pop_dummy_frame ();
}
@@ -341,15 +342,15 @@ xstormy16_pop_frame (void)
{
/* Restore the saved regs. */
for (i = 0; i < NUM_REGS; i++)
- if (fi->saved_regs[i])
+ if (get_frame_saved_regs (fi)[i])
{
if (i == SP_REGNUM)
- write_register (i, fi->saved_regs[i]);
+ write_register (i, get_frame_saved_regs (fi)[i]);
else if (i == E_PC_REGNUM)
- write_register (i, read_memory_integer (fi->saved_regs[i],
+ write_register (i, read_memory_integer (get_frame_saved_regs (fi)[i],
xstormy16_pc_size));
else
- write_register (i, read_memory_integer (fi->saved_regs[i],
+ write_register (i, read_memory_integer (get_frame_saved_regs (fi)[i],
xstormy16_reg_size));
}
/* Restore the PC */
@@ -466,7 +467,8 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
if (fi)
{
/* In a call dummy, don't touch the frame. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
return start_addr;
/* Grab the frame-relative values of SP and FP, needed below.
@@ -476,7 +478,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
fp = xstormy16_frame_saved_register (fi, E_FP_REGNUM);
/* Initialize framesize with size of PC put on stack by CALLF inst. */
- fi->extra_info->framesize = xstormy16_pc_size;
+ get_frame_extra_info (fi)->framesize = xstormy16_pc_size;
}
for (next_addr = start_addr;
next_addr < end_addr; next_addr += xstormy16_inst_size)
@@ -490,8 +492,8 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
if (fi)
{
regnum = inst & 0x000f;
- fi->saved_regs[regnum] = fi->extra_info->framesize;
- fi->extra_info->framesize += xstormy16_reg_size;
+ get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize;
+ get_frame_extra_info (fi)->framesize += xstormy16_reg_size;
}
}
@@ -499,28 +501,28 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
else if (inst == 0x301f || inst == 0x303f) /* inc r15, #0x1/#0x3 */
{
if (fi) /* Record the frame size. */
- fi->extra_info->framesize += ((inst & 0x0030) >> 4) + 1;
+ get_frame_extra_info (fi)->framesize += ((inst & 0x0030) >> 4) + 1;
}
/* optional stack allocation for args and local vars > 4 && < 16 byte */
else if ((inst & 0xff0f) == 0x510f) /* 51Hf add r15, #0xH */
{
if (fi) /* Record the frame size. */
- fi->extra_info->framesize += (inst & 0x00f0) >> 4;
+ get_frame_extra_info (fi)->framesize += (inst & 0x00f0) >> 4;
}
/* optional stack allocation for args and local vars >= 16 byte */
else if (inst == 0x314f && inst2 >= 0x0010) /* 314f HHHH add r15, #0xH */
{
if (fi) /* Record the frame size. */
- fi->extra_info->framesize += inst2;
+ get_frame_extra_info (fi)->framesize += inst2;
next_addr += xstormy16_inst_size;
}
else if (inst == 0x46fd) /* mov r13, r15 */
{
if (fi) /* Record that the frame pointer is in use. */
- fi->extra_info->frameless_p = 0;
+ get_frame_extra_info (fi)->frameless_p = 0;
if (frameless)
*frameless = 0;
}
@@ -546,7 +548,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
if (offset & 0x0800)
offset -= 0x1000;
- fi->saved_regs[regnum] = fi->extra_info->framesize + offset;
+ get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize + offset;
}
next_addr += xstormy16_inst_size;
}
@@ -591,15 +593,15 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
by convention what we put here is simply the previous
_value_ of the SP (as opposed to an address where the
previous value would have been pushed). */
- if (fi->extra_info->frameless_p)
+ if (get_frame_extra_info (fi)->frameless_p)
{
- fi->saved_regs[E_SP_REGNUM] = sp - fi->extra_info->framesize;
- fi->frame = sp;
+ get_frame_saved_regs (fi)[E_SP_REGNUM] = sp - get_frame_extra_info (fi)->framesize;
+ deprecated_update_frame_base_hack (fi, sp);
}
else
{
- fi->saved_regs[E_SP_REGNUM] = fp - fi->extra_info->framesize;
- fi->frame = fp;
+ get_frame_saved_regs (fi)[E_SP_REGNUM] = fp - get_frame_extra_info (fi)->framesize;
+ deprecated_update_frame_base_hack (fi, fp);
}
/* So far only offsets to the beginning of the frame are
@@ -607,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 (fi->saved_regs[regnum])
- fi->saved_regs[regnum] += fi->saved_regs[E_SP_REGNUM];
+ if (get_frame_saved_regs (fi)[regnum])
+ get_frame_saved_regs (fi)[regnum] += get_frame_saved_regs (fi)[E_SP_REGNUM];
/* Save address of PC on stack. */
- fi->saved_regs[E_PC_REGNUM] = fi->saved_regs[E_SP_REGNUM];
+ get_frame_saved_regs (fi)[E_PC_REGNUM] = get_frame_saved_regs (fi)[E_SP_REGNUM];
}
return next_addr;
@@ -732,14 +734,14 @@ xstormy16_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR func_addr, func_end;
- if (!fi->saved_regs)
+ if (!get_frame_saved_regs (fi))
{
frame_saved_regs_zalloc (fi);
/* Find the beginning of this function, so we can analyze its
prologue. */
- if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end))
- xstormy16_scan_prologue (func_addr, fi->pc, fi, NULL);
+ if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
+ xstormy16_scan_prologue (func_addr, get_frame_pc (fi), fi, NULL);
/* Else we're out of luck (can't debug completely stripped code).
FIXME. */
}
@@ -756,14 +758,16 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
{
CORE_ADDR saved_pc;
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
{
- saved_pc = deprecated_read_register_dummy (fi->pc, fi->frame,
+ saved_pc = deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi),
E_PC_REGNUM);
}
else
{
- saved_pc = read_memory_unsigned_integer (fi->saved_regs[E_PC_REGNUM],
+ saved_pc = read_memory_unsigned_integer (get_frame_saved_regs (fi)[E_PC_REGNUM],
xstormy16_pc_size);
}
@@ -779,29 +783,28 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
static void
xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
- if (!fi->extra_info)
+ if (!get_frame_extra_info (fi))
{
- fi->extra_info = (struct frame_extra_info *)
- frame_obstack_alloc (sizeof (struct frame_extra_info));
- fi->extra_info->framesize = 0;
- fi->extra_info->frameless_p = 1; /* Default frameless, detect framed */
+ frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+ get_frame_extra_info (fi)->framesize = 0;
+ get_frame_extra_info (fi)->frameless_p = 1; /* Default frameless, detect framed */
/* By default, the fi->frame is set to the value of the FP reg by gdb.
This may not always be right; we may be in a frameless function,
or we may be in the prologue, before the FP has been set up.
Unfortunately, we can't make this determination without first
calling scan_prologue, and we can't do that unles we know the
- fi->pc. */
+ get_frame_pc (fi). */
- if (!fi->pc)
+ if (!get_frame_pc (fi))
{
/* Sometimes we are called from get_prev_frame without
the PC being set up first. Long history, don't ask.
Fortunately this will never happen from the outermost
frame, so we should be able to get the saved pc from
the next frame. */
- if (fi->next)
- fi->pc = xstormy16_frame_saved_pc (fi->next);
+ if (get_next_frame (fi))
+ deprecated_update_frame_pc_hack (fi, xstormy16_frame_saved_pc (get_next_frame (fi)));
}
/* Take care of the saved_regs right here (non-lazy). */
@@ -817,15 +820,16 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
static CORE_ADDR
xstormy16_frame_chain (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
{
/* Call dummy's frame is the same as caller's. */
- return fi->frame;
+ return get_frame_base (fi);
}
else
{
/* Return computed offset from this frame's fp. */
- return fi->frame - fi->extra_info->framesize;
+ return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
}
}
@@ -833,8 +837,8 @@ static int
xstormy16_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
{
return chain < 0x8000 && FRAME_SAVED_PC (thisframe) >= 0x8000 &&
- (thisframe->extra_info->frameless_p ||
- thisframe->frame - thisframe->extra_info->framesize == chain);
+ (get_frame_extra_info (thisframe)->frameless_p ||
+ get_frame_base (thisframe) - get_frame_extra_info (thisframe)->framesize == chain);
}
/* Function: xstormy16_saved_pc_after_call
@@ -958,7 +962,7 @@ xstormy16_in_solib_call_trampoline (CORE_ADDR pc, char *name)
}
static CORE_ADDR
-xstormy16_pointer_to_address (struct type *type, void *buf)
+xstormy16_pointer_to_address (struct type *type, const void *buf)
{
enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
@@ -1078,10 +1082,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* OK to default this value to 'unknown'. */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- /* W/o prototype, coerce float args to double. */
- set_gdbarch_coerce_float_to_double (gdbarch,
- standard_coerce_float_to_double);
-
/*
* Call Dummies
*
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index e1aa8fa8d13..d6d42e3f9ca 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -1,535 +1,535 @@
-/* Target-machine dependent code for Zilog Z8000, for GDB.
-
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 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. */
-
-/*
- Contributed by Steve Chamberlain
- sac@cygnus.com
- */
-
-#include "defs.h"
-#include "frame.h"
-#include "symtab.h"
-#include "gdbcmd.h"
-#include "gdbtypes.h"
-#include "dis-asm.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#include "value.h" /* For read_register() */
-
-
-static int read_memory_pointer (CORE_ADDR x);
-
-/* Return the saved PC from this frame.
-
- If the frame has a memory copy of SRP_REGNUM, use that. If not,
- just use the register SRP_REGNUM itself. */
-
-CORE_ADDR
-z8k_frame_saved_pc (struct frame_info *frame)
-{
- return read_memory_pointer (frame->frame + (BIG ? 4 : 2));
-}
-
-#define IS_PUSHL(x) (BIG ? ((x & 0xfff0) == 0x91e0):((x & 0xfff0) == 0x91F0))
-#define IS_PUSHW(x) (BIG ? ((x & 0xfff0) == 0x93e0):((x & 0xfff0)==0x93f0))
-#define IS_MOVE_FP(x) (BIG ? x == 0xa1ea : x == 0xa1fa)
-#define IS_MOV_SP_FP(x) (BIG ? x == 0x94ea : x == 0x0d76)
-#define IS_SUB2_SP(x) (x==0x1b87)
-#define IS_MOVK_R5(x) (x==0x7905)
-#define IS_SUB_SP(x) ((x & 0xffff) == 0x020f)
-#define IS_PUSH_FP(x) (BIG ? (x == 0x93ea) : (x == 0x93fa))
-
-/* work out how much local space is on the stack and
- return the pc pointing to the first push */
-
-static CORE_ADDR
-skip_adjust (CORE_ADDR pc, int *size)
-{
- *size = 0;
-
- if (IS_PUSH_FP (read_memory_short (pc))
- && IS_MOV_SP_FP (read_memory_short (pc + 2)))
- {
- /* This is a function with an explict frame pointer */
- pc += 4;
- *size += 2; /* remember the frame pointer */
- }
-
- /* remember any stack adjustment */
- if (IS_SUB_SP (read_memory_short (pc)))
- {
- *size += read_memory_short (pc + 2);
- pc += 4;
- }
- return pc;
-}
-
-static CORE_ADDR examine_frame (CORE_ADDR, CORE_ADDR * regs, CORE_ADDR);
-static CORE_ADDR
-examine_frame (CORE_ADDR pc, CORE_ADDR *regs, CORE_ADDR sp)
-{
- int w = read_memory_short (pc);
- int offset = 0;
- int regno;
-
- for (regno = 0; regno < NUM_REGS; regno++)
- regs[regno] = 0;
-
- while (IS_PUSHW (w) || IS_PUSHL (w))
- {
- /* work out which register is being pushed to where */
- if (IS_PUSHL (w))
- {
- regs[w & 0xf] = offset;
- regs[(w & 0xf) + 1] = offset + 2;
- offset += 4;
- }
- else
- {
- regs[w & 0xf] = offset;
- offset += 2;
- }
- pc += 2;
- w = read_memory_short (pc);
- }
-
- if (IS_MOVE_FP (w))
- {
- /* We know the fp */
-
- }
- else if (IS_SUB_SP (w))
- {
- /* Subtracting a value from the sp, so were in a function
- which needs stack space for locals, but has no fp. We fake up
- the values as if we had an fp */
- regs[FP_REGNUM] = sp;
- }
- else
- {
- /* This one didn't have an fp, we'll fake it up */
- regs[SP_REGNUM] = sp;
- }
- /* stack pointer contains address of next frame */
- /* regs[fp_regnum()] = fp; */
- regs[SP_REGNUM] = sp;
- return pc;
-}
-
-CORE_ADDR
-z8k_skip_prologue (CORE_ADDR start_pc)
-{
- CORE_ADDR dummy[NUM_REGS];
-
- return examine_frame (start_pc, dummy, 0);
-}
-
-CORE_ADDR
-z8k_addr_bits_remove (CORE_ADDR addr)
-{
- return (addr & PTR_MASK);
-}
-
-static int
-read_memory_pointer (CORE_ADDR x)
-{
- return read_memory_integer (ADDR_BITS_REMOVE (x), BIG ? 4 : 2);
-}
-
-CORE_ADDR
-z8k_frame_chain (struct frame_info *thisframe)
-{
- if (!inside_entry_file (thisframe->pc))
- {
- return read_memory_pointer (thisframe->frame);
- }
- return 0;
-}
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-void
-z8k_frame_init_saved_regs (struct frame_info *frame_info)
-{
- CORE_ADDR pc;
- int w;
-
- frame_saved_regs_zalloc (frame_info);
- pc = get_pc_function_start (frame_info->pc);
-
- /* wander down the instruction stream */
- examine_frame (pc, frame_info->saved_regs, frame_info->frame);
-
-}
-
-void
-z8k_push_dummy_frame (void)
-{
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
-}
-
-int
-gdb_print_insn_z8k (bfd_vma memaddr, disassemble_info *info)
-{
- if (BIG)
- return print_insn_z8001 (memaddr, info);
- else
- return print_insn_z8002 (memaddr, info);
-}
-
-/* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
- is not the address of a valid instruction, the address of the next
- instruction beyond ADDR otherwise. *PWORD1 receives the first word
- of the instruction. */
-
-CORE_ADDR
-NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, short *pword1)
-{
- char buf[2];
- if (addr < lim + 8)
- {
- read_memory (addr, buf, 2);
- *pword1 = extract_signed_integer (buf, 2);
-
- return addr + 2;
- }
- return 0;
-}
-
-#if 0
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame.
-
- We cache the result of doing this in the frame_cache_obstack, since
- it is fairly expensive. */
-
-void
-frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
-{
- int locals;
- CORE_ADDR pc;
- CORE_ADDR adr;
- int i;
-
- memset (fsrp, 0, sizeof *fsrp);
-
- pc = skip_adjust (get_pc_function_start (fip->pc), &locals);
-
- {
- adr = get_frame_base (fip) - locals;
- for (i = 0; i < 8; i++)
- {
- int word = read_memory_short (pc);
-
- pc += 2;
- if (IS_PUSHL (word))
- {
- fsrp->regs[word & 0xf] = adr;
- fsrp->regs[(word & 0xf) + 1] = adr - 2;
- adr -= 4;
- }
- else if (IS_PUSHW (word))
- {
- fsrp->regs[word & 0xf] = adr;
- adr -= 2;
- }
- else
- break;
- }
-
- }
-
- fsrp->regs[PC_REGNUM] = fip->frame + 4;
- fsrp->regs[FP_REGNUM] = fip->frame;
-
-}
-#endif
-
-int
-z8k_saved_pc_after_call (struct frame_info *frame)
-{
- return ADDR_BITS_REMOVE
- (read_memory_integer (read_register (SP_REGNUM), PTR_SIZE));
-}
-
-
-void
-extract_return_value (struct type *type, char *regbuf, char *valbuf)
-{
- int b;
- int len = TYPE_LENGTH (type);
-
- for (b = 0; b < len; b += 2)
- {
- int todo = len - b;
-
- if (todo > 2)
- todo = 2;
- memcpy (valbuf + b, regbuf + b, todo);
- }
-}
-
-void
-write_return_value (struct type *type, char *valbuf)
-{
- int reg;
- int len;
-
- for (len = 0; len < TYPE_LENGTH (type); len += 2)
- deprecated_write_register_bytes (REGISTER_BYTE (len / 2 + 2),
- valbuf + len, 2);
-}
-
-void
-store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (2, addr);
-}
-
-
-static void
-z8k_print_register_hook (int regno)
-{
- if ((regno & 1) == 0 && regno < 16)
- {
- unsigned char l[4];
-
- frame_register_read (deprecated_selected_frame, regno, l + 0);
- frame_register_read (deprecated_selected_frame, regno + 1, l + 2);
- printf_unfiltered ("\t");
- printf_unfiltered ("0x%02x%02x%02x%02x", l[0], l[1], l[2], l[3]);
- }
-
- if ((regno & 3) == 0 && regno < 16)
- {
- unsigned char l[8];
-
- frame_register_read (deprecated_selected_frame, regno, l + 0);
- frame_register_read (deprecated_selected_frame, regno + 1, l + 2);
- frame_register_read (deprecated_selected_frame, regno + 2, l + 4);
- frame_register_read (deprecated_selected_frame, regno + 3, l + 6);
-
- printf_unfiltered ("\t");
- printf_unfiltered ("0x%02x%02x%02x%02x%02x%02x%02x%02x",
- l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7]);
- }
- if (regno == 15)
- {
- unsigned short rval;
- int i;
-
- frame_register_read (deprecated_selected_frame, regno, (char *) (&rval));
-
- printf_unfiltered ("\n");
- for (i = 0; i < 10; i += 2)
- {
- printf_unfiltered ("(sp+%d=%04x)", i,
- (unsigned int)read_memory_short (rval + i));
- }
- }
-}
-
-static void
-z8k_print_registers_info (struct gdbarch *gdbarch,
- struct ui_file *file,
- struct frame_info *frame,
- int regnum, int print_all)
-{
- int i;
- const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
- char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
- char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
-
- for (i = 0; i < numregs; i++)
- {
- /* Decide between printing all regs, non-float / vector regs, or
- specific reg. */
- if (regnum == -1)
- {
- if (!print_all)
- {
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
- continue;
- if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
- continue;
- }
- }
- else
- {
- if (i != regnum)
- continue;
- }
-
- /* If the register name is empty, it is undefined for this
- processor, so don't display anything. */
- if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
- continue;
-
- fputs_filtered (REGISTER_NAME (i), file);
- print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
-
- /* Get the data in raw format. */
- if (! frame_register_read (frame, i, raw_buffer))
- {
- fprintf_filtered (file, "*value not available*\n");
- continue;
- }
-
- /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
- The function frame_register_read() should have returned the
- pre-cooked register so no conversion is necessary. */
- /* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (i))
- {
- REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
- raw_buffer, virtual_buffer);
- }
- else
- {
- memcpy (virtual_buffer, raw_buffer,
- REGISTER_VIRTUAL_SIZE (i));
- }
-
- /* If virtual format is floating, print it that way, and in raw
- hex. */
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
- {
- int j;
-
- val_print (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++)
- {
- int idx;
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- idx = j;
- else
- idx = REGISTER_RAW_SIZE (i) - 1 - j;
- fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
- }
- fprintf_filtered (file, ")");
- }
- else
- {
- /* Print the register in hex. */
- val_print (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)
- {
- fprintf_filtered (file, "\t");
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
- file, 0, 1, 0, Val_pretty_default);
- }
- }
-
- /* Some z8k specific info. */
- z8k_print_register_hook (i);
-
- fprintf_filtered (file, "\n");
- }
-}
-
-void
-z8k_do_registers_info (int regnum, int all)
-{
- z8k_print_registers_info (current_gdbarch, gdb_stdout,
- deprecated_selected_frame, regnum, all);
-}
-
-void
-z8k_pop_frame (void)
-{
-}
-
-struct cmd_list_element *setmemorylist;
-
-void
-z8k_set_pointer_size (int newsize)
-{
- static int oldsize = 0;
-
- if (oldsize != newsize)
- {
- printf_unfiltered ("pointer size set to %d bits\n", newsize);
- oldsize = newsize;
- if (newsize == 32)
- {
- BIG = 1;
- }
- else
- {
- BIG = 0;
- }
- /* FIXME: This code should be using the GDBARCH framework to
- handle changed type sizes. If this problem is ever fixed
- (the direct reference to _initialize_gdbtypes() below
- eliminated) then Makefile.in should be updated so that
- z8k-tdep.c is again compiled with -Werror. */
- _initialize_gdbtypes ();
- }
-}
-
-static void
-segmented_command (char *args, int from_tty)
-{
- z8k_set_pointer_size (32);
-}
-
-static void
-unsegmented_command (char *args, int from_tty)
-{
- z8k_set_pointer_size (16);
-}
-
-static void
-set_memory (char *args, int from_tty)
-{
- printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n");
- help_list (setmemorylist, "set memory ", -1, gdb_stdout);
-}
-
-void
-_initialize_z8ktdep (void)
-{
- tm_print_insn = gdb_print_insn_z8k;
-
- add_prefix_cmd ("memory", no_class, set_memory,
- "set the memory model", &setmemorylist, "set memory ", 0,
- &setlist);
- add_cmd ("segmented", class_support, segmented_command,
- "Set segmented memory model.", &setmemorylist);
- add_cmd ("unsegmented", class_support, unsegmented_command,
- "Set unsegmented memory model.", &setmemorylist);
-
-}
+// 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 5b46e44124f..829d187740e 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,43 @@
+2003-01-31 Grant Grundler <grundler@dsl2.external.hp.com>
+
+ * hppa.h (ldwa, ldda): Add ordered opcodes.
+
+2003-01-26 Daniel Jacobowitz <drow@mvista.com>
+
+ * hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
+ (struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
+ (htab_create_alloc_ex): New prototype.
+ (htab_set_functions_ex): New prototype.
+
+2003-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252.
+
+2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff/tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug
+ * coff/ti.h (TICOFF_TARGET_MACHINE_GET): Added macros
+
+2002-07-17 Geoffrey Keating <geoffk@redhat.com>
+
+ * splay-tree.h (GTY): Define if undefined.
+ (splay_tree_allocate_fn): Return PTR for compatibility, not void *.
+ (struct splay_tree_node_s): Support gengtype.
+ (struct splay_tree_s): Likewise. Make allocate_data a PTR,
+ not a void *.
+
+2002-01-02 Ben Elliston <bje@redhat.com>
+
+ * dis-asm.h (print_insn_iq2000): Declare.
+
+2002-12-24 Dmitry Diky <diwil@mail.ru>
+
+ * dis-asm.h: Add msp430 disassembler prototype.
+
+2002-12-27 Chris Demetriou <cgd@broadcom.com>
+
+ * dis-asm.h (print_mips_disassembler_options): Prototype.
+
2002-12-23 Alan Modra <amodra@bigpond.net.au>
* bfdlink.h (struct bfd_link_info): Add "strip_discarded".
diff --git a/include/coff/ti.h b/include/coff/ti.h
index 0a59b226a32..8df15223c8d 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -57,6 +57,14 @@ struct external_filehdr
#error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
#endif
+#ifndef TICOFF_TARGET_MACHINE_GET
+#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
+#endif
+
+#ifndef TICOFF_TARGET_MACHINE_SET
+#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
+#endif
+
/* Default to COFF2 for file output */
#ifndef TICOFF_DEFAULT_MAGIC
#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
diff --git a/include/coff/tic4x.h b/include/coff/tic4x.h
index 03215fb5314..083cc3b10d6 100644
--- a/include/coff/tic4x.h
+++ b/include/coff/tic4x.h
@@ -30,14 +30,14 @@
/* We use COFF2. */
#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
-#define TICOFF_TARGET_MACHINE_GET (FLAGS) \
+#define TICOFF_TARGET_MACHINE_GET(FLAGS) \
(((FLAGS) & F_VERS) ? bfd_mach_c4x : bfd_mach_c3x)
-#define TICOFF_TARGET_MACHINE_SET (FLAGSP, MACHINE) \
+#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE) \
do \
{ \
if ((MACHINE) == bfd_mach_c4x) \
- *(FLAGSP) = F_VERS; \
+ *(FLAGSP) |= F_VERS; \
} \
while (0)
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 993b3ad29f6..5e6bdc3ad3b 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -217,6 +217,7 @@ extern int print_insn_mcore PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mmix PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_msp430 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_openrisc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_or32 PARAMS ((bfd_vma, disassemble_info*));
@@ -239,10 +240,12 @@ extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_frv PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_iq2000 PARAMS ((bfd_vma, disassemble_info *));
extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
+extern void print_mips_disassembler_options PARAMS ((FILE *));
extern void print_ppc_disassembler_options PARAMS ((FILE *));
extern void print_arm_disassembler_options PARAMS ((FILE *));
extern void parse_arm_disassembler_option PARAMS ((char *));
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index de95f20c5a8..88e8c96e566 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,73 @@
+2003-02-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h: Add TLS relocs. Format.
+ * ppc64.h: Likewise.
+
+2003-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * mips.h (EF_MIPS_XGOT): Define.
+
+2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: Add s390 TLS relocations.
+
+2003-01-23 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh.h (EF_SH_MERGE_MACH): Handle SH2E.
+
+ 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh.h (EF_SH2E): New.
+
+2003-01-23 Alan Modra <amodra@bigpond.net.au>
+
+ * sh.h: Split out various bits to bfd/elf32-sh64.h.
+
+2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: Rename R_390_GOTOFF to R_390_GOTOFF32. Add new gotoff,
+ gotplt and pltoff relocations.
+
+2003-01-17 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h: Formatting, typo fixes.
+ (DT_ENCODING): Correct value.
+
+2003-01-17 Fabio Alemagna <falemagn@aros.org>
+
+ * common.h (ELFOSABI_AROS): Define.
+ (ELFOSABI_OPENVMS): Likewise.
+ (ELFOSABI_NSK): Likewise.
+
+2003-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h: Split out ppc64 definitions to..
+ * pcc64.h: ..here. New file.
+ (R_PPC64_REL30): Rename from R_PPC64_ADDR30.
+
+2003-01-13 Dmitry Diky <diwil@mail.ru>
+
+ * elf/common.h (EM_MSP430): Change e_machine value to officially
+ assigned.
+
+2003-01-02 Ben Elliston <bje@redhat.com>
+
+ * common.h (EM_IQ2000): Define.
+ * iq2000.h: New file.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (E_MIPS_ARCH_32R2): New define.
+
+2002-12-24 Dmitry Diky <diwil@mail.ru>
+
+ * common.h: Define msp430 machine numbers.
+ * msp430.h: New file. Define msp430 relocs.
+
2002-12-20 DJ Delorie <dj@redhat.com>
* xstormy16.h: Add XSTORMY16_12.
@@ -51,10 +121,10 @@
* sh.h: Add SH TLS relocs.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* mips.h (E_MIPS_MACH_4120, E_MIPS_MACH_5400, E_MIPS_MACH_5500): New.
@@ -92,9 +162,9 @@
Graham Stott <grahams@redhat.com>
Jeff Johnston <jjohnstn@redhat.com>
- * common.h (EM_IP2K): New macro.
+ * common.h (EM_IP2K): New macro.
(EM_IP2K_OLD): New macro.
- * ip2k.h: New file.
+ * ip2k.h: New file.
2002-07-01 Matt Thomas <matt@3am-software.com>
diff --git a/include/elf/common.h b/include/elf/common.h
index 0cef267e952..2315fa8d7ce 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -35,46 +35,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Fields in e_ident[] */
#define EI_MAG0 0 /* File identification byte 0 index */
-#define ELFMAG0 0x7F /* Magic number byte 0 */
+#define ELFMAG0 0x7F /* Magic number byte 0 */
#define EI_MAG1 1 /* File identification byte 1 index */
-#define ELFMAG1 'E' /* Magic number byte 1 */
+#define ELFMAG1 'E' /* Magic number byte 1 */
#define EI_MAG2 2 /* File identification byte 2 index */
-#define ELFMAG2 'L' /* Magic number byte 2 */
+#define ELFMAG2 'L' /* Magic number byte 2 */
#define EI_MAG3 3 /* File identification byte 3 index */
-#define ELFMAG3 'F' /* Magic number byte 3 */
+#define ELFMAG3 'F' /* Magic number byte 3 */
#define EI_CLASS 4 /* File class */
-#define ELFCLASSNONE 0 /* Invalid class */
-#define ELFCLASS32 1 /* 32-bit objects */
-#define ELFCLASS64 2 /* 64-bit objects */
+#define ELFCLASSNONE 0 /* Invalid class */
+#define ELFCLASS32 1 /* 32-bit objects */
+#define ELFCLASS64 2 /* 64-bit objects */
#define EI_DATA 5 /* Data encoding */
-#define ELFDATANONE 0 /* Invalid data encoding */
-#define ELFDATA2LSB 1 /* 2's complement, little endian */
-#define ELFDATA2MSB 2 /* 2's complement, big endian */
+#define ELFDATANONE 0 /* Invalid data encoding */
+#define ELFDATA2LSB 1 /* 2's complement, little endian */
+#define ELFDATA2MSB 2 /* 2's complement, big endian */
#define EI_VERSION 6 /* File version */
-#define EI_OSABI 7 /* Operating System/ABI indication */
-#define ELFOSABI_NONE 0 /* UNIX System V ABI */
-#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* OpenBSD */
-#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-#define ELFOSABI_ARM 97 /* ARM */
-
-#define EI_ABIVERSION 8 /* ABI version */
+#define EI_OSABI 7 /* Operating System/ABI indication */
+#define ELFOSABI_NONE 0 /* UNIX System V ABI */
+#define ELFOSABI_HPUX 1 /* HP-UX operating system */
+#define ELFOSABI_NETBSD 2 /* NetBSD */
+#define ELFOSABI_LINUX 3 /* GNU/Linux */
+#define ELFOSABI_HURD 4 /* GNU/Hurd */
+#define ELFOSABI_SOLARIS 6 /* Solaris */
+#define ELFOSABI_AIX 7 /* AIX */
+#define ELFOSABI_IRIX 8 /* IRIX */
+#define ELFOSABI_FREEBSD 9 /* FreeBSD */
+#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
+#define ELFOSABI_MODESTO 11 /* Novell Modesto */
+#define ELFOSABI_OPENBSD 12 /* OpenBSD */
+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
+#define ELFOSABI_AROS 15 /* Amiga Research OS */
+#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
+
+#define EI_ABIVERSION 8 /* ABI version */
#define EI_PAD 9 /* Start of padding bytes */
@@ -86,8 +89,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ET_EXEC 2 /* Executable file */
#define ET_DYN 3 /* Shared object file */
#define ET_CORE 4 /* Core file */
-#define ET_LOOS 0xFE00 /* Operating system-specific */
-#define ET_HIOS 0xFEFF /* Operating system-specific */
+#define ET_LOOS 0xFE00 /* Operating system-specific */
+#define ET_HIOS 0xFEFF /* Operating system-specific */
#define ET_LOPROC 0xFF00 /* Processor-specific */
#define ET_HIPROC 0xFFFF /* Processor-specific */
@@ -95,88 +98,89 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
are officially assigned by registry@caldera.com. See below for a list of
ad-hoc numbers used during initial development. */
-#define EM_NONE 0 /* No machine */
-#define EM_M32 1 /* AT&T WE 32100 */
-#define EM_SPARC 2 /* SUN SPARC */
-#define EM_386 3 /* Intel 80386 */
-#define EM_68K 4 /* Motorola m68k family */
-#define EM_88K 5 /* Motorola m88k family */
-#define EM_486 6 /* Intel 80486 *//* Reserved for future use */
-#define EM_860 7 /* Intel 80860 */
-#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
-#define EM_S370 9 /* IBM System/370 */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */
-
-#define EM_PARISC 15 /* HPPA */
-
-#define EM_VPP550 17 /* Fujitsu VPP500 */
-#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
-#define EM_960 19 /* Intel 80960 */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* 64-bit PowerPC */
-#define EM_S390 22 /* IBM S/390 */
-
-#define EM_V800 36 /* NEC V800 series */
-#define EM_FR20 37 /* Fujitsu FR20 */
-#define EM_RH32 38 /* TRW RH32 */
-#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
-#define EM_RCE 39 /* Old name for MCore */
-#define EM_ARM 40 /* ARM */
-#define EM_OLD_ALPHA 41 /* Digital Alpha */
-#define EM_SH 42 /* Hitachi SH */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit */
-#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
-#define EM_ARC 45 /* ARC Cores */
-#define EM_H8_300 46 /* Hitachi H8/300 */
-#define EM_H8_300H 47 /* Hitachi H8/300H */
-#define EM_H8S 48 /* Hitachi H8S */
-#define EM_H8_500 49 /* Hitachi H8/500 */
-#define EM_IA_64 50 /* Intel IA-64 Processor */
-#define EM_MIPS_X 51 /* Stanford MIPS-X */
-#define EM_COLDFIRE 52 /* Motorola Coldfire */
-#define EM_68HC12 53 /* Motorola M68HC12 */
-#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */
-#define EM_PCP 55 /* Siemens PCP */
-#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
-#define EM_NDR1 57 /* Denso NDR1 microprocesspr */
-#define EM_STARCORE 58 /* Motorola Star*Core processor */
-#define EM_ME16 59 /* Toyota ME16 processor */
-#define EM_ST100 60 /* STMicroelectronics ST100 processor */
-#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
-#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
-
-#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
-#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
-#define EM_FX66 66 /* Siemens FX66 microcontroller */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
-#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
-#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
-#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
-#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
-#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
-#define EM_SVX 73 /* Silicon Graphics SVx */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */
-#define EM_VAX 75 /* Digital VAX */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
-#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */
-#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
-#define EM_HUANY 81 /* Harvard's machine-independent format */
-#define EM_PRISM 82 /* SiTera Prism */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
-#define EM_FR30 84 /* Fujitsu FR30 */
-#define EM_D10V 85 /* Mitsubishi D10V */
-#define EM_D30V 86 /* Mitsubishi D30V */
-#define EM_V850 87 /* NEC v850 */
-#define EM_M32R 88 /* Mitsubishi M32R */
-#define EM_MN10300 89 /* Matsushita MN10300 */
-#define EM_MN10200 90 /* Matsushita MN10200 */
-#define EM_PJ 91 /* picoJava */
-#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
-#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
-#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
+#define EM_NONE 0 /* No machine */
+#define EM_M32 1 /* AT&T WE 32100 */
+#define EM_SPARC 2 /* SUN SPARC */
+#define EM_386 3 /* Intel 80386 */
+#define EM_68K 4 /* Motorola m68k family */
+#define EM_88K 5 /* Motorola m88k family */
+#define EM_486 6 /* Intel 80486 *//* Reserved for future use */
+#define EM_860 7 /* Intel 80860 */
+#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
+#define EM_S370 9 /* IBM System/370 */
+#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft) Deprecated */
+
+#define EM_PARISC 15 /* HPPA */
+
+#define EM_VPP550 17 /* Fujitsu VPP500 */
+#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
+#define EM_960 19 /* Intel 80960 */
+#define EM_PPC 20 /* PowerPC */
+#define EM_PPC64 21 /* 64-bit PowerPC */
+#define EM_S390 22 /* IBM S/390 */
+
+#define EM_V800 36 /* NEC V800 series */
+#define EM_FR20 37 /* Fujitsu FR20 */
+#define EM_RH32 38 /* TRW RH32 */
+#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
+#define EM_RCE 39 /* Old name for MCore */
+#define EM_ARM 40 /* ARM */
+#define EM_OLD_ALPHA 41 /* Digital Alpha */
+#define EM_SH 42 /* Hitachi SH */
+#define EM_SPARCV9 43 /* SPARC v9 64-bit */
+#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
+#define EM_ARC 45 /* ARC Cores */
+#define EM_H8_300 46 /* Hitachi H8/300 */
+#define EM_H8_300H 47 /* Hitachi H8/300H */
+#define EM_H8S 48 /* Hitachi H8S */
+#define EM_H8_500 49 /* Hitachi H8/500 */
+#define EM_IA_64 50 /* Intel IA-64 Processor */
+#define EM_MIPS_X 51 /* Stanford MIPS-X */
+#define EM_COLDFIRE 52 /* Motorola Coldfire */
+#define EM_68HC12 53 /* Motorola M68HC12 */
+#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */
+#define EM_PCP 55 /* Siemens PCP */
+#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
+#define EM_NDR1 57 /* Denso NDR1 microprocesspr */
+#define EM_STARCORE 58 /* Motorola Star*Core processor */
+#define EM_ME16 59 /* Toyota ME16 processor */
+#define EM_ST100 60 /* STMicroelectronics ST100 processor */
+#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
+#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
+
+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
+#define EM_FX66 66 /* Siemens FX66 microcontroller */
+#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
+#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
+#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
+#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
+#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
+#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
+#define EM_SVX 73 /* Silicon Graphics SVx */
+#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */
+#define EM_VAX 75 /* Digital VAX */
+#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
+#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */
+#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */
+#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */
+#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
+#define EM_HUANY 81 /* Harvard's machine-independent format */
+#define EM_PRISM 82 /* SiTera Prism */
+#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
+#define EM_FR30 84 /* Fujitsu FR30 */
+#define EM_D10V 85 /* Mitsubishi D10V */
+#define EM_D30V 86 /* Mitsubishi D30V */
+#define EM_V850 87 /* NEC v850 */
+#define EM_M32R 88 /* Mitsubishi M32R */
+#define EM_MN10300 89 /* Matsushita MN10300 */
+#define EM_MN10200 90 /* Matsushita MN10200 */
+#define EM_PJ 91 /* picoJava */
+#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
+#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
+#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
+#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
+#define EM_MSP430 105 /* TI msp430 micro controller */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -188,9 +192,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Normally, each entity or maintainer responsible for a machine with an
unofficial e_machine number should eventually ask registry@caldera.com for
- an officially blessed number to be added to the list above. */
+ an officially blessed number to be added to the list above. */
-#define EM_PJ_OLD 99 /* picoJava */
+#define EM_PJ_OLD 99 /* picoJava */
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_POWERPC 0x9025
@@ -202,11 +206,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Old version of PowerPC, this should be removed shortly. */
#define EM_PPC_OLD 17
-/* (Depreciated) Temporary number for the OpenRISC processor. */
-#define EM_OR32 0x8472
+/* (Deprecated) Temporary number for the OpenRISC processor. */
+#define EM_OR32 0x8472
/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_M32R 0x9041
+#define EM_CYGNUS_M32R 0x9041
/* Alpha backend magic number. Written in the absence of an ABI. */
#define EM_ALPHA 0x9026
@@ -243,14 +247,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Written in the absense of an ABI. */
#define EM_DLX 0x5aa5
-#define EM_XSTORMY16 0xad45
+#define EM_XSTORMY16 0xad45
/* FRV magic number - no EABI available??. */
#define EM_CYGNUS_FRV 0x5441
/* Ubicom IP2xxx; no ABI */
-#define EM_IP2K_OLD 0x8217
+#define EM_IP2K_OLD 0x8217
+/* MSP430 magic number
+ Written in the absense everything. */
+#define EM_MSP430_OLD 0x1059
+
+/* Vitesse IQ2000. */
+#define EM_IQ2000 0xFEBA
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version. */
@@ -260,7 +270,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Values for program header, p_type field. */
-#define PT_NULL 0 /* Program header table entry unused */
+#define PT_NULL 0 /* Program header table entry unused */
#define PT_LOAD 1 /* Loadable program segment */
#define PT_DYNAMIC 2 /* Dynamic linking information */
#define PT_INTERP 3 /* Program interpreter */
@@ -268,8 +278,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_SHLIB 5 /* Reserved, unspecified semantics */
#define PT_PHDR 6 /* Entry for header table itself */
#define PT_TLS 7 /* Thread local storage segment */
-#define PT_LOOS 0x60000000 /* OS-specific */
-#define PT_HIOS 0x6fffffff /* OS-specific */
+#define PT_LOOS 0x60000000 /* OS-specific */
+#define PT_HIOS 0x6fffffff /* OS-specific */
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
@@ -299,14 +309,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
-#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */
-#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */
+#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */
+#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */
#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */
-#define SHT_GROUP 17 /* Section contains a section group */
+#define SHT_GROUP 17 /* Section contains a section group */
#define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */
-#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
-#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
+#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
+#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
@@ -335,7 +345,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHF_MERGE (1 << 4) /* Data in this section can be merged */
#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */
#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */
-#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */
+#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */
#define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */
#define SHF_GROUP (1 << 9) /* Member of a section group */
#define SHF_TLS (1 << 10) /* Thread local storage section */
@@ -350,7 +360,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
#define NT_TASKSTRUCT 4 /* Contains copy of task struct */
-#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
+#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
/* note name must be "LINUX". */
/* Note segments for core files on dir-style procfs systems. */
@@ -423,8 +433,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STB_LOCAL 0 /* Symbol not visible outside obj */
#define STB_GLOBAL 1 /* Symbol visible outside obj */
#define STB_WEAK 2 /* Like globals, lower precedence */
-#define STB_LOOS 10 /* OS-specific semantics */
-#define STB_HIOS 12 /* OS-specific semantics */
+#define STB_LOOS 10 /* OS-specific semantics */
+#define STB_HIOS 12 /* OS-specific semantics */
#define STB_LOPROC 13 /* Application-specific semantics */
#define STB_HIPROC 15 /* Application-specific semantics */
@@ -435,8 +445,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STT_FILE 4 /* Symbol gives a file name */
#define STT_COMMON 5 /* An uninitialised common block */
#define STT_TLS 6 /* Thread local data object */
-#define STT_LOOS 10 /* OS-specific semantics */
-#define STT_HIOS 12 /* OS-specific semantics */
+#define STT_LOOS 10 /* OS-specific semantics */
+#define STT_HIOS 12 /* OS-specific semantics */
#define STT_LOPROC 13 /* Application-specific semantics */
#define STT_HIPROC 15 /* Application-specific semantics */
@@ -447,12 +457,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */
#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
-#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
-#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
-#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
-#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
-#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
-#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
+#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
+#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
+#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
+#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
+#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
+#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
#define SHN_BAD ((unsigned) -1) /* Used internally by bfd */
/* The following constants control how a symbol may be accessed once it has
@@ -499,32 +509,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DT_DEBUG 21
#define DT_TEXTREL 22
#define DT_JMPREL 23
-#define DT_BIND_NOW 24
-#define DT_INIT_ARRAY 25
-#define DT_FINI_ARRAY 26
+#define DT_BIND_NOW 24
+#define DT_INIT_ARRAY 25
+#define DT_FINI_ARRAY 26
#define DT_INIT_ARRAYSZ 27
#define DT_FINI_ARRAYSZ 28
-#define DT_RUNPATH 29
-#define DT_FLAGS 30
-
-#define DT_ENCODING 32
+#define DT_RUNPATH 29
+#define DT_FLAGS 30
+#define DT_ENCODING 31
#define DT_PREINIT_ARRAY 32
#define DT_PREINIT_ARRAYSZ 33
/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
for DT_LOOS and DT_HIOS. Some implementations however, use
- values outside of the new range (see below). */
+ values outside of the new range (see below). */
#define OLD_DT_LOOS 0x60000000
-#define DT_LOOS 0x6000000d
-#define DT_HIOS 0x6fff0000
-#define OLD_DT_HIOS 0x6fffffff
+#define DT_LOOS 0x6000000d
+#define DT_HIOS 0x6fff0000
+#define OLD_DT_HIOS 0x6fffffff
-#define DT_LOPROC 0x70000000
-#define DT_HIPROC 0x7fffffff
+#define DT_LOPROC 0x70000000
+#define DT_HIPROC 0x7fffffff
/* The next four dynamic tags are used on Solaris. We support them
- everywhere. Note these values lie outside of the (new) range for
- OS specific values. This is a deliberate special case and we
+ everywhere. Note these values lie outside of the (new) range for
+ OS specific values. This is a deliberate special case and we
maintain it for backwards compatability. */
#define DT_VALRNGLO 0x6ffffd00
#define DT_GNU_PRELINKED 0x6ffffdf5
@@ -583,7 +592,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
defined here is the same as the one in <sys/link.h> on Solaris 8. */
#define DTF_1_CONFEXP 0x00000002
-/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
+/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
#define DF_P1_LAZYLOAD 0x00000001
#define DF_P1_GROUPPERM 0x00000002
@@ -603,7 +612,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DF_1_NODUMP 0x00001000
#define DF_1_CONLFAT 0x00002000
-/* Flag values for the DT_FLAGS entry. */
+/* Flag values for the DT_FLAGS entry. */
#define DF_ORIGIN (1 << 0)
#define DF_SYMBOLIC (1 << 1)
#define DF_TEXTREL (1 << 2)
@@ -670,7 +679,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SYMINFO_CURRENT 1
#define SYMINFO_NUM 2
-/* Section Group Flags. */
+/* Section Group Flags. */
#define GRP_COMDAT 0x1 /* A COMDAT group */
diff --git a/include/elf/iq2000.h b/include/elf/iq2000.h
new file mode 100644
index 00000000000..83c690c7091
--- /dev/null
+++ b/include/elf/iq2000.h
@@ -0,0 +1,58 @@
+/* IQ2000 ELF support for BFD.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_IQ2000_H
+#define _ELF_IQ2000_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_iq2000_reloc_type)
+ RELOC_NUMBER (R_IQ2000_NONE, 0)
+ RELOC_NUMBER (R_IQ2000_16, 1)
+ RELOC_NUMBER (R_IQ2000_32, 2)
+ RELOC_NUMBER (R_IQ2000_26, 3)
+ RELOC_NUMBER (R_IQ2000_PC16, 4)
+ RELOC_NUMBER (R_IQ2000_HI16, 5)
+ RELOC_NUMBER (R_IQ2000_LO16, 6)
+ RELOC_NUMBER (R_IQ2000_OFFSET_16, 7)
+ RELOC_NUMBER (R_IQ2000_OFFSET_21, 8)
+ RELOC_NUMBER (R_IQ2000_UHI16, 9)
+ RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
+ RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
+ RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
+END_RELOC_NUMBERS(R_IQ2000_max)
+
+#define EF_IQ2000_CPU_IQ2000 0x00000001 /* default */
+#define EF_IQ2000_CPU_IQ10 0x00000002 /* IQ10 */
+#define EF_IQ2000_CPU_MASK 0x00000003 /* specific cpu bits */
+#define EF_IQ2000_ALL_FLAGS (EF_IQ2000_CPU_MASK)
+
+/* Define the data & instruction memory discriminator. In a linked
+ executable, an symbol should be deemed to point to an instruction
+ if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly
+ for the data space. */
+
+#define IQ2000_DATA_MASK 0x80000000
+#define IQ2000_DATA_VALUE 0x00000000
+#define IQ2000_INSN_MASK 0x80000000
+#define IQ2000_INSN_VALUE 0x80000000
+
+
+#endif /* _ELF_IQ2000_H */
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 81451ab55cd..44f7cb9292c 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -99,6 +99,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
position independent code. */
#define EF_MIPS_CPIC 0x00000004
+/* ??? Unknown flag, set in IRIX 6's BSDdup2.o in libbsd.a. */
+#define EF_MIPS_XGOT 0x00000008
+
/* Code in file uses UCODE (obsolete) */
#define EF_MIPS_UCODE 0x00000010
@@ -145,6 +148,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
/* -mips64 code. */
#define E_MIPS_ARCH_64 0x60000000
+/* -mips32r2 code. */
+#define E_MIPS_ARCH_32R2 0x70000000
+
/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
#define EF_MIPS_ABI 0x0000F000
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
new file mode 100644
index 00000000000..cb3f241dea1
--- /dev/null
+++ b/include/elf/msp430.h
@@ -0,0 +1,55 @@
+/* MSP430 ELF support for BFD.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_MSP430_H
+#define _ELF_MSP430_H
+
+#include "elf/reloc-macros.h"
+
+/* Processor specific flags for the ELF header e_flags field. */
+#define EF_MSP430_MACH 0xff
+
+#define E_MSP430_MACH_MSP430x11x1 110
+#define E_MSP430_MACH_MSP430x11 11
+#define E_MSP430_MACH_MSP430x12 12
+#define E_MSP430_MACH_MSP430x13 13
+#define E_MSP430_MACH_MSP430x14 14
+#define E_MSP430_MACH_MSP430x31 31
+#define E_MSP430_MACH_MSP430x32 32
+#define E_MSP430_MACH_MSP430x33 33
+#define E_MSP430_MACH_MSP430x41 41
+#define E_MSP430_MACH_MSP430x43 43
+#define E_MSP430_MACH_MSP430x44 44
+#define E_MSP430_MACH_MSP430x15 15
+#define E_MSP430_MACH_MSP430x16 16
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_msp430_reloc_type)
+ RELOC_NUMBER (R_MSP430_NONE, 0)
+ RELOC_NUMBER (R_MSP430_32, 1)
+ RELOC_NUMBER (R_MSP430_10_PCREL, 2)
+ RELOC_NUMBER (R_MSP430_16, 3)
+ RELOC_NUMBER (R_MSP430_16_PCREL, 4)
+ RELOC_NUMBER (R_MSP430_16_BYTE, 5)
+ RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 6)
+
+END_RELOC_NUMBERS (R_MSP430_max)
+
+#endif /* _ELF_MSP430_H */
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
index dfb43f46a40..21c67437953 100644
--- a/include/elf/ppc.h
+++ b/include/elf/ppc.h
@@ -1,5 +1,6 @@
/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
@@ -31,152 +32,104 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Relocations. */
START_RELOC_NUMBERS (elf_ppc_reloc_type)
- RELOC_NUMBER (R_PPC_NONE, 0)
- RELOC_NUMBER (R_PPC_ADDR32, 1)
- RELOC_NUMBER (R_PPC_ADDR24, 2)
- RELOC_NUMBER (R_PPC_ADDR16, 3)
- RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
- RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
- RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
- RELOC_NUMBER (R_PPC_ADDR14, 7)
- RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
- RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
- RELOC_NUMBER (R_PPC_REL24, 10)
- RELOC_NUMBER (R_PPC_REL14, 11)
- RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
- RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
- RELOC_NUMBER (R_PPC_GOT16, 14)
- RELOC_NUMBER (R_PPC_GOT16_LO, 15)
- RELOC_NUMBER (R_PPC_GOT16_HI, 16)
- RELOC_NUMBER (R_PPC_GOT16_HA, 17)
- RELOC_NUMBER (R_PPC_PLTREL24, 18)
- RELOC_NUMBER (R_PPC_COPY, 19)
- RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
- RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
- RELOC_NUMBER (R_PPC_RELATIVE, 22)
- RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
- RELOC_NUMBER (R_PPC_UADDR32, 24)
- RELOC_NUMBER (R_PPC_UADDR16, 25)
- RELOC_NUMBER (R_PPC_REL32, 26)
- RELOC_NUMBER (R_PPC_PLT32, 27)
- RELOC_NUMBER (R_PPC_PLTREL32, 28)
- RELOC_NUMBER (R_PPC_PLT16_LO, 29)
- RELOC_NUMBER (R_PPC_PLT16_HI, 30)
- RELOC_NUMBER (R_PPC_PLT16_HA, 31)
- RELOC_NUMBER (R_PPC_SDAREL16, 32)
- RELOC_NUMBER (R_PPC_SECTOFF, 33)
- RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
- RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
- RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
- RELOC_NUMBER (R_PPC_ADDR30, 37)
-
-/* The following relocs are from the 64-bit PowerPC ELF ABI. */
- RELOC_NUMBER (R_PPC64_ADDR64, 38)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42)
- RELOC_NUMBER (R_PPC64_UADDR64, 43)
- RELOC_NUMBER (R_PPC64_REL64, 44)
- RELOC_NUMBER (R_PPC64_PLT64, 45)
- RELOC_NUMBER (R_PPC64_PLTREL64, 46)
- RELOC_NUMBER (R_PPC64_TOC16, 47)
- RELOC_NUMBER (R_PPC64_TOC16_LO, 48)
- RELOC_NUMBER (R_PPC64_TOC16_HI, 49)
- RELOC_NUMBER (R_PPC64_TOC16_HA, 50)
- RELOC_NUMBER (R_PPC64_TOC, 51)
- RELOC_NUMBER (R_PPC64_PLTGOT16, 52)
- RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53)
- RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54)
- RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55)
-
-/* The following relocs were added in the 64-bit PowerPC ELF ABI revision 1.2. */
- RELOC_NUMBER (R_PPC64_ADDR16_DS, 56)
- RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57)
- RELOC_NUMBER (R_PPC64_GOT16_DS, 58)
- RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59)
- RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60)
- RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61)
- RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62)
- RELOC_NUMBER (R_PPC64_TOC16_DS, 63)
- RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64)
- RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65)
- RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66)
+ RELOC_NUMBER (R_PPC_NONE, 0)
+ RELOC_NUMBER (R_PPC_ADDR32, 1)
+ RELOC_NUMBER (R_PPC_ADDR24, 2)
+ RELOC_NUMBER (R_PPC_ADDR16, 3)
+ RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
+ RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
+ RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
+ RELOC_NUMBER (R_PPC_ADDR14, 7)
+ RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
+ RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
+ RELOC_NUMBER (R_PPC_REL24, 10)
+ RELOC_NUMBER (R_PPC_REL14, 11)
+ RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
+ RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
+ RELOC_NUMBER (R_PPC_GOT16, 14)
+ RELOC_NUMBER (R_PPC_GOT16_LO, 15)
+ RELOC_NUMBER (R_PPC_GOT16_HI, 16)
+ RELOC_NUMBER (R_PPC_GOT16_HA, 17)
+ RELOC_NUMBER (R_PPC_PLTREL24, 18)
+ RELOC_NUMBER (R_PPC_COPY, 19)
+ RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
+ RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
+ RELOC_NUMBER (R_PPC_RELATIVE, 22)
+ RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
+ RELOC_NUMBER (R_PPC_UADDR32, 24)
+ RELOC_NUMBER (R_PPC_UADDR16, 25)
+ RELOC_NUMBER (R_PPC_REL32, 26)
+ RELOC_NUMBER (R_PPC_PLT32, 27)
+ RELOC_NUMBER (R_PPC_PLTREL32, 28)
+ RELOC_NUMBER (R_PPC_PLT16_LO, 29)
+ RELOC_NUMBER (R_PPC_PLT16_HI, 30)
+ RELOC_NUMBER (R_PPC_PLT16_HA, 31)
+ RELOC_NUMBER (R_PPC_SDAREL16, 32)
+ RELOC_NUMBER (R_PPC_SECTOFF, 33)
+ RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
+ RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
+ RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
+ RELOC_NUMBER (R_PPC_ADDR30, 37)
+
+ /* Relocs added to support TLS. */
+ RELOC_NUMBER (R_PPC_TLS, 67)
+ RELOC_NUMBER (R_PPC_DTPMOD64, 68)
+ RELOC_NUMBER (R_PPC_TPREL16, 69)
+ RELOC_NUMBER (R_PPC_TPREL16_LO, 70)
+ RELOC_NUMBER (R_PPC_TPREL16_HI, 71)
+ RELOC_NUMBER (R_PPC_TPREL16_HA, 72)
+ RELOC_NUMBER (R_PPC_TPREL64, 73)
+ RELOC_NUMBER (R_PPC_DTPREL16, 74)
+ RELOC_NUMBER (R_PPC_DTPREL16_LO, 75)
+ RELOC_NUMBER (R_PPC_DTPREL16_HI, 76)
+ RELOC_NUMBER (R_PPC_DTPREL16_HA, 77)
+ RELOC_NUMBER (R_PPC_DTPREL64, 78)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16, 79)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16_LO, 80)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16_HI, 81)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16_HA, 82)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16, 83)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16_LO, 84)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16_HI, 85)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16_HA, 86)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16, 87)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16_LO, 88)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16_HI, 89)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16_HA, 90)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16, 91)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94)
/* The remaining relocs are from the Embedded ELF ABI, and are not
in the SVR4 ELF ABI. */
- RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
- RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
- RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
- RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
- RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
- RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
- RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
- RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
- RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
- RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
- RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
- RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
- RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
+ RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
+ RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
+ RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
+ RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
+ RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
+ RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
+ RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
+ RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
+ RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
+ RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
+ RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
+ RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
/* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
- RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
+ RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
+ RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
/* This is a phony reloc to handle any old fashioned TOC16 references
that may still be in object files. */
- RELOC_NUMBER (R_PPC_TOC16, 255)
+ RELOC_NUMBER (R_PPC_TOC16, 255)
END_RELOC_NUMBERS (R_PPC_max)
-/* Aliases for R_PPC64-relocs. */
-#define R_PPC64_NONE R_PPC_NONE
-#define R_PPC64_ADDR32 R_PPC_ADDR32
-#define R_PPC64_ADDR24 R_PPC_ADDR24
-#define R_PPC64_ADDR16 R_PPC_ADDR16
-#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO
-#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI
-#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA
-#define R_PPC64_ADDR14 R_PPC_ADDR14
-#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
-#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
-#define R_PPC64_REL24 R_PPC_REL24
-#define R_PPC64_REL14 R_PPC_REL14
-#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
-#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
-#define R_PPC64_GOT16 R_PPC_GOT16
-#define R_PPC64_GOT16_LO R_PPC_GOT16_LO
-#define R_PPC64_GOT16_HI R_PPC_GOT16_HI
-#define R_PPC64_GOT16_HA R_PPC_GOT16_HA
-#define R_PPC64_COPY R_PPC_COPY
-#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
-#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
-#define R_PPC64_RELATIVE R_PPC_RELATIVE
-#define R_PPC64_UADDR32 R_PPC_UADDR32
-#define R_PPC64_UADDR16 R_PPC_UADDR16
-#define R_PPC64_REL32 R_PPC_REL32
-#define R_PPC64_PLT32 R_PPC_PLT32
-#define R_PPC64_PLTREL32 R_PPC_PLTREL32
-#define R_PPC64_PLT16_LO R_PPC_PLT16_LO
-#define R_PPC64_PLT16_HI R_PPC_PLT16_HI
-#define R_PPC64_PLT16_HA R_PPC_PLT16_HA
-#define R_PPC64_SECTOFF R_PPC_SECTOFF
-#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
-#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
-#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
-#define R_PPC64_ADDR30 R_PPC_ADDR30
-#define R_PPC64_GNU_VTINHERIT R_PPC_GNU_VTINHERIT
-#define R_PPC64_GNU_VTENTRY R_PPC_GNU_VTENTRY
-
-/* Specify the start of the .glink section. */
-#define DT_PPC64_GLINK DT_LOPROC
-
-/* Specify the start and size of the .opd section. */
-#define DT_PPC64_OPD (DT_LOPROC + 1)
-#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
/* Processor specific flags for the ELF header e_flags field. */
diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h
new file mode 100644
index 00000000000..8b801871714
--- /dev/null
+++ b/include/elf/ppc64.h
@@ -0,0 +1,156 @@
+/* PPC64 ELF support for BFD.
+ Copyright 2003 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_PPC64_H
+#define _ELF_PPC64_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_ppc64_reloc_type)
+ RELOC_NUMBER (R_PPC64_NONE, 0)
+ RELOC_NUMBER (R_PPC64_ADDR32, 1)
+ RELOC_NUMBER (R_PPC64_ADDR24, 2)
+ RELOC_NUMBER (R_PPC64_ADDR16, 3)
+ RELOC_NUMBER (R_PPC64_ADDR16_LO, 4)
+ RELOC_NUMBER (R_PPC64_ADDR16_HI, 5)
+ RELOC_NUMBER (R_PPC64_ADDR16_HA, 6)
+ RELOC_NUMBER (R_PPC64_ADDR14, 7)
+ RELOC_NUMBER (R_PPC64_ADDR14_BRTAKEN, 8)
+ RELOC_NUMBER (R_PPC64_ADDR14_BRNTAKEN, 9)
+ RELOC_NUMBER (R_PPC64_REL24, 10)
+ RELOC_NUMBER (R_PPC64_REL14, 11)
+ RELOC_NUMBER (R_PPC64_REL14_BRTAKEN, 12)
+ RELOC_NUMBER (R_PPC64_REL14_BRNTAKEN, 13)
+ RELOC_NUMBER (R_PPC64_GOT16, 14)
+ RELOC_NUMBER (R_PPC64_GOT16_LO, 15)
+ RELOC_NUMBER (R_PPC64_GOT16_HI, 16)
+ RELOC_NUMBER (R_PPC64_GOT16_HA, 17)
+ /* 18 unused. 32-bit reloc is R_PPC_PLTREL24. */
+ RELOC_NUMBER (R_PPC64_COPY, 19)
+ RELOC_NUMBER (R_PPC64_GLOB_DAT, 20)
+ RELOC_NUMBER (R_PPC64_JMP_SLOT, 21)
+ RELOC_NUMBER (R_PPC64_RELATIVE, 22)
+ /* 23 unused. 32-bit reloc is R_PPC_LOCAL24PC. */
+ RELOC_NUMBER (R_PPC64_UADDR32, 24)
+ RELOC_NUMBER (R_PPC64_UADDR16, 25)
+ RELOC_NUMBER (R_PPC64_REL32, 26)
+ RELOC_NUMBER (R_PPC64_PLT32, 27)
+ RELOC_NUMBER (R_PPC64_PLTREL32, 28)
+ RELOC_NUMBER (R_PPC64_PLT16_LO, 29)
+ RELOC_NUMBER (R_PPC64_PLT16_HI, 30)
+ RELOC_NUMBER (R_PPC64_PLT16_HA, 31)
+ /* 32 unused. 32-bit reloc is R_PPC_SDAREL16. */
+ RELOC_NUMBER (R_PPC64_SECTOFF, 33)
+ RELOC_NUMBER (R_PPC64_SECTOFF_LO, 34)
+ RELOC_NUMBER (R_PPC64_SECTOFF_HI, 35)
+ RELOC_NUMBER (R_PPC64_SECTOFF_HA, 36)
+ RELOC_NUMBER (R_PPC64_REL30, 37)
+ RELOC_NUMBER (R_PPC64_ADDR64, 38)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42)
+ RELOC_NUMBER (R_PPC64_UADDR64, 43)
+ RELOC_NUMBER (R_PPC64_REL64, 44)
+ RELOC_NUMBER (R_PPC64_PLT64, 45)
+ RELOC_NUMBER (R_PPC64_PLTREL64, 46)
+ RELOC_NUMBER (R_PPC64_TOC16, 47)
+ RELOC_NUMBER (R_PPC64_TOC16_LO, 48)
+ RELOC_NUMBER (R_PPC64_TOC16_HI, 49)
+ RELOC_NUMBER (R_PPC64_TOC16_HA, 50)
+ RELOC_NUMBER (R_PPC64_TOC, 51)
+ RELOC_NUMBER (R_PPC64_PLTGOT16, 52)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55)
+
+ /* The following relocs were added in the 64-bit PowerPC ELF ABI
+ revision 1.2. */
+ RELOC_NUMBER (R_PPC64_ADDR16_DS, 56)
+ RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57)
+ RELOC_NUMBER (R_PPC64_GOT16_DS, 58)
+ RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59)
+ RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60)
+ RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61)
+ RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62)
+ RELOC_NUMBER (R_PPC64_TOC16_DS, 63)
+ RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66)
+
+ /* Relocs added to support TLS. PowerPC64 ELF ABI revision 1.5. */
+ RELOC_NUMBER (R_PPC64_TLS, 67)
+ RELOC_NUMBER (R_PPC64_DTPMOD64, 68)
+ RELOC_NUMBER (R_PPC64_TPREL16, 69)
+ RELOC_NUMBER (R_PPC64_TPREL16_LO, 70)
+ RELOC_NUMBER (R_PPC64_TPREL16_HI, 71)
+ RELOC_NUMBER (R_PPC64_TPREL16_HA, 72)
+ RELOC_NUMBER (R_PPC64_TPREL64, 73)
+ RELOC_NUMBER (R_PPC64_DTPREL16, 74)
+ RELOC_NUMBER (R_PPC64_DTPREL16_LO, 75)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HI, 76)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HA, 77)
+ RELOC_NUMBER (R_PPC64_DTPREL64, 78)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16, 79)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16_LO, 80)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HI, 81)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HA, 82)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16, 83)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16_LO, 84)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HI, 85)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HA, 86)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_DS, 87)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_LO_DS, 88)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_HI, 89)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_HA, 90)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_DS, 91)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_LO_DS, 92)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HI, 93)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HA, 94)
+ RELOC_NUMBER (R_PPC64_TPREL16_DS, 95)
+ RELOC_NUMBER (R_PPC64_TPREL16_LO_DS, 96)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHER, 97)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHERA, 98)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHEST, 99)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHESTA, 100)
+ RELOC_NUMBER (R_PPC64_DTPREL16_DS, 101)
+ RELOC_NUMBER (R_PPC64_DTPREL16_LO_DS, 102)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHER, 103)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHERA, 104)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHEST, 105)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHESTA, 106)
+
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_PPC64_GNU_VTINHERIT, 253)
+ RELOC_NUMBER (R_PPC64_GNU_VTENTRY, 254)
+
+END_RELOC_NUMBERS (R_PPC64_max)
+
+#define IS_TLS_RELOC(R) \
+ ((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)
+
+/* Specify the start of the .glink section. */
+#define DT_PPC64_GLINK DT_LOPROC
+
+/* Specify the start and size of the .opd section. */
+#define DT_PPC64_OPD (DT_LOPROC + 1)
+#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
+
+#endif /* _ELF_PPC64_H */
diff --git a/include/elf/s390.h b/include/elf/s390.h
index 8b67c967a9a..6a21c3b6fe2 100644
--- a/include/elf/s390.h
+++ b/include/elf/s390.h
@@ -49,7 +49,7 @@ START_RELOC_NUMBERS (elf_s390_reloc_type)
RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
- RELOC_NUMBER (R_390_GOTOFF, 13) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTOFF32, 13) /* 32 bit offset to GOT. */
RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
@@ -63,6 +63,53 @@ START_RELOC_NUMBERS (elf_s390_reloc_type)
RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
+ RELOC_NUMBER (R_390_GOTOFF16, 27) /* 16 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTOFF64, 28) /* 64 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTPLT12, 29) /* 12 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLT16, 30) /* 16 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLT32, 31) /* 32 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLT64, 32) /* 64 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLTENT, 33) /* 32 bit rel. offset to jump slot. */
+ RELOC_NUMBER (R_390_PLTOFF16, 34) /* 16 bit offset from GOT to PLT. */
+ RELOC_NUMBER (R_390_PLTOFF32, 35) /* 32 bit offset from GOT to PLT. */
+ RELOC_NUMBER (R_390_PLTOFF64, 36) /* 16 bit offset from GOT to PLT. */
+ RELOC_NUMBER (R_390_TLS_LOAD, 37) /* Tag for load insn in TLS code. */
+ RELOC_NUMBER (R_390_TLS_GDCALL, 38) /* Tag for function call in general
+ dynamic TLS code. */
+ RELOC_NUMBER (R_390_TLS_LDCALL, 39) /* Tag for function call in local
+ dynamic TLS code. */
+ RELOC_NUMBER (R_390_TLS_GD32, 40) /* Direct 32 bit for general dynamic
+ thread local data. */
+ RELOC_NUMBER (R_390_TLS_GD64, 41) /* Direct 64 bit for general dynamic
+ thread local data. */
+ RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS
+ block offset. */
+ RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS
+ block offset. */
+ RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS
+ block offset. */
+ RELOC_NUMBER (R_390_TLS_LDM32, 45) /* Direct 32 bit for local dynamic
+ thread local data in LD code. */
+ RELOC_NUMBER (R_390_TLS_LDM64, 46) /* Direct 64 bit for local dynamic
+ thread local data in LD code. */
+ RELOC_NUMBER (R_390_TLS_IE32, 47) /* 32 bit address of GOT entry for
+ negated static TLS block offset. */
+ RELOC_NUMBER (R_390_TLS_IE64, 48) /* 64 bit address of GOT entry for
+ negated static TLS block offset. */
+ RELOC_NUMBER (R_390_TLS_IEENT, 49) /* 32 bit rel. offset to GOT entry for
+ negated static TLS block offset. */
+ RELOC_NUMBER (R_390_TLS_LE32, 50) /* 32 bit negated offset relative to
+ static TLS block. */
+ RELOC_NUMBER (R_390_TLS_LE64, 51) /* 64 bit negated offset relative to
+ static TLS block. */
+ RELOC_NUMBER (R_390_TLS_LDO32, 52) /* 32 bit offset relative to TLS
+ block. */
+ RELOC_NUMBER (R_390_TLS_LDO64, 53) /* 64 bit offset relative to TLS
+ block. */
+ RELOC_NUMBER (R_390_TLS_DTPMOD, 54) /* ID of module containing symbol. */
+ RELOC_NUMBER (R_390_TLS_DTPOFF, 55) /* Offset in TLS block. */
+ RELOC_NUMBER (R_390_TLS_TPOFF, 56) /* Negate offset in static TLS
+ block. */
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
diff --git a/include/elf/sh.h b/include/elf/sh.h
index 68a2c542e66..41bf0bf6967 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -1,5 +1,5 @@
/* SH ELF support for BFD.
- Copyright 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,6 +33,7 @@
#define EF_SH_HAS_FP(flags) ((flags) & 8)
#define EF_SH3E 8
#define EF_SH4 9
+#define EF_SH2E 11
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
@@ -45,6 +46,13 @@
: (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
|| ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
? EF_SH3 \
+ : ((mach1) == EF_SH2E && EF_SH_HAS_FP (mach2)) \
+ ? (mach2) \
+ : ((mach2) == EF_SH2E && EF_SH_HAS_FP (mach1)) \
+ ? (mach1) \
+ : (((mach1) == EF_SH2E && (mach2) == EF_SH_UNKNOWN) \
+ || ((mach2) == EF_SH2E && (mach1) == EF_SH_UNKNOWN)) \
+ ? EF_SH2E \
: (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
|| ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
? EF_SH4 \
@@ -71,61 +79,6 @@
symbols). */
#define STT_DATALABEL STT_LOPROC
-#define SH64_CRANGES_SECTION_NAME ".cranges"
-enum sh64_elf_cr_type {
- CRT_NONE = 0,
- CRT_DATA = 1,
- CRT_SH5_ISA16 = 2,
- CRT_SH5_ISA32 = 3
-};
-
-/* The official definition is this:
-
- typedef struct {
- Elf32_Addr cr_addr;
- Elf32_Word cr_size;
- Elf32_Half cr_type;
- } Elf32_CRange;
-
- but we have no use for that exact type. Instead we use this struct for
- the internal representation. */
-typedef struct {
- bfd_vma cr_addr;
- bfd_size_type cr_size;
- enum sh64_elf_cr_type cr_type;
-} sh64_elf_crange;
-
-#define SH64_CRANGE_SIZE (4 + 4 + 2)
-#define SH64_CRANGE_CR_ADDR_OFFSET 0
-#define SH64_CRANGE_CR_SIZE_OFFSET 4
-#define SH64_CRANGE_CR_TYPE_OFFSET (4 + 4)
-
-/* Get the contents type of an arbitrary address, or return CRT_NONE. */
-extern enum sh64_elf_cr_type sh64_get_contents_type
- PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
-
-/* Simpler interface.
- FIXME: This seems redundant now that we export the interface above. */
-extern bfd_boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
-
-extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
-
-/* We put this in elf_section_data (section)->tdata. */
-struct sh64_section_data
-{
- flagword contents_flags;
-
- /* Only used in the cranges section, but we don't have an official
- backend-specific bfd field. */
- bfd_size_type cranges_growth;
-};
-
-#define sh64_elf_section_data(sec) \
- ((struct sh64_section_data *) ((elf_section_data (sec))->tdata))
-
#include "elf/reloc-macros.h"
/* Relocations. */
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
index 7c780f7c3b9..2d28d26f9b4 100644
--- a/include/elf/sparc.h
+++ b/include/elf/sparc.h
@@ -1,5 +1,5 @@
/* SPARC ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -126,13 +126,36 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type)
RELOC_NUMBER (R_SPARC_UA64, 54)
RELOC_NUMBER (R_SPARC_UA16, 55)
- /* little endian data relocs */
- RELOC_NUMBER (R_SPARC_REV32, 56)
-
+ RELOC_NUMBER (R_SPARC_TLS_GD_HI22, 56)
+ RELOC_NUMBER (R_SPARC_TLS_GD_LO10, 57)
+ RELOC_NUMBER (R_SPARC_TLS_GD_ADD, 58)
+ RELOC_NUMBER (R_SPARC_TLS_GD_CALL, 59)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_HI22, 60)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_LO10, 61)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_ADD, 62)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_CALL, 63)
+ RELOC_NUMBER (R_SPARC_TLS_LDO_HIX22, 64)
+ RELOC_NUMBER (R_SPARC_TLS_LDO_LOX10, 65)
+ RELOC_NUMBER (R_SPARC_TLS_LDO_ADD, 66)
+ RELOC_NUMBER (R_SPARC_TLS_IE_HI22, 67)
+ RELOC_NUMBER (R_SPARC_TLS_IE_LO10, 68)
+ RELOC_NUMBER (R_SPARC_TLS_IE_LD, 69)
+ RELOC_NUMBER (R_SPARC_TLS_IE_LDX, 70)
+ RELOC_NUMBER (R_SPARC_TLS_IE_ADD, 71)
+ RELOC_NUMBER (R_SPARC_TLS_LE_HIX22, 72)
+ RELOC_NUMBER (R_SPARC_TLS_LE_LOX10, 73)
+ RELOC_NUMBER (R_SPARC_TLS_DTPMOD32, 74)
+ RELOC_NUMBER (R_SPARC_TLS_DTPMOD64, 75)
+ RELOC_NUMBER (R_SPARC_TLS_DTPOFF32, 76)
+ RELOC_NUMBER (R_SPARC_TLS_DTPOFF64, 77)
+ RELOC_NUMBER (R_SPARC_TLS_TPOFF32, 78)
+ RELOC_NUMBER (R_SPARC_TLS_TPOFF64, 79)
+
EMPTY_RELOC (R_SPARC_max_std)
RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
+ RELOC_NUMBER (R_SPARC_REV32, 252)
END_RELOC_NUMBERS (R_SPARC_max)
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index c39a7a04725..b36341ddba7 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2002-12-26 Kazu Hirata <kazu@cs.umass.edu>
+
+ * sim-h8300.h: Remove ^M.
+
2002-07-29 Andrey Volkov <avolkov@transas.com>
* sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
diff --git a/include/gdb/sim-h8300.h b/include/gdb/sim-h8300.h
index ecc68835296..246370aec23 100644
--- a/include/gdb/sim-h8300.h
+++ b/include/gdb/sim-h8300.h
@@ -1,36 +1,36 @@
-/* This file defines the interface between the h8300 simulator and gdb.
- Copyright (C) 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
+/* This file defines the interface between the h8300 simulator and gdb.
+ Copyright (C) 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. */
-#if !defined (SIM_H8300_H)
-#define SIM_H8300_H
-
-#ifdef __cplusplus
+#if !defined (SIM_H8300_H)
+#define SIM_H8300_H
+
+#ifdef __cplusplus
extern "C" { //}
#endif
-
-/* The simulator makes use of the following register information. */
-
+
+/* The simulator makes use of the following register information. */
+
enum sim_h8300_regs
{
/* Registers common to all the H8 variants. */
/* Start here: */
- SIM_H8300_R0_REGNUM,
+ SIM_H8300_R0_REGNUM,
SIM_H8300_R1_REGNUM,
SIM_H8300_R2_REGNUM,
SIM_H8300_R3_REGNUM,
@@ -42,8 +42,8 @@ extern "C" { //}
SIM_H8300_CCR_REGNUM, /* Contains processor status */
SIM_H8300_PC_REGNUM, /* Contains program counter */
/* End here */
-
- SIM_H8300_EXR_REGNUM, /* Contains extended processor status
+
+ SIM_H8300_EXR_REGNUM, /* Contains extended processor status
H8S and higher */
SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/
SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */
@@ -55,11 +55,11 @@ extern "C" { //}
enum
{
- SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
- may be passed */
- SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM, /* last reg in which an arg
+ SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
may be passed */
- SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
+ SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM, /* last reg in which an arg
+ may be passed */
+ SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
stack frame */
SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM /* Contains address of top of stack */
};
@@ -71,8 +71,8 @@ extern "C" { //}
SIM_H8300_NUM_REGS = 16
};
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
-
+
#endif /* SIM_H8300_H */
diff --git a/include/hashtab.h b/include/hashtab.h
index be866b51ee6..4995a9a10e0 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -76,10 +76,16 @@ typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
/* We also need a free() routine. */
typedef void (*htab_free) PARAMS ((PTR));
+/* Memory allocation and deallocation; variants which take an extra
+ argument. */
+typedef PTR (*htab_alloc_with_arg) PARAMS ((void *, size_t, size_t));
+typedef void (*htab_free_with_arg) PARAMS ((void *, void *));
+
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
tables. All work with hash table should be executed only through
- functions mentioned below. */
+ functions mentioned below. The size of this structure is subject to
+ change. */
struct htab GTY(())
{
@@ -115,6 +121,11 @@ struct htab GTY(())
/* Pointers to allocate/free functions. */
htab_alloc alloc_f;
htab_free free_f;
+
+ /* Alternate allocate/free functions, which take an extra argument. */
+ PTR GTY((skip (""))) alloc_arg;
+ htab_alloc_with_arg alloc_with_arg_f;
+ htab_free_with_arg free_with_arg_f;
};
typedef struct htab *htab_t;
@@ -128,10 +139,20 @@ extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
htab_eq, htab_del,
htab_alloc, htab_free));
+extern htab_t htab_create_alloc_ex PARAMS ((size_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg));
+
/* Backward-compatibility functions. */
extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
+extern void htab_set_functions_ex PARAMS ((htab_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg));
+
extern void htab_delete PARAMS ((htab_t));
extern void htab_empty PARAMS ((htab_t));
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 5aa92e9ab23..c7c4484cc80 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,48 @@
+2003-01-23 Alan Modra <amodra@bigpond.net.au>
+
+ * m68hc11.h (cpu6812s): Define.
+
+2003-01-07 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Fix missing space in comment.
+ (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4, INSN_ISA5)
+ (INSN_ISA32, INSN_ISA32R2, INSN_ISA64): Shift values right
+ by four bits.
+
+2003-01-02 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Update copyright years to include 2002 (which had
+ been missed previously) and 2003. Make comments about "+A",
+ "+B", and "+C" operand types more descriptive.
+
+2002-12-31 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Note that the "+D" operand type name is now used.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Document "+" as the start of two-character operand
+ type names, and add new "K", "+A", "+B", and "+C" operand types.
+ (OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
+ (OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
+ defines.
+
+2002-12-24 Dmitry Diky <diwil@mail.ru>
+
+ * msp430.h: New file. Defines msp430 opcodes.
+
+2002-12-30 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
+
+ * h8300.h: Added some more pseudo opcodes for system call
+ processing.
+
+2002-12-19 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (OP_OP_COP0, OP_OP_COP1, OP_OP_COP2, OP_OP_COP3)
+ (OP_OP_LWC1, OP_OP_LWC2, OP_OP_LWC3, OP_OP_LDC1, OP_OP_LDC2)
+ (OP_OP_LDC3, OP_OP_SWC1, OP_OP_SWC2, OP_OP_SWC3, OP_OP_SDC1)
+ (OP_OP_SDC2, OP_OP_SDC3): Define.
+
2002-12-16 Alan Modra <amodra@bigpond.net.au>
* hppa.h (completer_chars): #if 0 out.
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index d5404c2c2ff..4141c575e5a 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -301,6 +301,16 @@ struct h8_opcode
#define O_STM 86
#define O_STMAC 87
#define O_LAST 88
+/* Change made for System Call processing. */
+#define O_SYS_CREAT 100
+#define O_SYS_OPEN 101
+#define O_SYS_READ 102
+#define O_SYS_WRITE 103
+#define O_SYS_LSEEK 104
+#define O_SYS_CLOSE 105
+#define O_SYS_STAT 106
+#define O_SYS_FSTAT 107
+/* End of System Call specific Changes. */
#define SB 0
#define SW 1
#define SL 2
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
index 471161788ad..8234664a626 100644
--- a/include/opcode/hppa.h
+++ b/include/opcode/hppa.h
@@ -407,6 +407,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldbx", 0x0c000000, 0xfc001fc0, "cXx(b),t", pa10, 0},
{ "ldwa", 0x0c000180, 0xfc00d3c0, "cxccx(b),t", pa10, FLAG_STRICT},
{ "ldwa", 0x0c001180, 0xfc00d3c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldwa", 0x0c0011a0, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(s,b),t", pa10, FLAG_STRICT},
{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(b),t", pa10, FLAG_STRICT},
{ "ldcw", 0x0c0011c0, 0xfc0013c0, "cmcd5(s,b),t", pa10, FLAG_STRICT},
@@ -417,6 +418,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(b)", pa10, FLAG_STRICT},
{ "ldda", 0x0c000100, 0xfc00d3c0, "cxccx(b),t", pa20, FLAG_STRICT},
{ "ldda", 0x0c001100, 0xfc00d3c0, "cmcc5(b),t", pa20, FLAG_STRICT},
+{ "ldda", 0x0c001120, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(s,b),t", pa20, FLAG_STRICT},
{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(b),t", pa20, FLAG_STRICT},
{ "ldcd", 0x0c001140, 0xfc0013c0, "cmcd5(s,b),t", pa20, FLAG_STRICT},
diff --git a/include/opcode/m68hc11.h b/include/opcode/m68hc11.h
index a538026f84a..5d2fc9bb04f 100644
--- a/include/opcode/m68hc11.h
+++ b/include/opcode/m68hc11.h
@@ -1,5 +1,5 @@
/* m68hc11.h -- Header file for Motorola 68HC11 & 68HC12 opcode table
- Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GDB, GAS, and the GNU binutils.
@@ -388,6 +388,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
/* CPU identification. */
#define cpu6811 0x01
#define cpu6812 0x02
+#define cpu6812s 0x04
/* The opcode table is an array of struct m68hc11_opcode. */
struct m68hc11_opcode {
@@ -424,4 +425,3 @@ extern const struct m68hc12_opcode_alias m68hc12_alias[];
extern const int m68hc12_num_alias;
#endif /* _OPCODE_M68HC11_H */
-
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 3849fdce68b..1f90cfd7636 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1,5 +1,5 @@
/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
@@ -142,6 +142,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define OP_SH_VECBYTE 22
#define OP_MASK_VECALIGN 0x7 /* Vector byte-align (alni.ob) op. */
#define OP_SH_VECALIGN 21
+#define OP_MASK_INSMSB 0x1f /* "ins" MSB. */
+#define OP_SH_INSMSB 11
+#define OP_MASK_EXTMSBD 0x1f /* "ext" MSBD. */
+#define OP_SH_EXTMSBD 11
+
+#define OP_OP_COP0 0x10
+#define OP_OP_COP1 0x11
+#define OP_OP_COP2 0x12
+#define OP_OP_COP3 0x13
+#define OP_OP_LWC1 0x31
+#define OP_OP_LWC2 0x32
+#define OP_OP_LWC3 0x33 /* a.k.a. pref */
+#define OP_OP_LDC1 0x35
+#define OP_OP_LDC2 0x36
+#define OP_OP_LDC3 0x37 /* a.k.a. ld */
+#define OP_OP_SWC1 0x39
+#define OP_OP_SWC2 0x3a
+#define OP_OP_SWC3 0x3b
+#define OP_OP_SDC1 0x3d
+#define OP_OP_SDC2 0x3e
+#define OP_OP_SDC3 0x3f /* a.k.a. sd */
/* Values in the 'VSEL' field. */
#define MDMX_FMTSEL_IMM_QH 0x1d
@@ -211,6 +232,15 @@ struct mips_opcode
"J" 19 bit wait function code (OP_*_CODE19)
"x" accept and ignore register name
"z" must be zero register
+ "K" 5 bit Hardware Register (rdhwr instruction) (OP_*_RD)
+ "+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.
+ Enforces: 0 < (pos+size) <= 32.
+ "+C" 5 bit ext size, which becomes MSBD (OP_*_EXTMSBD).
+ Requires that "+A" occur first to set position.
+ Enforces: 0 < (pos+size) <= 32.
Floating point instructions:
"D" 5 bit destination register (OP_*_FD)
@@ -230,6 +260,8 @@ struct mips_opcode
"e" 5 bit vector register byte specifier (OP_*_VECBYTE)
"%" 3 bit immediate vr5400 vector alignment operand (OP_*_VECALIGN)
see also "k" above
+ "+D" Combined destination register ("G") and sel ("H") for CP0 ops,
+ for pretty-printing in disassembly only.
Macro instructions:
"A" General 32 bit expression
@@ -251,11 +283,16 @@ struct mips_opcode
"()" parens surrounding optional value
"," separates operands
"[]" brackets around index for vector-op scalar operand specifier (vr5400)
+ "+" Start of extension sequence.
Characters used so far, for quick reference when adding more:
- "%[]<>(),"
- "ABCDEFGHIJLMNOPQRSTUVWXYZ"
+ "%[]<>(),+"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefhijklopqrstuvwxz"
+
+ Extension character sequences used so far ("+" followed by the
+ following), for quick reference when adding more:
+ "ABCD"
*/
/* These are the bits which may be set in the pinfo field of an
@@ -336,17 +373,18 @@ struct mips_opcode
/* Masks used to mark instructions to indicate which MIPS ISA level
they were introduced in. ISAs, as defined below, are logical
- ORs of these bits, indicatingthat they support the instructions
+ ORs of these bits, indicating that they support the instructions
defined at the given level. */
#define INSN_ISA_MASK 0x00000fff
-#define INSN_ISA1 0x00000010
-#define INSN_ISA2 0x00000020
-#define INSN_ISA3 0x00000040
-#define INSN_ISA4 0x00000080
-#define INSN_ISA5 0x00000100
-#define INSN_ISA32 0x00000200
-#define INSN_ISA64 0x00000400
+#define INSN_ISA1 0x00000001
+#define INSN_ISA2 0x00000002
+#define INSN_ISA3 0x00000004
+#define INSN_ISA4 0x00000008
+#define INSN_ISA5 0x00000010
+#define INSN_ISA32 0x00000020
+#define INSN_ISA64 0x00000040
+#define INSN_ISA32R2 0x00000080
/* Masks used for MIPS-defined ASEs. */
#define INSN_ASE_MASK 0x0000f000
@@ -389,9 +427,12 @@ struct mips_opcode
#define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)
#define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)
#define ISA_MIPS5 (ISA_MIPS4 | INSN_ISA5)
+
#define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)
#define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
+#define ISA_MIPS32R2 (ISA_MIPS32 | INSN_ISA32R2)
+
/* CPU defines, use instead of hardcoding processor number. Keep this
in sync with bfd/archures.c in order for machine selection to work. */
#define CPU_UNKNOWN 0 /* Gas internal use. */
@@ -415,6 +456,7 @@ struct mips_opcode
#define CPU_R12000 12000
#define CPU_MIPS16 16
#define CPU_MIPS32 32
+#define CPU_MIPS32R2 33
#define CPU_MIPS5 5
#define CPU_MIPS64 64
#define CPU_SB1 12310201 /* octal 'SB', 01. */
diff --git a/include/opcode/msp430.h b/include/opcode/msp430.h
new file mode 100644
index 00000000000..19702254eef
--- /dev/null
+++ b/include/opcode/msp430.h
@@ -0,0 +1,111 @@
+/* Opcode table for the TI MSP430 microcontrollers
+
+ Copyright 2002 Free Software Foundation, Inc.
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef __MSP430_H_
+#define __MSP430_H_
+
+struct msp430_operand_s
+{
+ int ol; /* Operand length words. */
+ int am; /* Addr mode. */
+ int reg; /* Register. */
+ int mode; /* Pperand mode. */
+#define OP_REG 0
+#define OP_EXP 1
+#ifndef DASM_SECTION
+ expressionS exp;
+#endif
+};
+
+#define BYTE_OPERATION (1 << 6) /* Byte operation flag for all instructions. */
+
+struct msp430_opcode_s
+{
+ char *name;
+ int fmt;
+ int insn_opnumb;
+ int bin_opcode;
+ int bin_mask;
+};
+
+#define MSP_INSN(name, size, numb, bin, mask) { #name, size, numb, bin, mask }
+
+static struct msp430_opcode_s msp430_opcodes[] =
+{
+ MSP_INSN (and, 1, 2, 0xf000, 0xf000),
+ MSP_INSN (inv, 0, 1, 0xe330, 0xfff0),
+ MSP_INSN (xor, 1, 2, 0xe000, 0xf000),
+ MSP_INSN (setz, 0, 0, 0xd322, 0xffff),
+ MSP_INSN (setc, 0, 0, 0xd312, 0xffff),
+ MSP_INSN (eint, 0, 0, 0xd232, 0xffff),
+ MSP_INSN (setn, 0, 0, 0xd222, 0xffff),
+ MSP_INSN (bis, 1, 2, 0xd000, 0xf000),
+ MSP_INSN (clrz, 0, 0, 0xc322, 0xffff),
+ MSP_INSN (clrc, 0, 0, 0xc312, 0xffff),
+ MSP_INSN (dint, 0, 0, 0xc232, 0xffff),
+ MSP_INSN (clrn, 0, 0, 0xc222, 0xffff),
+ MSP_INSN (bic, 1, 2, 0xc000, 0xf000),
+ MSP_INSN (bit, 1, 2, 0xb000, 0xf000),
+ MSP_INSN (dadc, 0, 1, 0xa300, 0xff30),
+ MSP_INSN (dadd, 1, 2, 0xa000, 0xf000),
+ MSP_INSN (tst, 0, 1, 0x9300, 0xff30),
+ MSP_INSN (cmp, 1, 2, 0x9000, 0xf000),
+ MSP_INSN (decd, 0, 1, 0x8320, 0xff30),
+ MSP_INSN (dec, 0, 1, 0x8310, 0xff30),
+ MSP_INSN (sub, 1, 2, 0x8000, 0xf000),
+ MSP_INSN (sbc, 0, 1, 0x7300, 0xff30),
+ MSP_INSN (subc, 1, 2, 0x7000, 0xf000),
+ MSP_INSN (adc, 0, 1, 0x6300, 0xff30),
+ MSP_INSN (rlc, 0, 2, 0x6000, 0xf000),
+ MSP_INSN (addc, 1, 2, 0x6000, 0xf000),
+ MSP_INSN (incd, 0, 1, 0x5320, 0xff30),
+ MSP_INSN (inc, 0, 1, 0x5310, 0xff30),
+ MSP_INSN (rla, 0, 2, 0x5000, 0xf000),
+ MSP_INSN (add, 1, 2, 0x5000, 0xf000),
+ MSP_INSN (nop, 0, 0, 0x4303, 0xffff),
+ MSP_INSN (clr, 0, 1, 0x4300, 0xff30),
+ MSP_INSN (ret, 0, 0, 0x4130, 0xff30),
+ MSP_INSN (pop, 0, 1, 0x4130, 0xff30),
+ MSP_INSN (br, 0, 3, 0x4000, 0xf000),
+ MSP_INSN (mov, 1, 2, 0x4000, 0xf000),
+ MSP_INSN (jmp, 3, 1, 0x3c00, 0xfc00),
+ MSP_INSN (jl, 3, 1, 0x3800, 0xfc00),
+ MSP_INSN (jge, 3, 1, 0x3400, 0xfc00),
+ MSP_INSN (jn, 3, 1, 0x3000, 0xfc00),
+ MSP_INSN (jc, 3, 1, 0x2c00, 0xfc00),
+ MSP_INSN (jhs, 3, 1, 0x2c00, 0xfc00),
+ MSP_INSN (jnc, 3, 1, 0x2800, 0xfc00),
+ MSP_INSN (jlo, 3, 1, 0x2800, 0xfc00),
+ MSP_INSN (jz, 3, 1, 0x2400, 0xfc00),
+ MSP_INSN (jeq, 3, 1, 0x2400, 0xfc00),
+ MSP_INSN (jnz, 3, 1, 0x2000, 0xfc00),
+ MSP_INSN (jne, 3, 1, 0x2000, 0xfc00),
+ MSP_INSN (reti, 2, 0, 0x1300, 0xffc0),
+ MSP_INSN (call, 2, 1, 0x1280, 0xffc0),
+ MSP_INSN (push, 2, 1, 0x1200, 0xff80),
+ MSP_INSN (sxt, 2, 1, 0x1180, 0xffc0),
+ MSP_INSN (rra, 2, 1, 0x1100, 0xff80),
+ MSP_INSN (swpb, 2, 1, 0x1080, 0xffc0),
+ MSP_INSN (rrc, 2, 1, 0x1000, 0xff80),
+
+ /* End of instruction set. */
+ { NULL, 0, 0, 0, 0 }
+};
+
+#endif
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 23f7ac69d42..86707fc1d2f 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -36,6 +36,10 @@ extern "C" {
#include "ansidecl.h"
+#ifndef GTY
+#define GTY(X)
+#endif
+
/* Use typedefs for the key and data types to facilitate changing
these types, if necessary. These types should be sufficiently wide
that any pointer or scalar can be cast to these types, and then
@@ -65,7 +69,7 @@ typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
node structures. The first argument is the number of bytes needed;
the second is a data pointer the splay tree functions pass through
to the allocator. This function must never return zero. */
-typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *));
+typedef PTR (*splay_tree_allocate_fn) PARAMS((int, void *));
/* The type of a function used to free memory allocated using the
corresponding splay_tree_allocate_fn. The first argument is the
@@ -74,24 +78,24 @@ typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *));
typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
/* The nodes in the splay tree. */
-struct splay_tree_node_s
+struct splay_tree_node_s GTY(())
{
/* The key. */
- splay_tree_key key;
+ splay_tree_key GTY ((use_param1 (""))) key;
/* The value. */
- splay_tree_value value;
+ splay_tree_value GTY ((use_param2 (""))) value;
/* The left and right children, respectively. */
- splay_tree_node left;
- splay_tree_node right;
+ splay_tree_node GTY ((use_params (""))) left;
+ splay_tree_node GTY ((use_params (""))) right;
};
/* The splay tree itself. */
-typedef struct splay_tree_s
+struct splay_tree_s GTY(())
{
/* The root of the tree. */
- splay_tree_node root;
+ splay_tree_node GTY ((use_params (""))) root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -105,9 +109,10 @@ typedef struct splay_tree_s
/* Allocate/free functions, and a data pointer to pass to them. */
splay_tree_allocate_fn allocate;
splay_tree_deallocate_fn deallocate;
- void *allocate_data;
+ PTR GTY((skip (""))) allocate_data;
-} *splay_tree;
+};
+typedef struct splay_tree_s *splay_tree;
extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
splay_tree_delete_key_fn,
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 7280aa03747..57acfc068eb 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,72 @@
+2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * libiberty.texi: Update to GFDL 1.2.
+
+2003-01-30 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Makefile.in (libiberty_topdir): New subst.
+ (mkinstalldirs): Redefine in terms of the above.
+ * configure.in: AC_SUBST it.
+ * configure: Regenerate.
+
+2003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Makefile.in (all-subdir, check-subdir, installcheck-subdir)
+ (info-subdir, install-info-subdir, clean-info-subdir)
+ (dvi-subdir, install-subdir, etags-subdir, mostlyclean-subdir)
+ (clean-subdir, distclean-subdir, maintainer-clean-subdir):
+ Pass $(FLAGS_TO_PASS).
+
+2003-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (install_to_tooldir): Instead of $(MULTISUBDIR), use
+ /`$$CC -print-multi-os-directory`.
+
+2003-01-26 Daniel Jacobowitz <drow@mvista.com>
+
+ * hashtab.c (htab_create_alloc_ex): New function.
+ (hatab_set_functions_ex): New function.
+ (htab_delete, htab_expand): Support alternate allocation functions.
+
+2003-01-24 Christopher Faylor <cgf@redhat.com>
+
+ * configure.in: Remove special pex-cygwin consideration.
+ * configure: Regenerate.
+ * pex-cygwin.c: Remove.
+ * Makefile.in: Remove pex-cygwin.[co] lines.
+
+2003-01-24 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.in (CFILES): Add pex-*.c.
+ (REQUIRED_OFILES): Change pexecute.o to @pexecute@
+ (CONFIGURED_OFILES): Add pex-*.o.
+ (TEXIFILES): Add pexecute.txh.
+ (pexecute.o): Delete rule.
+ (pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
+ pex-unix.o, pex-win32.o): New rules.
+ * configure.in: Change AC_INIT argument to xmalloc.c.
+ Compute appropriate pexecute implementation and substitute it
+ as @pexecute@.
+
+ * pexecute.c: Split up into...
+ * pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
+ pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
+ new files.
+
+ * functions.texi: Regenerate.
+ * configure: Regenerate.
+
+2003-01-20 Josef Zlomek <zlomekj@suse.cz>
+
+ * hashtab.c (htab_expand): Fix allocation of new entries.
+
+2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
+
+ * Makefile.in (install_to_libdir, install_to_tooldir): Add a
+ mkinstalldirs command.
+
2002-12-04 Danny Smith <dannysmith@users.sourceforge.net>
* make-relative-prefix.c (HAVE_HOST_EXECUTABLE_SUFFIX):
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index cdf14a4311b..761c674c40e 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000, 2001, 2002
+# Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -26,6 +26,7 @@
# Makefile for libiberty directory
#
+libiberty_topdir = @libiberty_topdir@
srcdir = @srcdir@
VPATH = @srcdir@
@@ -50,7 +51,7 @@ MULTICLEAN = true
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
+mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs
# Some compilers can't handle cc -c blah.c -o foo/blah.o.
OUTPUT_OPTION = @OUTPUT_OPTION@
@@ -84,6 +85,7 @@ FLAGS_TO_PASS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
+ "DESTDIR=$(DESTDIR)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"EXTRA_OFILES=$(EXTRA_OFILES)" \
"HDEFINES=$(HDEFINES)" \
@@ -139,7 +141,10 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
memset.c mkstemps.c \
objalloc.c obstack.c \
- partition.c pexecute.c putenv.c \
+ partition.c \
+ pex-djgpp.c pex-mpw.c pex-msdos.c pex-os2.c \
+ pex-unix.c pex-win32.c \
+ putenv.c \
random.c regex.c rename.c rindex.c \
safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c \
splay-tree.c strcasecmp.c strchr.c strdup.c strerror.c \
@@ -163,7 +168,7 @@ REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o \
make-relative-prefix.o \
make-temp-file.o \
objalloc.o obstack.o \
- partition.o pexecute.o \
+ partition.o @pexecute@ \
safe-ctype.o sort.o spaces.o splay-tree.o strerror.o \
strsignal.o \
ternary.o \
@@ -180,7 +185,9 @@ CONFIGURED_OFILES = asprintf.o atexit.o \
getcwd.o getpagesize.o \
index.o insque.o \
memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \
- putenv.o \
+ pex-djgpp.o pex-mpw.o pex-msdos.o pex-os2.o \
+ pex-unix.o pex-win32.o \
+ putenv.o \
random.o rename.o rindex.o \
setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o \
strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o \
@@ -239,7 +246,7 @@ TEXISRC = \
# Additional files that have texi snippets that need to be collected
# and sorted. Some are here because the sources are imported from
# elsewhere. Others represent headers in ../include.
-TEXIFILES = fnmatch.txh
+TEXIFILES = fnmatch.txh pexecute.txh
libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
$(MAKEINFO) -I$(srcdir) $(srcdir)/libiberty.texi
@@ -261,6 +268,7 @@ INSTALL_DEST = @INSTALL_DEST@
install: install_to_$(INSTALL_DEST) install-subdir
install_to_libdir: all
+ ${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
@@ -277,9 +285,10 @@ install_to_libdir: all
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
install_to_tooldir: all
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n
+ ( cd $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
# needed-list is used by libstdc++. NEEDED is the list of functions
@@ -390,7 +399,7 @@ maintainer-clean-subdir: config.h
@subdirs='$(SUBDIRS)'; \
target=`echo $@ | sed -e 's/-subdir//'`; \
for dir in $$subdirs ; do \
- cd $$dir && $(MAKE) $$target; \
+ cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $$target; \
done
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
@@ -447,8 +456,13 @@ objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/partition.h
-pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+pex-djgpp.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-mpw.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-msdos.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
+pex-os2.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-unix.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+pex-win32.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
putenv.o: config.h $(INCDIR)/ansidecl.h
random.o: $(INCDIR)/ansidecl.h
regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
diff --git a/libiberty/configure b/libiberty/configure
index cac9f5637a9..86037aebbe5 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -465,7 +465,7 @@ echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=pexecute.c
+ac_unique_file=xmalloc.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
@@ -583,6 +583,7 @@ if test "${srcdir}" = "."; then
else
libiberty_topdir="${srcdir}/.."
fi
+
ac_aux_dir=
for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
if test -f $ac_dir/install-sh; then
@@ -605,7 +606,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:609: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:610: 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"
@@ -630,7 +631,7 @@ fi
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:634: checking for $ac_word" >&5
+echo "configure:635: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -676,7 +677,7 @@ fi
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:680: checking for $ac_word" >&5
+echo "configure:681: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -716,7 +717,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:720: checking host system type" >&5
+echo "configure:721: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -739,7 +740,7 @@ echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:743: checking build system type" >&5
+echo "configure:744: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -765,7 +766,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:769: checking for $ac_word" >&5
+echo "configure:770: 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
@@ -797,7 +798,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:801: checking for $ac_word" >&5
+echo "configure:802: 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
@@ -829,7 +830,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:833: checking for $ac_word" >&5
+echo "configure:834: 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
@@ -866,7 +867,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:870: checking for $ac_word" >&5
+echo "configure:871: 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
@@ -896,7 +897,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:900: checking for $ac_word" >&5
+echo "configure:901: 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
@@ -945,7 +946,7 @@ fi
fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:949: checking whether we are using GNU C" >&5
+echo "configure:950: 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
@@ -954,7 +955,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:958: \"$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:959: \"$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
@@ -970,7 +971,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:974: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:975: 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
@@ -1002,10 +1003,10 @@ fi
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1006: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1009: checking whether cc understands -c and -o together" >&5
+echo "configure:1010: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1017,16 +1018,16 @@ else
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
@@ -1062,7 +1063,7 @@ fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1066: checking for POSIXized ISC" >&5
+echo "configure:1067: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1083,12 +1084,12 @@ else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1087: checking for working const" >&5
+echo "configure:1088: 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 1092 "configure"
+#line 1093 "configure"
#include "confdefs.h"
int main() {
@@ -1137,7 +1138,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1158,21 +1159,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1162: checking for inline" >&5
+echo "configure:1163: 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 1169 "configure"
+#line 1170 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1215,7 +1216,7 @@ esac
# 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:1219: checking for a BSD compatible install" >&5
+echo "configure:1220: 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
@@ -1276,7 +1277,7 @@ host_makefile_frag=${frag}
# able to link anything, it had better be able to at least compile
# something.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1280: checking how to run the C preprocessor" >&5
+echo "configure:1281: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1291,13 +1292,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 1295 "configure"
+#line 1296 "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:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1302: \"$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
:
@@ -1308,13 +1309,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+#line 1313 "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:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1319: \"$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
:
@@ -1325,13 +1326,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1329 "configure"
+#line 1330 "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:1335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1336: \"$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
:
@@ -1359,17 +1360,17 @@ for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1363: checking for $ac_hdr" >&5
+echo "configure:1364: 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 1368 "configure"
+#line 1369 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1374: \"$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*
@@ -1396,12 +1397,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1400: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1401: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1405 "configure"
+#line 1406 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1417,7 +1418,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1438,12 +1439,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1442: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1443: 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 1447 "configure"
+#line 1448 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1452,7 +1453,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1474,19 +1475,19 @@ fi
echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
-echo "configure:1478: checking whether errno must be declared" >&5
+echo "configure:1479: checking whether errno must be declared" >&5
if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1483 "configure"
+#line 1484 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
int x = errno;
; return 0; }
EOF
-if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libiberty_cv_declare_errno=no
else
@@ -1508,12 +1509,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1512: checking for ANSI C header files" >&5
+echo "configure:1513: 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 1517 "configure"
+#line 1518 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1521,7 +1522,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1526: \"$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*
@@ -1538,7 +1539,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 1542 "configure"
+#line 1543 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1556,7 +1557,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 1560 "configure"
+#line 1561 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1577,7 +1578,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1581 "configure"
+#line 1582 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1588,7 +1589,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1612,12 +1613,12 @@ EOF
fi
echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
-echo "configure:1616: checking for uintptr_t" >&5
+echo "configure:1617: checking for uintptr_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1622 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1654,12 +1655,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1658: checking for pid_t" >&5
+echo "configure:1659: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1663 "configure"
+#line 1664 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1744,12 +1745,12 @@ if test "x" = "y"; then
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1748: checking for $ac_func" >&5
+echo "configure:1749: 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 1753 "configure"
+#line 1754 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1772,7 +1773,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1777: \"$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
@@ -1799,12 +1800,12 @@ done
for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1803: checking for $ac_func" >&5
+echo "configure:1804: 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 1808 "configure"
+#line 1809 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1827,7 +1828,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1832: \"$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
@@ -1854,12 +1855,12 @@ done
for ac_func in memmove memset putenv random rename rindex sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1858: checking for $ac_func" >&5
+echo "configure:1859: 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 1863 "configure"
+#line 1864 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1882,7 +1883,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1887: \"$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
@@ -1909,12 +1910,12 @@ done
for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1913: checking for $ac_func" >&5
+echo "configure:1914: 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 1918 "configure"
+#line 1919 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1937,7 +1938,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1942: \"$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
@@ -1964,12 +1965,12 @@ done
for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1968: checking for $ac_func" >&5
+echo "configure:1969: 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 1973 "configure"
+#line 1974 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1992,7 +1993,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1997: \"$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
@@ -2019,12 +2020,12 @@ done
for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2023: checking for $ac_func" >&5
+echo "configure:2024: 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 2028 "configure"
+#line 2029 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2047,7 +2048,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2052: \"$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
@@ -2074,12 +2075,12 @@ done
for ac_func in sysconf times sbrk gettimeofday ffs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2078: checking for $ac_func" >&5
+echo "configure:2079: 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 2083 "configure"
+#line 2084 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2102,7 +2103,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2107: \"$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
@@ -2332,7 +2333,7 @@ if test -z "${setobjs}"; then
# We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works.
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2336: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2337: 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.
@@ -2343,12 +2344,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2347 "configure"
+#line 2348 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2353: \"$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
@@ -2374,19 +2375,19 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2378: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2379: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
for ac_func in $funcs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2385: checking for $ac_func" >&5
+echo "configure:2386: 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 2390 "configure"
+#line 2391 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2409,7 +2410,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2414: \"$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
@@ -2436,12 +2437,12 @@ done
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2440: checking whether alloca needs Cray hooks" >&5
+echo "configure:2441: 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 2445 "configure"
+#line 2446 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2466,12 +2467,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:2470: checking for $ac_func" >&5
+echo "configure:2471: 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 2475 "configure"
+#line 2476 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2494,7 +2495,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2499: \"$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
@@ -2520,7 +2521,7 @@ fi
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2524: checking stack direction for C alloca" >&5
+echo "configure:2525: 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
@@ -2528,7 +2529,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2532 "configure"
+#line 2533 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2547,7 +2548,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2552: \"$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
@@ -2569,17 +2570,17 @@ EOF
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2573: checking for vfork.h" >&5
+echo "configure:2574: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2578 "configure"
+#line 2579 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2584: \"$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*
@@ -2604,18 +2605,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2608: checking for working vfork" >&5
+echo "configure:2609: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2614: checking for vfork" >&5
+echo "configure:2615: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
+#line 2620 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2638,7 +2639,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2660,7 +2661,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2664 "configure"
+#line 2665 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2755,7 +2756,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2787,12 +2788,12 @@ fi
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2791: checking for $ac_func" >&5
+echo "configure:2792: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2796 "configure"
+#line 2797 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2815,7 +2816,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2845,12 +2846,12 @@ done
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2849: checking for $ac_func" >&5
+echo "configure:2850: 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 2854 "configure"
+#line 2855 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2873,7 +2874,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2878: \"$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
@@ -2901,19 +2902,19 @@ done
for v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2905: checking for $v" >&5
+echo "configure:2906: checking for $v" >&5
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2910 "configure"
+#line 2911 "configure"
#include "confdefs.h"
int *p;
int main() {
extern int $v []; p = $v;
; return 0; }
EOF
-if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "libiberty_cv_var_$v=yes"
else
@@ -2939,12 +2940,12 @@ EOF
for ac_func in $checkfuncs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2943: checking for $ac_func" >&5
+echo "configure:2944: 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 2948 "configure"
+#line 2949 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2967,7 +2968,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2972: \"$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
@@ -2993,21 +2994,31 @@ done
fi
+# Figure out which version of pexecute to use.
+case "${host}" in
+ *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
+ *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
+ *-*-msdos*) pexecute=pex-msdos.o ;;
+ *-*-os2-emx*) pexecute=pex-os2.o ;;
+ *) pexecute=pex-unix.o ;;
+esac
+
+
for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3001: checking for $ac_hdr" >&5
+echo "configure:3012: 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 3006 "configure"
+#line 3017 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3022: \"$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*
@@ -3036,12 +3047,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3040: checking for $ac_func" >&5
+echo "configure:3051: 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 3045 "configure"
+#line 3056 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3064,7 +3075,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3079: \"$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
@@ -3089,7 +3100,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3093: checking for working mmap" >&5
+echo "configure:3104: 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
@@ -3097,7 +3108,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3101 "configure"
+#line 3112 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3250,7 +3261,7 @@ main()
}
EOF
-if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3265: \"$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
@@ -3274,7 +3285,7 @@ fi
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:3278: checking for working strncmp" >&5
+echo "configure:3289: checking for working strncmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3282,7 +3293,7 @@ else
ac_cv_func_strncmp_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 3286 "configure"
+#line 3297 "configure"
#include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi.
@@ -3346,7 +3357,7 @@ main ()
}
EOF
-if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strncmp_works=yes
else
@@ -3510,6 +3521,7 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
+s%@libiberty_topdir@%$libiberty_topdir%g
s%@MAINT@%$MAINT%g
s%@NOTMAINT@%$NOTMAINT%g
s%@MAKEINFO@%$MAKEINFO%g
@@ -3541,6 +3553,7 @@ s%@CPP@%$CPP%g
s%@CHECK@%$CHECK%g
s%@target_header_dir@%$target_header_dir%g
s%@LIBOBJS@%$LIBOBJS%g
+s%@pexecute@%$pexecute%g
s%@INSTALL_DEST@%$INSTALL_DEST%g
CEOF
diff --git a/libiberty/configure.in b/libiberty/configure.in
index a8dc66fa83c..1329f1352d6 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script
AC_PREREQ(2.13)
-AC_INIT(pexecute.c)
+AC_INIT(xmalloc.c)
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
@@ -35,6 +35,7 @@ if test "${srcdir}" = "."; then
else
libiberty_topdir="${srcdir}/.."
fi
+AC_SUBST(libiberty_topdir)
AC_CONFIG_AUX_DIR($libiberty_topdir)
dnl Very limited version of automake's enable-maintainer-mode
@@ -425,6 +426,16 @@ if test -z "${setobjs}"; then
AC_CHECK_FUNCS($checkfuncs)
fi
+# Figure out which version of pexecute to use.
+case "${host}" in
+ *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
+ *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
+ *-*-msdos*) pexecute=pex-msdos.o ;;
+ *-*-os2-emx*) pexecute=pex-os2.o ;;
+ *) pexecute=pex-unix.o ;;
+esac
+AC_SUBST(pexecute)
+
libiberty_AC_FUNC_STRNCMP
# Install a library built with a cross compiler in $(tooldir) rather
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index 7d9c181d219..18b2480a781 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -483,7 +483,7 @@ reading and writing.
@end deftypefn
-@c pexecute.c:67
+@c pexecute.txh:1
@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
Executes a program.
@@ -498,14 +498,15 @@ use if needed. This is currently only needed for MS-DOS ports that
don't use @code{go32} (do any still exist?). Ports that don't need it
can pass @code{NULL}.
-(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH} should be searched
-(??? It's not clear that GCC passes this flag correctly). (@code{@var{flags} &
-PEXECUTE_FIRST}) is nonzero for the first process in chain.
-(@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the last process
-in chain. The first/last flags could be simplified to only mark the
-last of a chain of processes but that requires the caller to always
-mark the last one (and not give up early if some error occurs).
-It's more robust to require the caller to mark both ends of the chain.
+(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH}
+should be searched (??? It's not clear that GCC passes this flag
+correctly). (@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the
+first process in chain. (@code{@var{flags} & PEXECUTE_FIRST}) is
+nonzero for the last process in chain. The first/last flags could be
+simplified to only mark the last of a chain of processes but that
+requires the caller to always mark the last one (and not give up
+early if some error occurs). It's more robust to require the caller
+to mark both ends of the chain.
The result is the pid on systems like Unix where we
@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
@@ -540,21 +541,23 @@ name is unset/removed.
@end deftypefn
-@c pexecute.c:104
+@c pexecute.txh:39
@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
Waits for a program started by @code{pexecute} to finish.
@var{pid} is the process id of the task to wait for. @var{status} is
-the `status' argument to wait. @var{flags} is currently unused (allows
-future enhancement without breaking upward compatibility). Pass 0 for now.
+the `status' argument to wait. @var{flags} is currently unused
+(allows future enhancement without breaking upward compatibility).
+Pass 0 for now.
The result is the pid of the child reaped, or -1 for failure
(@code{errno} says why).
-On systems that don't support waiting for a particular child, @var{pid} is
-ignored. On systems like MS-DOS that don't really multitask @code{pwait}
-is just a mechanism to provide a consistent interface for the caller.
+On systems that don't support waiting for a particular child,
+@var{pid} is ignored. On systems like MS-DOS that don't really
+multitask @code{pwait} is just a mechanism to provide a consistent
+interface for the caller.
@end deftypefn
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 6bf59ff7378..0429936e961 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
@@ -191,6 +191,63 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
return result;
}
+/* As above, but use the variants of alloc_f and free_f which accept
+ an extra argument. */
+
+htab_t
+htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
+ free_f)
+ size_t size;
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+ PTR alloc_arg;
+ htab_alloc_with_arg alloc_f;
+ htab_free_with_arg free_f;
+{
+ htab_t result;
+
+ size = higher_prime_number (size);
+ result = (htab_t) (*alloc_f) (alloc_arg, 1, sizeof (struct htab));
+ if (result == NULL)
+ return NULL;
+ result->entries = (PTR *) (*alloc_f) (alloc_arg, size, sizeof (PTR));
+ if (result->entries == NULL)
+ {
+ if (free_f != NULL)
+ (*free_f) (alloc_arg, result);
+ return NULL;
+ }
+ result->size = size;
+ result->hash_f = hash_f;
+ result->eq_f = eq_f;
+ result->del_f = del_f;
+ result->alloc_arg = alloc_arg;
+ result->alloc_with_arg_f = alloc_f;
+ result->free_with_arg_f = free_f;
+ return result;
+}
+
+/* Update the function pointers and allocation parameter in the htab_t. */
+
+void
+htab_set_functions_ex (htab, hash_f, eq_f, del_f, alloc_arg, alloc_f, free_f)
+ htab_t htab;
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+ PTR alloc_arg;
+ htab_alloc_with_arg alloc_f;
+ htab_free_with_arg free_f;
+{
+ htab->hash_f = hash_f;
+ htab->eq_f = eq_f;
+ htab->del_f = del_f;
+ htab->alloc_arg = alloc_arg;
+ htab->alloc_with_arg_f = alloc_f;
+ htab->free_with_arg_f = free_f;
+}
+
/* These functions exist solely for backward compatibility. */
#undef htab_create
@@ -234,6 +291,11 @@ htab_delete (htab)
(*htab->free_f) (htab->entries);
(*htab->free_f) (htab);
}
+ else if (htab->free_with_arg_f != NULL)
+ {
+ (*htab->free_with_arg_f) (htab->alloc_arg, htab->entries);
+ (*htab->free_with_arg_f) (htab->alloc_arg, htab);
+ }
}
/* This function clears all entries in the given hash table. */
@@ -306,16 +368,22 @@ htab_expand (htab)
PTR *olimit;
PTR *p;
PTR *nentries;
+ size_t nsize;
oentries = htab->entries;
olimit = oentries + htab->size;
- htab->size = higher_prime_number (htab->size * 2);
+ nsize = higher_prime_number (htab->size * 2);
- nentries = (PTR *) (*htab->alloc_f) (htab->size, sizeof (PTR *));
+ if (htab->alloc_with_arg_f != NULL)
+ nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize,
+ sizeof (PTR *));
+ else
+ nentries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *));
if (nentries == NULL)
return 0;
htab->entries = nentries;
+ htab->size = nsize;
htab->n_elements -= htab->n_deleted;
htab->n_deleted = 0;
@@ -338,6 +406,8 @@ htab_expand (htab)
if (htab->free_f != NULL)
(*htab->free_f) (oentries);
+ else if (htab->free_with_arg_f != NULL)
+ (*htab->free_with_arg_f) (htab->alloc_arg, oentries);
return 1;
}
diff --git a/libiberty/libiberty.texi b/libiberty/libiberty.texi
index 4b60d6a07fb..b57e3c530e1 100644
--- a/libiberty/libiberty.texi
+++ b/libiberty/libiberty.texi
@@ -29,7 +29,7 @@ This edition accompanies GCC 3, September 2001.
Copyright @copyright{} 2001 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
+ under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
@@ -58,7 +58,7 @@ notice identical to this one except for the removal of this paragraph
Copyright @copyright{} 2001 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
+ under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h
new file mode 100644
index 00000000000..da2f71e1247
--- /dev/null
+++ b/libiberty/pex-common.h
@@ -0,0 +1,42 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. Shared logic.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifndef PEX_COMMON_H
+#define PEX_COMMON_H
+
+#include "config.h"
+#include "libiberty.h"
+
+#define install_error_msg "installation problem, cannot exec `%s'"
+
+/* stdin file number. */
+#define STDIN_FILE_NO 0
+
+/* stdout file number. */
+#define STDOUT_FILE_NO 1
+
+/* value of `pipe': port index for reading. */
+#define READ_PORT 0
+
+/* value of `pipe': port index for writing. */
+#define WRITE_PORT 1
+
+#endif
diff --git a/libiberty/pex-djgpp.c b/libiberty/pex-djgpp.c
new file mode 100644
index 00000000000..968e7841215
--- /dev/null
+++ b/libiberty/pex-djgpp.c
@@ -0,0 +1,103 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. DJGPP specialization.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "pex-common.h"
+
+#include <stdio.h>
+#include <errno.h>
+#ifdef NEED_DECLARATION_ERRNO
+extern int errno;
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <process.h>
+
+/* Use ECHILD if available, otherwise use EINVAL. */
+#ifdef ECHILD
+#define PWAIT_ERROR ECHILD
+#else
+#define PWAIT_ERROR EINVAL
+#endif
+
+/* MSDOS doesn't multitask, but for the sake of a consistent interface
+ the code behaves like it does. pexecute runs the program, tucks the
+ exit code away, and returns a "pid". pwait must be called to fetch the
+ exit code. */
+
+/* For communicating information from pexecute to pwait. */
+static int last_pid = 0;
+static int last_status = 0;
+static int last_reaped = 0;
+
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+ const char *program;
+ char * const *argv;
+ const char *this_pname;
+ const char *temp_base;
+ char **errmsg_fmt, **errmsg_arg;
+ int flags;
+{
+ int rc;
+
+ last_pid++;
+ if (last_pid < 0)
+ last_pid = 1;
+
+ if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
+ abort ();
+
+ /* ??? What are the possible return values from spawnv? */
+ rc = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (P_WAIT, program, argv);
+
+ if (rc == -1)
+ {
+ *errmsg_fmt = install_error_msg;
+ *errmsg_arg = (char *)program;
+ return -1;
+ }
+
+ /* Tuck the status away for pwait, and return a "pid". */
+ last_status = rc << 8;
+ return last_pid;
+}
+
+int
+pwait (pid, status, flags)
+ int pid;
+ int *status;
+ int flags;
+{
+ /* On MSDOS each pexecute must be followed by its associated pwait. */
+ if (pid != last_pid
+ /* Called twice for the same child? */
+ || pid == last_reaped)
+ {
+ errno = PWAIT_ERROR;
+ return -1;
+ }
+ /* ??? Here's an opportunity to canonicalize the values in STATUS.
+ Needed? */
+ *status = (last_status >> 8);
+ last_reaped = last_pid;
+ return last_pid;
+}
diff --git a/libiberty/pex-mpw.c b/libiberty/pex-mpw.c
new file mode 100644
index 00000000000..9a8879c9b27
--- /dev/null
+++ b/libiberty/pex-mpw.c
@@ -0,0 +1,161 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. MPW specialization.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "pex-common.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+/* MPW pexecute doesn't actually run anything; instead, it writes out
+ script commands that, when run, will do the actual executing.
+
+ For example, in GCC's case, GCC will write out several script commands:
+
+ cpp ...
+ cc1 ...
+ as ...
+ ld ...
+
+ and then exit. None of the above programs will have run yet. The task
+ that called GCC will then execute the script and cause cpp,etc. to run.
+ The caller must invoke pfinish before calling exit. This adds
+ the finishing touches to the generated script. */
+
+static int first_time = 1;
+
+extern void mpwify_filename PARAMS ((const char *, char *));
+
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+ const char *program;
+ char * const *argv;
+ const char *this_pname;
+ const char *temp_base;
+ char **errmsg_fmt, **errmsg_arg;
+ int flags;
+{
+ char tmpprogram[255];
+ char *cp, *tmpname;
+ int i;
+
+ mpwify_filename (program, tmpprogram);
+ if (first_time)
+ {
+ printf ("Set Failed 0\n");
+ first_time = 0;
+ }
+
+ fputs ("If {Failed} == 0\n", stdout);
+ /* If being verbose, output a copy of the command. It should be
+ accurate enough and escaped enough to be "clickable". */
+ if (flags & PEXECUTE_VERBOSE)
+ {
+ fputs ("\tEcho ", stdout);
+ fputc ('\'', stdout);
+ fputs (tmpprogram, stdout);
+ fputc ('\'', stdout);
+ fputc (' ', stdout);
+ for (i=1; argv[i]; i++)
+ {
+ fputc ('\'', stdout);
+ /* See if we have an argument that needs fixing. */
+ if (strchr(argv[i], '/'))
+ {
+ tmpname = (char *) xmalloc (256);
+ mpwify_filename (argv[i], tmpname);
+ argv[i] = tmpname;
+ }
+ for (cp = argv[i]; *cp; cp++)
+ {
+ /* Write an Option-d escape char in front of special chars. */
+ if (strchr("'+", *cp))
+ fputc ('\266', stdout);
+ fputc (*cp, stdout);
+ }
+ fputc ('\'', stdout);
+ fputc (' ', stdout);
+ }
+ fputs ("\n", stdout);
+ }
+ fputs ("\t", stdout);
+ fputs (tmpprogram, stdout);
+ fputc (' ', stdout);
+
+ for (i=1; argv[i]; i++)
+ {
+ /* See if we have an argument that needs fixing. */
+ if (strchr(argv[i], '/'))
+ {
+ tmpname = (char *) xmalloc (256);
+ mpwify_filename (argv[i], tmpname);
+ argv[i] = tmpname;
+ }
+ if (strchr (argv[i], ' '))
+ fputc ('\'', stdout);
+ for (cp = argv[i]; *cp; cp++)
+ {
+ /* Write an Option-d escape char in front of special chars. */
+ if (strchr("'+", *cp))
+ fputc ('\266', stdout);
+ fputc (*cp, stdout);
+ }
+ if (strchr (argv[i], ' '))
+ fputc ('\'', stdout);
+ fputc (' ', stdout);
+ }
+
+ fputs ("\n", stdout);
+
+ /* Output commands that arrange to clean up and exit if a failure occurs.
+ We have to be careful to collect the status from the program that was
+ run, rather than some other script command. Also, we don't exit
+ immediately, since necessary cleanups are at the end of the script. */
+ fputs ("\tSet TmpStatus {Status}\n", stdout);
+ fputs ("\tIf {TmpStatus} != 0\n", stdout);
+ fputs ("\t\tSet Failed {TmpStatus}\n", stdout);
+ fputs ("\tEnd\n", stdout);
+ fputs ("End\n", stdout);
+
+ /* We're just composing a script, can't fail here. */
+ return 0;
+}
+
+int
+pwait (pid, status, flags)
+ int pid;
+ int *status;
+ int flags;
+{
+ *status = 0;
+ return 0;
+}
+
+/* Write out commands that will exit with the correct error code
+ if something in the script failed. */
+
+void
+pfinish ()
+{
+ printf ("\tExit \"{Failed}\"\n");
+}
+
diff --git a/libiberty/pex-msdos.c b/libiberty/pex-msdos.c
new file mode 100644
index 00000000000..d61c129b97f
--- /dev/null
+++ b/libiberty/pex-msdos.c
@@ -0,0 +1,147 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. Generic MSDOS specialization.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "pex-common.h"
+
+#include <stdio.h>
+#include <errno.h>
+#ifdef NEED_DECLARATION_ERRNO
+extern int errno;
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include "safe-ctype.h"
+#include <process.h>
+
+/* MSDOS doesn't multitask, but for the sake of a consistent interface
+ the code behaves like it does. pexecute runs the program, tucks the
+ exit code away, and returns a "pid". pwait must be called to fetch the
+ exit code. */
+
+/* For communicating information from pexecute to pwait. */
+static int last_pid = 0;
+static int last_status = 0;
+static int last_reaped = 0;
+
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+ const char *program;
+ char * const *argv;
+ const char *this_pname;
+ const char *temp_base;
+ char **errmsg_fmt, **errmsg_arg;
+ int flags;
+{
+ int rc;
+ char *scmd, *rf;
+ FILE *argfile;
+ int i, el = flags & PEXECUTE_SEARCH ? 4 : 0;
+
+ last_pid++;
+ if (last_pid < 0)
+ last_pid = 1;
+
+ if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
+ abort ();
+
+ if (temp_base == 0)
+ temp_base = choose_temp_base ();
+ scmd = (char *) xmalloc (strlen (program) + strlen (temp_base) + 6 + el);
+ rf = scmd + strlen(program) + 2 + el;
+ sprintf (scmd, "%s%s @%s.gp", program,
+ (flags & PEXECUTE_SEARCH ? ".exe" : ""), temp_base);
+ argfile = fopen (rf, "w");
+ if (argfile == 0)
+ {
+ int errno_save = errno;
+ free (scmd);
+ errno = errno_save;
+ *errmsg_fmt = "cannot open `%s.gp'";
+ *errmsg_arg = temp_base;
+ return -1;
+ }
+
+ for (i=1; argv[i]; i++)
+ {
+ char *cp;
+ for (cp = argv[i]; *cp; cp++)
+ {
+ if (*cp == '"' || *cp == '\'' || *cp == '\\' || ISSPACE (*cp))
+ fputc ('\\', argfile);
+ fputc (*cp, argfile);
+ }
+ fputc ('\n', argfile);
+ }
+ fclose (argfile);
+
+ rc = system (scmd);
+
+ {
+ int errno_save = errno;
+ remove (rf);
+ free (scmd);
+ errno = errno_save;
+ }
+
+ if (rc == -1)
+ {
+ *errmsg_fmt = install_error_msg;
+ *errmsg_arg = (char *)program;
+ return -1;
+ }
+
+ /* Tuck the status away for pwait, and return a "pid". */
+ last_status = rc << 8;
+ return last_pid;
+}
+
+/* Use ECHILD if available, otherwise use EINVAL. */
+#ifdef ECHILD
+#define PWAIT_ERROR ECHILD
+#else
+#define PWAIT_ERROR EINVAL
+#endif
+
+int
+pwait (pid, status, flags)
+ int pid;
+ int *status;
+ int flags;
+{
+ /* On MSDOS each pexecute must be followed by its associated pwait. */
+ if (pid != last_pid
+ /* Called twice for the same child? */
+ || pid == last_reaped)
+ {
+ errno = PWAIT_ERROR;
+ return -1;
+ }
+ /* ??? Here's an opportunity to canonicalize the values in STATUS.
+ Needed? */
+ *status = last_status;
+ last_reaped = last_pid;
+ return last_pid;
+}
diff --git a/libiberty/pex-os2.c b/libiberty/pex-os2.c
new file mode 100644
index 00000000000..d9eacf1f8f3
--- /dev/null
+++ b/libiberty/pex-os2.c
@@ -0,0 +1,72 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. OS/2 specialization.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "pex-common.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+/* ??? Does OS2 have process.h? */
+extern int spawnv ();
+extern int spawnvp ();
+
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+ const char *program;
+ char * const *argv;
+ const char *this_pname;
+ const char *temp_base;
+ char **errmsg_fmt, **errmsg_arg;
+ int flags;
+{
+ int pid;
+
+ if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
+ abort ();
+ /* ??? Presumably 1 == _P_NOWAIT. */
+ pid = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (1, program, argv);
+ if (pid == -1)
+ {
+ *errmsg_fmt = install_error_msg;
+ *errmsg_arg = program;
+ return -1;
+ }
+ return pid;
+}
+
+int
+pwait (pid, status, flags)
+ int pid;
+ int *status;
+ int flags;
+{
+ /* ??? Here's an opportunity to canonicalize the values in STATUS.
+ Needed? */
+ int pid = wait (status);
+ return pid;
+}
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
new file mode 100644
index 00000000000..14fe71ed09c
--- /dev/null
+++ b/libiberty/pex-unix.c
@@ -0,0 +1,166 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. Generic Unix version
+ (also used for UWIN and VMS).
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "pex-common.h"
+
+#include <stdio.h>
+#include <errno.h>
+#ifdef NEED_DECLARATION_ERRNO
+extern int errno;
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifndef HAVE_WAITPID
+#define waitpid(pid, status, flags) wait(status)
+#endif
+
+extern int execv ();
+extern int execvp ();
+
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+ const char *program;
+ char * const *argv;
+ const char *this_pname;
+ const char *temp_base ATTRIBUTE_UNUSED;
+ char **errmsg_fmt, **errmsg_arg;
+ int flags;
+{
+ int (*func)() = (flags & PEXECUTE_SEARCH ? execvp : execv);
+ int pid;
+ int pdes[2];
+ int input_desc, output_desc;
+ int retries, sleep_interval;
+ /* Pipe waiting from last process, to be used as input for the next one.
+ Value is STDIN_FILE_NO if no pipe is waiting
+ (i.e. the next command is the first of a group). */
+ static int last_pipe_input;
+
+ /* If this is the first process, initialize. */
+ if (flags & PEXECUTE_FIRST)
+ last_pipe_input = STDIN_FILE_NO;
+
+ input_desc = last_pipe_input;
+
+ /* If this isn't the last process, make a pipe for its output,
+ and record it as waiting to be the input to the next process. */
+ if (! (flags & PEXECUTE_LAST))
+ {
+ if (pipe (pdes) < 0)
+ {
+ *errmsg_fmt = "pipe";
+ *errmsg_arg = NULL;
+ return -1;
+ }
+ output_desc = pdes[WRITE_PORT];
+ last_pipe_input = pdes[READ_PORT];
+ }
+ else
+ {
+ /* Last process. */
+ output_desc = STDOUT_FILE_NO;
+ last_pipe_input = STDIN_FILE_NO;
+ }
+
+ /* Fork a subprocess; wait and retry if it fails. */
+ sleep_interval = 1;
+ pid = -1;
+ for (retries = 0; retries < 4; retries++)
+ {
+ pid = fork ();
+ if (pid >= 0)
+ break;
+ sleep (sleep_interval);
+ sleep_interval *= 2;
+ }
+
+ switch (pid)
+ {
+ case -1:
+ *errmsg_fmt = "fork";
+ *errmsg_arg = NULL;
+ return -1;
+
+ case 0: /* child */
+ /* Move the input and output pipes into place, if necessary. */
+ if (input_desc != STDIN_FILE_NO)
+ {
+ close (STDIN_FILE_NO);
+ dup (input_desc);
+ close (input_desc);
+ }
+ if (output_desc != STDOUT_FILE_NO)
+ {
+ close (STDOUT_FILE_NO);
+ dup (output_desc);
+ close (output_desc);
+ }
+
+ /* Close the parent's descs that aren't wanted here. */
+ if (last_pipe_input != STDIN_FILE_NO)
+ close (last_pipe_input);
+
+ /* Exec the program. */
+ (*func) (program, argv);
+
+ fprintf (stderr, "%s: ", this_pname);
+ fprintf (stderr, install_error_msg, program);
+ fprintf (stderr, ": %s\n", xstrerror (errno));
+ exit (-1);
+ /* NOTREACHED */
+ return 0;
+
+ default:
+ /* In the parent, after forking.
+ Close the descriptors that we made for this child. */
+ if (input_desc != STDIN_FILE_NO)
+ close (input_desc);
+ if (output_desc != STDOUT_FILE_NO)
+ close (output_desc);
+
+ /* Return child's process number. */
+ return pid;
+ }
+}
+
+int
+pwait (pid, status, flags)
+ int pid;
+ int *status;
+ int flags ATTRIBUTE_UNUSED;
+{
+ /* ??? Here's an opportunity to canonicalize the values in STATUS.
+ Needed? */
+ pid = waitpid (pid, status, 0);
+ return pid;
+}
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
new file mode 100644
index 00000000000..bd097a4bb05
--- /dev/null
+++ b/libiberty/pex-win32.c
@@ -0,0 +1,243 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it. Generic Win32 specialization.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "pex-common.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#include <process.h>
+#include <io.h>
+#include <fcntl.h>
+#include <signal.h>
+
+/* mingw32 headers may not define the following. */
+
+#ifndef _P_WAIT
+# define _P_WAIT 0
+# define _P_NOWAIT 1
+# define _P_OVERLAY 2
+# define _P_NOWAITO 3
+# define _P_DETACH 4
+
+# define WAIT_CHILD 0
+# define WAIT_GRANDCHILD 1
+#endif
+
+/* This is a kludge to get around the Microsoft C spawn functions' propensity
+ to remove the outermost set of double quotes from all arguments. */
+
+static const char * const *
+fix_argv (argvec)
+ char **argvec;
+{
+ int i;
+
+ for (i = 1; argvec[i] != 0; i++)
+ {
+ int len, j;
+ char *temp, *newtemp;
+
+ temp = argvec[i];
+ len = strlen (temp);
+ for (j = 0; j < len; j++)
+ {
+ if (temp[j] == '"')
+ {
+ newtemp = xmalloc (len + 2);
+ strncpy (newtemp, temp, j);
+ newtemp [j] = '\\';
+ strncpy (&newtemp [j+1], &temp [j], len-j);
+ newtemp [len+1] = 0;
+ temp = newtemp;
+ len++;
+ j++;
+ }
+ }
+
+ argvec[i] = temp;
+ }
+
+ for (i = 0; argvec[i] != 0; i++)
+ {
+ if (strpbrk (argvec[i], " \t"))
+ {
+ int len, trailing_backslash;
+ char *temp;
+
+ len = strlen (argvec[i]);
+ trailing_backslash = 0;
+
+ /* There is an added complication when an arg with embedded white
+ space ends in a backslash (such as in the case of -iprefix arg
+ passed to cpp). The resulting quoted strings gets misinterpreted
+ by the command interpreter -- it thinks that the ending quote
+ is escaped by the trailing backslash and things get confused.
+ We handle this case by escaping the trailing backslash, provided
+ it was not escaped in the first place. */
+ if (len > 1
+ && argvec[i][len-1] == '\\'
+ && argvec[i][len-2] != '\\')
+ {
+ trailing_backslash = 1;
+ ++len; /* to escape the final backslash. */
+ }
+
+ len += 2; /* and for the enclosing quotes. */
+
+ temp = xmalloc (len + 1);
+ temp[0] = '"';
+ strcpy (temp + 1, argvec[i]);
+ if (trailing_backslash)
+ temp[len-2] = '\\';
+ temp[len-1] = '"';
+ temp[len] = '\0';
+
+ argvec[i] = temp;
+ }
+ }
+
+ return (const char * const *) argvec;
+}
+
+/* Win32 supports pipes */
+int
+pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
+ const char *program;
+ char * const *argv;
+ const char *this_pname;
+ const char *temp_base;
+ char **errmsg_fmt, **errmsg_arg;
+ int flags;
+{
+ int pid;
+ int pdes[2], org_stdin, org_stdout;
+ int input_desc, output_desc;
+ int retries, sleep_interval;
+
+ /* Pipe waiting from last process, to be used as input for the next one.
+ Value is STDIN_FILE_NO if no pipe is waiting
+ (i.e. the next command is the first of a group). */
+ static int last_pipe_input;
+
+ /* If this is the first process, initialize. */
+ if (flags & PEXECUTE_FIRST)
+ last_pipe_input = STDIN_FILE_NO;
+
+ input_desc = last_pipe_input;
+
+ /* If this isn't the last process, make a pipe for its output,
+ and record it as waiting to be the input to the next process. */
+ if (! (flags & PEXECUTE_LAST))
+ {
+ if (_pipe (pdes, 256, O_BINARY) < 0)
+ {
+ *errmsg_fmt = "pipe";
+ *errmsg_arg = NULL;
+ return -1;
+ }
+ output_desc = pdes[WRITE_PORT];
+ last_pipe_input = pdes[READ_PORT];
+ }
+ else
+ {
+ /* Last process. */
+ output_desc = STDOUT_FILE_NO;
+ last_pipe_input = STDIN_FILE_NO;
+ }
+
+ if (input_desc != STDIN_FILE_NO)
+ {
+ org_stdin = dup (STDIN_FILE_NO);
+ dup2 (input_desc, STDIN_FILE_NO);
+ close (input_desc);
+ }
+
+ if (output_desc != STDOUT_FILE_NO)
+ {
+ org_stdout = dup (STDOUT_FILE_NO);
+ dup2 (output_desc, STDOUT_FILE_NO);
+ close (output_desc);
+ }
+
+ pid = (flags & PEXECUTE_SEARCH ? _spawnvp : _spawnv)
+ (_P_NOWAIT, program, fix_argv(argv));
+
+ if (input_desc != STDIN_FILE_NO)
+ {
+ dup2 (org_stdin, STDIN_FILE_NO);
+ close (org_stdin);
+ }
+
+ if (output_desc != STDOUT_FILE_NO)
+ {
+ dup2 (org_stdout, STDOUT_FILE_NO);
+ close (org_stdout);
+ }
+
+ if (pid == -1)
+ {
+ *errmsg_fmt = install_error_msg;
+ *errmsg_arg = program;
+ return -1;
+ }
+
+ return pid;
+}
+
+/* MS CRTDLL doesn't return enough information in status to decide if the
+ child exited due to a signal or not, rather it simply returns an
+ integer with the exit code of the child; eg., if the child exited with
+ an abort() call and didn't have a handler for SIGABRT, it simply returns
+ with status = 3. We fix the status code to conform to the usual WIF*
+ macros. Note that WIFSIGNALED will never be true under CRTDLL. */
+
+int
+pwait (pid, status, flags)
+ int pid;
+ int *status;
+ int flags;
+{
+ int termstat;
+
+ pid = _cwait (&termstat, pid, WAIT_CHILD);
+
+ /* ??? Here's an opportunity to canonicalize the values in STATUS.
+ Needed? */
+
+ /* cwait returns the child process exit code in termstat.
+ A value of 3 indicates that the child caught a signal, but not
+ which one. Since only SIGABRT, SIGFPE and SIGINT do anything, we
+ report SIGABRT. */
+ if (termstat == 3)
+ *status = SIGABRT;
+ else
+ *status = (((termstat) & 0xff) << 8);
+
+ return pid;
+}
diff --git a/libiberty/pexecute.c b/libiberty/pexecute.c
deleted file mode 100644
index 347c4db1092..00000000000
--- a/libiberty/pexecute.c
+++ /dev/null
@@ -1,792 +0,0 @@
-/* Utilities to execute a program in a subprocess (possibly linked by pipes
- with other subprocesses), and wait for it.
- Copyright (C) 1996-2000 Free Software Foundation, Inc.
-
-This file is part of the libiberty library.
-Libiberty is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-Libiberty is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with libiberty; see the file COPYING.LIB. If not,
-write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-/* This file exports two functions: pexecute and pwait. */
-
-/* This file lives in at least two places: libiberty and gcc.
- Don't change one without the other. */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#ifdef NEED_DECLARATION_ERRNO
-extern int errno;
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#include "libiberty.h"
-#include "safe-ctype.h"
-
-/* stdin file number. */
-#define STDIN_FILE_NO 0
-
-/* stdout file number. */
-#define STDOUT_FILE_NO 1
-
-/* value of `pipe': port index for reading. */
-#define READ_PORT 0
-
-/* value of `pipe': port index for writing. */
-#define WRITE_PORT 1
-
-static char *install_error_msg = "installation problem, cannot exec `%s'";
-
-/* pexecute: execute a program.
-
-@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
-
-Executes a program.
-
-@var{program} and @var{argv} are the arguments to
-@code{execv}/@code{execvp}.
-
-@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
-
-@var{temp_base} is the path name, sans suffix, of a temporary file to
-use if needed. This is currently only needed for MS-DOS ports that
-don't use @code{go32} (do any still exist?). Ports that don't need it
-can pass @code{NULL}.
-
-(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH} should be searched
-(??? It's not clear that GCC passes this flag correctly). (@code{@var{flags} &
-PEXECUTE_FIRST}) is nonzero for the first process in chain.
-(@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the last process
-in chain. The first/last flags could be simplified to only mark the
-last of a chain of processes but that requires the caller to always
-mark the last one (and not give up early if some error occurs).
-It's more robust to require the caller to mark both ends of the chain.
-
-The result is the pid on systems like Unix where we
-@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
-use @code{spawn}. It is up to the caller to wait for the child.
-
-The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
-@code{spawn} and wait for the child here.
-
-Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
-text of the error message with an optional argument (if not needed,
-@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
-@code{errno} is available to the caller to use.
-
-@end deftypefn
-
-@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
-
-Waits for a program started by @code{pexecute} to finish.
-
-@var{pid} is the process id of the task to wait for. @var{status} is
-the `status' argument to wait. @var{flags} is currently unused (allows
-future enhancement without breaking upward compatibility). Pass 0 for now.
-
-The result is the pid of the child reaped, or -1 for failure
-(@code{errno} says why).
-
-On systems that don't support waiting for a particular child, @var{pid} is
-ignored. On systems like MS-DOS that don't really multitask @code{pwait}
-is just a mechanism to provide a consistent interface for the caller.
-
-@end deftypefn
-
-@undocumented pfinish
-
- pfinish: finish generation of script
-
- pfinish is necessary for systems like MPW where a script is generated that
- runs the requested programs. */
-
-#ifdef __MSDOS__
-
-/* MSDOS doesn't multitask, but for the sake of a consistent interface
- the code behaves like it does. pexecute runs the program, tucks the
- exit code away, and returns a "pid". pwait must be called to fetch the
- exit code. */
-
-#include <process.h>
-
-/* For communicating information from pexecute to pwait. */
-static int last_pid = 0;
-static int last_status = 0;
-static int last_reaped = 0;
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
-{
- int rc;
-
- last_pid++;
- if (last_pid < 0)
- last_pid = 1;
-
- if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
- abort ();
-
-#ifdef __DJGPP__
- /* ??? What are the possible return values from spawnv? */
- rc = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (P_WAIT, program, argv);
-#else
- char *scmd, *rf;
- FILE *argfile;
- int i, el = flags & PEXECUTE_SEARCH ? 4 : 0;
-
- if (temp_base == 0)
- temp_base = choose_temp_base ();
- scmd = (char *) xmalloc (strlen (program) + strlen (temp_base) + 6 + el);
- rf = scmd + strlen(program) + 2 + el;
- sprintf (scmd, "%s%s @%s.gp", program,
- (flags & PEXECUTE_SEARCH ? ".exe" : ""), temp_base);
- argfile = fopen (rf, "w");
- if (argfile == 0)
- {
- int errno_save = errno;
- free (scmd);
- errno = errno_save;
- *errmsg_fmt = "cannot open `%s.gp'";
- *errmsg_arg = temp_base;
- return -1;
- }
-
- for (i=1; argv[i]; i++)
- {
- char *cp;
- for (cp = argv[i]; *cp; cp++)
- {
- if (*cp == '"' || *cp == '\'' || *cp == '\\' || ISSPACE (*cp))
- fputc ('\\', argfile);
- fputc (*cp, argfile);
- }
- fputc ('\n', argfile);
- }
- fclose (argfile);
-
- rc = system (scmd);
-
- {
- int errno_save = errno;
- remove (rf);
- free (scmd);
- errno = errno_save;
- }
-#endif
-
- if (rc == -1)
- {
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = (char *)program;
- return -1;
- }
-
- /* Tuck the status away for pwait, and return a "pid". */
- last_status = rc << 8;
- return last_pid;
-}
-
-/* Use ECHILD if available, otherwise use EINVAL. */
-#ifdef ECHILD
-#define PWAIT_ERROR ECHILD
-#else
-#define PWAIT_ERROR EINVAL
-#endif
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
-{
- /* On MSDOS each pexecute must be followed by it's associated pwait. */
- if (pid != last_pid
- /* Called twice for the same child? */
- || pid == last_reaped)
- {
- errno = PWAIT_ERROR;
- return -1;
- }
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
-#ifdef __DJGPP__
- *status = (last_status >> 8);
-#else
- *status = last_status;
-#endif
- last_reaped = last_pid;
- return last_pid;
-}
-
-#endif /* MSDOS */
-
-#if defined (_WIN32) && ! defined (_UWIN)
-
-#include <process.h>
-
-#ifdef __CYGWIN__
-
-#define fix_argv(argvec) (argvec)
-
-extern int _spawnv ();
-extern int _spawnvp ();
-
-#else /* ! __CYGWIN__ */
-
-/* This is a kludge to get around the Microsoft C spawn functions' propensity
- to remove the outermost set of double quotes from all arguments. */
-
-static const char * const *
-fix_argv (argvec)
- char **argvec;
-{
- int i;
-
- for (i = 1; argvec[i] != 0; i++)
- {
- int len, j;
- char *temp, *newtemp;
-
- temp = argvec[i];
- len = strlen (temp);
- for (j = 0; j < len; j++)
- {
- if (temp[j] == '"')
- {
- newtemp = xmalloc (len + 2);
- strncpy (newtemp, temp, j);
- newtemp [j] = '\\';
- strncpy (&newtemp [j+1], &temp [j], len-j);
- newtemp [len+1] = 0;
- temp = newtemp;
- len++;
- j++;
- }
- }
-
- argvec[i] = temp;
- }
-
- for (i = 0; argvec[i] != 0; i++)
- {
- if (strpbrk (argvec[i], " \t"))
- {
- int len, trailing_backslash;
- char *temp;
-
- len = strlen (argvec[i]);
- trailing_backslash = 0;
-
- /* There is an added complication when an arg with embedded white
- space ends in a backslash (such as in the case of -iprefix arg
- passed to cpp). The resulting quoted strings gets misinterpreted
- by the command interpreter -- it thinks that the ending quote
- is escaped by the trailing backslash and things get confused.
- We handle this case by escaping the trailing backslash, provided
- it was not escaped in the first place. */
- if (len > 1
- && argvec[i][len-1] == '\\'
- && argvec[i][len-2] != '\\')
- {
- trailing_backslash = 1;
- ++len; /* to escape the final backslash. */
- }
-
- len += 2; /* and for the enclosing quotes. */
-
- temp = xmalloc (len + 1);
- temp[0] = '"';
- strcpy (temp + 1, argvec[i]);
- if (trailing_backslash)
- temp[len-2] = '\\';
- temp[len-1] = '"';
- temp[len] = '\0';
-
- argvec[i] = temp;
- }
- }
-
- return (const char * const *) argvec;
-}
-#endif /* __CYGWIN__ */
-
-#include <io.h>
-#include <fcntl.h>
-#include <signal.h>
-
-/* mingw32 headers may not define the following. */
-
-#ifndef _P_WAIT
-# define _P_WAIT 0
-# define _P_NOWAIT 1
-# define _P_OVERLAY 2
-# define _P_NOWAITO 3
-# define _P_DETACH 4
-
-# define WAIT_CHILD 0
-# define WAIT_GRANDCHILD 1
-#endif
-
-/* Win32 supports pipes */
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
-{
- int pid;
- int pdes[2], org_stdin, org_stdout;
- int input_desc, output_desc;
- int retries, sleep_interval;
-
- /* Pipe waiting from last process, to be used as input for the next one.
- Value is STDIN_FILE_NO if no pipe is waiting
- (i.e. the next command is the first of a group). */
- static int last_pipe_input;
-
- /* If this is the first process, initialize. */
- if (flags & PEXECUTE_FIRST)
- last_pipe_input = STDIN_FILE_NO;
-
- input_desc = last_pipe_input;
-
- /* If this isn't the last process, make a pipe for its output,
- and record it as waiting to be the input to the next process. */
- if (! (flags & PEXECUTE_LAST))
- {
- if (_pipe (pdes, 256, O_BINARY) < 0)
- {
- *errmsg_fmt = "pipe";
- *errmsg_arg = NULL;
- return -1;
- }
- output_desc = pdes[WRITE_PORT];
- last_pipe_input = pdes[READ_PORT];
- }
- else
- {
- /* Last process. */
- output_desc = STDOUT_FILE_NO;
- last_pipe_input = STDIN_FILE_NO;
- }
-
- if (input_desc != STDIN_FILE_NO)
- {
- org_stdin = dup (STDIN_FILE_NO);
- dup2 (input_desc, STDIN_FILE_NO);
- close (input_desc);
- }
-
- if (output_desc != STDOUT_FILE_NO)
- {
- org_stdout = dup (STDOUT_FILE_NO);
- dup2 (output_desc, STDOUT_FILE_NO);
- close (output_desc);
- }
-
- pid = (flags & PEXECUTE_SEARCH ? _spawnvp : _spawnv)
- (_P_NOWAIT, program, fix_argv(argv));
-
- if (input_desc != STDIN_FILE_NO)
- {
- dup2 (org_stdin, STDIN_FILE_NO);
- close (org_stdin);
- }
-
- if (output_desc != STDOUT_FILE_NO)
- {
- dup2 (org_stdout, STDOUT_FILE_NO);
- close (org_stdout);
- }
-
- if (pid == -1)
- {
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = program;
- return -1;
- }
-
- return pid;
-}
-
-/* MS CRTDLL doesn't return enough information in status to decide if the
- child exited due to a signal or not, rather it simply returns an
- integer with the exit code of the child; eg., if the child exited with
- an abort() call and didn't have a handler for SIGABRT, it simply returns
- with status = 3. We fix the status code to conform to the usual WIF*
- macros. Note that WIFSIGNALED will never be true under CRTDLL. */
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
-{
-#ifdef __CYGWIN__
- return wait (status);
-#else
- int termstat;
-
- pid = _cwait (&termstat, pid, WAIT_CHILD);
-
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
-
- /* cwait returns the child process exit code in termstat.
- A value of 3 indicates that the child caught a signal, but not
- which one. Since only SIGABRT, SIGFPE and SIGINT do anything, we
- report SIGABRT. */
- if (termstat == 3)
- *status = SIGABRT;
- else
- *status = (((termstat) & 0xff) << 8);
-
- return pid;
-#endif /* __CYGWIN__ */
-}
-
-#endif /* _WIN32 && ! _UWIN */
-
-#ifdef OS2
-
-/* ??? Does OS2 have process.h? */
-extern int spawnv ();
-extern int spawnvp ();
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
-{
- int pid;
-
- if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
- abort ();
- /* ??? Presumably 1 == _P_NOWAIT. */
- pid = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (1, program, argv);
- if (pid == -1)
- {
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = program;
- return -1;
- }
- return pid;
-}
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
-{
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
- int pid = wait (status);
- return pid;
-}
-
-#endif /* OS2 */
-
-#ifdef MPW
-
-/* MPW pexecute doesn't actually run anything; instead, it writes out
- script commands that, when run, will do the actual executing.
-
- For example, in GCC's case, GCC will write out several script commands:
-
- cpp ...
- cc1 ...
- as ...
- ld ...
-
- and then exit. None of the above programs will have run yet. The task
- that called GCC will then execute the script and cause cpp,etc. to run.
- The caller must invoke pfinish before calling exit. This adds
- the finishing touches to the generated script. */
-
-static int first_time = 1;
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
-{
- char tmpprogram[255];
- char *cp, *tmpname;
- int i;
-
- mpwify_filename (program, tmpprogram);
- if (first_time)
- {
- printf ("Set Failed 0\n");
- first_time = 0;
- }
-
- fputs ("If {Failed} == 0\n", stdout);
- /* If being verbose, output a copy of the command. It should be
- accurate enough and escaped enough to be "clickable". */
- if (flags & PEXECUTE_VERBOSE)
- {
- fputs ("\tEcho ", stdout);
- fputc ('\'', stdout);
- fputs (tmpprogram, stdout);
- fputc ('\'', stdout);
- fputc (' ', stdout);
- for (i=1; argv[i]; i++)
- {
- fputc ('\'', stdout);
- /* See if we have an argument that needs fixing. */
- if (strchr(argv[i], '/'))
- {
- tmpname = (char *) xmalloc (256);
- mpwify_filename (argv[i], tmpname);
- argv[i] = tmpname;
- }
- for (cp = argv[i]; *cp; cp++)
- {
- /* Write an Option-d escape char in front of special chars. */
- if (strchr("'+", *cp))
- fputc ('\266', stdout);
- fputc (*cp, stdout);
- }
- fputc ('\'', stdout);
- fputc (' ', stdout);
- }
- fputs ("\n", stdout);
- }
- fputs ("\t", stdout);
- fputs (tmpprogram, stdout);
- fputc (' ', stdout);
-
- for (i=1; argv[i]; i++)
- {
- /* See if we have an argument that needs fixing. */
- if (strchr(argv[i], '/'))
- {
- tmpname = (char *) xmalloc (256);
- mpwify_filename (argv[i], tmpname);
- argv[i] = tmpname;
- }
- if (strchr (argv[i], ' '))
- fputc ('\'', stdout);
- for (cp = argv[i]; *cp; cp++)
- {
- /* Write an Option-d escape char in front of special chars. */
- if (strchr("'+", *cp))
- fputc ('\266', stdout);
- fputc (*cp, stdout);
- }
- if (strchr (argv[i], ' '))
- fputc ('\'', stdout);
- fputc (' ', stdout);
- }
-
- fputs ("\n", stdout);
-
- /* Output commands that arrange to clean up and exit if a failure occurs.
- We have to be careful to collect the status from the program that was
- run, rather than some other script command. Also, we don't exit
- immediately, since necessary cleanups are at the end of the script. */
- fputs ("\tSet TmpStatus {Status}\n", stdout);
- fputs ("\tIf {TmpStatus} != 0\n", stdout);
- fputs ("\t\tSet Failed {TmpStatus}\n", stdout);
- fputs ("\tEnd\n", stdout);
- fputs ("End\n", stdout);
-
- /* We're just composing a script, can't fail here. */
- return 0;
-}
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
-{
- *status = 0;
- return 0;
-}
-
-/* Write out commands that will exit with the correct error code
- if something in the script failed. */
-
-void
-pfinish ()
-{
- printf ("\tExit \"{Failed}\"\n");
-}
-
-#endif /* MPW */
-
-/* include for Unix-like environments but not for Dos-like environments */
-#if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
- && ! (defined (_WIN32) && ! defined (_UWIN))
-
-extern int execv ();
-extern int execvp ();
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base ATTRIBUTE_UNUSED;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
-{
- int (*func)() = (flags & PEXECUTE_SEARCH ? execvp : execv);
- int pid;
- int pdes[2];
- int input_desc, output_desc;
- int retries, sleep_interval;
- /* Pipe waiting from last process, to be used as input for the next one.
- Value is STDIN_FILE_NO if no pipe is waiting
- (i.e. the next command is the first of a group). */
- static int last_pipe_input;
-
- /* If this is the first process, initialize. */
- if (flags & PEXECUTE_FIRST)
- last_pipe_input = STDIN_FILE_NO;
-
- input_desc = last_pipe_input;
-
- /* If this isn't the last process, make a pipe for its output,
- and record it as waiting to be the input to the next process. */
- if (! (flags & PEXECUTE_LAST))
- {
- if (pipe (pdes) < 0)
- {
- *errmsg_fmt = "pipe";
- *errmsg_arg = NULL;
- return -1;
- }
- output_desc = pdes[WRITE_PORT];
- last_pipe_input = pdes[READ_PORT];
- }
- else
- {
- /* Last process. */
- output_desc = STDOUT_FILE_NO;
- last_pipe_input = STDIN_FILE_NO;
- }
-
- /* Fork a subprocess; wait and retry if it fails. */
- sleep_interval = 1;
- pid = -1;
- for (retries = 0; retries < 4; retries++)
- {
- pid = fork ();
- if (pid >= 0)
- break;
- sleep (sleep_interval);
- sleep_interval *= 2;
- }
-
- switch (pid)
- {
- case -1:
- *errmsg_fmt = "fork";
- *errmsg_arg = NULL;
- return -1;
-
- case 0: /* child */
- /* Move the input and output pipes into place, if necessary. */
- if (input_desc != STDIN_FILE_NO)
- {
- close (STDIN_FILE_NO);
- dup (input_desc);
- close (input_desc);
- }
- if (output_desc != STDOUT_FILE_NO)
- {
- close (STDOUT_FILE_NO);
- dup (output_desc);
- close (output_desc);
- }
-
- /* Close the parent's descs that aren't wanted here. */
- if (last_pipe_input != STDIN_FILE_NO)
- close (last_pipe_input);
-
- /* Exec the program. */
- (*func) (program, argv);
-
- fprintf (stderr, "%s: ", this_pname);
- fprintf (stderr, install_error_msg, program);
- fprintf (stderr, ": %s\n", xstrerror (errno));
- exit (-1);
- /* NOTREACHED */
- return 0;
-
- default:
- /* In the parent, after forking.
- Close the descriptors that we made for this child. */
- if (input_desc != STDIN_FILE_NO)
- close (input_desc);
- if (output_desc != STDOUT_FILE_NO)
- close (output_desc);
-
- /* Return child's process number. */
- return pid;
- }
-}
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags ATTRIBUTE_UNUSED;
-{
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
-#ifdef VMS
- pid = waitpid (-1, status, 0);
-#else
- pid = wait (status);
-#endif
- return pid;
-}
-
-#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! _UWIN) */
diff --git a/libiberty/pexecute.txh b/libiberty/pexecute.txh
new file mode 100644
index 00000000000..269f031cc72
--- /dev/null
+++ b/libiberty/pexecute.txh
@@ -0,0 +1,63 @@
+@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
+
+Executes a program.
+
+@var{program} and @var{argv} are the arguments to
+@code{execv}/@code{execvp}.
+
+@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
+
+@var{temp_base} is the path name, sans suffix, of a temporary file to
+use if needed. This is currently only needed for MS-DOS ports that
+don't use @code{go32} (do any still exist?). Ports that don't need it
+can pass @code{NULL}.
+
+(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH}
+should be searched (??? It's not clear that GCC passes this flag
+correctly). (@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the
+first process in chain. (@code{@var{flags} & PEXECUTE_FIRST}) is
+nonzero for the last process in chain. The first/last flags could be
+simplified to only mark the last of a chain of processes but that
+requires the caller to always mark the last one (and not give up
+early if some error occurs). It's more robust to require the caller
+to mark both ends of the chain.
+
+The result is the pid on systems like Unix where we
+@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
+use @code{spawn}. It is up to the caller to wait for the child.
+
+The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
+@code{spawn} and wait for the child here.
+
+Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
+text of the error message with an optional argument (if not needed,
+@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
+@code{errno} is available to the caller to use.
+
+@end deftypefn
+
+@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
+
+Waits for a program started by @code{pexecute} to finish.
+
+@var{pid} is the process id of the task to wait for. @var{status} is
+the `status' argument to wait. @var{flags} is currently unused
+(allows future enhancement without breaking upward compatibility).
+Pass 0 for now.
+
+The result is the pid of the child reaped, or -1 for failure
+(@code{errno} says why).
+
+On systems that don't support waiting for a particular child,
+@var{pid} is ignored. On systems like MS-DOS that don't really
+multitask @code{pwait} is just a mechanism to provide a consistent
+interface for the caller.
+
+@end deftypefn
+
+@undocumented pfinish
+
+pfinish: finish generation of script
+
+pfinish is necessary for systems like MPW where a script is generated
+that runs the requested programs.
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 430b4ddba63..78a8842dc12 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,177 @@
+2003-02-06 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
+
+ * i386-dis.c (dq_mode, Edq): Define.
+ (dis386_twobyte): Correct movd operands.
+ (OP_E): Handle dq_mode case.
+
+2003-01-29 Henric Jungheim <henric@attbi.com>
+
+ * sparc-dis.c (print_insn_sparc): When examining values added in
+ to rs1, make sure that there are previous instructions.
+
+2003-01-23 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh-dis.c (print_insn_shx): Handle bfd_mach_sh2e.
+ * sh-opc.h (arch_sh2e, arch_sh2e_up): New.
+ (arch_sh2_up): Added sh2e.
+ (sh_table): Replaced all occurrences of arch_sh3e_up with
+ arch_sh2e_up, except in fsqrt.
+
+2003-01-23 Alan Modra <amodra@bigpond.net.au>
+
+ * sh64-dis.c: Include elf32-sh64.h.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2003-01-17 Richard Henderson <rth@redhat.com>
+
+ * alpha-opc.c (alpha_opcodes): Add bugchk, rduniq, wruniq, gentrap
+ PAL entry points.
+
+2003-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2003-01-08 Klee Dienes <kdienes@apple.com>
+
+ * Makefile.am (ALL_MACHINES): Add msp430-dis.lo.
+ * Makefile.in: Regenerate.
+
+2003-01-08 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (powerpc_macros <extrwi>): Accept a shift of 32.
+
+2002-01-02 Ben Elliston <bje@redhat.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * iq2000-asm.c: New file.
+ * iq2000-desc.c: Likewise.
+ * iq2000-desc.h: Likewise.
+ * iq2000-dis.c: Likewise.
+ * iq2000-ibld.c: Likewise.
+ * iq2000-opc.c: Likewise.
+ * iq2000-opc.h: Likewise.
+ * Makefile.am (HFILES): Add iq2000-desc.h, iq2000-opc.h.
+ (CFILES): Add iq2000-asm.c, iq2000-desc.c, iq2000-dis.c,
+ iq2000-ibld.c, iq2000-opc.c.
+ (ALL_MACHINES): Add iq2000-asm.lo, iq2000-desc.lo, iq2000-dis.lo,
+ iq2000-ibld.lo, iq2000-opc.lo.
+ (CLEANFILES): Add stamp-iq2000.
+ (IQ2000_DEPS): New macro.
+ (stamp-iq2000): New target.
+ * Makefile.in: Regenerate.
+ * configure.in: Handle bfd_iq2000_arch.
+ * configure: Regenerate.
+
+2003-01-02 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c (print_insn_args): Use position extracted by "+A"
+ to calculate size for "+B". Redo code for "+C" so it shares
+ the same style as "+A" and "+B" now do.
+
+2003-01-02 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c: Update copyright years.
+ (print_insn_arg): Rename to...
+ (print_insn_args): This, returning void. Process the whole
+ string of args rather than a single one. Reindent.
+ (print_insn_mips): Update to match the above.
+
+2002-12-31 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-opc.c (mips_builtin_opcodes): Move "di" into the
+ right order alphabetically, and make all hex constants use
+ lower-case letters.
+
+2002-12-31 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c (mips_cp0sel_name): New structure.
+ (mips_cp0sel_names_mips3264, mips_cp0sel_names_mips3264r2)
+ (mips_cp0sel_names_sb1): New arrays.
+ (mips_arch_choice): New structure members "cp0sel_names" and
+ "cp0sel_names_len".
+ (mips_arch_choices): Add references to new cp0sel_names arrays
+ as appropriate, and make all existing entries reference
+ appropriate mips_XXX_names_numeric arrays rather than simply
+ using NULL.
+ (mips_cp0sel_names, mips_cp0sel_names_len): New variables.
+ (lookup_mips_cp0sel_name): New function.
+ (set_default_mips_dis_options): Set mips_cp0sel_names and
+ mips_cp0sel_names_len as appropriate. Remove now-unnecessary
+ checks for NULL register name arrays.
+ (parse_mips_dis_option): Likewise.
+ (print_insn_arg): Handle "+D" operand type.
+ * mips-opc.c (mips_builtin_opcodes): Add new "+D" variants
+ of mfc0, mtc0, dmfc0, and dmtc0 to print CP0+sel register
+ names symbolically.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric)
+ (mips_hwr_names_mips3264r2): New arrays.
+ (mips_arch_choice): New "hwr_names" member.
+ (mips_arch_choices): Adjust for structure change, and add a new
+ entry for "mips32r2" ISA.
+ (mips_hwr_names): New variable.
+ (set_default_mips_dis_options): Set mips_hwr_names.
+ (parse_mips_dis_option): New "hwr-names" option which sets
+ mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names.
+ (print_insn_arg): Change return type to "int"
+ and use that to indicate number of characters consumed.
+ Add support for "+" operand extension character, "+A", "+B",
+ "+C", and "K" operands.
+ (print_insn_mips): Adjust for changes to print_insn_arg.
+ (print_mips_disassembler_options): Adjust for "hwr-names"
+ addition and "reg-names" change.
+ * mips-opc (I33): New define (shorthand for INSN_ISA32R2).
+ (mips_builtin_opcodes): Note that "nop" and "ssnop" are special
+ forms of "sll". Add new MIPS32 Release 2 instructions: ehb,
+ di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2,
+ rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh.
+ Note that hardware rotate instructions (ror, rorv) can be
+ used on MIPS32 Release 2, and add the official mnemonics
+ for them (rotr, rotrv) and the similar "rotl" mnemonic for
+ left-rotate.
+
+2002-12-30 Dmitry Diky <diwil@mail.ru>
+
+ * configure.in: Add msp430 target.
+ * configure: Regenerate.
+ * disassemble.c: Add entry for msp430 disassembly.
+ * msp430-dis.c: New file: msp430 disassembler.
+
+2002-12-27 Chris Demetriou <cgd@broadcom.com>
+
+ * disassemble.c (disassembler_usage): Add invocation of
+ print_mips_disassembler_options.
+ * mips-dis.c: Include libiberty.h.
+ (print_mips_disassembler_options, set_default_mips_dis_options)
+ (parse_mips_dis_option, parse_mips_dis_options, choose_abi_by_name)
+ (choose_arch_by_name, choose_arch_by_number): New functions.
+ (mips_abi_choice, mips_arch_choice): New structures.
+ (mips32_reg_names, mips64_reg_names, reg_names): Remove.
+ (mips_gpr_names_numeric, mips_gpr_names_oldabi)
+ (mips_gpr_names_newabi, mips_fpr_names_numeric)
+ (mips_fpr_names_32, mips_fpr_names_n32, mips_fpr_names_64)
+ (mips_cp0_names_numeric, mips_cp0_names_mips3264)
+ (mips_cp0_names_sb1, mips_abi_choices, mips_arch_choices)
+ (mips_processor, mips_isa, mips_gpr_names, mips_fpr_names)
+ (mips_cp0_names): New variables.
+ (print_insn_args): Use new variables to print GPR, FPR, and CP0
+ register names.
+ (mips_isa_type): Remove.
+ (print_insn_mips): Remove ISA and CPU setup since it is now done...
+ (_print_insn_mips): Here. Remove register setup code, and
+ call set_default_mips_dis_options and parse_mips_dis_options
+ instead.
+ (print_mips16_insn_arg): Use mips_gpr_names instead of mips32_names.
+
2002-12-23 Alan Modra <amodra@bigpond.net.au>
* Makefile.in: Regenerate.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index ba0072681c3..d3ecd6fe579 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -31,6 +31,7 @@ HFILES = \
ia64-asmtab.h \
ia64-opc.h \
ip2k-desc.h ip2k-opc.h \
+ iq2000-desc.h iq2000-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
openrisc-desc.h openrisc-opc.h \
@@ -96,6 +97,11 @@ CFILES = \
ip2k-dis.c \
ip2k-ibld.c \
ip2k-opc.c \
+ iq2000-asm.c \
+ iq2000-desc.c \
+ iq2000-dis.c \
+ iq2000-ibld.c \
+ iq2000-opc.c \
m32r-asm.c \
m32r-desc.c \
m32r-dis.c \
@@ -201,6 +207,11 @@ ALL_MACHINES = \
ip2k-dis.lo \
ip2k-ibld.lo \
ip2k-opc.lo \
+ iq2000-asm.lo \
+ iq2000-desc.lo \
+ iq2000-dis.lo \
+ iq2000-ibld.lo \
+ iq2000-opc.lo \
m32r-asm.lo \
m32r-desc.lo \
m32r-dis.lo \
@@ -222,6 +233,7 @@ ALL_MACHINES = \
mips16-opc.lo \
mmix-dis.lo \
mmix-opc.lo \
+ msp430-dis.lo \
ns32k-dis.lo \
openrisc-asm.lo \
openrisc-desc.lo \
@@ -326,7 +338,7 @@ uninstall_libopcodes:
CLEANFILES = \
stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
- stamp-xstormy16 \
+ stamp-iq2000 stamp-xstormy16 \
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
@@ -350,6 +362,7 @@ M32R_DEPS = stamp-m32r
FR30_DEPS = stamp-fr30
FRV_DEPS = stamp-frv
OPENRISC_DEPS = stamp-openrisc
+IQ2000_DEPS = stamp-iq2000
XSTORMY16_DEPS = stamp-xstormy16
else
IP2K_DEPS =
@@ -357,6 +370,7 @@ M32R_DEPS =
FR30_DEPS =
FRV_DEPS =
OPENRISC_DEPS =
+IQ2000_DEPS =
XSTORMY16_DEPS =
endif
@@ -401,6 +415,12 @@ $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(s
stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
$(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
+$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
+ @true
+stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
+ $(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
+ $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= extrafiles=
+
$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
@true
stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
@@ -498,7 +518,7 @@ arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/reloc-macros.h
avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
- $(INCDIR)/opcode/avr.h
+ $(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
$(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h opintl.h
@@ -533,10 +553,11 @@ fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h $(INCDIR)/libiberty.h
+ fr30-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
$(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
@@ -549,10 +570,11 @@ frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h $(INCDIR)/libiberty.h
+ frv-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ frv-desc.h $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
$(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
@@ -562,7 +584,7 @@ frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
opintl.h
@@ -600,7 +622,7 @@ ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
- ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c ../intl/libintl.h
ia64-asmtab.lo: ia64-asmtab.c
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
@@ -608,26 +630,44 @@ ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h $(INCDIR)/libiberty.h
+ ip2k-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
$(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h $(INCDIR)/libiberty.h
+ ip2k-opc.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
+ iq2000-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
+ iq2000-opc.h opintl.h $(INCDIR)/libiberty.h
+iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
+iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
+iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
+ iq2000-opc.h $(INCDIR)/libiberty.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h $(INCDIR)/libiberty.h
+ m32r-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
$(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
@@ -649,14 +689,14 @@ m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/m88k.h \
- opintl.h
+ opintl.h $(INCDIR)/libiberty.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/mips.h \
- opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/opcode/mips.h opintl.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -684,10 +724,12 @@ openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
+ opintl.h
openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
@@ -724,7 +766,8 @@ sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/elf32-sh64.h
sh64-opc.lo: sh64-opc.c sh64-opc.h
sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
@@ -761,11 +804,12 @@ xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
$(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
- opintl.h
+ $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h
xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
@@ -775,5 +819,6 @@ xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
$(INCDIR)/opcode/cgen.h xstormy16-opc.h $(INCDIR)/libiberty.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
-z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h
+z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index da66cf594e8..4939324e7a6 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -141,6 +141,7 @@ HFILES = \
ia64-asmtab.h \
ia64-opc.h \
ip2k-desc.h ip2k-opc.h \
+ iq2000-desc.h iq2000-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
openrisc-desc.h openrisc-opc.h \
@@ -207,6 +208,11 @@ CFILES = \
ip2k-dis.c \
ip2k-ibld.c \
ip2k-opc.c \
+ iq2000-asm.c \
+ iq2000-desc.c \
+ iq2000-dis.c \
+ iq2000-ibld.c \
+ iq2000-opc.c \
m32r-asm.c \
m32r-desc.c \
m32r-dis.c \
@@ -313,6 +319,11 @@ ALL_MACHINES = \
ip2k-dis.lo \
ip2k-ibld.lo \
ip2k-opc.lo \
+ iq2000-asm.lo \
+ iq2000-desc.lo \
+ iq2000-dis.lo \
+ iq2000-ibld.lo \
+ iq2000-opc.lo \
m32r-asm.lo \
m32r-desc.lo \
m32r-dis.lo \
@@ -334,6 +345,7 @@ ALL_MACHINES = \
mips16-opc.lo \
mmix-dis.lo \
mmix-opc.lo \
+ msp430-dis.lo \
ns32k-dis.lo \
openrisc-asm.lo \
openrisc-desc.lo \
@@ -393,7 +405,7 @@ POTFILES = $(HFILES) $(CFILES)
CLEANFILES = \
stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
- stamp-xstormy16 \
+ stamp-iq2000 stamp-xstormy16 \
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
@@ -421,6 +433,8 @@ CGEN_CPUS = fr30 frv ip2k m32r openrisc xstormy16
@CGEN_MAINT_FALSE@FRV_DEPS =
@CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc
@CGEN_MAINT_FALSE@OPENRISC_DEPS =
+@CGEN_MAINT_TRUE@IQ2000_DEPS = @CGEN_MAINT_TRUE@stamp-iq2000
+@CGEN_MAINT_FALSE@IQ2000_DEPS =
@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16
@CGEN_MAINT_FALSE@XSTORMY16_DEPS =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -600,7 +614,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
+ test "$$subdir" != "." || dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@@ -897,6 +911,12 @@ $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(s
stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
$(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
+$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
+ @true
+stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
+ $(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
+ $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= extrafiles=
+
$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
@true
stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
@@ -994,7 +1014,7 @@ arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/reloc-macros.h
avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
- $(INCDIR)/opcode/avr.h
+ $(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
$(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h opintl.h
@@ -1029,10 +1049,11 @@ fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h $(INCDIR)/libiberty.h
+ fr30-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
$(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
@@ -1045,10 +1066,11 @@ frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h $(INCDIR)/libiberty.h
+ frv-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ frv-desc.h $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
$(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
@@ -1058,7 +1080,7 @@ frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
opintl.h
@@ -1096,7 +1118,7 @@ ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
- ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c ../intl/libintl.h
ia64-asmtab.lo: ia64-asmtab.c
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
@@ -1104,26 +1126,44 @@ ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h $(INCDIR)/libiberty.h
+ ip2k-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
$(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h $(INCDIR)/libiberty.h
+ ip2k-opc.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
+ iq2000-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
+ iq2000-opc.h opintl.h $(INCDIR)/libiberty.h
+iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
+iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
+iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
+ iq2000-opc.h $(INCDIR)/libiberty.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h $(INCDIR)/libiberty.h
+ m32r-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
$(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
@@ -1145,14 +1185,14 @@ m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/m88k.h \
- opintl.h
+ opintl.h $(INCDIR)/libiberty.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/mips.h \
- opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/opcode/mips.h opintl.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -1180,10 +1220,12 @@ openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
+ opintl.h
openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
@@ -1220,7 +1262,8 @@ sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/elf32-sh64.h
sh64-opc.lo: sh64-opc.c sh64-opc.h
sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
@@ -1257,11 +1300,12 @@ xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
$(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
- opintl.h
+ $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h
xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
@@ -1271,7 +1315,8 @@ xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
$(INCDIR)/opcode/cgen.h xstormy16-opc.h $(INCDIR)/libiberty.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
-z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h
+z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/opcodes/alpha-opc.c b/opcodes/alpha-opc.c
index 6cf7d4cefcc..8dc10e4a55b 100644
--- a/opcodes/alpha-opc.c
+++ b/opcodes/alpha-opc.c
@@ -533,9 +533,13 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "halt", SPCD(0x00,0x0000), BASE, ARG_NONE },
{ "draina", SPCD(0x00,0x0002), BASE, ARG_NONE },
{ "bpt", SPCD(0x00,0x0080), BASE, ARG_NONE },
+ { "bugchk", SPCD(0x00,0x0081), BASE, ARG_NONE },
{ "callsys", SPCD(0x00,0x0083), BASE, ARG_NONE },
{ "chmk", SPCD(0x00,0x0083), BASE, ARG_NONE },
{ "imb", SPCD(0x00,0x0086), BASE, ARG_NONE },
+ { "rduniq", SPCD(0x00,0x009e), BASE, ARG_NONE },
+ { "wruniq", SPCD(0x00,0x009f), BASE, ARG_NONE },
+ { "gentrap", SPCD(0x00,0x00aa), BASE, ARG_NONE },
{ "call_pal", PCD(0x00), BASE, ARG_PCD },
{ "pal", PCD(0x00), BASE, ARG_PCD }, /* alias */
diff --git a/opcodes/configure b/opcodes/configure
index 6825a0b020b..171fadde4aa 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -2338,7 +2338,7 @@ if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
install_libbfd_p=$enableval
else
- if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then
+ if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
install_libbfd_p=yes
else
install_libbfd_p=no
@@ -4615,6 +4615,7 @@ if test x${all_targets} = xfalse ; then
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
+ bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
bfd_m68hc12_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -4625,6 +4626,7 @@ if test x${all_targets} = xfalse ; then
bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
+ bfd_msp430_arch) ta="$ta msp430-dis.lo" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 0e5eb6f5fb4..6e74b15cc3b 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -190,6 +190,7 @@ if test x${all_targets} = xfalse ; then
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
+ bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
bfd_m68hc12_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -200,6 +201,7 @@ if test x${all_targets} = xfalse ; then
bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
+ bfd_msp430_arch) ta="$ta msp430-dis.lo" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index 4bd0d898c32..7e6ba0b807d 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -49,6 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_mmix
#define ARCH_mn10200
#define ARCH_mn10300
+#define ARCH_msp430
#define ARCH_ns32k
#define ARCH_openrisc
#define ARCH_or32
@@ -69,6 +70,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_xstormy16
#define ARCH_z8k
#define ARCH_frv
+#define ARCH_iq2000
#define INCLUDE_SHMEDIA
#endif
@@ -214,6 +216,11 @@ disassembler (abfd)
disassemble = print_insn_m88k;
break;
#endif
+#ifdef ARCH_msp430
+ case bfd_arch_msp430:
+ disassemble = print_insn_msp430;
+ break;
+#endif
#ifdef ARCH_ns32k
case bfd_arch_ns32k:
disassemble = print_insn_ns32k;
@@ -354,6 +361,11 @@ disassembler (abfd)
disassemble = print_insn_frv;
break;
#endif
+#ifdef ARCH_iq2000
+ case bfd_arch_iq2000:
+ disassemble = print_insn_iq2000;
+ break;
+#endif
default:
return 0;
}
@@ -367,6 +379,9 @@ disassembler_usage (stream)
#ifdef ARCH_arm
print_arm_disassembler_options (stream);
#endif
+#ifdef ARCH_mips
+ print_mips_disassembler_options (stream);
+#endif
#ifdef ARCH_powerpc
print_ppc_disassembler_options (stream);
#endif
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 65c36f15f3d..f185b2858c4 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1,7 +1,6 @@
/* Print i386 instructions for GDB, the GNU debugger.
Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2001
- Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -176,9 +175,9 @@ fetch_data (info, addr)
if (status != 0)
{
/* If we did manage to read at least one byte, then
- print_insn_i386 will do something sensible. Otherwise, print
- an error. We do that here because this is where we know
- STATUS. */
+ print_insn_i386 will do something sensible. Otherwise, print
+ an error. We do that here because this is where we know
+ STATUS. */
if (priv->max_fetched == priv->the_buffer)
(*info->memory_error_func) (status, start, info);
longjmp (priv->bailout, 1);
@@ -193,6 +192,7 @@ fetch_data (info, addr)
#define Eb OP_E, b_mode
#define Ev OP_E, v_mode
#define Ed OP_E, d_mode
+#define Edq OP_E, dq_mode
#define indirEb OP_indirE, b_mode
#define indirEv OP_indirE, v_mode
#define Ew OP_E, w_mode
@@ -312,6 +312,7 @@ fetch_data (info, addr)
#define m_mode 7 /* d_mode in 32bit, q_mode in 64bit mode. */
#define cond_jump_mode 8
#define loop_jcxz_mode 9
+#define dq_mode 10 /* operand size depends on REX prefixes. */
#define es_reg 100
#define cs_reg 101
@@ -878,7 +879,7 @@ static const struct dis386 dis386_twobyte[] = {
{ "packssdw", MX, EM, XX },
{ PREGRP26 },
{ PREGRP24 },
- { "movd", MX, Ed, XX },
+ { "movd", MX, Edq, XX },
{ PREGRP19 },
/* 70 */
{ PREGRP22 },
@@ -1611,9 +1612,9 @@ static const struct dis386 prefix_user_table[][4] = {
},
/* PREGRP23 */
{
- { "movd", Ed, MX, XX },
+ { "movd", Edq, MX, XX },
{ "movq", XM, EX, XX },
- { "movd", Ed, XM, XX },
+ { "movd", Edq, XM, XX },
{ "(bad)", Ed, XM, XX },
},
/* PREGRP24 */
@@ -1808,9 +1809,9 @@ prefix_name (pref, sizeflag)
return (sizeflag & DFLAG) ? "data16" : "data32";
case 0x67:
if (mode_64bit)
- return (sizeflag & AFLAG) ? "addr32" : "addr64";
+ return (sizeflag & AFLAG) ? "addr32" : "addr64";
else
- return ((sizeflag & AFLAG) && !mode_64bit) ? "addr16" : "addr32";
+ return ((sizeflag & AFLAG) && !mode_64bit) ? "addr16" : "addr32";
case FWAIT_OPCODE:
return "fwait";
default:
@@ -2040,7 +2041,7 @@ print_insn (pc, info)
const char *name;
/* fwait not followed by floating point instruction. Print the
- first prefix, which is probably fwait itself. */
+ first prefix, which is probably fwait itself. */
name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
if (name == NULL)
name = INTERNAL_DISASSEMBLER_ERROR;
@@ -2273,7 +2274,7 @@ static const char *float_mem[] = {
"fsubr{s||s|}",
"fdiv{s||s|}",
"fdivr{s||s|}",
- /* d9 */
+ /* d9 */
"fld{s||s|}",
"(bad)",
"fst{s||s|}",
@@ -2518,11 +2519,11 @@ dofloat (sizeflag)
putop (float_mem[(floatop - 0xd8) * 8 + reg], sizeflag);
obufp = op1out;
if (floatop == 0xdb)
- OP_E (x_mode, sizeflag);
+ OP_E (x_mode, sizeflag);
else if (floatop == 0xdd)
- OP_E (d_mode, sizeflag);
+ OP_E (d_mode, sizeflag);
else
- OP_E (v_mode, sizeflag);
+ OP_E (v_mode, sizeflag);
return;
}
/* Skip mod/rm byte. */
@@ -2617,14 +2618,14 @@ putop (template, sizeflag)
case '}':
break;
case 'A':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
*obufp++ = 'b';
break;
case 'B':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (sizeflag & SUFFIX_ALWAYS)
*obufp++ = 'b';
break;
@@ -2642,8 +2643,8 @@ putop (template, sizeflag)
used_prefixes |= (prefixes & PREFIX_ADDR);
break;
case 'F':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
{
if (sizeflag & AFLAG)
@@ -2654,8 +2655,8 @@ putop (template, sizeflag)
}
break;
case 'H':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
|| (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
{
@@ -2669,8 +2670,8 @@ putop (template, sizeflag)
}
break;
case 'L':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (sizeflag & SUFFIX_ALWAYS)
*obufp++ = 'l';
break;
@@ -2688,8 +2689,8 @@ putop (template, sizeflag)
*obufp++ = 'd';
break;
case 'T':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (mode_64bit)
{
*obufp++ = 'q';
@@ -2697,8 +2698,8 @@ putop (template, sizeflag)
}
/* Fall through. */
case 'P':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if ((prefixes & PREFIX_DATA)
|| (rex & REX_MODE64)
|| (sizeflag & SUFFIX_ALWAYS))
@@ -2717,8 +2718,8 @@ putop (template, sizeflag)
}
break;
case 'U':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (mode_64bit)
{
*obufp++ = 'q';
@@ -2726,8 +2727,8 @@ putop (template, sizeflag)
}
/* Fall through. */
case 'Q':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
USED_REX (REX_MODE64);
if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
{
@@ -2745,7 +2746,7 @@ putop (template, sizeflag)
break;
case 'R':
USED_REX (REX_MODE64);
- if (intel_syntax)
+ if (intel_syntax)
{
if (rex & REX_MODE64)
{
@@ -2776,8 +2777,8 @@ putop (template, sizeflag)
used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 'S':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (sizeflag & SUFFIX_ALWAYS)
{
if (rex & REX_MODE64)
@@ -2797,11 +2798,11 @@ putop (template, sizeflag)
*obufp++ = 'd';
else
*obufp++ = 's';
- used_prefixes |= (prefixes & PREFIX_DATA);
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 'Y':
- if (intel_syntax)
- break;
+ if (intel_syntax)
+ break;
if (rex & REX_MODE64)
{
USED_REX (REX_MODE64);
@@ -2818,7 +2819,7 @@ putop (template, sizeflag)
*obufp++ = 'w';
else
*obufp++ = 'b';
- if (intel_syntax)
+ if (intel_syntax)
{
if (rex)
{
@@ -3000,10 +3001,11 @@ OP_E (bytemode, sizeflag)
oappend (names32[rm + add]);
break;
case v_mode:
+ case dq_mode:
USED_REX (REX_MODE64);
if (rex & REX_MODE64)
oappend (names64[rm + add]);
- else if (sizeflag & DFLAG)
+ else if ((sizeflag & DFLAG) || bytemode == dq_mode)
oappend (names32[rm + add]);
else
oappend (names16[rm + add]);
@@ -3076,52 +3078,52 @@ OP_E (bytemode, sizeflag)
}
if (!intel_syntax)
- if (mod != 0 || (base & 7) == 5)
- {
+ if (mod != 0 || (base & 7) == 5)
+ {
print_operand_value (scratchbuf, !riprel, disp);
- oappend (scratchbuf);
+ oappend (scratchbuf);
if (riprel)
{
set_op (disp, 1);
oappend ("(%rip)");
}
- }
+ }
if (havebase || (havesib && (index != 4 || scale != 0)))
{
- if (intel_syntax)
- {
- switch (bytemode)
- {
- case b_mode:
- oappend ("BYTE PTR ");
- break;
- case w_mode:
- oappend ("WORD PTR ");
- break;
- case v_mode:
- oappend ("DWORD PTR ");
- break;
- case d_mode:
- oappend ("QWORD PTR ");
- break;
- case m_mode:
+ if (intel_syntax)
+ {
+ switch (bytemode)
+ {
+ case b_mode:
+ oappend ("BYTE PTR ");
+ break;
+ case w_mode:
+ oappend ("WORD PTR ");
+ break;
+ case v_mode:
+ oappend ("DWORD PTR ");
+ break;
+ case d_mode:
+ oappend ("QWORD PTR ");
+ break;
+ case m_mode:
if (mode_64bit)
oappend ("DWORD PTR ");
else
oappend ("QWORD PTR ");
break;
- case x_mode:
- oappend ("XWORD PTR ");
- break;
- default:
- break;
- }
- }
+ case x_mode:
+ oappend ("XWORD PTR ");
+ break;
+ default:
+ break;
+ }
+ }
*obufp++ = open_char;
if (intel_syntax && riprel)
oappend ("rip + ");
- *obufp = '\0';
+ *obufp = '\0';
USED_REX (REX_EXTZ);
if (!havesib && (rex & REX_EXTZ))
base += 8;
@@ -3132,41 +3134,41 @@ OP_E (bytemode, sizeflag)
{
if (index != 4)
{
- if (intel_syntax)
- {
- if (havebase)
- {
- *obufp++ = separator_char;
- *obufp = '\0';
- }
- sprintf (scratchbuf, "%s",
+ if (intel_syntax)
+ {
+ if (havebase)
+ {
+ *obufp++ = separator_char;
+ *obufp = '\0';
+ }
+ sprintf (scratchbuf, "%s",
mode_64bit && (sizeflag & AFLAG)
? names64[index] : names32[index]);
- }
- else
+ }
+ else
sprintf (scratchbuf, ",%s",
mode_64bit && (sizeflag & AFLAG)
? names64[index] : names32[index]);
oappend (scratchbuf);
}
- if (!intel_syntax
- || (intel_syntax
- && bytemode != b_mode
- && bytemode != w_mode
- && bytemode != v_mode))
- {
- *obufp++ = scale_char;
- *obufp = '\0';
- sprintf (scratchbuf, "%d", 1 << scale);
- oappend (scratchbuf);
- }
+ if (!intel_syntax
+ || (intel_syntax
+ && bytemode != b_mode
+ && bytemode != w_mode
+ && bytemode != v_mode))
+ {
+ *obufp++ = scale_char;
+ *obufp = '\0';
+ sprintf (scratchbuf, "%d", 1 << scale);
+ oappend (scratchbuf);
+ }
}
- if (intel_syntax)
- if (mod != 0 || (base & 7) == 5)
- {
+ if (intel_syntax)
+ if (mod != 0 || (base & 7) == 5)
+ {
/* Don't print zero displacements. */
- if (disp != 0)
- {
+ if (disp != 0)
+ {
if ((bfd_signed_vma) disp > 0)
{
*obufp++ = '+';
@@ -3174,17 +3176,17 @@ OP_E (bytemode, sizeflag)
}
print_operand_value (scratchbuf, 0, disp);
- oappend (scratchbuf);
- }
- }
+ oappend (scratchbuf);
+ }
+ }
*obufp++ = close_char;
- *obufp = '\0';
+ *obufp = '\0';
}
else if (intel_syntax)
- {
- if (mod != 0 || (base & 7) == 5)
- {
+ {
+ if (mod != 0 || (base & 7) == 5)
+ {
if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
| PREFIX_ES | PREFIX_FS | PREFIX_GS))
;
@@ -3194,9 +3196,9 @@ OP_E (bytemode, sizeflag)
oappend (":");
}
print_operand_value (scratchbuf, 1, disp);
- oappend (scratchbuf);
- }
- }
+ oappend (scratchbuf);
+ }
+ }
}
else
{ /* 16 bit address mode */
@@ -3224,19 +3226,19 @@ OP_E (bytemode, sizeflag)
}
if (!intel_syntax)
- if (mod != 0 || (rm & 7) == 6)
- {
+ if (mod != 0 || (rm & 7) == 6)
+ {
print_operand_value (scratchbuf, 0, disp);
- oappend (scratchbuf);
- }
+ oappend (scratchbuf);
+ }
if (mod != 0 || (rm & 7) != 6)
{
*obufp++ = open_char;
- *obufp = '\0';
+ *obufp = '\0';
oappend (index16[rm + add]);
- *obufp++ = close_char;
- *obufp = '\0';
+ *obufp++ = close_char;
+ *obufp = '\0';
}
}
}
@@ -3383,9 +3385,9 @@ OP_REG (code, sizeflag)
{
case indir_dx_reg:
if (intel_syntax)
- s = "[dx]";
+ s = "[dx]";
else
- s = "(%dx)";
+ s = "(%dx)";
break;
case ax_reg: case cx_reg: case dx_reg: case bx_reg:
case sp_reg: case bp_reg: case si_reg: case di_reg:
@@ -3441,9 +3443,9 @@ OP_IMREG (code, sizeflag)
{
case indir_dx_reg:
if (intel_syntax)
- s = "[dx]";
+ s = "[dx]";
else
- s = "(%dx)";
+ s = "(%dx)";
break;
case ax_reg: case cx_reg: case dx_reg: case bx_reg:
case sp_reg: case bp_reg: case si_reg: case di_reg:
@@ -3725,7 +3727,7 @@ OP_OFF (bytemode, sizeflag)
if (intel_syntax)
{
if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
- | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
{
oappend (names_seg[ds_reg - es_reg]);
oappend (":");
@@ -3755,7 +3757,7 @@ OP_OFF64 (bytemode, sizeflag)
if (intel_syntax)
{
if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
- | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
{
oappend (names_seg[ds_reg - es_reg]);
oappend (":");
@@ -3780,9 +3782,9 @@ ptr_reg (code, sizeflag)
if (rex & REX_MODE64)
{
if (!(sizeflag & AFLAG))
- s = names32[code - eAX_reg];
+ s = names32[code - eAX_reg];
else
- s = names64[code - eAX_reg];
+ s = names64[code - eAX_reg];
}
else if (sizeflag & AFLAG)
s = names32[code - eAX_reg];
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
new file mode 100644
index 00000000000..17b93eb2f40
--- /dev/null
+++ b/opcodes/iq2000-asm.c
@@ -0,0 +1,891 @@
+/* Assembler interface for targets using CGEN. -*- C -*-
+ CGEN: Cpu tools GENerator
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+- the resultant file is machine generated, cgen-asm.in isn't
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* ??? Eventually more and more of this stuff can go to cpu-independent files.
+ Keep that in mind. */
+
+#include "sysdep.h"
+#include <stdio.h>
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "iq2000-desc.h"
+#include "iq2000-opc.h"
+#include "opintl.h"
+#include "xregex.h"
+#include "libiberty.h"
+#include "safe-ctype.h"
+
+#undef min
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#undef max
+#define max(a,b) ((a) > (b) ? (a) : (b))
+
+static const char * parse_insn_normal
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+
+/* -- assembler routines inserted here. */
+
+/* -- asm.c */
+static const char * parse_mimm PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_imm PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+static const char * parse_hi16 PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+static const char * parse_lo16 PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+
+/* Special check to ensure that instruction exists for given machine */
+int
+iq2000_cgen_insn_supported (cd, insn)
+ CGEN_CPU_DESC cd;
+ CGEN_INSN *insn;
+{
+ int machs = cd->machs;
+
+ return ((CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_MACH) & machs) != 0);
+}
+
+static int iq2000_cgen_isa_register (strp)
+ const char **strp;
+{
+ int len;
+ int ch1, ch2;
+ if (**strp == 'r' || **strp == 'R')
+ {
+ len = strlen (*strp);
+ if (len == 2)
+ {
+ ch1 = (*strp)[1];
+ if ('0' <= ch1 && ch1 <= '9')
+ return 1;
+ }
+ else if (len == 3)
+ {
+ ch1 = (*strp)[1];
+ ch2 = (*strp)[2];
+ if (('1' <= ch1 && ch1 <= '2') && ('0' <= ch2 && ch2 <= '9'))
+ return 1;
+ if ('3' == ch1 && (ch2 == '0' || ch2 == '1'))
+ return 1;
+ }
+ }
+ if (**strp == '%' && tolower((*strp)[1]) != 'l' && tolower((*strp)[1]) != 'h')
+ return 1;
+ return 0;
+}
+
+/* Handle negated literal. */
+
+static const char *
+parse_mimm (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ const char *errmsg;
+ long value;
+
+ /* Verify this isn't a register */
+ if (iq2000_cgen_isa_register (strp))
+ errmsg = _("immediate value cannot be register");
+ else
+ {
+ long value;
+
+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, & value);
+ if (errmsg == NULL)
+ {
+ long x = (-value) & 0xFFFF0000;
+ if (x != 0 && x != 0xFFFF0000)
+ errmsg = _("immediate value out of range");
+ else
+ *valuep = (-value & 0xFFFF);
+ }
+ }
+ return errmsg;
+}
+
+/* Handle signed/unsigned literal. */
+
+static const char *
+parse_imm (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ unsigned long *valuep;
+{
+ const char *errmsg;
+ long value;
+
+ if (iq2000_cgen_isa_register (strp))
+ errmsg = _("immediate value cannot be register");
+ else
+ {
+ long value;
+
+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, & value);
+ if (errmsg == NULL)
+ {
+ long x = value & 0xFFFF0000;
+ if (x != 0 && x != 0xFFFF0000)
+ errmsg = _("immediate value out of range");
+ else
+ *valuep = (value & 0xFFFF);
+ }
+ }
+ return errmsg;
+}
+
+/* Handle iq10 21-bit jmp offset. */
+
+static const char *
+parse_jtargq10 (cd, strp, opindex, reloc, type_addr, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ int reloc;
+ enum cgen_parse_operand_result *type_addr;
+ unsigned long *valuep;
+{
+ const char *errmsg;
+ bfd_vma value;
+ enum cgen_parse_operand_result result_type = CGEN_PARSE_OPERAND_RESULT_NUMBER;
+
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IQ2000_OFFSET_21,
+ &result_type, &value);
+ if (errmsg == NULL && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ {
+ /* check value is within 23-bits (remembering that 2-bit shift right will occur) */
+ if (value > 0x7fffff)
+ return _("21-bit offset out of range");
+ }
+ *valuep = (value & 0x7FFFFF);
+ return errmsg;
+}
+
+/* Handle high(). */
+
+static const char *
+parse_hi16 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ unsigned long *valuep;
+{
+ if (strncasecmp (*strp, "%hi(", 4) == 0)
+ {
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+ const char *errmsg;
+
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16,
+ &result_type, &value);
+ if (**strp != ')')
+ return _("missing `)'");
+
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ {
+ /* if value has top-bit of %lo on, then it will
+ sign-propagate and so we compensate by adding
+ 1 to the resultant %hi value */
+ if (value & 0x8000)
+ value += 0x10000;
+ value >>= 16;
+ }
+ *valuep = value;
+
+ return errmsg;
+ }
+
+ /* we add %uhi in case a user just wants the high 16-bits or is using
+ an insn like ori for %lo which does not sign-propagate */
+ if (strncasecmp (*strp, "%uhi(", 5) == 0)
+ {
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+ const char *errmsg;
+
+ *strp += 5;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IQ2000_UHI16,
+ &result_type, &value);
+ if (**strp != ')')
+ return _("missing `)'");
+
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ {
+ value >>= 16;
+ }
+ *valuep = value;
+
+ return errmsg;
+ }
+
+ return parse_imm (cd, strp, opindex, valuep);
+}
+
+/* Handle %lo in a signed context.
+ The signedness of the value doesn't matter to %lo(), but this also
+ handles the case where %lo() isn't present. */
+
+static const char *
+parse_lo16 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ if (strncasecmp (*strp, "%lo(", 4) == 0)
+ {
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16,
+ &result_type, &value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+
+ return parse_imm (cd, strp, opindex, valuep);
+}
+
+/* Handle %lo in a negated signed context.
+ The signedness of the value doesn't matter to %lo(), but this also
+ handles the case where %lo() isn't present. */
+
+static const char *
+parse_mlo16 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ if (strncasecmp (*strp, "%lo(", 4) == 0)
+ {
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16,
+ &result_type, &value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value = (-value) & 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+
+ return parse_mimm (cd, strp, opindex, valuep);
+}
+
+/* -- */
+
+const char * iq2000_cgen_parse_operand
+ PARAMS ((CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *));
+
+/* Main entry point for operand parsing.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `parse_insn_normal', but keeping it
+ separate makes clear the interface between `parse_insn_normal' and each of
+ the handlers. */
+
+const char *
+iq2000_cgen_parse_operand (cd, opindex, strp, fields)
+ CGEN_CPU_DESC cd;
+ int opindex;
+ const char ** strp;
+ CGEN_FIELDS * fields;
+{
+ const char * errmsg = NULL;
+ /* Used by scalar operands that still need to be parsed. */
+ long junk ATTRIBUTE_UNUSED;
+
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rs);
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ {
+ bfd_vma value;
+ errmsg = cgen_parse_address (cd, strp, IQ2000_OPERAND_BASEOFF, 0, NULL, & value);
+ fields->f_imm = value;
+ }
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_BITNUM, &fields->f_rt);
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_BYTECOUNT, &fields->f_bytecount);
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CAM_Y, &fields->f_cam_y);
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CAM_Z, &fields->f_cam_z);
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_3FUNC, &fields->f_cm_3func);
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_3Z, &fields->f_cm_3z);
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_4FUNC, &fields->f_cm_4func);
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_4Z, &fields->f_cm_4z);
+ break;
+ case IQ2000_OPERAND_COUNT :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_COUNT, &fields->f_count);
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_EXECODE, &fields->f_excode);
+ break;
+ case IQ2000_OPERAND_HI16 :
+ errmsg = parse_hi16 (cd, strp, IQ2000_OPERAND_HI16, &fields->f_imm);
+ break;
+ case IQ2000_OPERAND_IMM :
+ errmsg = parse_imm (cd, strp, IQ2000_OPERAND_IMM, &fields->f_imm);
+ break;
+ case IQ2000_OPERAND_INDEX :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_INDEX, &fields->f_index);
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ {
+ bfd_vma value;
+ errmsg = cgen_parse_address (cd, strp, IQ2000_OPERAND_JMPTARG, 0, NULL, & value);
+ fields->f_jtarg = value;
+ }
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ {
+ bfd_vma value;
+ errmsg = parse_jtargq10 (cd, strp, IQ2000_OPERAND_JMPTARGQ10, 0, NULL, & value);
+ fields->f_jtargq10 = value;
+ }
+ break;
+ case IQ2000_OPERAND_LO16 :
+ errmsg = parse_lo16 (cd, strp, IQ2000_OPERAND_LO16, &fields->f_imm);
+ break;
+ case IQ2000_OPERAND_MASK :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASK, &fields->f_mask);
+ break;
+ case IQ2000_OPERAND_MASKL :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASKL, &fields->f_maskl);
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASKQ10, &fields->f_maskq10);
+ break;
+ case IQ2000_OPERAND_MASKR :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASKR, &fields->f_rs);
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ errmsg = parse_mlo16 (cd, strp, IQ2000_OPERAND_MLO16, &fields->f_imm);
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ {
+ bfd_vma value;
+ errmsg = cgen_parse_address (cd, strp, IQ2000_OPERAND_OFFSET, 0, NULL, & value);
+ fields->f_offset = value;
+ }
+ break;
+ case IQ2000_OPERAND_RD :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rd);
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rd_rs);
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rd_rt);
+ break;
+ case IQ2000_OPERAND_RS :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rs);
+ break;
+ case IQ2000_OPERAND_RT :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rt);
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rt_rs);
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_SHAMT, &fields->f_shamt);
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex);
+ abort ();
+ }
+
+ return errmsg;
+}
+
+cgen_parse_fn * const iq2000_cgen_parse_handlers[] =
+{
+ parse_insn_normal,
+};
+
+void
+iq2000_cgen_init_asm (cd)
+ CGEN_CPU_DESC cd;
+{
+ iq2000_cgen_init_opcode_table (cd);
+ iq2000_cgen_init_ibld_table (cd);
+ cd->parse_handlers = & iq2000_cgen_parse_handlers[0];
+ cd->parse_operand = iq2000_cgen_parse_operand;
+#ifdef CGEN_ASM_INIT_HOOK
+CGEN_ASM_INIT_HOOK
+#endif
+}
+
+
+
+/* Regex construction routine.
+
+ This translates an opcode syntax string into a regex string,
+ by replacing any non-character syntax element (such as an
+ opcode) with the pattern '.*'
+
+ It then compiles the regex and stores it in the opcode, for
+ later use by iq2000_cgen_assemble_insn
+
+ Returns NULL for success, an error message for failure. */
+
+char *
+iq2000_cgen_build_insn_regex (insn)
+ CGEN_INSN *insn;
+{
+ CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
+ const char *mnem = CGEN_INSN_MNEMONIC (insn);
+ char rxbuf[CGEN_MAX_RX_ELEMENTS];
+ char *rx = rxbuf;
+ const CGEN_SYNTAX_CHAR_TYPE *syn;
+ int reg_err;
+
+ syn = CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc));
+
+ /* Mnemonics come first in the syntax string. */
+ if (! CGEN_SYNTAX_MNEMONIC_P (* syn))
+ return _("missing mnemonic in syntax string");
+ ++syn;
+
+ /* Generate a case sensitive regular expression that emulates case
+ insensitive matching in the "C" locale. We cannot generate a case
+ insensitive regular expression because in Turkish locales, 'i' and 'I'
+ are not equal modulo case conversion. */
+
+ /* Copy the literal mnemonic out of the insn. */
+ for (; *mnem; mnem++)
+ {
+ char c = *mnem;
+
+ if (ISALPHA (c))
+ {
+ *rx++ = '[';
+ *rx++ = TOLOWER (c);
+ *rx++ = TOUPPER (c);
+ *rx++ = ']';
+ }
+ else
+ *rx++ = c;
+ }
+
+ /* Copy any remaining literals from the syntax string into the rx. */
+ for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn)
+ {
+ if (CGEN_SYNTAX_CHAR_P (* syn))
+ {
+ char c = CGEN_SYNTAX_CHAR (* syn);
+
+ switch (c)
+ {
+ /* Escape any regex metacharacters in the syntax. */
+ case '.': case '[': case '\\':
+ case '*': case '^': case '$':
+
+#ifdef CGEN_ESCAPE_EXTENDED_REGEX
+ case '?': case '{': case '}':
+ case '(': case ')': case '*':
+ case '|': case '+': case ']':
+#endif
+ *rx++ = '\\';
+ *rx++ = c;
+ break;
+
+ default:
+ if (ISALPHA (c))
+ {
+ *rx++ = '[';
+ *rx++ = TOLOWER (c);
+ *rx++ = TOUPPER (c);
+ *rx++ = ']';
+ }
+ else
+ *rx++ = c;
+ break;
+ }
+ }
+ else
+ {
+ /* Replace non-syntax fields with globs. */
+ *rx++ = '.';
+ *rx++ = '*';
+ }
+ }
+
+ /* Trailing whitespace ok. */
+ * rx++ = '[';
+ * rx++ = ' ';
+ * rx++ = '\t';
+ * rx++ = ']';
+ * rx++ = '*';
+
+ /* But anchor it after that. */
+ * rx++ = '$';
+ * rx = '\0';
+
+ CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t));
+ reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB);
+
+ if (reg_err == 0)
+ return NULL;
+ else
+ {
+ static char msg[80];
+
+ regerror (reg_err, (regex_t *) CGEN_INSN_RX (insn), msg, 80);
+ regfree ((regex_t *) CGEN_INSN_RX (insn));
+ free (CGEN_INSN_RX (insn));
+ (CGEN_INSN_RX (insn)) = NULL;
+ return msg;
+ }
+}
+
+
+/* Default insn parser.
+
+ The syntax string is scanned and operands are parsed and stored in FIELDS.
+ Relocs are queued as we go via other callbacks.
+
+ ??? Note that this is currently an all-or-nothing parser. If we fail to
+ parse the instruction, we return 0 and the caller will start over from
+ the beginning. Backtracking will be necessary in parsing subexpressions,
+ but that can be handled there. Not handling backtracking here may get
+ expensive in the case of the m68k. Deal with later.
+
+ Returns NULL for success, an error message for failure. */
+
+static const char *
+parse_insn_normal (cd, insn, strp, fields)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN *insn;
+ const char **strp;
+ CGEN_FIELDS *fields;
+{
+ /* ??? Runtime added insns not handled yet. */
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ const char *str = *strp;
+ const char *errmsg;
+ const char *p;
+ const CGEN_SYNTAX_CHAR_TYPE * syn;
+#ifdef CGEN_MNEMONIC_OPERANDS
+ /* FIXME: wip */
+ int past_opcode_p;
+#endif
+
+ /* For now we assume the mnemonic is first (there are no leading operands).
+ We can parse it without needing to set up operand parsing.
+ GAS's input scrubber will ensure mnemonics are lowercase, but we may
+ not be called from GAS. */
+ p = CGEN_INSN_MNEMONIC (insn);
+ while (*p && TOLOWER (*p) == TOLOWER (*str))
+ ++p, ++str;
+
+ if (* p)
+ return _("unrecognized instruction");
+
+#ifndef CGEN_MNEMONIC_OPERANDS
+ if (* str && ! ISSPACE (* str))
+ return _("unrecognized instruction");
+#endif
+
+ CGEN_INIT_PARSE (cd);
+ cgen_init_parse_operand (cd);
+#ifdef CGEN_MNEMONIC_OPERANDS
+ past_opcode_p = 0;
+#endif
+
+ /* We don't check for (*str != '\0') here because we want to parse
+ any trailing fake arguments in the syntax string. */
+ syn = CGEN_SYNTAX_STRING (syntax);
+
+ /* Mnemonics come first for now, ensure valid string. */
+ if (! CGEN_SYNTAX_MNEMONIC_P (* syn))
+ abort ();
+
+ ++syn;
+
+ while (* syn != 0)
+ {
+ /* Non operand chars must match exactly. */
+ if (CGEN_SYNTAX_CHAR_P (* syn))
+ {
+ /* FIXME: While we allow for non-GAS callers above, we assume the
+ first char after the mnemonic part is a space. */
+ /* FIXME: We also take inappropriate advantage of the fact that
+ GAS's input scrubber will remove extraneous blanks. */
+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
+ {
+#ifdef CGEN_MNEMONIC_OPERANDS
+ if (CGEN_SYNTAX_CHAR(* syn) == ' ')
+ past_opcode_p = 1;
+#endif
+ ++ syn;
+ ++ str;
+ }
+ else if (*str)
+ {
+ /* Syntax char didn't match. Can't be this insn. */
+ static char msg [80];
+
+ /* xgettext:c-format */
+ sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
+ CGEN_SYNTAX_CHAR(*syn), *str);
+ return msg;
+ }
+ else
+ {
+ /* Ran out of input. */
+ static char msg [80];
+
+ /* xgettext:c-format */
+ sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
+ CGEN_SYNTAX_CHAR(*syn));
+ return msg;
+ }
+ continue;
+ }
+
+ /* We have an operand of some sort. */
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
+ &str, fields);
+ if (errmsg)
+ return errmsg;
+
+ /* Done with this operand, continue with next one. */
+ ++ syn;
+ }
+
+ /* If we're at the end of the syntax string, we're done. */
+ if (* syn == 0)
+ {
+ /* FIXME: For the moment we assume a valid `str' can only contain
+ blanks now. IE: We needn't try again with a longer version of
+ the insn and it is assumed that longer versions of insns appear
+ before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
+ while (ISSPACE (* str))
+ ++ str;
+
+ if (* str != '\0')
+ return _("junk at end of line"); /* FIXME: would like to include `str' */
+
+ return NULL;
+ }
+
+ /* We couldn't parse it. */
+ return _("unrecognized instruction");
+}
+
+/* Main entry point.
+ This routine is called for each instruction to be assembled.
+ STR points to the insn to be assembled.
+ We assume all necessary tables have been initialized.
+ The assembled instruction, less any fixups, is stored in BUF.
+ Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value
+ still needs to be converted to target byte order, otherwise BUF is an array
+ of bytes in target byte order.
+ The result is a pointer to the insn's entry in the opcode table,
+ or NULL if an error occured (an error message will have already been
+ printed).
+
+ Note that when processing (non-alias) macro-insns,
+ this function recurses.
+
+ ??? It's possible to make this cpu-independent.
+ One would have to deal with a few minor things.
+ At this point in time doing so would be more of a curiosity than useful
+ [for example this file isn't _that_ big], but keeping the possibility in
+ mind helps keep the design clean. */
+
+const CGEN_INSN *
+iq2000_cgen_assemble_insn (cd, str, fields, buf, errmsg)
+ CGEN_CPU_DESC cd;
+ const char *str;
+ CGEN_FIELDS *fields;
+ CGEN_INSN_BYTES_PTR buf;
+ char **errmsg;
+{
+ const char *start;
+ CGEN_INSN_LIST *ilist;
+ const char *parse_errmsg = NULL;
+ const char *insert_errmsg = NULL;
+ int recognized_mnemonic = 0;
+
+ /* Skip leading white space. */
+ while (ISSPACE (* str))
+ ++ str;
+
+ /* The instructions are stored in hashed lists.
+ Get the first in the list. */
+ ilist = CGEN_ASM_LOOKUP_INSN (cd, str);
+
+ /* Keep looking until we find a match. */
+ start = str;
+ for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist))
+ {
+ const CGEN_INSN *insn = ilist->insn;
+ recognized_mnemonic = 1;
+
+#ifdef CGEN_VALIDATE_INSN_SUPPORTED
+ /* Not usually needed as unsupported opcodes
+ shouldn't be in the hash lists. */
+ /* Is this insn supported by the selected cpu? */
+ if (! iq2000_cgen_insn_supported (cd, insn))
+ continue;
+#endif
+ /* If the RELAX attribute is set, this is an insn that shouldn't be
+ chosen immediately. Instead, it is used during assembler/linker
+ relaxation if possible. */
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ continue;
+
+ str = start;
+
+ /* Skip this insn if str doesn't look right lexically. */
+ if (CGEN_INSN_RX (insn) != NULL &&
+ regexec ((regex_t *) CGEN_INSN_RX (insn), str, 0, NULL, 0) == REG_NOMATCH)
+ continue;
+
+ /* Allow parse/insert handlers to obtain length of insn. */
+ CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
+
+ parse_errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields);
+ if (parse_errmsg != NULL)
+ continue;
+
+ /* ??? 0 is passed for `pc'. */
+ insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf,
+ (bfd_vma) 0);
+ if (insert_errmsg != NULL)
+ continue;
+
+ /* It is up to the caller to actually output the insn and any
+ queued relocs. */
+ return insn;
+ }
+
+ {
+ static char errbuf[150];
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+ const char *tmp_errmsg;
+
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#else
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#endif
+
+ *errmsg = errbuf;
+ return NULL;
+ }
+}
+
+#if 0 /* This calls back to GAS which we can't do without care. */
+
+/* Record each member of OPVALS in the assembler's symbol table.
+ This lets GAS parse registers for us.
+ ??? Interesting idea but not currently used. */
+
+/* Record each member of OPVALS in the assembler's symbol table.
+ FIXME: Not currently used. */
+
+void
+iq2000_cgen_asm_hash_keywords (cd, opvals)
+ CGEN_CPU_DESC cd;
+ CGEN_KEYWORD *opvals;
+{
+ CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
+ const CGEN_KEYWORD_ENTRY * ke;
+
+ while ((ke = cgen_keyword_search_next (& search)) != NULL)
+ {
+#if 0 /* Unnecessary, should be done in the search routine. */
+ if (! iq2000_cgen_opval_supported (ke))
+ continue;
+#endif
+ cgen_asm_record_register (cd, ke->name, ke->value);
+ }
+}
+
+#endif /* 0 */
diff --git a/opcodes/iq2000-desc.c b/opcodes/iq2000-desc.c
new file mode 100644
index 00000000000..a30bf56b8bf
--- /dev/null
+++ b/opcodes/iq2000-desc.c
@@ -0,0 +1,2222 @@
+/* CPU data for iq2000.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "sysdep.h"
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "iq2000-desc.h"
+#include "iq2000-opc.h"
+#include "opintl.h"
+#include "libiberty.h"
+
+/* Attributes. */
+
+static const CGEN_ATTR_ENTRY bool_attr[] =
+{
+ { "#f", 0 },
+ { "#t", 1 },
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY MACH_attr[] =
+{
+ { "base", MACH_BASE },
+ { "iq2000", MACH_IQ2000 },
+ { "iq10", MACH_IQ10 },
+ { "max", MACH_MAX },
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY ISA_attr[] =
+{
+ { "iq2000", ISA_IQ2000 },
+ { "max", ISA_MAX },
+ { 0, 0 }
+};
+
+const CGEN_ATTR_TABLE iq2000_cgen_ifield_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "RESERVED", &bool_attr[0], &bool_attr[0] },
+ { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
+ { "SIGNED", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+const CGEN_ATTR_TABLE iq2000_cgen_hardware_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "PC", &bool_attr[0], &bool_attr[0] },
+ { "PROFILE", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+const CGEN_ATTR_TABLE iq2000_cgen_operand_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
+ { "SIGNED", &bool_attr[0], &bool_attr[0] },
+ { "NEGATIVE", &bool_attr[0], &bool_attr[0] },
+ { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "SEM-ONLY", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "ALIAS", &bool_attr[0], &bool_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] },
+ { "COND-CTI", &bool_attr[0], &bool_attr[0] },
+ { "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
+ { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
+ { "RELAXABLE", &bool_attr[0], &bool_attr[0] },
+ { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "NO-DIS", &bool_attr[0], &bool_attr[0] },
+ { "PBB", &bool_attr[0], &bool_attr[0] },
+ { "YIELD-INSN", &bool_attr[0], &bool_attr[0] },
+ { "LOAD-DELAY", &bool_attr[0], &bool_attr[0] },
+ { "EVEN-REG-NUM", &bool_attr[0], &bool_attr[0] },
+ { "UNSUPPORTED", &bool_attr[0], &bool_attr[0] },
+ { "USES-RD", &bool_attr[0], &bool_attr[0] },
+ { "USES-RS", &bool_attr[0], &bool_attr[0] },
+ { "USES-RT", &bool_attr[0], &bool_attr[0] },
+ { "USES-R31", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+/* Instruction set variants. */
+
+static const CGEN_ISA iq2000_cgen_isa_table[] = {
+ { "iq2000", 32, 32, 32, 32 },
+ { 0, 0, 0, 0, 0 }
+};
+
+/* Machine variants. */
+
+static const CGEN_MACH iq2000_cgen_mach_table[] = {
+ { "iq2000", "iq2000", MACH_IQ2000, 0 },
+ { "iq10", "iq10", MACH_IQ10, 0 },
+ { 0, 0, 0, 0 }
+};
+
+static CGEN_KEYWORD_ENTRY iq2000_cgen_opval_gr_names_entries[] =
+{
+ { "r0", 0, {0, {0}}, 0, 0 },
+ { "%0", 0, {0, {0}}, 0, 0 },
+ { "r1", 1, {0, {0}}, 0, 0 },
+ { "%1", 1, {0, {0}}, 0, 0 },
+ { "r2", 2, {0, {0}}, 0, 0 },
+ { "%2", 2, {0, {0}}, 0, 0 },
+ { "r3", 3, {0, {0}}, 0, 0 },
+ { "%3", 3, {0, {0}}, 0, 0 },
+ { "r4", 4, {0, {0}}, 0, 0 },
+ { "%4", 4, {0, {0}}, 0, 0 },
+ { "r5", 5, {0, {0}}, 0, 0 },
+ { "%5", 5, {0, {0}}, 0, 0 },
+ { "r6", 6, {0, {0}}, 0, 0 },
+ { "%6", 6, {0, {0}}, 0, 0 },
+ { "r7", 7, {0, {0}}, 0, 0 },
+ { "%7", 7, {0, {0}}, 0, 0 },
+ { "r8", 8, {0, {0}}, 0, 0 },
+ { "%8", 8, {0, {0}}, 0, 0 },
+ { "r9", 9, {0, {0}}, 0, 0 },
+ { "%9", 9, {0, {0}}, 0, 0 },
+ { "r10", 10, {0, {0}}, 0, 0 },
+ { "%10", 10, {0, {0}}, 0, 0 },
+ { "r11", 11, {0, {0}}, 0, 0 },
+ { "%11", 11, {0, {0}}, 0, 0 },
+ { "r12", 12, {0, {0}}, 0, 0 },
+ { "%12", 12, {0, {0}}, 0, 0 },
+ { "r13", 13, {0, {0}}, 0, 0 },
+ { "%13", 13, {0, {0}}, 0, 0 },
+ { "r14", 14, {0, {0}}, 0, 0 },
+ { "%14", 14, {0, {0}}, 0, 0 },
+ { "r15", 15, {0, {0}}, 0, 0 },
+ { "%15", 15, {0, {0}}, 0, 0 },
+ { "r16", 16, {0, {0}}, 0, 0 },
+ { "%16", 16, {0, {0}}, 0, 0 },
+ { "r17", 17, {0, {0}}, 0, 0 },
+ { "%17", 17, {0, {0}}, 0, 0 },
+ { "r18", 18, {0, {0}}, 0, 0 },
+ { "%18", 18, {0, {0}}, 0, 0 },
+ { "r19", 19, {0, {0}}, 0, 0 },
+ { "%19", 19, {0, {0}}, 0, 0 },
+ { "r20", 20, {0, {0}}, 0, 0 },
+ { "%20", 20, {0, {0}}, 0, 0 },
+ { "r21", 21, {0, {0}}, 0, 0 },
+ { "%21", 21, {0, {0}}, 0, 0 },
+ { "r22", 22, {0, {0}}, 0, 0 },
+ { "%22", 22, {0, {0}}, 0, 0 },
+ { "r23", 23, {0, {0}}, 0, 0 },
+ { "%23", 23, {0, {0}}, 0, 0 },
+ { "r24", 24, {0, {0}}, 0, 0 },
+ { "%24", 24, {0, {0}}, 0, 0 },
+ { "r25", 25, {0, {0}}, 0, 0 },
+ { "%25", 25, {0, {0}}, 0, 0 },
+ { "r26", 26, {0, {0}}, 0, 0 },
+ { "%26", 26, {0, {0}}, 0, 0 },
+ { "r27", 27, {0, {0}}, 0, 0 },
+ { "%27", 27, {0, {0}}, 0, 0 },
+ { "r28", 28, {0, {0}}, 0, 0 },
+ { "%28", 28, {0, {0}}, 0, 0 },
+ { "r29", 29, {0, {0}}, 0, 0 },
+ { "%29", 29, {0, {0}}, 0, 0 },
+ { "r30", 30, {0, {0}}, 0, 0 },
+ { "%30", 30, {0, {0}}, 0, 0 },
+ { "r31", 31, {0, {0}}, 0, 0 },
+ { "%31", 31, {0, {0}}, 0, 0 }
+};
+
+CGEN_KEYWORD iq2000_cgen_opval_gr_names =
+{
+ & iq2000_cgen_opval_gr_names_entries[0],
+ 64,
+ 0, 0, 0, 0, ""
+};
+
+
+/* The hardware table. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_HW_##a)
+#else
+#define A(a) (1 << CGEN_HW_/**/a)
+#endif
+
+const CGEN_HW_ENTRY iq2000_cgen_hw_table[] =
+{
+ { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+ { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+ { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+ { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+ { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+ { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PROFILE)|A(PC), { (1<<MACH_BASE) } } },
+ { "h-gr", HW_H_GR, CGEN_ASM_KEYWORD, (PTR) & iq2000_cgen_opval_gr_names, { 0, { (1<<MACH_BASE) } } },
+ { 0, 0, CGEN_ASM_NONE, 0, {0, {0}} }
+};
+
+#undef A
+
+
+/* The instruction field table. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_IFLD_##a)
+#else
+#define A(a) (1 << CGEN_IFLD_/**/a)
+#endif
+
+const CGEN_IFLD iq2000_cgen_ifld_table[] =
+{
+ { IQ2000_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_OPCODE, "f-opcode", 0, 32, 31, 6, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_RS, "f-rs", 0, 32, 25, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_RT, "f-rt", 0, 32, 20, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_RD, "f-rd", 0, 32, 15, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_SHAMT, "f-shamt", 0, 32, 10, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CP_OP, "f-cp-op", 0, 32, 10, 3, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CP_OP_10, "f-cp-op-10", 0, 32, 10, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CP_GRP, "f-cp-grp", 0, 32, 7, 2, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_FUNC, "f-func", 0, 32, 5, 6, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_IMM, "f-imm", 0, 32, 15, 16, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_JTARG, "f-jtarg", 0, 32, 15, 16, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
+ { IQ2000_F_JTARGQ10, "f-jtargq10", 0, 32, 20, 21, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
+ { IQ2000_F_OFFSET, "f-offset", 0, 32, 15, 16, { 0|A(PCREL_ADDR), { (1<<MACH_BASE) } } },
+ { IQ2000_F_COUNT, "f-count", 0, 32, 15, 7, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_BYTECOUNT, "f-bytecount", 0, 32, 7, 8, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_INDEX, "f-index", 0, 32, 8, 9, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_MASK, "f-mask", 0, 32, 9, 4, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_MASKQ10, "f-maskq10", 0, 32, 10, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_MASKL, "f-maskl", 0, 32, 4, 5, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_EXCODE, "f-excode", 0, 32, 25, 20, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_RSRVD, "f-rsrvd", 0, 32, 25, 10, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_10_11, "f-10-11", 0, 32, 10, 11, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_24_19, "f-24-19", 0, 32, 24, 19, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_5, "f-5", 0, 32, 5, 1, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_10, "f-10", 0, 32, 10, 1, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_25, "f-25", 0, 32, 25, 1, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CAM_Z, "f-cam-z", 0, 32, 5, 3, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CAM_Y, "f-cam-y", 0, 32, 2, 3, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CM_3FUNC, "f-cm-3func", 0, 32, 5, 3, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CM_4FUNC, "f-cm-4func", 0, 32, 5, 4, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CM_3Z, "f-cm-3z", 0, 32, 1, 2, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_CM_4Z, "f-cm-4z", 0, 32, 2, 3, { 0, { (1<<MACH_BASE) } } },
+ { 0, 0, 0, 0, 0, 0, {0, {0}} }
+};
+
+#undef A
+
+
+
+/* multi ifield declarations */
+
+const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [];
+
+
+/* multi ifield definitions */
+
+const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [] =
+{
+ { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
+ { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ {0,{0}}
+};
+const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [] =
+{
+ { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
+ { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ {0,{0}}
+};
+const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [] =
+{
+ { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ {0,{0}}
+};
+
+/* The operand table. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_OPERAND_##a)
+#else
+#define A(a) (1 << CGEN_OPERAND_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) IQ2000_OPERAND_##op
+#else
+#define OPERAND(op) IQ2000_OPERAND_/**/op
+#endif
+
+const CGEN_OPERAND iq2000_cgen_operand_table[] =
+{
+/* pc: program counter */
+ { "pc", IQ2000_OPERAND_PC, HW_H_PC, 0, 0,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[0])} },
+ { 0|A(SEM_ONLY), { (1<<MACH_BASE) } } },
+/* rs: register Rs */
+ { "rs", IQ2000_OPERAND_RS, HW_H_GR, 25, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* rt: register Rt */
+ { "rt", IQ2000_OPERAND_RT, HW_H_GR, 20, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* rd: register Rd */
+ { "rd", IQ2000_OPERAND_RD, HW_H_GR, 15, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* rd-rs: register Rd from Rs */
+ { "rd-rs", IQ2000_OPERAND_RD_RS, HW_H_GR, 15, 10,
+ { 2, { (void *) &(IQ2000_F_RD_RS_MULTI_IFIELD[0])} },
+ { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+/* rd-rt: register Rd from Rt */
+ { "rd-rt", IQ2000_OPERAND_RD_RT, HW_H_GR, 15, 10,
+ { 2, { (void *) &(IQ2000_F_RD_RT_MULTI_IFIELD[0])} },
+ { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+/* rt-rs: register Rt from Rs */
+ { "rt-rs", IQ2000_OPERAND_RT_RS, HW_H_GR, 20, 10,
+ { 2, { (void *) &(IQ2000_F_RT_RS_MULTI_IFIELD[0])} },
+ { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+/* shamt: shift amount */
+ { "shamt", IQ2000_OPERAND_SHAMT, HW_H_UINT, 10, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[6])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* imm: immediate */
+ { "imm", IQ2000_OPERAND_IMM, HW_H_UINT, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* offset: pc-relative offset */
+ { "offset", IQ2000_OPERAND_OFFSET, HW_H_IADDR, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[14])} },
+ { 0|A(PCREL_ADDR), { (1<<MACH_BASE) } } },
+/* baseoff: base register offset */
+ { "baseoff", IQ2000_OPERAND_BASEOFF, HW_H_IADDR, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* jmptarg: jump target */
+ { "jmptarg", IQ2000_OPERAND_JMPTARG, HW_H_IADDR, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[12])} },
+ { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
+/* mask: mask */
+ { "mask", IQ2000_OPERAND_MASK, HW_H_UINT, 9, 4,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[18])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* maskq10: iq10 mask */
+ { "maskq10", IQ2000_OPERAND_MASKQ10, HW_H_UINT, 10, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[19])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* maskl: mask left */
+ { "maskl", IQ2000_OPERAND_MASKL, HW_H_UINT, 4, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[20])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* count: count */
+ { "count", IQ2000_OPERAND_COUNT, HW_H_UINT, 15, 7,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[15])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* index: index */
+ { "index", IQ2000_OPERAND_INDEX, HW_H_UINT, 8, 9,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[17])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* execode: execcode */
+ { "execode", IQ2000_OPERAND_EXECODE, HW_H_UINT, 25, 20,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[21])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* bytecount: byte count */
+ { "bytecount", IQ2000_OPERAND_BYTECOUNT, HW_H_UINT, 7, 8,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[16])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* cam-y: cam global opn y */
+ { "cam-y", IQ2000_OPERAND_CAM_Y, HW_H_UINT, 2, 3,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[29])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* cam-z: cam global mask z */
+ { "cam-z", IQ2000_OPERAND_CAM_Z, HW_H_UINT, 5, 3,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[28])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* cm-3func: CM 3 bit fn field */
+ { "cm-3func", IQ2000_OPERAND_CM_3FUNC, HW_H_UINT, 5, 3,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[30])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* cm-4func: CM 4 bit fn field */
+ { "cm-4func", IQ2000_OPERAND_CM_4FUNC, HW_H_UINT, 5, 4,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[31])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* cm-3z: CM 3 bit Z field */
+ { "cm-3z", IQ2000_OPERAND_CM_3Z, HW_H_UINT, 1, 2,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[32])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* cm-4z: CM 4 bit Z field */
+ { "cm-4z", IQ2000_OPERAND_CM_4Z, HW_H_UINT, 2, 3,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[33])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* base: base register */
+ { "base", IQ2000_OPERAND_BASE, HW_H_GR, 25, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* maskr: mask right */
+ { "maskr", IQ2000_OPERAND_MASKR, HW_H_UINT, 25, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* bitnum: bit number */
+ { "bitnum", IQ2000_OPERAND_BITNUM, HW_H_UINT, 20, 5,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* hi16: high 16 bit immediate */
+ { "hi16", IQ2000_OPERAND_HI16, HW_H_UINT, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* lo16: 16 bit signed immediate, for low */
+ { "lo16", IQ2000_OPERAND_LO16, HW_H_UINT, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* mlo16: negated 16 bit signed immediate */
+ { "mlo16", IQ2000_OPERAND_MLO16, HW_H_UINT, 15, 16,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (1<<MACH_BASE) } } },
+/* jmptargq10: iq10 21-bit jump offset */
+ { "jmptargq10", IQ2000_OPERAND_JMPTARGQ10, HW_H_IADDR, 20, 21,
+ { 0, { (void *) &(iq2000_cgen_ifld_table[13])} },
+ { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
+ { 0, 0, 0, 0, 0, {0, {0}}, {0, {0}} }
+};
+
+#undef A
+
+
+/* The instruction table. */
+
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_INSN_##a)
+#else
+#define A(a) (1 << CGEN_INSN_/**/a)
+#endif
+
+static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
+{
+ /* Special null first entry.
+ A `num' value of zero is thus invalid.
+ Also, the special `invalid' insn resides here. */
+ { 0, 0, 0, 0, {0, {0}} },
+/* add ${rd-rs},$rt */
+ {
+ -1, "add2", "add", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* add $rd,$rs,$rt */
+ {
+ IQ2000_INSN_ADD, "add", "add", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* addi ${rt-rs},$lo16 */
+ {
+ -1, "addi2", "addi", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* addi $rt,$rs,$lo16 */
+ {
+ IQ2000_INSN_ADDI, "addi", "addi", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* addiu ${rt-rs},$lo16 */
+ {
+ -1, "addiu2", "addiu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* addiu $rt,$rs,$lo16 */
+ {
+ IQ2000_INSN_ADDIU, "addiu", "addiu", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* addu ${rd-rs},$rt */
+ {
+ -1, "addu2", "addu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* addu $rd,$rs,$rt */
+ {
+ IQ2000_INSN_ADDU, "addu", "addu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* ado16 ${rd-rs},$rt */
+ {
+ -1, "ado162", "ado16", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* ado16 $rd,$rs,$rt */
+ {
+ IQ2000_INSN_ADO16, "ado16", "ado16", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* and ${rd-rs},$rt */
+ {
+ -1, "and2", "and", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* and $rd,$rs,$rt */
+ {
+ IQ2000_INSN_AND, "and", "and", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* andi ${rt-rs},$lo16 */
+ {
+ -1, "andi2", "andi", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* andi $rt,$rs,$lo16 */
+ {
+ IQ2000_INSN_ANDI, "andi", "andi", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* andoi ${rt-rs},$lo16 */
+ {
+ -1, "andoi2", "andoi", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* andoi $rt,$rs,$lo16 */
+ {
+ IQ2000_INSN_ANDOI, "andoi", "andoi", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* nor ${rd-rs},$rt */
+ {
+ -1, "nor2", "nor", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* nor $rd,$rs,$rt */
+ {
+ IQ2000_INSN_NOR, "nor", "nor", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* or ${rd-rs},$rt */
+ {
+ -1, "or2", "or", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* or $rd,$rs,$rt */
+ {
+ IQ2000_INSN_OR, "or", "or", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* ori ${rt-rs},$lo16 */
+ {
+ -1, "ori2", "ori", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* ori $rt,$rs,$lo16 */
+ {
+ IQ2000_INSN_ORI, "ori", "ori", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* ram $rd,$rt,$shamt,$maskl,$maskr */
+ {
+ IQ2000_INSN_RAM, "ram", "ram", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* sll $rd,$rt,$shamt */
+ {
+ IQ2000_INSN_SLL, "sll", "sll", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* sllv ${rd-rt},$rs */
+ {
+ -1, "sllv2", "sllv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sllv $rd,$rt,$rs */
+ {
+ IQ2000_INSN_SLLV, "sllv", "sllv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* slmv ${rd-rt},$rs,$shamt */
+ {
+ -1, "slmv2", "slmv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* slmv $rd,$rt,$rs,$shamt */
+ {
+ IQ2000_INSN_SLMV, "slmv", "slmv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* slt ${rd-rs},$rt */
+ {
+ -1, "slt2", "slt", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* slt $rd,$rs,$rt */
+ {
+ IQ2000_INSN_SLT, "slt", "slt", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* slti ${rt-rs},$imm */
+ {
+ -1, "slti2", "slti", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* slti $rt,$rs,$imm */
+ {
+ IQ2000_INSN_SLTI, "slti", "slti", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* sltiu ${rt-rs},$imm */
+ {
+ -1, "sltiu2", "sltiu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sltiu $rt,$rs,$imm */
+ {
+ IQ2000_INSN_SLTIU, "sltiu", "sltiu", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* sltu ${rd-rs},$rt */
+ {
+ -1, "sltu2", "sltu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sltu $rd,$rs,$rt */
+ {
+ IQ2000_INSN_SLTU, "sltu", "sltu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* sra ${rd-rt},$shamt */
+ {
+ -1, "sra2", "sra", 32,
+ { 0|A(USES_RT)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sra $rd,$rt,$shamt */
+ {
+ IQ2000_INSN_SRA, "sra", "sra", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* srav ${rd-rt},$rs */
+ {
+ -1, "srav2", "srav", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* srav $rd,$rt,$rs */
+ {
+ IQ2000_INSN_SRAV, "srav", "srav", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* srl $rd,$rt,$shamt */
+ {
+ IQ2000_INSN_SRL, "srl", "srl", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* srlv ${rd-rt},$rs */
+ {
+ -1, "srlv2", "srlv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* srlv $rd,$rt,$rs */
+ {
+ IQ2000_INSN_SRLV, "srlv", "srlv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* srmv ${rd-rt},$rs,$shamt */
+ {
+ -1, "srmv2", "srmv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* srmv $rd,$rt,$rs,$shamt */
+ {
+ IQ2000_INSN_SRMV, "srmv", "srmv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* sub ${rd-rs},$rt */
+ {
+ -1, "sub2", "sub", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sub $rd,$rs,$rt */
+ {
+ IQ2000_INSN_SUB, "sub", "sub", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* subu ${rd-rs},$rt */
+ {
+ -1, "subu2", "subu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* subu $rd,$rs,$rt */
+ {
+ IQ2000_INSN_SUBU, "subu", "subu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* xor ${rd-rs},$rt */
+ {
+ -1, "xor2", "xor", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* xor $rd,$rs,$rt */
+ {
+ IQ2000_INSN_XOR, "xor", "xor", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
+ },
+/* xori ${rt-rs},$lo16 */
+ {
+ -1, "xori2", "xori", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* xori $rt,$rs,$lo16 */
+ {
+ IQ2000_INSN_XORI, "xori", "xori", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* bbi $rs($bitnum),$offset */
+ {
+ IQ2000_INSN_BBI, "bbi", "bbi", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bbin $rs($bitnum),$offset */
+ {
+ IQ2000_INSN_BBIN, "bbin", "bbin", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bbv $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BBV, "bbv", "bbv", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bbvn $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BBVN, "bbvn", "bbvn", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* beq $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BEQ, "beq", "beq", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* beql $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BEQL, "beql", "beql", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bgez $rs,$offset */
+ {
+ IQ2000_INSN_BGEZ, "bgez", "bgez", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bgezal $rs,$offset */
+ {
+ IQ2000_INSN_BGEZAL, "bgezal", "bgezal", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bgezall $rs,$offset */
+ {
+ IQ2000_INSN_BGEZALL, "bgezall", "bgezall", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bgezl $rs,$offset */
+ {
+ IQ2000_INSN_BGEZL, "bgezl", "bgezl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bltz $rs,$offset */
+ {
+ IQ2000_INSN_BLTZ, "bltz", "bltz", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bltzl $rs,$offset */
+ {
+ IQ2000_INSN_BLTZL, "bltzl", "bltzl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bltzal $rs,$offset */
+ {
+ IQ2000_INSN_BLTZAL, "bltzal", "bltzal", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bltzall $rs,$offset */
+ {
+ IQ2000_INSN_BLTZALL, "bltzall", "bltzall", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bmb0 $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMB0, "bmb0", "bmb0", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bmb1 $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMB1, "bmb1", "bmb1", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bmb2 $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMB2, "bmb2", "bmb2", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bmb3 $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMB3, "bmb3", "bmb3", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bne $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BNE, "bne", "bne", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* bnel $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BNEL, "bnel", "bnel", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* jalr $rd,$rs */
+ {
+ IQ2000_INSN_JALR, "jalr", "jalr", 32,
+ { 0|A(USES_RS)|A(USES_RD)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* jr $rs */
+ {
+ IQ2000_INSN_JR, "jr", "jr", 32,
+ { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
+ },
+/* lb $rt,$lo16($base) */
+ {
+ IQ2000_INSN_LB, "lb", "lb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
+ },
+/* lbu $rt,$lo16($base) */
+ {
+ IQ2000_INSN_LBU, "lbu", "lbu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
+ },
+/* lh $rt,$lo16($base) */
+ {
+ IQ2000_INSN_LH, "lh", "lh", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
+ },
+/* lhu $rt,$lo16($base) */
+ {
+ IQ2000_INSN_LHU, "lhu", "lhu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
+ },
+/* lui $rt,$hi16 */
+ {
+ IQ2000_INSN_LUI, "lui", "lui", 32,
+ { 0|A(USES_RT), { (1<<MACH_BASE) } }
+ },
+/* lw $rt,$lo16($base) */
+ {
+ IQ2000_INSN_LW, "lw", "lw", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
+ },
+/* sb $rt,$lo16($base) */
+ {
+ IQ2000_INSN_SB, "sb", "sb", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* sh $rt,$lo16($base) */
+ {
+ IQ2000_INSN_SH, "sh", "sh", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* sw $rt,$lo16($base) */
+ {
+ IQ2000_INSN_SW, "sw", "sw", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
+ },
+/* break */
+ {
+ IQ2000_INSN_BREAK, "break", "break", 32,
+ { 0, { (1<<MACH_BASE) } }
+ },
+/* syscall */
+ {
+ IQ2000_INSN_SYSCALL, "syscall", "syscall", 32,
+ { 0|A(YIELD_INSN), { (1<<MACH_BASE) } }
+ },
+/* andoui $rt,$rs,$hi16 */
+ {
+ IQ2000_INSN_ANDOUI, "andoui", "andoui", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ2000) } }
+ },
+/* andoui ${rt-rs},$hi16 */
+ {
+ -1, "andoui2", "andoui", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ2000) } }
+ },
+/* orui ${rt-rs},$hi16 */
+ {
+ -1, "orui2", "orui", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ2000) } }
+ },
+/* orui $rt,$rs,$hi16 */
+ {
+ IQ2000_INSN_ORUI, "orui", "orui", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ2000) } }
+ },
+/* bgtz $rs,$offset */
+ {
+ IQ2000_INSN_BGTZ, "bgtz", "bgtz", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bgtzl $rs,$offset */
+ {
+ IQ2000_INSN_BGTZL, "bgtzl", "bgtzl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* blez $rs,$offset */
+ {
+ IQ2000_INSN_BLEZ, "blez", "blez", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* blezl $rs,$offset */
+ {
+ IQ2000_INSN_BLEZL, "blezl", "blezl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* mrgb $rd,$rs,$rt,$mask */
+ {
+ IQ2000_INSN_MRGB, "mrgb", "mrgb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* mrgb ${rd-rs},$rt,$mask */
+ {
+ -1, "mrgb2", "mrgb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ2000) } }
+ },
+/* bctxt $rs,$offset */
+ {
+ IQ2000_INSN_BCTXT, "bctxt", "bctxt", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc0f $offset */
+ {
+ IQ2000_INSN_BC0F, "bc0f", "bc0f", 32,
+ { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc0fl $offset */
+ {
+ IQ2000_INSN_BC0FL, "bc0fl", "bc0fl", 32,
+ { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc3f $offset */
+ {
+ IQ2000_INSN_BC3F, "bc3f", "bc3f", 32,
+ { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc3fl $offset */
+ {
+ IQ2000_INSN_BC3FL, "bc3fl", "bc3fl", 32,
+ { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc0t $offset */
+ {
+ IQ2000_INSN_BC0T, "bc0t", "bc0t", 32,
+ { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc0tl $offset */
+ {
+ IQ2000_INSN_BC0TL, "bc0tl", "bc0tl", 32,
+ { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc3t $offset */
+ {
+ IQ2000_INSN_BC3T, "bc3t", "bc3t", 32,
+ { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bc3tl $offset */
+ {
+ IQ2000_INSN_BC3TL, "bc3tl", "bc3tl", 32,
+ { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* cfc0 $rt,$rd */
+ {
+ IQ2000_INSN_CFC0, "cfc0", "cfc0", 32,
+ { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* cfc1 $rt,$rd */
+ {
+ IQ2000_INSN_CFC1, "cfc1", "cfc1", 32,
+ { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* cfc2 $rt,$rd */
+ {
+ IQ2000_INSN_CFC2, "cfc2", "cfc2", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* cfc3 $rt,$rd */
+ {
+ IQ2000_INSN_CFC3, "cfc3", "cfc3", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* chkhdr $rd,$rt */
+ {
+ IQ2000_INSN_CHKHDR, "chkhdr", "chkhdr", 32,
+ { 0|A(YIELD_INSN)|A(USES_RD)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* ctc0 $rt,$rd */
+ {
+ IQ2000_INSN_CTC0, "ctc0", "ctc0", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* ctc1 $rt,$rd */
+ {
+ IQ2000_INSN_CTC1, "ctc1", "ctc1", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* ctc2 $rt,$rd */
+ {
+ IQ2000_INSN_CTC2, "ctc2", "ctc2", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* ctc3 $rt,$rd */
+ {
+ IQ2000_INSN_CTC3, "ctc3", "ctc3", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* jcr $rs */
+ {
+ IQ2000_INSN_JCR, "jcr", "jcr", 32,
+ { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* luc32 $rt,$rd */
+ {
+ IQ2000_INSN_LUC32, "luc32", "luc32", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* luc32l $rt,$rd */
+ {
+ IQ2000_INSN_LUC32L, "luc32l", "luc32l", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* luc64 $rt,$rd */
+ {
+ IQ2000_INSN_LUC64, "luc64", "luc64", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* luc64l $rt,$rd */
+ {
+ IQ2000_INSN_LUC64L, "luc64l", "luc64l", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* luk $rt,$rd */
+ {
+ IQ2000_INSN_LUK, "luk", "luk", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* lulck $rt */
+ {
+ IQ2000_INSN_LULCK, "lulck", "lulck", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* lum32 $rt,$rd */
+ {
+ IQ2000_INSN_LUM32, "lum32", "lum32", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* lum32l $rt,$rd */
+ {
+ IQ2000_INSN_LUM32L, "lum32l", "lum32l", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* lum64 $rt,$rd */
+ {
+ IQ2000_INSN_LUM64, "lum64", "lum64", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* lum64l $rt,$rd */
+ {
+ IQ2000_INSN_LUM64L, "lum64l", "lum64l", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* lur $rt,$rd */
+ {
+ IQ2000_INSN_LUR, "lur", "lur", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* lurl $rt,$rd */
+ {
+ IQ2000_INSN_LURL, "lurl", "lurl", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* luulck $rt */
+ {
+ IQ2000_INSN_LUULCK, "luulck", "luulck", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* mfc0 $rt,$rd */
+ {
+ IQ2000_INSN_MFC0, "mfc0", "mfc0", 32,
+ { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* mfc1 $rt,$rd */
+ {
+ IQ2000_INSN_MFC1, "mfc1", "mfc1", 32,
+ { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* mfc2 $rt,$rd */
+ {
+ IQ2000_INSN_MFC2, "mfc2", "mfc2", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* mfc3 $rt,$rd */
+ {
+ IQ2000_INSN_MFC3, "mfc3", "mfc3", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
+ },
+/* mtc0 $rt,$rd */
+ {
+ IQ2000_INSN_MTC0, "mtc0", "mtc0", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* mtc1 $rt,$rd */
+ {
+ IQ2000_INSN_MTC1, "mtc1", "mtc1", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* mtc2 $rt,$rd */
+ {
+ IQ2000_INSN_MTC2, "mtc2", "mtc2", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* mtc3 $rt,$rd */
+ {
+ IQ2000_INSN_MTC3, "mtc3", "mtc3", 32,
+ { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* pkrl $rd,$rt */
+ {
+ IQ2000_INSN_PKRL, "pkrl", "pkrl", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* pkrlr1 $rt,$index,$count */
+ {
+ IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* pkrlr30 $rt,$index,$count */
+ {
+ IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* rb $rd,$rt */
+ {
+ IQ2000_INSN_RB, "rb", "rb", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* rbr1 $rt,$index,$count */
+ {
+ IQ2000_INSN_RBR1, "rbr1", "rbr1", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* rbr30 $rt,$index,$count */
+ {
+ IQ2000_INSN_RBR30, "rbr30", "rbr30", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* rfe */
+ {
+ IQ2000_INSN_RFE, "rfe", "rfe", 32,
+ { 0, { (1<<MACH_IQ2000) } }
+ },
+/* rx $rd,$rt */
+ {
+ IQ2000_INSN_RX, "rx", "rx", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* rxr1 $rt,$index,$count */
+ {
+ IQ2000_INSN_RXR1, "rxr1", "rxr1", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* rxr30 $rt,$index,$count */
+ {
+ IQ2000_INSN_RXR30, "rxr30", "rxr30", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* sleep */
+ {
+ IQ2000_INSN_SLEEP, "sleep", "sleep", 32,
+ { 0|A(YIELD_INSN), { (1<<MACH_IQ2000) } }
+ },
+/* srrd $rt */
+ {
+ IQ2000_INSN_SRRD, "srrd", "srrd", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* srrdl $rt */
+ {
+ IQ2000_INSN_SRRDL, "srrdl", "srrdl", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* srulck $rt */
+ {
+ IQ2000_INSN_SRULCK, "srulck", "srulck", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* srwr $rt,$rd */
+ {
+ IQ2000_INSN_SRWR, "srwr", "srwr", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* srwru $rt,$rd */
+ {
+ IQ2000_INSN_SRWRU, "srwru", "srwru", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* trapqfl */
+ {
+ IQ2000_INSN_TRAPQFL, "trapqfl", "trapqfl", 32,
+ { 0|A(YIELD_INSN), { (1<<MACH_IQ2000) } }
+ },
+/* trapqne */
+ {
+ IQ2000_INSN_TRAPQNE, "trapqne", "trapqne", 32,
+ { 0|A(YIELD_INSN), { (1<<MACH_IQ2000) } }
+ },
+/* traprel $rt */
+ {
+ IQ2000_INSN_TRAPREL, "traprel", "traprel", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wb $rd,$rt */
+ {
+ IQ2000_INSN_WB, "wb", "wb", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* wbu $rd,$rt */
+ {
+ IQ2000_INSN_WBU, "wbu", "wbu", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* wbr1 $rt,$index,$count */
+ {
+ IQ2000_INSN_WBR1, "wbr1", "wbr1", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wbr1u $rt,$index,$count */
+ {
+ IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wbr30 $rt,$index,$count */
+ {
+ IQ2000_INSN_WBR30, "wbr30", "wbr30", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wbr30u $rt,$index,$count */
+ {
+ IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wx $rd,$rt */
+ {
+ IQ2000_INSN_WX, "wx", "wx", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* wxu $rd,$rt */
+ {
+ IQ2000_INSN_WXU, "wxu", "wxu", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
+ },
+/* wxr1 $rt,$index,$count */
+ {
+ IQ2000_INSN_WXR1, "wxr1", "wxr1", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wxr1u $rt,$index,$count */
+ {
+ IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wxr30 $rt,$index,$count */
+ {
+ IQ2000_INSN_WXR30, "wxr30", "wxr30", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* wxr30u $rt,$index,$count */
+ {
+ IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 32,
+ { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
+ },
+/* ldw $rt,$lo16($base) */
+ {
+ IQ2000_INSN_LDW, "ldw", "ldw", 32,
+ { 0|A(USES_RT)|A(LOAD_DELAY)|A(EVEN_REG_NUM), { (1<<MACH_IQ2000) } }
+ },
+/* sdw $rt,$lo16($base) */
+ {
+ IQ2000_INSN_SDW, "sdw", "sdw", 32,
+ { 0|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ2000) } }
+ },
+/* j $jmptarg */
+ {
+ IQ2000_INSN_J, "j", "j", 32,
+ { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* jal $jmptarg */
+ {
+ IQ2000_INSN_JAL, "jal", "jal", 32,
+ { 0|A(USES_R31)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* bmb $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMB, "bmb", "bmb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
+ },
+/* andoui $rt,$rs,$hi16 */
+ {
+ IQ2000_INSN_ANDOUI_Q10, "andoui-q10", "andoui", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* andoui ${rt-rs},$hi16 */
+ {
+ -1, "andoui2-q10", "andoui", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* orui $rt,$rs,$hi16 */
+ {
+ IQ2000_INSN_ORUI_Q10, "orui-q10", "orui", 32,
+ { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* orui ${rt-rs},$hi16 */
+ {
+ -1, "orui2-q10", "orui", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* mrgb $rd,$rs,$rt,$maskq10 */
+ {
+ IQ2000_INSN_MRGBQ10, "mrgbq10", "mrgb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* mrgb ${rd-rs},$rt,$maskq10 */
+ {
+ -1, "mrgbq102", "mrgb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* j $jmptarg */
+ {
+ IQ2000_INSN_JQ10, "jq10", "j", 32,
+ { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* jal $rt,$jmptarg */
+ {
+ IQ2000_INSN_JALQ10, "jalq10", "jal", 32,
+ { 0|A(USES_RT)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* jal $jmptarg */
+ {
+ IQ2000_INSN_JALQ10_2, "jalq10-2", "jal", 32,
+ { 0|A(USES_RT)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bbil $rs($bitnum),$offset */
+ {
+ IQ2000_INSN_BBIL, "bbil", "bbil", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bbinl $rs($bitnum),$offset */
+ {
+ IQ2000_INSN_BBINL, "bbinl", "bbinl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bbvl $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BBVL, "bbvl", "bbvl", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bbvnl $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BBVNL, "bbvnl", "bbvnl", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bgtzal $rs,$offset */
+ {
+ IQ2000_INSN_BGTZAL, "bgtzal", "bgtzal", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bgtzall $rs,$offset */
+ {
+ IQ2000_INSN_BGTZALL, "bgtzall", "bgtzall", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* blezal $rs,$offset */
+ {
+ IQ2000_INSN_BLEZAL, "blezal", "blezal", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* blezall $rs,$offset */
+ {
+ IQ2000_INSN_BLEZALL, "blezall", "blezall", 32,
+ { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bgtz $rs,$offset */
+ {
+ IQ2000_INSN_BGTZ_Q10, "bgtz-q10", "bgtz", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bgtzl $rs,$offset */
+ {
+ IQ2000_INSN_BGTZL_Q10, "bgtzl-q10", "bgtzl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* blez $rs,$offset */
+ {
+ IQ2000_INSN_BLEZ_Q10, "blez-q10", "blez", 32,
+ { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* blezl $rs,$offset */
+ {
+ IQ2000_INSN_BLEZL_Q10, "blezl-q10", "blezl", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bmb $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMB_Q10, "bmb-q10", "bmb", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bmbl $rs,$rt,$offset */
+ {
+ IQ2000_INSN_BMBL, "bmbl", "bmbl", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bri $rs,$offset */
+ {
+ IQ2000_INSN_BRI, "bri", "bri", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* brv $rs,$offset */
+ {
+ IQ2000_INSN_BRV, "brv", "brv", 32,
+ { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* bctx $rs,$offset */
+ {
+ IQ2000_INSN_BCTX, "bctx", "bctx", 32,
+ { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
+ },
+/* yield */
+ {
+ IQ2000_INSN_YIELD, "yield", "yield", 32,
+ { 0, { (1<<MACH_IQ10) } }
+ },
+/* crc32 $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CRC32, "crc32", "crc32", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* crc32b $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CRC32B, "crc32b", "crc32b", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* cnt1s $rd,$rs */
+ {
+ IQ2000_INSN_CNT1S, "cnt1s", "cnt1s", 32,
+ { 0|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* avail $rd */
+ {
+ IQ2000_INSN_AVAIL, "avail", "avail", 32,
+ { 0|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* free $rd,$rs */
+ {
+ IQ2000_INSN_FREE, "free", "free", 32,
+ { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* tstod $rd,$rs */
+ {
+ IQ2000_INSN_TSTOD, "tstod", "tstod", 32,
+ { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cmphdr $rd */
+ {
+ IQ2000_INSN_CMPHDR, "cmphdr", "cmphdr", 32,
+ { 0|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* mcid $rd,$rt */
+ {
+ IQ2000_INSN_MCID, "mcid", "mcid", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* dba $rd */
+ {
+ IQ2000_INSN_DBA, "dba", "dba", 32,
+ { 0|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* dbd $rd,$rs,$rt */
+ {
+ IQ2000_INSN_DBD, "dbd", "dbd", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* dpwt $rd,$rs */
+ {
+ IQ2000_INSN_DPWT, "dpwt", "dpwt", 32,
+ { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* chkhdr $rd,$rs */
+ {
+ IQ2000_INSN_CHKHDRQ10, "chkhdrq10", "chkhdr", 32,
+ { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* rba $rd,$rs,$rt */
+ {
+ IQ2000_INSN_RBA, "rba", "rba", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* rbal $rd,$rs,$rt */
+ {
+ IQ2000_INSN_RBAL, "rbal", "rbal", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* rbar $rd,$rs,$rt */
+ {
+ IQ2000_INSN_RBAR, "rbar", "rbar", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* wba $rd,$rs,$rt */
+ {
+ IQ2000_INSN_WBA, "wba", "wba", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* wbau $rd,$rs,$rt */
+ {
+ IQ2000_INSN_WBAU, "wbau", "wbau", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* wbac $rd,$rs,$rt */
+ {
+ IQ2000_INSN_WBAC, "wbac", "wbac", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* rbi $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_RBI, "rbi", "rbi", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* rbil $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_RBIL, "rbil", "rbil", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* rbir $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_RBIR, "rbir", "rbir", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* wbi $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_WBI, "wbi", "wbi", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* wbic $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_WBIC, "wbic", "wbic", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* wbiu $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_WBIU, "wbiu", "wbiu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* pkrli $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_PKRLI, "pkrli", "pkrli", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* pkrlih $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_PKRLIH, "pkrlih", "pkrlih", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* pkrliu $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_PKRLIU, "pkrliu", "pkrliu", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* pkrlic $rd,$rs,$rt,$bytecount */
+ {
+ IQ2000_INSN_PKRLIC, "pkrlic", "pkrlic", 32,
+ { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* pkrla $rd,$rs,$rt */
+ {
+ IQ2000_INSN_PKRLA, "pkrla", "pkrla", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlau $rd,$rs,$rt */
+ {
+ IQ2000_INSN_PKRLAU, "pkrlau", "pkrlau", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlah $rd,$rs,$rt */
+ {
+ IQ2000_INSN_PKRLAH, "pkrlah", "pkrlah", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlac $rd,$rs,$rt */
+ {
+ IQ2000_INSN_PKRLAC, "pkrlac", "pkrlac", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* lock $rd,$rt */
+ {
+ IQ2000_INSN_LOCK, "lock", "lock", 32,
+ { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ10) } }
+ },
+/* unlk $rd,$rt */
+ {
+ IQ2000_INSN_UNLK, "unlk", "unlk", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* swrd $rd,$rt */
+ {
+ IQ2000_INSN_SWRD, "swrd", "swrd", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* swrdl $rd,$rt */
+ {
+ IQ2000_INSN_SWRDL, "swrdl", "swrdl", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* swwr $rd,$rs,$rt */
+ {
+ IQ2000_INSN_SWWR, "swwr", "swwr", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* swwru $rd,$rs,$rt */
+ {
+ IQ2000_INSN_SWWRU, "swwru", "swwru", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* dwrd $rd,$rt */
+ {
+ IQ2000_INSN_DWRD, "dwrd", "dwrd", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* dwrdl $rd,$rt */
+ {
+ IQ2000_INSN_DWRDL, "dwrdl", "dwrdl", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cam36 $rd,$rt,${cam-z},${cam-y} */
+ {
+ IQ2000_INSN_CAM36, "cam36", "cam36", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cam72 $rd,$rt,${cam-y},${cam-z} */
+ {
+ IQ2000_INSN_CAM72, "cam72", "cam72", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cam144 $rd,$rt,${cam-y},${cam-z} */
+ {
+ IQ2000_INSN_CAM144, "cam144", "cam144", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cam288 $rd,$rt,${cam-y},${cam-z} */
+ {
+ IQ2000_INSN_CAM288, "cam288", "cam288", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cm32and $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32AND, "cm32and", "cm32and", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32andn $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32ANDN, "cm32andn", "cm32andn", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32or $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32OR, "cm32or", "cm32or", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32ra $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32RA, "cm32ra", "cm32ra", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32rd $rd,$rt */
+ {
+ IQ2000_INSN_CM32RD, "cm32rd", "cm32rd", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cm32ri $rd,$rt */
+ {
+ IQ2000_INSN_CM32RI, "cm32ri", "cm32ri", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cm32rs $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32RS, "cm32rs", "cm32rs", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32sa $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32SA, "cm32sa", "cm32sa", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32sd $rd,$rt */
+ {
+ IQ2000_INSN_CM32SD, "cm32sd", "cm32sd", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cm32si $rd,$rt */
+ {
+ IQ2000_INSN_CM32SI, "cm32si", "cm32si", 32,
+ { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
+ },
+/* cm32ss $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32SS, "cm32ss", "cm32ss", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm32xor $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM32XOR, "cm32xor", "cm32xor", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm64clr $rd,$rt */
+ {
+ IQ2000_INSN_CM64CLR, "cm64clr", "cm64clr", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64ra $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM64RA, "cm64ra", "cm64ra", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64rd $rd,$rt */
+ {
+ IQ2000_INSN_CM64RD, "cm64rd", "cm64rd", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64ri $rd,$rt */
+ {
+ IQ2000_INSN_CM64RI, "cm64ri", "cm64ri", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64ria2 $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM64RIA2, "cm64ria2", "cm64ria2", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64rs $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM64RS, "cm64rs", "cm64rs", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64sa $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM64SA, "cm64sa", "cm64sa", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64sd $rd,$rt */
+ {
+ IQ2000_INSN_CM64SD, "cm64sd", "cm64sd", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64si $rd,$rt */
+ {
+ IQ2000_INSN_CM64SI, "cm64si", "cm64si", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64sia2 $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM64SIA2, "cm64sia2", "cm64sia2", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm64ss $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM64SS, "cm64ss", "cm64ss", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm128ria2 $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM128RIA2, "cm128ria2", "cm128ria2", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm128ria3 $rd,$rs,$rt,${cm-3z} */
+ {
+ IQ2000_INSN_CM128RIA3, "cm128ria3", "cm128ria3", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm128ria4 $rd,$rs,$rt,${cm-4z} */
+ {
+ IQ2000_INSN_CM128RIA4, "cm128ria4", "cm128ria4", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm128sia2 $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM128SIA2, "cm128sia2", "cm128sia2", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm128sia3 $rd,$rs,$rt,${cm-3z} */
+ {
+ IQ2000_INSN_CM128SIA3, "cm128sia3", "cm128sia3", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
+ },
+/* cm128sia4 $rd,$rs,$rt,${cm-4z} */
+ {
+ IQ2000_INSN_CM128SIA4, "cm128sia4", "cm128sia4", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cm128vsa $rd,$rs,$rt */
+ {
+ IQ2000_INSN_CM128VSA, "cm128vsa", "cm128vsa", 32,
+ { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+/* cfc $rd,$rt */
+ {
+ IQ2000_INSN_CFC, "cfc", "cfc", 32,
+ { 0|A(YIELD_INSN)|A(USES_RD)|A(LOAD_DELAY), { (1<<MACH_IQ10) } }
+ },
+/* ctc $rs,$rt */
+ {
+ IQ2000_INSN_CTC, "ctc", "ctc", 32,
+ { 0|A(USES_RS), { (1<<MACH_IQ10) } }
+ },
+};
+
+#undef OP
+#undef A
+
+/* Initialize anything needed to be done once, before any cpu_open call. */
+static void init_tables PARAMS ((void));
+
+static void
+init_tables ()
+{
+}
+
+static const CGEN_MACH * lookup_mach_via_bfd_name
+ PARAMS ((const CGEN_MACH *, const char *));
+static void build_hw_table PARAMS ((CGEN_CPU_TABLE *));
+static void build_ifield_table PARAMS ((CGEN_CPU_TABLE *));
+static void build_operand_table PARAMS ((CGEN_CPU_TABLE *));
+static void build_insn_table PARAMS ((CGEN_CPU_TABLE *));
+static void iq2000_cgen_rebuild_tables PARAMS ((CGEN_CPU_TABLE *));
+
+/* Subroutine of iq2000_cgen_cpu_open to look up a mach via its bfd name. */
+
+static const CGEN_MACH *
+lookup_mach_via_bfd_name (table, name)
+ const CGEN_MACH *table;
+ const char *name;
+{
+ while (table->name)
+ {
+ if (strcmp (name, table->bfd_name) == 0)
+ return table;
+ ++table;
+ }
+ abort ();
+}
+
+/* Subroutine of iq2000_cgen_cpu_open to build the hardware table. */
+
+static void
+build_hw_table (cd)
+ CGEN_CPU_TABLE *cd;
+{
+ int i;
+ int machs = cd->machs;
+ const CGEN_HW_ENTRY *init = & iq2000_cgen_hw_table[0];
+ /* MAX_HW is only an upper bound on the number of selected entries.
+ However each entry is indexed by it's enum so there can be holes in
+ the table. */
+ const CGEN_HW_ENTRY **selected =
+ (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *));
+
+ cd->hw_table.init_entries = init;
+ cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY);
+ memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *));
+ /* ??? For now we just use machs to determine which ones we want. */
+ for (i = 0; init[i].name != NULL; ++i)
+ if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH)
+ & machs)
+ selected[init[i].type] = &init[i];
+ cd->hw_table.entries = selected;
+ cd->hw_table.num_entries = MAX_HW;
+}
+
+/* Subroutine of iq2000_cgen_cpu_open to build the hardware table. */
+
+static void
+build_ifield_table (cd)
+ CGEN_CPU_TABLE *cd;
+{
+ cd->ifld_table = & iq2000_cgen_ifld_table[0];
+}
+
+/* Subroutine of iq2000_cgen_cpu_open to build the hardware table. */
+
+static void
+build_operand_table (cd)
+ CGEN_CPU_TABLE *cd;
+{
+ int i;
+ int machs = cd->machs;
+ const CGEN_OPERAND *init = & iq2000_cgen_operand_table[0];
+ /* MAX_OPERANDS is only an upper bound on the number of selected entries.
+ However each entry is indexed by it's enum so there can be holes in
+ the table. */
+ const CGEN_OPERAND **selected =
+ (const CGEN_OPERAND **) xmalloc (MAX_OPERANDS * sizeof (CGEN_OPERAND *));
+
+ cd->operand_table.init_entries = init;
+ cd->operand_table.entry_size = sizeof (CGEN_OPERAND);
+ memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *));
+ /* ??? For now we just use mach to determine which ones we want. */
+ for (i = 0; init[i].name != NULL; ++i)
+ if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH)
+ & machs)
+ selected[init[i].type] = &init[i];
+ cd->operand_table.entries = selected;
+ cd->operand_table.num_entries = MAX_OPERANDS;
+}
+
+/* Subroutine of iq2000_cgen_cpu_open to build the hardware table.
+ ??? This could leave out insns not supported by the specified mach/isa,
+ but that would cause errors like "foo only supported by bar" to become
+ "unknown insn", so for now we include all insns and require the app to
+ do the checking later.
+ ??? On the other hand, parsing of such insns may require their hardware or
+ operand elements to be in the table [which they mightn't be]. */
+
+static void
+build_insn_table (cd)
+ CGEN_CPU_TABLE *cd;
+{
+ int i;
+ const CGEN_IBASE *ib = & iq2000_cgen_insn_table[0];
+ CGEN_INSN *insns = (CGEN_INSN *) xmalloc (MAX_INSNS * sizeof (CGEN_INSN));
+
+ memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN));
+ for (i = 0; i < MAX_INSNS; ++i)
+ insns[i].base = &ib[i];
+ cd->insn_table.init_entries = insns;
+ cd->insn_table.entry_size = sizeof (CGEN_IBASE);
+ cd->insn_table.num_init_entries = MAX_INSNS;
+}
+
+/* Subroutine of iq2000_cgen_cpu_open to rebuild the tables. */
+
+static void
+iq2000_cgen_rebuild_tables (cd)
+ CGEN_CPU_TABLE *cd;
+{
+ int i;
+ unsigned int isas = cd->isas;
+ unsigned int machs = cd->machs;
+
+ cd->int_insn_p = CGEN_INT_INSN_P;
+
+ /* Data derived from the isa spec. */
+#define UNSET (CGEN_SIZE_UNKNOWN + 1)
+ cd->default_insn_bitsize = UNSET;
+ cd->base_insn_bitsize = UNSET;
+ cd->min_insn_bitsize = 65535; /* some ridiculously big number */
+ cd->max_insn_bitsize = 0;
+ for (i = 0; i < MAX_ISAS; ++i)
+ if (((1 << i) & isas) != 0)
+ {
+ const CGEN_ISA *isa = & iq2000_cgen_isa_table[i];
+
+ /* Default insn sizes of all selected isas must be
+ equal or we set the result to 0, meaning "unknown". */
+ if (cd->default_insn_bitsize == UNSET)
+ cd->default_insn_bitsize = isa->default_insn_bitsize;
+ else if (isa->default_insn_bitsize == cd->default_insn_bitsize)
+ ; /* this is ok */
+ else
+ cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN;
+
+ /* Base insn sizes of all selected isas must be equal
+ or we set the result to 0, meaning "unknown". */
+ if (cd->base_insn_bitsize == UNSET)
+ cd->base_insn_bitsize = isa->base_insn_bitsize;
+ else if (isa->base_insn_bitsize == cd->base_insn_bitsize)
+ ; /* this is ok */
+ else
+ cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN;
+
+ /* Set min,max insn sizes. */
+ if (isa->min_insn_bitsize < cd->min_insn_bitsize)
+ cd->min_insn_bitsize = isa->min_insn_bitsize;
+ if (isa->max_insn_bitsize > cd->max_insn_bitsize)
+ cd->max_insn_bitsize = isa->max_insn_bitsize;
+ }
+
+ /* Data derived from the mach spec. */
+ for (i = 0; i < MAX_MACHS; ++i)
+ if (((1 << i) & machs) != 0)
+ {
+ const CGEN_MACH *mach = & iq2000_cgen_mach_table[i];
+
+ if (mach->insn_chunk_bitsize != 0)
+ {
+ if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
+ {
+ fprintf (stderr, "iq2000_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n",
+ cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
+ abort ();
+ }
+
+ cd->insn_chunk_bitsize = mach->insn_chunk_bitsize;
+ }
+ }
+
+ /* Determine which hw elements are used by MACH. */
+ build_hw_table (cd);
+
+ /* Build the ifield table. */
+ build_ifield_table (cd);
+
+ /* Determine which operands are used by MACH/ISA. */
+ build_operand_table (cd);
+
+ /* Build the instruction table. */
+ build_insn_table (cd);
+}
+
+/* Initialize a cpu table and return a descriptor.
+ It's much like opening a file, and must be the first function called.
+ The arguments are a set of (type/value) pairs, terminated with
+ CGEN_CPU_OPEN_END.
+
+ Currently supported values:
+ CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr
+ CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr
+ CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name
+ CGEN_CPU_OPEN_ENDIAN: specify endian choice
+ CGEN_CPU_OPEN_END: terminates arguments
+
+ ??? Simultaneous multiple isas might not make sense, but it's not (yet)
+ precluded.
+
+ ??? We only support ISO C stdargs here, not K&R.
+ Laziness, plus experiment to see if anything requires K&R - eventually
+ K&R will no longer be supported - e.g. GDB is currently trying this. */
+
+CGEN_CPU_DESC
+iq2000_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
+{
+ CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE));
+ static int init_p;
+ unsigned int isas = 0; /* 0 = "unspecified" */
+ unsigned int machs = 0; /* 0 = "unspecified" */
+ enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN;
+ va_list ap;
+
+ if (! init_p)
+ {
+ init_tables ();
+ init_p = 1;
+ }
+
+ memset (cd, 0, sizeof (*cd));
+
+ va_start (ap, arg_type);
+ while (arg_type != CGEN_CPU_OPEN_END)
+ {
+ switch (arg_type)
+ {
+ case CGEN_CPU_OPEN_ISAS :
+ isas = va_arg (ap, unsigned int);
+ break;
+ case CGEN_CPU_OPEN_MACHS :
+ machs = va_arg (ap, unsigned int);
+ break;
+ case CGEN_CPU_OPEN_BFDMACH :
+ {
+ const char *name = va_arg (ap, const char *);
+ const CGEN_MACH *mach =
+ lookup_mach_via_bfd_name (iq2000_cgen_mach_table, name);
+
+ machs |= 1 << mach->num;
+ break;
+ }
+ case CGEN_CPU_OPEN_ENDIAN :
+ endian = va_arg (ap, enum cgen_endian);
+ break;
+ default :
+ fprintf (stderr, "iq2000_cgen_cpu_open: unsupported argument `%d'\n",
+ arg_type);
+ abort (); /* ??? return NULL? */
+ }
+ arg_type = va_arg (ap, enum cgen_cpu_open_arg);
+ }
+ va_end (ap);
+
+ /* mach unspecified means "all" */
+ if (machs == 0)
+ machs = (1 << MAX_MACHS) - 1;
+ /* base mach is always selected */
+ machs |= 1;
+ /* isa unspecified means "all" */
+ if (isas == 0)
+ isas = (1 << MAX_ISAS) - 1;
+ if (endian == CGEN_ENDIAN_UNKNOWN)
+ {
+ /* ??? If target has only one, could have a default. */
+ fprintf (stderr, "iq2000_cgen_cpu_open: no endianness specified\n");
+ abort ();
+ }
+
+ cd->isas = isas;
+ cd->machs = machs;
+ cd->endian = endian;
+ /* FIXME: for the sparc case we can determine insn-endianness statically.
+ The worry here is where both data and insn endian can be independently
+ chosen, in which case this function will need another argument.
+ Actually, will want to allow for more arguments in the future anyway. */
+ cd->insn_endian = endian;
+
+ /* Table (re)builder. */
+ cd->rebuild_tables = iq2000_cgen_rebuild_tables;
+ iq2000_cgen_rebuild_tables (cd);
+
+ /* Default to not allowing signed overflow. */
+ cd->signed_overflow_ok_p = 0;
+
+ return (CGEN_CPU_DESC) cd;
+}
+
+/* Cover fn to iq2000_cgen_cpu_open to handle the simple case of 1 isa, 1 mach.
+ MACH_NAME is the bfd name of the mach. */
+
+CGEN_CPU_DESC
+iq2000_cgen_cpu_open_1 (mach_name, endian)
+ const char *mach_name;
+ enum cgen_endian endian;
+{
+ return iq2000_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
+ CGEN_CPU_OPEN_ENDIAN, endian,
+ CGEN_CPU_OPEN_END);
+}
+
+/* Close a cpu table.
+ ??? This can live in a machine independent file, but there's currently
+ no place to put this file (there's no libcgen). libopcodes is the wrong
+ place as some simulator ports use this but they don't use libopcodes. */
+
+void
+iq2000_cgen_cpu_close (cd)
+ CGEN_CPU_DESC cd;
+{
+ unsigned int i;
+ CGEN_INSN *insns;
+
+ if (cd->macro_insn_table.init_entries)
+ {
+ insns = cd->macro_insn_table.init_entries;
+ for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
+ {
+ if (CGEN_INSN_RX ((insns)))
+ regfree(CGEN_INSN_RX (insns));
+ }
+ }
+
+ if (cd->insn_table.init_entries)
+ {
+ insns = cd->insn_table.init_entries;
+ for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
+ {
+ if (CGEN_INSN_RX (insns))
+ regfree(CGEN_INSN_RX (insns));
+ }
+ }
+
+
+
+ if (cd->macro_insn_table.init_entries)
+ free ((CGEN_INSN *) cd->macro_insn_table.init_entries);
+
+ if (cd->insn_table.init_entries)
+ free ((CGEN_INSN *) cd->insn_table.init_entries);
+
+ if (cd->hw_table.entries)
+ free ((CGEN_HW_ENTRY *) cd->hw_table.entries);
+
+ if (cd->operand_table.entries)
+ free ((CGEN_HW_ENTRY *) cd->operand_table.entries);
+
+ free (cd);
+}
+
diff --git a/opcodes/iq2000-desc.h b/opcodes/iq2000-desc.h
new file mode 100644
index 00000000000..584c3ded755
--- /dev/null
+++ b/opcodes/iq2000-desc.h
@@ -0,0 +1,302 @@
+/* CPU data header for iq2000.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef IQ2000_CPU_H
+#define IQ2000_CPU_H
+
+#define CGEN_ARCH iq2000
+
+/* Given symbol S, return iq2000_cgen_<S>. */
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define CGEN_SYM(s) iq2000##_cgen_##s
+#else
+#define CGEN_SYM(s) iq2000/**/_cgen_/**/s
+#endif
+
+
+/* Selected cpu families. */
+#define HAVE_CPU_IQ2000BF
+#define HAVE_CPU_IQ10BF
+
+#define CGEN_INSN_LSB0_P 1
+
+/* Minimum size of any insn (in bytes). */
+#define CGEN_MIN_INSN_SIZE 4
+
+/* Maximum size of any insn (in bytes). */
+#define CGEN_MAX_INSN_SIZE 4
+
+#define CGEN_INT_INSN_P 1
+
+/* Maximum number of syntax elements in an instruction. */
+#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 19
+
+/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands.
+ e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands
+ we can't hash on everything up to the space. */
+#define CGEN_MNEMONIC_OPERANDS
+
+/* Maximum number of fields in an instruction. */
+#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 8
+
+/* Enums. */
+
+/* Enum declaration for . */
+typedef enum gr_names {
+ H_GR_R0 = 0, H_GR__0 = 0, H_GR_R1 = 1, H_GR__1 = 1
+ , H_GR_R2 = 2, H_GR__2 = 2, H_GR_R3 = 3, H_GR__3 = 3
+ , H_GR_R4 = 4, H_GR__4 = 4, H_GR_R5 = 5, H_GR__5 = 5
+ , H_GR_R6 = 6, H_GR__6 = 6, H_GR_R7 = 7, H_GR__7 = 7
+ , H_GR_R8 = 8, H_GR__8 = 8, H_GR_R9 = 9, H_GR__9 = 9
+ , H_GR_R10 = 10, H_GR__10 = 10, H_GR_R11 = 11, H_GR__11 = 11
+ , H_GR_R12 = 12, H_GR__12 = 12, H_GR_R13 = 13, H_GR__13 = 13
+ , H_GR_R14 = 14, H_GR__14 = 14, H_GR_R15 = 15, H_GR__15 = 15
+ , H_GR_R16 = 16, H_GR__16 = 16, H_GR_R17 = 17, H_GR__17 = 17
+ , H_GR_R18 = 18, H_GR__18 = 18, H_GR_R19 = 19, H_GR__19 = 19
+ , H_GR_R20 = 20, H_GR__20 = 20, H_GR_R21 = 21, H_GR__21 = 21
+ , H_GR_R22 = 22, H_GR__22 = 22, H_GR_R23 = 23, H_GR__23 = 23
+ , H_GR_R24 = 24, H_GR__24 = 24, H_GR_R25 = 25, H_GR__25 = 25
+ , H_GR_R26 = 26, H_GR__26 = 26, H_GR_R27 = 27, H_GR__27 = 27
+ , H_GR_R28 = 28, H_GR__28 = 28, H_GR_R29 = 29, H_GR__29 = 29
+ , H_GR_R30 = 30, H_GR__30 = 30, H_GR_R31 = 31, H_GR__31 = 31
+} GR_NAMES;
+
+/* Enum declaration for primary opcodes. */
+typedef enum opcodes {
+ OP_SPECIAL = 0, OP_REGIMM = 1, OP_J = 2, OP_JAL = 3
+ , OP_BEQ = 4, OP_BNE = 5, OP_BLEZ = 6, OP_BGTZ = 7
+ , OP_ADDI = 8, OP_ADDIU = 9, OP_SLTI = 10, OP_SLTIU = 11
+ , OP_ANDI = 12, OP_ORI = 13, OP_XORI = 14, OP_LUI = 15
+ , OP_COP0 = 16, OP_COP1 = 17, OP_COP2 = 18, OP_COP3 = 19
+ , OP_BEQL = 20, OP_BNEL = 21, OP_BLEZL = 22, OP_BGTZL = 23
+ , OP_BMB0 = 24, OP_BMB1 = 25, OP_BMB2 = 26, OP_BMB3 = 27
+ , OP_BBI = 28, OP_BBV = 29, OP_BBIN = 30, OP_BBVN = 31
+ , OP_LB = 32, OP_LH = 33, OP_LW = 35, OP_LBU = 36
+ , OP_LHU = 37, OP_RAM = 39, OP_SB = 40, OP_SH = 41
+ , OP_SW = 43, OP_ANDOI = 44, OP_BMB = 45, OP_ORUI = 47
+ , OP_LDW = 48, OP_SDW = 56, OP_ANDOUI = 63
+} OPCODES;
+
+/* Enum declaration for iq10-only primary opcodes. */
+typedef enum q10_opcodes {
+ OP10_BMB = 6, OP10_ORUI = 15, OP10_BMBL = 22, OP10_ANDOUI = 47
+ , OP10_BBIL = 60, OP10_BBVL = 61, OP10_BBINL = 62, OP10_BBVNL = 63
+} Q10_OPCODES;
+
+/* Enum declaration for branch sub-opcodes. */
+typedef enum regimm_functions {
+ FUNC_BLTZ = 0, FUNC_BGEZ = 1, FUNC_BLTZL = 2, FUNC_BGEZL = 3
+ , FUNC_BLEZ = 4, FUNC_BGTZ = 5, FUNC_BLEZL = 6, FUNC_BGTZL = 7
+ , FUNC_BRI = 8, FUNC_BRV = 9, FUNC_BCTX = 12, FUNC_BLTZAL = 16
+ , FUNC_BGEZAL = 17, FUNC_BLTZALL = 18, FUNC_BGEZALL = 19, FUNC_BLEZAL = 20
+ , FUNC_BGTZAL = 21, FUNC_BLEZALL = 22, FUNC_BGTZALL = 23
+} REGIMM_FUNCTIONS;
+
+/* Enum declaration for function sub-opcodes. */
+typedef enum functions {
+ FUNC_SLL = 0, FUNC_SLMV = 1, FUNC_SRL = 2, FUNC_SRA = 3
+ , FUNC_SLLV = 4, FUNC_SRMV = 5, FUNC_SRLV = 6, FUNC_SRAV = 7
+ , FUNC_JR = 8, FUNC_JALR = 9, FUNC_JCR = 10, FUNC_SYSCALL = 12
+ , FUNC_BREAK = 13, FUNC_SLEEP = 14, FUNC_ADD = 32, FUNC_ADDU = 33
+ , FUNC_SUB = 34, FUNC_SUBU = 35, FUNC_AND = 36, FUNC_OR = 37
+ , FUNC_XOR = 38, FUNC_NOR = 39, FUNC_ADO16 = 41, FUNC_SLT = 42
+ , FUNC_SLTU = 43, FUNC_MRGB = 45
+} FUNCTIONS;
+
+/* Enum declaration for iq10-only special function sub-opcodes. */
+typedef enum q10s_functions {
+ FUNC10_YIELD = 14, FUNC10_CNT1S = 46
+} Q10S_FUNCTIONS;
+
+/* Enum declaration for iq10 function sub-opcodes. */
+typedef enum cop_functions {
+ FUNC10_CFC = 0, FUNC10_LOCK = 1, FUNC10_CTC = 2, FUNC10_UNLK = 3
+ , FUNC10_SWRD = 4, FUNC10_SWRDL = 5, FUNC10_SWWR = 6, FUNC10_SWWRU = 7
+ , FUNC10_RBA = 8, FUNC10_RBAL = 9, FUNC10_RBAR = 10, FUNC10_DWRD = 12
+ , FUNC10_DWRDL = 13, FUNC10_WBA = 16, FUNC10_WBAU = 17, FUNC10_WBAC = 18
+ , FUNC10_CRC32 = 20, FUNC10_CRC32B = 21, FUNC10_MCID = 32, FUNC10_DBD = 33
+ , FUNC10_DBA = 34, FUNC10_DPWT = 35, FUNC10_AVAIL = 36, FUNC10_FREE = 37
+ , FUNC10_CHKHDR = 38, FUNC10_TSTOD = 39, FUNC10_PKRLA = 40, FUNC10_PKRLAU = 41
+ , FUNC10_PKRLAH = 42, FUNC10_PKRLAC = 43, FUNC10_CMPHDR = 44, FUNC10_CM64RS = 0
+ , FUNC10_CM64RD = 1, FUNC10_CM64RI = 4, FUNC10_CM64CLR = 5, FUNC10_CM64SS = 8
+ , FUNC10_CM64SD = 9, FUNC10_CM64SI = 12, FUNC10_CM64RA = 16, FUNC10_CM64RIA2 = 20
+ , FUNC10_CM128RIA2 = 21, FUNC10_CM64SA = 24, FUNC10_CM64SIA2 = 28, FUNC10_CM128SIA2 = 29
+ , FUNC10_CM32RS = 32, FUNC10_CM32RD = 33, FUNC10_CM32XOR = 34, FUNC10_CM32ANDN = 35
+ , FUNC10_CM32RI = 36, FUNC10_CM128VSA = 38, FUNC10_CM32SS = 40, FUNC10_CM32SD = 41
+ , FUNC10_CM32OR = 42, FUNC10_CM32AND = 43, FUNC10_CM32SI = 44, FUNC10_CM32RA = 48
+ , FUNC10_CM32SA = 56
+} COP_FUNCTIONS;
+
+/* Enum declaration for iq10 function sub-opcodes. */
+typedef enum cop_cm128_4functions {
+ FUNC10_CM128RIA3 = 4, FUNC10_CM128SIA3 = 6
+} COP_CM128_4FUNCTIONS;
+
+/* Enum declaration for iq10 function sub-opcodes. */
+typedef enum cop_cm128_3functions {
+ FUNC10_CM128RIA4 = 6, FUNC10_CM128SIA4 = 7
+} COP_CM128_3FUNCTIONS;
+
+/* Enum declaration for iq10 coprocessor sub-opcodes. */
+typedef enum cop2_functions {
+ FUNC10_PKRLI = 0, FUNC10_PKRLIU = 1, FUNC10_PKRLIH = 2, FUNC10_PKRLIC = 3
+ , FUNC10_RBIR = 1, FUNC10_RBI = 2, FUNC10_RBIL = 3, FUNC10_WBIC = 5
+ , FUNC10_WBI = 6, FUNC10_WBIU = 7
+} COP2_FUNCTIONS;
+
+/* Enum declaration for iq10 coprocessor cam sub-opcodes. */
+typedef enum cop3_cam_functions {
+ FUNC10_CAM36 = 16, FUNC10_CAM72 = 17, FUNC10_CAM144 = 18, FUNC10_CAM288 = 19
+} COP3_CAM_FUNCTIONS;
+
+/* Attributes. */
+
+/* Enum declaration for machine type selection. */
+typedef enum mach_attr {
+ MACH_BASE, MACH_IQ2000, MACH_IQ10, MACH_MAX
+} MACH_ATTR;
+
+/* Enum declaration for instruction set selection. */
+typedef enum isa_attr {
+ ISA_IQ2000, ISA_MAX
+} ISA_ATTR;
+
+/* Number of architecture variants. */
+#define MAX_ISAS 1
+#define MAX_MACHS ((int) MACH_MAX)
+
+/* Ifield support. */
+
+extern const struct cgen_ifld iq2000_cgen_ifld_table[];
+
+/* Ifield attribute indices. */
+
+/* Enum declaration for cgen_ifld attrs. */
+typedef enum cgen_ifld_attr {
+ CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED
+ , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31
+ , CGEN_IFLD_MACH, CGEN_IFLD_END_NBOOLS
+} CGEN_IFLD_ATTR;
+
+/* Number of non-boolean elements in cgen_ifld_attr. */
+#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1)
+
+/* Enum declaration for iq2000 ifield types. */
+typedef enum ifield_type {
+ IQ2000_F_NIL, IQ2000_F_ANYOF, IQ2000_F_OPCODE, IQ2000_F_RS
+ , IQ2000_F_RT, IQ2000_F_RD, IQ2000_F_SHAMT, IQ2000_F_CP_OP
+ , IQ2000_F_CP_OP_10, IQ2000_F_CP_GRP, IQ2000_F_FUNC, IQ2000_F_IMM
+ , IQ2000_F_RD_RS, IQ2000_F_RD_RT, IQ2000_F_RT_RS, IQ2000_F_JTARG
+ , IQ2000_F_JTARGQ10, IQ2000_F_OFFSET, IQ2000_F_COUNT, IQ2000_F_BYTECOUNT
+ , IQ2000_F_INDEX, IQ2000_F_MASK, IQ2000_F_MASKQ10, IQ2000_F_MASKL
+ , IQ2000_F_EXCODE, IQ2000_F_RSRVD, IQ2000_F_10_11, IQ2000_F_24_19
+ , IQ2000_F_5, IQ2000_F_10, IQ2000_F_25, IQ2000_F_CAM_Z
+ , IQ2000_F_CAM_Y, IQ2000_F_CM_3FUNC, IQ2000_F_CM_4FUNC, IQ2000_F_CM_3Z
+ , IQ2000_F_CM_4Z, IQ2000_F_MAX
+} IFIELD_TYPE;
+
+#define MAX_IFLD ((int) IQ2000_F_MAX)
+
+/* Hardware attribute indices. */
+
+/* Enum declaration for cgen_hw attrs. */
+typedef enum cgen_hw_attr {
+ CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE
+ , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS
+} CGEN_HW_ATTR;
+
+/* Number of non-boolean elements in cgen_hw_attr. */
+#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1)
+
+/* Enum declaration for iq2000 hardware types. */
+typedef enum cgen_hw_type {
+ HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
+ , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_MAX
+} CGEN_HW_TYPE;
+
+#define MAX_HW ((int) HW_MAX)
+
+/* Operand attribute indices. */
+
+/* Enum declaration for cgen_operand attrs. */
+typedef enum cgen_operand_attr {
+ CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT
+ , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY
+ , CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_END_NBOOLS
+} CGEN_OPERAND_ATTR;
+
+/* Number of non-boolean elements in cgen_operand_attr. */
+#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1)
+
+/* Enum declaration for iq2000 operand types. */
+typedef enum cgen_operand_type {
+ IQ2000_OPERAND_PC, IQ2000_OPERAND_RS, IQ2000_OPERAND_RT, IQ2000_OPERAND_RD
+ , IQ2000_OPERAND_RD_RS, IQ2000_OPERAND_RD_RT, IQ2000_OPERAND_RT_RS, IQ2000_OPERAND_SHAMT
+ , IQ2000_OPERAND_IMM, IQ2000_OPERAND_OFFSET, IQ2000_OPERAND_BASEOFF, IQ2000_OPERAND_JMPTARG
+ , IQ2000_OPERAND_MASK, IQ2000_OPERAND_MASKQ10, IQ2000_OPERAND_MASKL, IQ2000_OPERAND_COUNT
+ , IQ2000_OPERAND_INDEX, IQ2000_OPERAND_EXECODE, IQ2000_OPERAND_BYTECOUNT, IQ2000_OPERAND_CAM_Y
+ , IQ2000_OPERAND_CAM_Z, IQ2000_OPERAND_CM_3FUNC, IQ2000_OPERAND_CM_4FUNC, IQ2000_OPERAND_CM_3Z
+ , IQ2000_OPERAND_CM_4Z, IQ2000_OPERAND_BASE, IQ2000_OPERAND_MASKR, IQ2000_OPERAND_BITNUM
+ , IQ2000_OPERAND_HI16, IQ2000_OPERAND_LO16, IQ2000_OPERAND_MLO16, IQ2000_OPERAND_JMPTARGQ10
+ , IQ2000_OPERAND_MAX
+} CGEN_OPERAND_TYPE;
+
+/* Number of operands types. */
+#define MAX_OPERANDS 32
+
+/* Maximum number of operands referenced by any insn. */
+#define MAX_OPERAND_INSTANCES 8
+
+/* Insn attribute indices. */
+
+/* Enum declaration for cgen_insn attrs. */
+typedef enum cgen_insn_attr {
+ CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_YIELD_INSN, CGEN_INSN_LOAD_DELAY
+ , CGEN_INSN_EVEN_REG_NUM, CGEN_INSN_UNSUPPORTED, CGEN_INSN_USES_RD, CGEN_INSN_USES_RS
+ , CGEN_INSN_USES_RT, CGEN_INSN_USES_R31, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31
+ , CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
+} CGEN_INSN_ATTR;
+
+/* Number of non-boolean elements in cgen_insn_attr. */
+#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1)
+
+/* cgen.h uses things we just defined. */
+#include "opcode/cgen.h"
+
+/* Attributes. */
+extern const CGEN_ATTR_TABLE iq2000_cgen_hardware_attr_table[];
+extern const CGEN_ATTR_TABLE iq2000_cgen_ifield_attr_table[];
+extern const CGEN_ATTR_TABLE iq2000_cgen_operand_attr_table[];
+extern const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[];
+
+/* Hardware decls. */
+
+extern CGEN_KEYWORD iq2000_cgen_opval_gr_names;
+
+
+
+
+#endif /* IQ2000_CPU_H */
diff --git a/opcodes/iq2000-dis.c b/opcodes/iq2000-dis.c
new file mode 100644
index 00000000000..49e01201dc6
--- /dev/null
+++ b/opcodes/iq2000-dis.c
@@ -0,0 +1,619 @@
+/* Disassembler interface for targets using CGEN. -*- C -*-
+ CGEN: Cpu tools GENerator
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+- the resultant file is machine generated, cgen-dis.in isn't
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* ??? Eventually more and more of this stuff can go to cpu-independent files.
+ Keep that in mind. */
+
+#include "sysdep.h"
+#include <stdio.h>
+#include "ansidecl.h"
+#include "dis-asm.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "iq2000-desc.h"
+#include "iq2000-opc.h"
+#include "opintl.h"
+
+/* Default text to print if an instruction isn't recognized. */
+#define UNKNOWN_INSN_MSG _("*unknown*")
+
+static void print_normal
+ PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+static void print_address
+ PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+static void print_keyword
+ PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+static void print_insn_normal
+ PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
+ bfd_vma, int));
+static int print_insn
+ PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+static int default_print_insn
+ PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+static int read_insn
+ PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
+ CGEN_EXTRACT_INFO *, unsigned long *));
+
+/* -- disassembler routines inserted here */
+
+
+void iq2000_cgen_print_operand
+ PARAMS ((CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *,
+ void const *, bfd_vma, int));
+
+/* Main entry point for printing operands.
+ XINFO is a `void *' and not a `disassemble_info *' to not put a requirement
+ of dis-asm.h on cgen.h.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `print_insn_normal', but keeping it
+ separate makes clear the interface between `print_insn_normal' and each of
+ the handlers. */
+
+void
+iq2000_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
+ CGEN_CPU_DESC cd;
+ int opindex;
+ PTR xinfo;
+ CGEN_FIELDS *fields;
+ void const *attrs ATTRIBUTE_UNUSED;
+ bfd_vma pc;
+ int length;
+{
+ disassemble_info *info = (disassemble_info *) xinfo;
+
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rs, 0);
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ print_address (cd, info, fields->f_imm, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ print_normal (cd, info, fields->f_rt, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ print_normal (cd, info, fields->f_bytecount, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ print_normal (cd, info, fields->f_cam_y, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ print_normal (cd, info, fields->f_cam_z, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ print_normal (cd, info, fields->f_cm_3func, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ print_normal (cd, info, fields->f_cm_3z, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ print_normal (cd, info, fields->f_cm_4func, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ print_normal (cd, info, fields->f_cm_4z, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_COUNT :
+ print_normal (cd, info, fields->f_count, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ print_normal (cd, info, fields->f_excode, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_HI16 :
+ print_normal (cd, info, fields->f_imm, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_IMM :
+ print_normal (cd, info, fields->f_imm, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_INDEX :
+ print_normal (cd, info, fields->f_index, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ print_address (cd, info, fields->f_jtarg, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ print_address (cd, info, fields->f_jtargq10, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
+ break;
+ case IQ2000_OPERAND_LO16 :
+ print_normal (cd, info, fields->f_imm, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_MASK :
+ print_normal (cd, info, fields->f_mask, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_MASKL :
+ print_normal (cd, info, fields->f_maskl, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ print_normal (cd, info, fields->f_maskq10, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_MASKR :
+ print_normal (cd, info, fields->f_rs, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ print_normal (cd, info, fields->f_imm, 0, pc, length);
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ print_address (cd, info, fields->f_offset, 0|(1<<CGEN_OPERAND_PCREL_ADDR), pc, length);
+ break;
+ case IQ2000_OPERAND_RD :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rd, 0);
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rd_rs, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rd_rt, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case IQ2000_OPERAND_RS :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rs, 0);
+ break;
+ case IQ2000_OPERAND_RT :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rt, 0);
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rt_rs, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ print_normal (cd, info, fields->f_shamt, 0, pc, length);
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while printing insn.\n"),
+ opindex);
+ abort ();
+ }
+}
+
+cgen_print_fn * const iq2000_cgen_print_handlers[] =
+{
+ print_insn_normal,
+};
+
+
+void
+iq2000_cgen_init_dis (cd)
+ CGEN_CPU_DESC cd;
+{
+ iq2000_cgen_init_opcode_table (cd);
+ iq2000_cgen_init_ibld_table (cd);
+ cd->print_handlers = & iq2000_cgen_print_handlers[0];
+ cd->print_operand = iq2000_cgen_print_operand;
+}
+
+
+/* Default print handler. */
+
+static void
+print_normal (cd, dis_info, value, attrs, pc, length)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ PTR dis_info;
+ long value;
+ unsigned int attrs;
+ bfd_vma pc ATTRIBUTE_UNUSED;
+ int length ATTRIBUTE_UNUSED;
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+
+#ifdef CGEN_PRINT_NORMAL
+ CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
+#endif
+
+ /* Print the operand as directed by the attributes. */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
+ ; /* nothing to do */
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED))
+ (*info->fprintf_func) (info->stream, "%ld", value);
+ else
+ (*info->fprintf_func) (info->stream, "0x%lx", value);
+}
+
+/* Default address handler. */
+
+static void
+print_address (cd, dis_info, value, attrs, pc, length)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ PTR dis_info;
+ bfd_vma value;
+ unsigned int attrs;
+ bfd_vma pc ATTRIBUTE_UNUSED;
+ int length ATTRIBUTE_UNUSED;
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+
+#ifdef CGEN_PRINT_ADDRESS
+ CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
+#endif
+
+ /* Print the operand as directed by the attributes. */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
+ ; /* nothing to do */
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_PCREL_ADDR))
+ (*info->print_address_func) (value, info);
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_ABS_ADDR))
+ (*info->print_address_func) (value, info);
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED))
+ (*info->fprintf_func) (info->stream, "%ld", (long) value);
+ else
+ (*info->fprintf_func) (info->stream, "0x%lx", (long) value);
+}
+
+/* Keyword print handler. */
+
+static void
+print_keyword (cd, dis_info, keyword_table, value, attrs)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ PTR dis_info;
+ CGEN_KEYWORD *keyword_table;
+ long value;
+ unsigned int attrs ATTRIBUTE_UNUSED;
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+ const CGEN_KEYWORD_ENTRY *ke;
+
+ ke = cgen_keyword_lookup_value (keyword_table, value);
+ if (ke != NULL)
+ (*info->fprintf_func) (info->stream, "%s", ke->name);
+ else
+ (*info->fprintf_func) (info->stream, "???");
+}
+
+/* Default insn printer.
+
+ DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ about disassemble_info. */
+
+static void
+print_insn_normal (cd, dis_info, insn, fields, pc, length)
+ CGEN_CPU_DESC cd;
+ PTR dis_info;
+ const CGEN_INSN *insn;
+ CGEN_FIELDS *fields;
+ bfd_vma pc;
+ int length;
+{
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ disassemble_info *info = (disassemble_info *) dis_info;
+ const CGEN_SYNTAX_CHAR_TYPE *syn;
+
+ CGEN_INIT_PRINT (cd);
+
+ for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
+ {
+ if (CGEN_SYNTAX_MNEMONIC_P (*syn))
+ {
+ (*info->fprintf_func) (info->stream, "%s", CGEN_INSN_MNEMONIC (insn));
+ continue;
+ }
+ if (CGEN_SYNTAX_CHAR_P (*syn))
+ {
+ (*info->fprintf_func) (info->stream, "%c", CGEN_SYNTAX_CHAR (*syn));
+ continue;
+ }
+
+ /* We have an operand. */
+ iq2000_cgen_print_operand (cd, CGEN_SYNTAX_FIELD (*syn), info,
+ fields, CGEN_INSN_ATTRS (insn), pc, length);
+ }
+}
+
+/* Subroutine of print_insn. Reads an insn into the given buffers and updates
+ the extract info.
+ Returns 0 if all is well, non-zero otherwise. */
+
+static int
+read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ bfd_vma pc;
+ disassemble_info *info;
+ char *buf;
+ int buflen;
+ CGEN_EXTRACT_INFO *ex_info;
+ unsigned long *insn_value;
+{
+ int status = (*info->read_memory_func) (pc, buf, buflen, info);
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return -1;
+ }
+
+ ex_info->dis_info = info;
+ ex_info->valid = (1 << buflen) - 1;
+ ex_info->insn_bytes = buf;
+
+ *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG);
+ return 0;
+}
+
+/* Utility to print an insn.
+ BUF is the base part of the insn, target byte order, BUFLEN bytes long.
+ The result is the size of the insn in bytes or zero for an unknown insn
+ or -1 if an error occurs fetching data (memory_error_func will have
+ been called). */
+
+static int
+print_insn (cd, pc, info, buf, buflen)
+ CGEN_CPU_DESC cd;
+ bfd_vma pc;
+ disassemble_info *info;
+ char *buf;
+ unsigned int buflen;
+{
+ CGEN_INSN_INT insn_value;
+ const CGEN_INSN_LIST *insn_list;
+ CGEN_EXTRACT_INFO ex_info;
+ int basesize;
+
+ /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
+ basesize = cd->base_insn_bitsize < buflen * 8 ?
+ cd->base_insn_bitsize : buflen * 8;
+ insn_value = cgen_get_insn_value (cd, buf, basesize);
+
+
+ /* Fill in ex_info fields like read_insn would. Don't actually call
+ read_insn, since the incoming buffer is already read (and possibly
+ modified a la m32r). */
+ ex_info.valid = (1 << buflen) - 1;
+ ex_info.dis_info = info;
+ ex_info.insn_bytes = buf;
+
+ /* The instructions are stored in hash lists.
+ Pick the first one and keep trying until we find the right one. */
+
+ insn_list = CGEN_DIS_LOOKUP_INSN (cd, buf, insn_value);
+ while (insn_list != NULL)
+ {
+ const CGEN_INSN *insn = insn_list->insn;
+ CGEN_FIELDS fields;
+ int length;
+ unsigned long insn_value_cropped;
+
+#ifdef CGEN_VALIDATE_INSN_SUPPORTED
+ /* Not needed as insn shouldn't be in hash lists if not supported. */
+ /* Supported by this cpu? */
+ if (! iq2000_cgen_insn_supported (cd, insn))
+ {
+ insn_list = CGEN_DIS_NEXT_INSN (insn_list);
+ continue;
+ }
+#endif
+
+ /* Basic bit mask must be correct. */
+ /* ??? May wish to allow target to defer this check until the extract
+ handler. */
+
+ /* Base size may exceed this instruction's size. Extract the
+ relevant part from the buffer. */
+ if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen &&
+ (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
+ insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn),
+ info->endian == BFD_ENDIAN_BIG);
+ else
+ insn_value_cropped = insn_value;
+
+ if ((insn_value_cropped & CGEN_INSN_BASE_MASK (insn))
+ == CGEN_INSN_BASE_VALUE (insn))
+ {
+ /* Printing is handled in two passes. The first pass parses the
+ machine insn and extracts the fields. The second pass prints
+ them. */
+
+ /* Make sure the entire insn is loaded into insn_value, if it
+ can fit. */
+ if (((unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize) &&
+ (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
+ {
+ unsigned long full_insn_value;
+ int rc = read_insn (cd, pc, info, buf,
+ CGEN_INSN_BITSIZE (insn) / 8,
+ & ex_info, & full_insn_value);
+ if (rc != 0)
+ return rc;
+ length = CGEN_EXTRACT_FN (cd, insn)
+ (cd, insn, &ex_info, full_insn_value, &fields, pc);
+ }
+ else
+ length = CGEN_EXTRACT_FN (cd, insn)
+ (cd, insn, &ex_info, insn_value_cropped, &fields, pc);
+
+ /* length < 0 -> error */
+ if (length < 0)
+ return length;
+ if (length > 0)
+ {
+ CGEN_PRINT_FN (cd, insn) (cd, info, insn, &fields, pc, length);
+ /* length is in bits, result is in bytes */
+ return length / 8;
+ }
+ }
+
+ insn_list = CGEN_DIS_NEXT_INSN (insn_list);
+ }
+
+ return 0;
+}
+
+/* Default value for CGEN_PRINT_INSN.
+ The result is the size of the insn in bytes or zero for an unknown insn
+ or -1 if an error occured fetching bytes. */
+
+#ifndef CGEN_PRINT_INSN
+#define CGEN_PRINT_INSN default_print_insn
+#endif
+
+static int
+default_print_insn (cd, pc, info)
+ CGEN_CPU_DESC cd;
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ char buf[CGEN_MAX_INSN_SIZE];
+ int buflen;
+ int status;
+
+ /* Attempt to read the base part of the insn. */
+ buflen = cd->base_insn_bitsize / 8;
+ status = (*info->read_memory_func) (pc, buf, buflen, info);
+
+ /* Try again with the minimum part, if min < base. */
+ if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize))
+ {
+ buflen = cd->min_insn_bitsize / 8;
+ status = (*info->read_memory_func) (pc, buf, buflen, info);
+ }
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return -1;
+ }
+
+ return print_insn (cd, pc, info, buf, buflen);
+}
+
+/* Main entry point.
+ Print one instruction from PC on INFO->STREAM.
+ Return the size of the instruction (in bytes). */
+
+typedef struct cpu_desc_list {
+ struct cpu_desc_list *next;
+ int isa;
+ int mach;
+ int endian;
+ CGEN_CPU_DESC cd;
+} cpu_desc_list;
+
+int
+print_insn_iq2000 (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ static cpu_desc_list *cd_list = 0;
+ cpu_desc_list *cl = 0;
+ static CGEN_CPU_DESC cd = 0;
+ static int prev_isa;
+ static int prev_mach;
+ static int prev_endian;
+ int length;
+ int isa,mach;
+ int endian = (info->endian == BFD_ENDIAN_BIG
+ ? CGEN_ENDIAN_BIG
+ : CGEN_ENDIAN_LITTLE);
+ enum bfd_architecture arch;
+
+ /* ??? gdb will set mach but leave the architecture as "unknown" */
+#ifndef CGEN_BFD_ARCH
+#define CGEN_BFD_ARCH bfd_arch_iq2000
+#endif
+ arch = info->arch;
+ if (arch == bfd_arch_unknown)
+ arch = CGEN_BFD_ARCH;
+
+ /* There's no standard way to compute the machine or isa number
+ so we leave it to the target. */
+#ifdef CGEN_COMPUTE_MACH
+ mach = CGEN_COMPUTE_MACH (info);
+#else
+ mach = info->mach;
+#endif
+
+#ifdef CGEN_COMPUTE_ISA
+ isa = CGEN_COMPUTE_ISA (info);
+#else
+ isa = info->insn_sets;
+#endif
+
+ /* If we've switched cpu's, try to find a handle we've used before */
+ if (cd
+ && (isa != prev_isa
+ || mach != prev_mach
+ || endian != prev_endian))
+ {
+ cd = 0;
+ for (cl = cd_list; cl; cl = cl->next)
+ {
+ if (cl->isa == isa &&
+ cl->mach == mach &&
+ cl->endian == endian)
+ {
+ cd = cl->cd;
+ break;
+ }
+ }
+ }
+
+ /* If we haven't initialized yet, initialize the opcode table. */
+ if (! cd)
+ {
+ const bfd_arch_info_type *arch_type = bfd_lookup_arch (arch, mach);
+ const char *mach_name;
+
+ if (!arch_type)
+ abort ();
+ mach_name = arch_type->printable_name;
+
+ prev_isa = isa;
+ prev_mach = mach;
+ prev_endian = endian;
+ cd = iq2000_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa,
+ CGEN_CPU_OPEN_BFDMACH, mach_name,
+ CGEN_CPU_OPEN_ENDIAN, prev_endian,
+ CGEN_CPU_OPEN_END);
+ if (!cd)
+ abort ();
+
+ /* save this away for future reference */
+ cl = xmalloc (sizeof (struct cpu_desc_list));
+ cl->cd = cd;
+ cl->isa = isa;
+ cl->mach = mach;
+ cl->endian = endian;
+ cl->next = cd_list;
+ cd_list = cl;
+
+ iq2000_cgen_init_dis (cd);
+ }
+
+ /* We try to have as much common code as possible.
+ But at this point some targets need to take over. */
+ /* ??? Some targets may need a hook elsewhere. Try to avoid this,
+ but if not possible try to move this hook elsewhere rather than
+ have two hooks. */
+ length = CGEN_PRINT_INSN (cd, pc, info);
+ if (length > 0)
+ return length;
+ if (length < 0)
+ return -1;
+
+ (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+ return cd->default_insn_bitsize / 8;
+}
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
new file mode 100644
index 00000000000..5a29228c08b
--- /dev/null
+++ b/opcodes/iq2000-ibld.c
@@ -0,0 +1,1394 @@
+/* Instruction building/extraction support for iq2000. -*- C -*-
+
+THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
+- the resultant file is machine generated, cgen-ibld.in isn't
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* ??? Eventually more and more of this stuff can go to cpu-independent files.
+ Keep that in mind. */
+
+#include "sysdep.h"
+#include <stdio.h>
+#include "ansidecl.h"
+#include "dis-asm.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "iq2000-desc.h"
+#include "iq2000-opc.h"
+#include "opintl.h"
+#include "safe-ctype.h"
+
+#undef min
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#undef max
+#define max(a,b) ((a) > (b) ? (a) : (b))
+
+/* Used by the ifield rtx function. */
+#define FLD(f) (fields->f)
+
+static const char * insert_normal
+ PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+static const char * insert_insn_normal
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+static int extract_normal
+ PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *));
+static int extract_insn_normal
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+#if CGEN_INT_INSN_P
+static void put_insn_int_value
+ PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+#endif
+#if ! CGEN_INT_INSN_P
+static CGEN_INLINE void insert_1
+ PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+static CGEN_INLINE int fill_cache
+ PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+static CGEN_INLINE long extract_1
+ PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
+ unsigned char *, bfd_vma));
+#endif
+
+/* Operand insertion. */
+
+#if ! CGEN_INT_INSN_P
+
+/* Subroutine of insert_normal. */
+
+static CGEN_INLINE void
+insert_1 (cd, value, start, length, word_length, bufp)
+ CGEN_CPU_DESC cd;
+ unsigned long value;
+ int start,length,word_length;
+ unsigned char *bufp;
+{
+ unsigned long x,mask;
+ int shift;
+
+ x = cgen_get_insn_value (cd, bufp, word_length);
+
+ /* Written this way to avoid undefined behaviour. */
+ mask = (((1L << (length - 1)) - 1) << 1) | 1;
+ if (CGEN_INSN_LSB0_P)
+ shift = (start + 1) - length;
+ else
+ shift = (word_length - (start + length));
+ x = (x & ~(mask << shift)) | ((value & mask) << shift);
+
+ cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
+}
+
+#endif /* ! CGEN_INT_INSN_P */
+
+/* Default insertion routine.
+
+ ATTRS is a mask of the boolean attributes.
+ WORD_OFFSET is the offset in bits from the start of the insn of the value.
+ WORD_LENGTH is the length of the word in bits in which the value resides.
+ START is the starting bit number in the word, architecture origin.
+ LENGTH is the length of VALUE in bits.
+ TOTAL_LENGTH is the total length of the insn in bits.
+
+ The result is an error message or NULL if success. */
+
+/* ??? This duplicates functionality with bfd's howto table and
+ bfd_install_relocation. */
+/* ??? This doesn't handle bfd_vma's. Create another function when
+ necessary. */
+
+static const char *
+insert_normal (cd, value, attrs, word_offset, start, length, word_length,
+ total_length, buffer)
+ CGEN_CPU_DESC cd;
+ long value;
+ unsigned int attrs;
+ unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_BYTES_PTR buffer;
+{
+ static char errbuf[100];
+ /* Written this way to avoid undefined behaviour. */
+ unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
+
+ /* If LENGTH is zero, this operand doesn't contribute to the value. */
+ if (length == 0)
+ return NULL;
+
+#if 0
+ if (CGEN_INT_INSN_P
+ && word_offset != 0)
+ abort ();
+#endif
+
+ if (word_length > 32)
+ abort ();
+
+ /* For architectures with insns smaller than the base-insn-bitsize,
+ word_length may be too big. */
+ if (cd->min_insn_bitsize < cd->base_insn_bitsize)
+ {
+ if (word_offset == 0
+ && word_length > total_length)
+ word_length = total_length;
+ }
+
+ /* Ensure VALUE will fit. */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
+ {
+ long minval = - (1L << (length - 1));
+ unsigned long maxval = mask;
+
+ if ((value > 0 && (unsigned long) value > maxval)
+ || value < minval)
+ {
+ /* xgettext:c-format */
+ sprintf (errbuf,
+ _("operand out of range (%ld not between %ld and %lu)"),
+ value, minval, maxval);
+ return errbuf;
+ }
+ }
+ else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
+ {
+ unsigned long maxval = mask;
+
+ if ((unsigned long) value > maxval)
+ {
+ /* xgettext:c-format */
+ sprintf (errbuf,
+ _("operand out of range (%lu not between 0 and %lu)"),
+ value, maxval);
+ return errbuf;
+ }
+ }
+ else
+ {
+ if (! cgen_signed_overflow_ok_p (cd))
+ {
+ long minval = - (1L << (length - 1));
+ long maxval = (1L << (length - 1)) - 1;
+
+ if (value < minval || value > maxval)
+ {
+ sprintf
+ /* xgettext:c-format */
+ (errbuf, _("operand out of range (%ld not between %ld and %ld)"),
+ value, minval, maxval);
+ return errbuf;
+ }
+ }
+ }
+
+#if CGEN_INT_INSN_P
+
+ {
+ int shift;
+
+ if (CGEN_INSN_LSB0_P)
+ shift = (word_offset + start + 1) - length;
+ else
+ shift = total_length - (word_offset + start + length);
+ *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
+ }
+
+#else /* ! CGEN_INT_INSN_P */
+
+ {
+ unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
+
+ insert_1 (cd, value, start, length, word_length, bufp);
+ }
+
+#endif /* ! CGEN_INT_INSN_P */
+
+ return NULL;
+}
+
+/* Default insn builder (insert handler).
+ The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
+ that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
+ recorded in host byte order, otherwise BUFFER is an array of bytes
+ and the value is recorded in target byte order).
+ The result is an error message or NULL if success. */
+
+static const char *
+insert_insn_normal (cd, insn, fields, buffer, pc)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN * insn;
+ CGEN_FIELDS * fields;
+ CGEN_INSN_BYTES_PTR buffer;
+ bfd_vma pc;
+{
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ unsigned long value;
+ const CGEN_SYNTAX_CHAR_TYPE * syn;
+
+ CGEN_INIT_INSERT (cd);
+ value = CGEN_INSN_BASE_VALUE (insn);
+
+ /* If we're recording insns as numbers (rather than a string of bytes),
+ target byte order handling is deferred until later. */
+
+#if CGEN_INT_INSN_P
+
+ put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
+ CGEN_FIELDS_BITSIZE (fields), value);
+
+#else
+
+ cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
+ (unsigned) CGEN_FIELDS_BITSIZE (fields)),
+ value);
+
+#endif /* ! CGEN_INT_INSN_P */
+
+ /* ??? It would be better to scan the format's fields.
+ Still need to be able to insert a value based on the operand though;
+ e.g. storing a branch displacement that got resolved later.
+ Needs more thought first. */
+
+ for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
+ {
+ const char *errmsg;
+
+ if (CGEN_SYNTAX_CHAR_P (* syn))
+ continue;
+
+ errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
+ fields, buffer, pc);
+ if (errmsg)
+ return errmsg;
+ }
+
+ return NULL;
+}
+
+#if CGEN_INT_INSN_P
+/* Cover function to store an insn value into an integral insn. Must go here
+ because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
+
+static void
+put_insn_int_value (cd, buf, length, insn_length, value)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ CGEN_INSN_BYTES_PTR buf;
+ int length;
+ int insn_length;
+ CGEN_INSN_INT value;
+{
+ /* For architectures with insns smaller than the base-insn-bitsize,
+ length may be too big. */
+ if (length > insn_length)
+ *buf = value;
+ else
+ {
+ int shift = insn_length - length;
+ /* Written this way to avoid undefined behaviour. */
+ CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
+ *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
+ }
+}
+#endif
+
+/* Operand extraction. */
+
+#if ! CGEN_INT_INSN_P
+
+/* Subroutine of extract_normal.
+ Ensure sufficient bytes are cached in EX_INFO.
+ OFFSET is the offset in bytes from the start of the insn of the value.
+ BYTES is the length of the needed value.
+ Returns 1 for success, 0 for failure. */
+
+static CGEN_INLINE int
+fill_cache (cd, ex_info, offset, bytes, pc)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info;
+ int offset, bytes;
+ bfd_vma pc;
+{
+ /* It's doubtful that the middle part has already been fetched so
+ we don't optimize that case. kiss. */
+ unsigned int mask;
+ disassemble_info *info = (disassemble_info *) ex_info->dis_info;
+
+ /* First do a quick check. */
+ mask = (1 << bytes) - 1;
+ if (((ex_info->valid >> offset) & mask) == mask)
+ return 1;
+
+ /* Search for the first byte we need to read. */
+ for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
+ if (! (mask & ex_info->valid))
+ break;
+
+ if (bytes)
+ {
+ int status;
+
+ pc += offset;
+ status = (*info->read_memory_func)
+ (pc, ex_info->insn_bytes + offset, bytes, info);
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return 0;
+ }
+
+ ex_info->valid |= ((1 << bytes) - 1) << offset;
+ }
+
+ return 1;
+}
+
+/* Subroutine of extract_normal. */
+
+static CGEN_INLINE long
+extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
+ CGEN_CPU_DESC cd;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ int start,length,word_length;
+ unsigned char *bufp;
+ bfd_vma pc ATTRIBUTE_UNUSED;
+{
+ unsigned long x;
+ int shift;
+#if 0
+ int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG;
+#endif
+ x = cgen_get_insn_value (cd, bufp, word_length);
+
+ if (CGEN_INSN_LSB0_P)
+ shift = (start + 1) - length;
+ else
+ shift = (word_length - (start + length));
+ return x >> shift;
+}
+
+#endif /* ! CGEN_INT_INSN_P */
+
+/* Default extraction routine.
+
+ INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
+ or sometimes less for cases like the m32r where the base insn size is 32
+ but some insns are 16 bits.
+ ATTRS is a mask of the boolean attributes. We only need `SIGNED',
+ but for generality we take a bitmask of all of them.
+ WORD_OFFSET is the offset in bits from the start of the insn of the value.
+ WORD_LENGTH is the length of the word in bits in which the value resides.
+ START is the starting bit number in the word, architecture origin.
+ LENGTH is the length of VALUE in bits.
+ TOTAL_LENGTH is the total length of the insn in bits.
+
+ Returns 1 for success, 0 for failure. */
+
+/* ??? The return code isn't properly used. wip. */
+
+/* ??? This doesn't handle bfd_vma's. Create another function when
+ necessary. */
+
+static int
+extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
+ word_length, total_length, pc, valuep)
+ CGEN_CPU_DESC cd;
+#if ! CGEN_INT_INSN_P
+ CGEN_EXTRACT_INFO *ex_info;
+#else
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+#endif
+ CGEN_INSN_INT insn_value;
+ unsigned int attrs;
+ unsigned int word_offset, start, length, word_length, total_length;
+#if ! CGEN_INT_INSN_P
+ bfd_vma pc;
+#else
+ bfd_vma pc ATTRIBUTE_UNUSED;
+#endif
+ long *valuep;
+{
+ long value, mask;
+
+ /* If LENGTH is zero, this operand doesn't contribute to the value
+ so give it a standard value of zero. */
+ if (length == 0)
+ {
+ *valuep = 0;
+ return 1;
+ }
+
+#if 0
+ if (CGEN_INT_INSN_P
+ && word_offset != 0)
+ abort ();
+#endif
+
+ if (word_length > 32)
+ abort ();
+
+ /* For architectures with insns smaller than the insn-base-bitsize,
+ word_length may be too big. */
+ if (cd->min_insn_bitsize < cd->base_insn_bitsize)
+ {
+ if (word_offset == 0
+ && word_length > total_length)
+ word_length = total_length;
+ }
+
+ /* Does the value reside in INSN_VALUE, and at the right alignment? */
+
+ if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
+ {
+ if (CGEN_INSN_LSB0_P)
+ value = insn_value >> ((word_offset + start + 1) - length);
+ else
+ value = insn_value >> (total_length - ( word_offset + start + length));
+ }
+
+#if ! CGEN_INT_INSN_P
+
+ else
+ {
+ unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
+
+ if (word_length > 32)
+ abort ();
+
+ if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
+ return 0;
+
+ value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
+ }
+
+#endif /* ! CGEN_INT_INSN_P */
+
+ /* Written this way to avoid undefined behaviour. */
+ mask = (((1L << (length - 1)) - 1) << 1) | 1;
+
+ value &= mask;
+ /* sign extend? */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
+ && (value & (1L << (length - 1))))
+ value |= ~mask;
+
+ *valuep = value;
+
+ return 1;
+}
+
+/* Default insn extractor.
+
+ INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
+ The extracted fields are stored in FIELDS.
+ EX_INFO is used to handle reading variable length insns.
+ Return the length of the insn in bits, or 0 if no match,
+ or -1 if an error occurs fetching data (memory_error_func will have
+ been called). */
+
+static int
+extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN *insn;
+ CGEN_EXTRACT_INFO *ex_info;
+ CGEN_INSN_INT insn_value;
+ CGEN_FIELDS *fields;
+ bfd_vma pc;
+{
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ const CGEN_SYNTAX_CHAR_TYPE *syn;
+
+ CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
+
+ CGEN_INIT_EXTRACT (cd);
+
+ for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
+ {
+ int length;
+
+ if (CGEN_SYNTAX_CHAR_P (*syn))
+ continue;
+
+ length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
+ ex_info, insn_value, fields, pc);
+ if (length <= 0)
+ return length;
+ }
+
+ /* We recognized and successfully extracted this insn. */
+ return CGEN_INSN_BITSIZE (insn);
+}
+
+/* machine generated code added here */
+
+const char * iq2000_cgen_insert_operand
+ PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+
+/* Main entry point for operand insertion.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `parse_insn_normal', but keeping it
+ separate makes clear the interface between `parse_insn_normal' and each of
+ the handlers. It's also needed by GAS to insert operands that couldn't be
+ resolved during parsing. */
+
+const char *
+iq2000_cgen_insert_operand (cd, opindex, fields, buffer, pc)
+ CGEN_CPU_DESC cd;
+ int opindex;
+ CGEN_FIELDS * fields;
+ CGEN_INSN_BYTES_PTR buffer;
+ bfd_vma pc ATTRIBUTE_UNUSED;
+{
+ const char * errmsg = NULL;
+ unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
+
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ errmsg = insert_normal (cd, fields->f_bytecount, 0, 0, 7, 8, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ errmsg = insert_normal (cd, fields->f_cam_y, 0, 0, 2, 3, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ errmsg = insert_normal (cd, fields->f_cam_z, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ errmsg = insert_normal (cd, fields->f_cm_3func, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ errmsg = insert_normal (cd, fields->f_cm_3z, 0, 0, 1, 2, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ errmsg = insert_normal (cd, fields->f_cm_4func, 0, 0, 5, 4, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ errmsg = insert_normal (cd, fields->f_cm_4z, 0, 0, 2, 3, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_COUNT :
+ errmsg = insert_normal (cd, fields->f_count, 0, 0, 15, 7, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ errmsg = insert_normal (cd, fields->f_excode, 0, 0, 25, 20, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_HI16 :
+ errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_IMM :
+ errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_INDEX :
+ errmsg = insert_normal (cd, fields->f_index, 0, 0, 8, 9, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ {
+ long value = fields->f_jtarg;
+ value = ((unsigned int) (((value) & (262143))) >> (2));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 15, 16, 32, total_length, buffer);
+ }
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ {
+ long value = fields->f_jtargq10;
+ value = ((unsigned int) (((value) & (8388607))) >> (2));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 20, 21, 32, total_length, buffer);
+ }
+ break;
+ case IQ2000_OPERAND_LO16 :
+ errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_MASK :
+ errmsg = insert_normal (cd, fields->f_mask, 0, 0, 9, 4, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_MASKL :
+ errmsg = insert_normal (cd, fields->f_maskl, 0, 0, 4, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ errmsg = insert_normal (cd, fields->f_maskq10, 0, 0, 10, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_MASKR :
+ errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ {
+ long value = fields->f_offset;
+ value = ((int) (((value) - (pc))) >> (2));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, buffer);
+ }
+ break;
+ case IQ2000_OPERAND_RD :
+ errmsg = insert_normal (cd, fields->f_rd, 0, 0, 15, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ {
+{
+ FLD (f_rd) = FLD (f_rd_rs);
+ FLD (f_rs) = FLD (f_rd_rs);
+}
+ errmsg = insert_normal (cd, fields->f_rd, 0, 0, 15, 5, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ {
+{
+ FLD (f_rd) = FLD (f_rd_rt);
+ FLD (f_rt) = FLD (f_rd_rt);
+}
+ errmsg = insert_normal (cd, fields->f_rd, 0, 0, 15, 5, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case IQ2000_OPERAND_RS :
+ errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_RT :
+ errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ {
+{
+ FLD (f_rt) = FLD (f_rt_rs);
+ FLD (f_rs) = FLD (f_rt_rs);
+}
+ errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ errmsg = insert_normal (cd, fields->f_shamt, 0, 0, 10, 5, 32, total_length, buffer);
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
+ opindex);
+ abort ();
+ }
+
+ return errmsg;
+}
+
+int iq2000_cgen_extract_operand
+ PARAMS ((CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ CGEN_FIELDS *, bfd_vma));
+
+/* Main entry point for operand extraction.
+ The result is <= 0 for error, >0 for success.
+ ??? Actual values aren't well defined right now.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `print_insn_normal', but keeping it
+ separate makes clear the interface between `print_insn_normal' and each of
+ the handlers. */
+
+int
+iq2000_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
+ CGEN_CPU_DESC cd;
+ int opindex;
+ CGEN_EXTRACT_INFO *ex_info;
+ CGEN_INSN_INT insn_value;
+ CGEN_FIELDS * fields;
+ bfd_vma pc;
+{
+ /* Assume success (for those operands that are nops). */
+ int length = 1;
+ unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
+
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 8, 32, total_length, pc, & fields->f_bytecount);
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 32, total_length, pc, & fields->f_cam_y);
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cam_z);
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cm_3func);
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 2, 32, total_length, pc, & fields->f_cm_3z);
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 4, 32, total_length, pc, & fields->f_cm_4func);
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 32, total_length, pc, & fields->f_cm_4z);
+ break;
+ case IQ2000_OPERAND_COUNT :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 7, 32, total_length, pc, & fields->f_count);
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 20, 32, total_length, pc, & fields->f_excode);
+ break;
+ case IQ2000_OPERAND_HI16 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
+ break;
+ case IQ2000_OPERAND_IMM :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
+ break;
+ case IQ2000_OPERAND_INDEX :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 9, 32, total_length, pc, & fields->f_index);
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 15, 16, 32, total_length, pc, & value);
+ value = ((((pc) & (0xf0000000))) | (((value) << (2))));
+ fields->f_jtarg = value;
+ }
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 20, 21, 32, total_length, pc, & value);
+ value = ((((pc) & (0xf0000000))) | (((value) << (2))));
+ fields->f_jtargq10 = value;
+ }
+ break;
+ case IQ2000_OPERAND_LO16 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
+ break;
+ case IQ2000_OPERAND_MASK :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 4, 32, total_length, pc, & fields->f_mask);
+ break;
+ case IQ2000_OPERAND_MASKL :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 5, 32, total_length, pc, & fields->f_maskl);
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 5, 32, total_length, pc, & fields->f_maskq10);
+ break;
+ case IQ2000_OPERAND_MASKR :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, pc, & value);
+ value = ((((value) << (2))) + (((pc) + (4))));
+ fields->f_offset = value;
+ }
+ break;
+ case IQ2000_OPERAND_RD :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_rd);
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_rd);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
+ if (length <= 0) break;
+{
+ FLD (f_rd_rs) = FLD (f_rs);
+}
+ }
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_rd);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
+ if (length <= 0) break;
+{
+ FLD (f_rd_rt) = FLD (f_rt);
+}
+ }
+ break;
+ case IQ2000_OPERAND_RS :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
+ break;
+ case IQ2000_OPERAND_RT :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
+ if (length <= 0) break;
+{
+ FLD (f_rd_rs) = FLD (f_rs);
+}
+ }
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 5, 32, total_length, pc, & fields->f_shamt);
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
+ opindex);
+ abort ();
+ }
+
+ return length;
+}
+
+cgen_insert_fn * const iq2000_cgen_insert_handlers[] =
+{
+ insert_insn_normal,
+};
+
+cgen_extract_fn * const iq2000_cgen_extract_handlers[] =
+{
+ extract_insn_normal,
+};
+
+int iq2000_cgen_get_int_operand
+ PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
+bfd_vma iq2000_cgen_get_vma_operand
+ PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
+
+/* Getting values from cgen_fields is handled by a collection of functions.
+ They are distinguished by the type of the VALUE argument they return.
+ TODO: floating point, inlining support, remove cases where result type
+ not appropriate. */
+
+int
+iq2000_cgen_get_int_operand (cd, opindex, fields)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ int opindex;
+ const CGEN_FIELDS * fields;
+{
+ int value;
+
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ value = fields->f_rs;
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ value = fields->f_rt;
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ value = fields->f_bytecount;
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ value = fields->f_cam_y;
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ value = fields->f_cam_z;
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ value = fields->f_cm_3func;
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ value = fields->f_cm_3z;
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ value = fields->f_cm_4func;
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ value = fields->f_cm_4z;
+ break;
+ case IQ2000_OPERAND_COUNT :
+ value = fields->f_count;
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ value = fields->f_excode;
+ break;
+ case IQ2000_OPERAND_HI16 :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_IMM :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_INDEX :
+ value = fields->f_index;
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ value = fields->f_jtarg;
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ value = fields->f_jtargq10;
+ break;
+ case IQ2000_OPERAND_LO16 :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_MASK :
+ value = fields->f_mask;
+ break;
+ case IQ2000_OPERAND_MASKL :
+ value = fields->f_maskl;
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ value = fields->f_maskq10;
+ break;
+ case IQ2000_OPERAND_MASKR :
+ value = fields->f_rs;
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ value = fields->f_offset;
+ break;
+ case IQ2000_OPERAND_RD :
+ value = fields->f_rd;
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ value = fields->f_rd_rs;
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ value = fields->f_rd_rt;
+ break;
+ case IQ2000_OPERAND_RS :
+ value = fields->f_rs;
+ break;
+ case IQ2000_OPERAND_RT :
+ value = fields->f_rt;
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ value = fields->f_rt_rs;
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ value = fields->f_shamt;
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
+ opindex);
+ abort ();
+ }
+
+ return value;
+}
+
+bfd_vma
+iq2000_cgen_get_vma_operand (cd, opindex, fields)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ int opindex;
+ const CGEN_FIELDS * fields;
+{
+ bfd_vma value;
+
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ value = fields->f_rs;
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ value = fields->f_rt;
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ value = fields->f_bytecount;
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ value = fields->f_cam_y;
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ value = fields->f_cam_z;
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ value = fields->f_cm_3func;
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ value = fields->f_cm_3z;
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ value = fields->f_cm_4func;
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ value = fields->f_cm_4z;
+ break;
+ case IQ2000_OPERAND_COUNT :
+ value = fields->f_count;
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ value = fields->f_excode;
+ break;
+ case IQ2000_OPERAND_HI16 :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_IMM :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_INDEX :
+ value = fields->f_index;
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ value = fields->f_jtarg;
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ value = fields->f_jtargq10;
+ break;
+ case IQ2000_OPERAND_LO16 :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_MASK :
+ value = fields->f_mask;
+ break;
+ case IQ2000_OPERAND_MASKL :
+ value = fields->f_maskl;
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ value = fields->f_maskq10;
+ break;
+ case IQ2000_OPERAND_MASKR :
+ value = fields->f_rs;
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ value = fields->f_imm;
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ value = fields->f_offset;
+ break;
+ case IQ2000_OPERAND_RD :
+ value = fields->f_rd;
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ value = fields->f_rd_rs;
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ value = fields->f_rd_rt;
+ break;
+ case IQ2000_OPERAND_RS :
+ value = fields->f_rs;
+ break;
+ case IQ2000_OPERAND_RT :
+ value = fields->f_rt;
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ value = fields->f_rt_rs;
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ value = fields->f_shamt;
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
+ opindex);
+ abort ();
+ }
+
+ return value;
+}
+
+void iq2000_cgen_set_int_operand
+ PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, int));
+void iq2000_cgen_set_vma_operand
+ PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma));
+
+/* Stuffing values in cgen_fields is handled by a collection of functions.
+ They are distinguished by the type of the VALUE argument they accept.
+ TODO: floating point, inlining support, remove cases where argument type
+ not appropriate. */
+
+void
+iq2000_cgen_set_int_operand (cd, opindex, fields, value)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ int opindex;
+ CGEN_FIELDS * fields;
+ int value;
+{
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ fields->f_rs = value;
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ fields->f_rt = value;
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ fields->f_bytecount = value;
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ fields->f_cam_y = value;
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ fields->f_cam_z = value;
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ fields->f_cm_3func = value;
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ fields->f_cm_3z = value;
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ fields->f_cm_4func = value;
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ fields->f_cm_4z = value;
+ break;
+ case IQ2000_OPERAND_COUNT :
+ fields->f_count = value;
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ fields->f_excode = value;
+ break;
+ case IQ2000_OPERAND_HI16 :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_IMM :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_INDEX :
+ fields->f_index = value;
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ fields->f_jtarg = value;
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ fields->f_jtargq10 = value;
+ break;
+ case IQ2000_OPERAND_LO16 :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_MASK :
+ fields->f_mask = value;
+ break;
+ case IQ2000_OPERAND_MASKL :
+ fields->f_maskl = value;
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ fields->f_maskq10 = value;
+ break;
+ case IQ2000_OPERAND_MASKR :
+ fields->f_rs = value;
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ fields->f_offset = value;
+ break;
+ case IQ2000_OPERAND_RD :
+ fields->f_rd = value;
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ fields->f_rd_rs = value;
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ fields->f_rd_rt = value;
+ break;
+ case IQ2000_OPERAND_RS :
+ fields->f_rs = value;
+ break;
+ case IQ2000_OPERAND_RT :
+ fields->f_rt = value;
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ fields->f_rt_rs = value;
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ fields->f_shamt = value;
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
+ opindex);
+ abort ();
+ }
+}
+
+void
+iq2000_cgen_set_vma_operand (cd, opindex, fields, value)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ int opindex;
+ CGEN_FIELDS * fields;
+ bfd_vma value;
+{
+ switch (opindex)
+ {
+ case IQ2000_OPERAND_BASE :
+ fields->f_rs = value;
+ break;
+ case IQ2000_OPERAND_BASEOFF :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_BITNUM :
+ fields->f_rt = value;
+ break;
+ case IQ2000_OPERAND_BYTECOUNT :
+ fields->f_bytecount = value;
+ break;
+ case IQ2000_OPERAND_CAM_Y :
+ fields->f_cam_y = value;
+ break;
+ case IQ2000_OPERAND_CAM_Z :
+ fields->f_cam_z = value;
+ break;
+ case IQ2000_OPERAND_CM_3FUNC :
+ fields->f_cm_3func = value;
+ break;
+ case IQ2000_OPERAND_CM_3Z :
+ fields->f_cm_3z = value;
+ break;
+ case IQ2000_OPERAND_CM_4FUNC :
+ fields->f_cm_4func = value;
+ break;
+ case IQ2000_OPERAND_CM_4Z :
+ fields->f_cm_4z = value;
+ break;
+ case IQ2000_OPERAND_COUNT :
+ fields->f_count = value;
+ break;
+ case IQ2000_OPERAND_EXECODE :
+ fields->f_excode = value;
+ break;
+ case IQ2000_OPERAND_HI16 :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_IMM :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_INDEX :
+ fields->f_index = value;
+ break;
+ case IQ2000_OPERAND_JMPTARG :
+ fields->f_jtarg = value;
+ break;
+ case IQ2000_OPERAND_JMPTARGQ10 :
+ fields->f_jtargq10 = value;
+ break;
+ case IQ2000_OPERAND_LO16 :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_MASK :
+ fields->f_mask = value;
+ break;
+ case IQ2000_OPERAND_MASKL :
+ fields->f_maskl = value;
+ break;
+ case IQ2000_OPERAND_MASKQ10 :
+ fields->f_maskq10 = value;
+ break;
+ case IQ2000_OPERAND_MASKR :
+ fields->f_rs = value;
+ break;
+ case IQ2000_OPERAND_MLO16 :
+ fields->f_imm = value;
+ break;
+ case IQ2000_OPERAND_OFFSET :
+ fields->f_offset = value;
+ break;
+ case IQ2000_OPERAND_RD :
+ fields->f_rd = value;
+ break;
+ case IQ2000_OPERAND_RD_RS :
+ fields->f_rd_rs = value;
+ break;
+ case IQ2000_OPERAND_RD_RT :
+ fields->f_rd_rt = value;
+ break;
+ case IQ2000_OPERAND_RS :
+ fields->f_rs = value;
+ break;
+ case IQ2000_OPERAND_RT :
+ fields->f_rt = value;
+ break;
+ case IQ2000_OPERAND_RT_RS :
+ fields->f_rt_rs = value;
+ break;
+ case IQ2000_OPERAND_SHAMT :
+ fields->f_shamt = value;
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
+ opindex);
+ abort ();
+ }
+}
+
+/* Function to call before using the instruction builder tables. */
+
+void
+iq2000_cgen_init_ibld_table (cd)
+ CGEN_CPU_DESC cd;
+{
+ cd->insert_handlers = & iq2000_cgen_insert_handlers[0];
+ cd->extract_handlers = & iq2000_cgen_extract_handlers[0];
+
+ cd->insert_operand = iq2000_cgen_insert_operand;
+ cd->extract_operand = iq2000_cgen_extract_operand;
+
+ cd->get_int_operand = iq2000_cgen_get_int_operand;
+ cd->set_int_operand = iq2000_cgen_set_int_operand;
+ cd->get_vma_operand = iq2000_cgen_get_vma_operand;
+ cd->set_vma_operand = iq2000_cgen_set_vma_operand;
+}
diff --git a/opcodes/iq2000-opc.c b/opcodes/iq2000-opc.c
new file mode 100644
index 00000000000..fe8cf641502
--- /dev/null
+++ b/opcodes/iq2000-opc.c
@@ -0,0 +1,3482 @@
+/* Instruction opcode table for iq2000.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "sysdep.h"
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "iq2000-desc.h"
+#include "iq2000-opc.h"
+#include "libiberty.h"
+
+/* The hash functions are recorded here to help keep assembler code out of
+ the disassembler and vice versa. */
+
+static int asm_hash_insn_p PARAMS ((const CGEN_INSN *));
+static unsigned int asm_hash_insn PARAMS ((const char *));
+static int dis_hash_insn_p PARAMS ((const CGEN_INSN *));
+static unsigned int dis_hash_insn PARAMS ((const char *, CGEN_INSN_INT));
+
+/* Instruction formats. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define F(f) & iq2000_cgen_ifld_table[IQ2000_##f]
+#else
+#define F(f) & iq2000_cgen_ifld_table[IQ2000_/**/f]
+#endif
+static const CGEN_IFMT ifmt_empty = {
+ 0, 0, 0x0, { { 0 } }
+};
+
+static const CGEN_IFMT ifmt_add2 = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RT) }, { F (F_RD_RS) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_add = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_addi2 = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RT_RS) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_addi = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_ram = {
+ 32, 32, 0xfc000020, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_5) }, { F (F_MASKL) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sll = {
+ 32, 32, 0xffe0003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sllv2 = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RD_RT) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_slmv2 = {
+ 32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RD_RT) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_slmv = {
+ 32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_slti2 = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RT_RS) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_slti = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sra2 = {
+ 32, 32, 0xffe0003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RD_RT) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bbi = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bbv = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bgez = {
+ 32, 32, 0xfc1f0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jalr = {
+ 32, 32, 0xfc1f07ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jr = {
+ 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lb = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lui = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_break = {
+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_syscall = {
+ 32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_EXCODE) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_andoui = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_andoui2 = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RT_RS) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mrgb = {
+ 32, 32, 0xfc00043f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_10) }, { F (F_MASK) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mrgb2 = {
+ 32, 32, 0xfc00043f, { { F (F_OPCODE) }, { F (F_RT) }, { F (F_RD_RS) }, { F (F_10) }, { F (F_MASK) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bc0f = {
+ 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cfc0 = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_10_11) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_chkhdr = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lulck = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_pkrlr1 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_COUNT) }, { F (F_INDEX) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_rfe = {
+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_25) }, { F (F_24_19) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_j = {
+ 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_RSRVD) }, { F (F_JTARG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mrgbq10 = {
+ 32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_MASKQ10) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mrgbq102 = {
+ 32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RT) }, { F (F_RD_RS) }, { F (F_MASKQ10) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jq10 = {
+ 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_JTARG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jalq10 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_JTARG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_avail = {
+ 32, 32, 0xffff07ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_rbi = {
+ 32, 32, 0xfc000700, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cam36 = {
+ 32, 32, 0xffe007c0, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cm32and = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cm32rd = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cm128ria3 = {
+ 32, 32, 0xfc0007fc, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_4FUNC) }, { F (F_CM_3Z) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cm128ria4 = {
+ 32, 32, 0xfc0007f8, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_3FUNC) }, { F (F_CM_4Z) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_ctc = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+#undef F
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_INSN_##a)
+#else
+#define A(a) (1 << CGEN_INSN_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) IQ2000_OPERAND_##op
+#else
+#define OPERAND(op) IQ2000_OPERAND_/**/op
+#endif
+#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+
+/* The instruction table. */
+
+static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
+{
+ /* Special null first entry.
+ A `num' value of zero is thus invalid.
+ Also, the special `invalid' insn resides here. */
+ { { 0, 0, 0, 0 }, {{0}}, 0, {0}},
+/* add ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x20 }
+ },
+/* add $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x20 }
+ },
+/* addi ${rt-rs},$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
+ & ifmt_addi2, { 0x20000000 }
+ },
+/* addi $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_addi, { 0x20000000 }
+ },
+/* addiu ${rt-rs},$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
+ & ifmt_addi2, { 0x24000000 }
+ },
+/* addiu $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_addi, { 0x24000000 }
+ },
+/* addu ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x21 }
+ },
+/* addu $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x21 }
+ },
+/* ado16 ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x29 }
+ },
+/* ado16 $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x29 }
+ },
+/* and ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x24 }
+ },
+/* and $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x24 }
+ },
+/* andi ${rt-rs},$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
+ & ifmt_addi2, { 0x30000000 }
+ },
+/* andi $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_addi, { 0x30000000 }
+ },
+/* andoi ${rt-rs},$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
+ & ifmt_addi2, { 0xb0000000 }
+ },
+/* andoi $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_addi, { 0xb0000000 }
+ },
+/* nor ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x27 }
+ },
+/* nor $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x27 }
+ },
+/* or ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x25 }
+ },
+/* or $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x25 }
+ },
+/* ori ${rt-rs},$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
+ & ifmt_addi2, { 0x34000000 }
+ },
+/* ori $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_addi, { 0x34000000 }
+ },
+/* ram $rd,$rt,$shamt,$maskl,$maskr */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), ',', OP (MASKL), ',', OP (MASKR), 0 } },
+ & ifmt_ram, { 0x9c000000 }
+ },
+/* sll $rd,$rt,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), 0 } },
+ & ifmt_sll, { 0x0 }
+ },
+/* sllv ${rd-rt},$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RT), ',', OP (RS), 0 } },
+ & ifmt_sllv2, { 0x4 }
+ },
+/* sllv $rd,$rt,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
+ & ifmt_add, { 0x4 }
+ },
+/* slmv ${rd-rt},$rs,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
+ & ifmt_slmv2, { 0x1 }
+ },
+/* slmv $rd,$rt,$rs,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
+ & ifmt_slmv, { 0x1 }
+ },
+/* slt ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x2a }
+ },
+/* slt $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x2a }
+ },
+/* slti ${rt-rs},$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (IMM), 0 } },
+ & ifmt_slti2, { 0x28000000 }
+ },
+/* slti $rt,$rs,$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
+ & ifmt_slti, { 0x28000000 }
+ },
+/* sltiu ${rt-rs},$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (IMM), 0 } },
+ & ifmt_slti2, { 0x2c000000 }
+ },
+/* sltiu $rt,$rs,$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
+ & ifmt_slti, { 0x2c000000 }
+ },
+/* sltu ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x2b }
+ },
+/* sltu $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x2b }
+ },
+/* sra ${rd-rt},$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RT), ',', OP (SHAMT), 0 } },
+ & ifmt_sra2, { 0x3 }
+ },
+/* sra $rd,$rt,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), 0 } },
+ & ifmt_sll, { 0x3 }
+ },
+/* srav ${rd-rt},$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RT), ',', OP (RS), 0 } },
+ & ifmt_sllv2, { 0x7 }
+ },
+/* srav $rd,$rt,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
+ & ifmt_add, { 0x7 }
+ },
+/* srl $rd,$rt,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), 0 } },
+ & ifmt_sll, { 0x2 }
+ },
+/* srlv ${rd-rt},$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RT), ',', OP (RS), 0 } },
+ & ifmt_sllv2, { 0x6 }
+ },
+/* srlv $rd,$rt,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
+ & ifmt_add, { 0x6 }
+ },
+/* srmv ${rd-rt},$rs,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
+ & ifmt_slmv2, { 0x5 }
+ },
+/* srmv $rd,$rt,$rs,$shamt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
+ & ifmt_slmv, { 0x5 }
+ },
+/* sub ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x22 }
+ },
+/* sub $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x22 }
+ },
+/* subu ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x23 }
+ },
+/* subu $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x23 }
+ },
+/* xor ${rd-rs},$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
+ & ifmt_add2, { 0x26 }
+ },
+/* xor $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x26 }
+ },
+/* xori ${rt-rs},$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
+ & ifmt_addi2, { 0x38000000 }
+ },
+/* xori $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_addi, { 0x38000000 }
+ },
+/* bbi $rs($bitnum),$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
+ & ifmt_bbi, { 0x70000000 }
+ },
+/* bbin $rs($bitnum),$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
+ & ifmt_bbi, { 0x78000000 }
+ },
+/* bbv $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x74000000 }
+ },
+/* bbvn $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x7c000000 }
+ },
+/* beq $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x10000000 }
+ },
+/* beql $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x50000000 }
+ },
+/* bgez $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4010000 }
+ },
+/* bgezal $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4110000 }
+ },
+/* bgezall $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4130000 }
+ },
+/* bgezl $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4030000 }
+ },
+/* bltz $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4000000 }
+ },
+/* bltzl $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4020000 }
+ },
+/* bltzal $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4100000 }
+ },
+/* bltzall $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4120000 }
+ },
+/* bmb0 $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x60000000 }
+ },
+/* bmb1 $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x64000000 }
+ },
+/* bmb2 $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x68000000 }
+ },
+/* bmb3 $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x6c000000 }
+ },
+/* bne $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x14000000 }
+ },
+/* bnel $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x54000000 }
+ },
+/* jalr $rd,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
+ & ifmt_jalr, { 0x9 }
+ },
+/* jr $rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), 0 } },
+ & ifmt_jr, { 0x8 }
+ },
+/* lb $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0x80000000 }
+ },
+/* lbu $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0x90000000 }
+ },
+/* lh $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0x84000000 }
+ },
+/* lhu $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0x94000000 }
+ },
+/* lui $rt,$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (HI16), 0 } },
+ & ifmt_lui, { 0x3c000000 }
+ },
+/* lw $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0x8c000000 }
+ },
+/* sb $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0xa0000000 }
+ },
+/* sh $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0xa4000000 }
+ },
+/* sw $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0xac000000 }
+ },
+/* break */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_break, { 0xd }
+ },
+/* syscall */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_syscall, { 0xc }
+ },
+/* andoui $rt,$rs,$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui, { 0xfc000000 }
+ },
+/* andoui ${rt-rs},$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui2, { 0xfc000000 }
+ },
+/* orui ${rt-rs},$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui2, { 0xbc000000 }
+ },
+/* orui $rt,$rs,$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui, { 0xbc000000 }
+ },
+/* bgtz $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x1c000000 }
+ },
+/* bgtzl $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x5c000000 }
+ },
+/* blez $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x18000000 }
+ },
+/* blezl $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x58000000 }
+ },
+/* mrgb $rd,$rs,$rt,$mask */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (MASK), 0 } },
+ & ifmt_mrgb, { 0x2d }
+ },
+/* mrgb ${rd-rs},$rt,$mask */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), ',', OP (MASK), 0 } },
+ & ifmt_mrgb2, { 0x2d }
+ },
+/* bctxt $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4060000 }
+ },
+/* bc0f $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x41000000 }
+ },
+/* bc0fl $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x41020000 }
+ },
+/* bc3f $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x4d000000 }
+ },
+/* bc3fl $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x4d020000 }
+ },
+/* bc0t $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x41010000 }
+ },
+/* bc0tl $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x41030000 }
+ },
+/* bc3t $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x4d010000 }
+ },
+/* bc3tl $offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (OFFSET), 0 } },
+ & ifmt_bc0f, { 0x4d030000 }
+ },
+/* cfc0 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x40400000 }
+ },
+/* cfc1 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x44400000 }
+ },
+/* cfc2 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x48400000 }
+ },
+/* cfc3 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x4c400000 }
+ },
+/* chkhdr $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4d200000 }
+ },
+/* ctc0 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x40c00000 }
+ },
+/* ctc1 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x44c00000 }
+ },
+/* ctc2 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x48c00000 }
+ },
+/* ctc3 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x4cc00000 }
+ },
+/* jcr $rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), 0 } },
+ & ifmt_jr, { 0xa }
+ },
+/* luc32 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200003 }
+ },
+/* luc32l $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200007 }
+ },
+/* luc64 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x4820000b }
+ },
+/* luc64l $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x4820000f }
+ },
+/* luk $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200008 }
+ },
+/* lulck $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_lulck, { 0x48200004 }
+ },
+/* lum32 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200002 }
+ },
+/* lum32l $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200006 }
+ },
+/* lum64 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x4820000a }
+ },
+/* lum64l $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x4820000e }
+ },
+/* lur $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200001 }
+ },
+/* lurl $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200005 }
+ },
+/* luulck $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_lulck, { 0x48200000 }
+ },
+/* mfc0 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x40000000 }
+ },
+/* mfc1 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x44000000 }
+ },
+/* mfc2 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x48000000 }
+ },
+/* mfc3 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x4c000000 }
+ },
+/* mtc0 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x40800000 }
+ },
+/* mtc1 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x44800000 }
+ },
+/* mtc2 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x48800000 }
+ },
+/* mtc3 $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_cfc0, { 0x4c800000 }
+ },
+/* pkrl $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200007 }
+ },
+/* pkrlr1 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4fa00000 }
+ },
+/* pkrlr30 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4fe00000 }
+ },
+/* rb $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200004 }
+ },
+/* rbr1 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4f000000 }
+ },
+/* rbr30 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4f400000 }
+ },
+/* rfe */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_rfe, { 0x42000010 }
+ },
+/* rx $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200006 }
+ },
+/* rxr1 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4f800000 }
+ },
+/* rxr30 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4fc00000 }
+ },
+/* sleep */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_syscall, { 0xe }
+ },
+/* srrd $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_lulck, { 0x48200010 }
+ },
+/* srrdl $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_lulck, { 0x48200014 }
+ },
+/* srulck $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_lulck, { 0x48200016 }
+ },
+/* srwr $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200011 }
+ },
+/* srwru $rt,$rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
+ & ifmt_chkhdr, { 0x48200015 }
+ },
+/* trapqfl */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_break, { 0x4c200008 }
+ },
+/* trapqne */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_break, { 0x4c200009 }
+ },
+/* traprel $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_lulck, { 0x4c20000a }
+ },
+/* wb $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200000 }
+ },
+/* wbu $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200001 }
+ },
+/* wbr1 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4e000000 }
+ },
+/* wbr1u $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4e200000 }
+ },
+/* wbr30 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4e400000 }
+ },
+/* wbr30u $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4e600000 }
+ },
+/* wx $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200002 }
+ },
+/* wxu $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c200003 }
+ },
+/* wxr1 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4e800000 }
+ },
+/* wxr1u $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4ea00000 }
+ },
+/* wxr30 $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4ec00000 }
+ },
+/* wxr30u $rt,$index,$count */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ & ifmt_pkrlr1, { 0x4ee00000 }
+ },
+/* ldw $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0xc0000000 }
+ },
+/* sdw $rt,$lo16($base) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
+ & ifmt_lb, { 0xe0000000 }
+ },
+/* j $jmptarg */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (JMPTARG), 0 } },
+ & ifmt_j, { 0x8000000 }
+ },
+/* jal $jmptarg */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (JMPTARG), 0 } },
+ & ifmt_j, { 0xc000000 }
+ },
+/* bmb $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0xb4000000 }
+ },
+/* andoui $rt,$rs,$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui, { 0xbc000000 }
+ },
+/* andoui ${rt-rs},$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui2, { 0xbc000000 }
+ },
+/* orui $rt,$rs,$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui, { 0x3c000000 }
+ },
+/* orui ${rt-rs},$hi16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
+ & ifmt_andoui2, { 0x3c000000 }
+ },
+/* mrgb $rd,$rs,$rt,$maskq10 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (MASKQ10), 0 } },
+ & ifmt_mrgbq10, { 0x2d }
+ },
+/* mrgb ${rd-rs},$rt,$maskq10 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD_RS), ',', OP (RT), ',', OP (MASKQ10), 0 } },
+ & ifmt_mrgbq102, { 0x2d }
+ },
+/* j $jmptarg */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (JMPTARG), 0 } },
+ & ifmt_jq10, { 0x8000000 }
+ },
+/* jal $rt,$jmptarg */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (JMPTARG), 0 } },
+ & ifmt_jalq10, { 0xc000000 }
+ },
+/* jal $jmptarg */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (JMPTARG), 0 } },
+ & ifmt_jq10, { 0xc1f0000 }
+ },
+/* bbil $rs($bitnum),$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
+ & ifmt_bbi, { 0xf0000000 }
+ },
+/* bbinl $rs($bitnum),$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
+ & ifmt_bbi, { 0xf8000000 }
+ },
+/* bbvl $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0xf4000000 }
+ },
+/* bbvnl $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0xfc000000 }
+ },
+/* bgtzal $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4150000 }
+ },
+/* bgtzall $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4170000 }
+ },
+/* blezal $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4140000 }
+ },
+/* blezall $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4160000 }
+ },
+/* bgtz $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4050000 }
+ },
+/* bgtzl $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4070000 }
+ },
+/* blez $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4040000 }
+ },
+/* blezl $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4060000 }
+ },
+/* bmb $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x18000000 }
+ },
+/* bmbl $rs,$rt,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
+ & ifmt_bbv, { 0x58000000 }
+ },
+/* bri $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4080000 }
+ },
+/* brv $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x4090000 }
+ },
+/* bctx $rs,$offset */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
+ & ifmt_bgez, { 0x40c0000 }
+ },
+/* yield */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_break, { 0xe }
+ },
+/* crc32 $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000014 }
+ },
+/* crc32b $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000015 }
+ },
+/* cnt1s $rd,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
+ & ifmt_add, { 0x2e }
+ },
+/* avail $rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), 0 } },
+ & ifmt_avail, { 0x4c000024 }
+ },
+/* free $rd,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
+ & ifmt_jalr, { 0x4c000025 }
+ },
+/* tstod $rd,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
+ & ifmt_jalr, { 0x4c000027 }
+ },
+/* cmphdr $rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), 0 } },
+ & ifmt_avail, { 0x4c00002c }
+ },
+/* mcid $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c000020 }
+ },
+/* dba $rd */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), 0 } },
+ & ifmt_avail, { 0x4c000022 }
+ },
+/* dbd $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000021 }
+ },
+/* dpwt $rd,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
+ & ifmt_jalr, { 0x4c000023 }
+ },
+/* chkhdr $rd,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
+ & ifmt_jalr, { 0x4c000026 }
+ },
+/* rba $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000008 }
+ },
+/* rbal $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000009 }
+ },
+/* rbar $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c00000a }
+ },
+/* wba $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000010 }
+ },
+/* wbau $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000011 }
+ },
+/* wbac $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000012 }
+ },
+/* rbi $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x4c000200 }
+ },
+/* rbil $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x4c000300 }
+ },
+/* rbir $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x4c000100 }
+ },
+/* wbi $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x4c000600 }
+ },
+/* wbic $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x4c000500 }
+ },
+/* wbiu $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x4c000700 }
+ },
+/* pkrli $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x48000000 }
+ },
+/* pkrlih $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x48000200 }
+ },
+/* pkrliu $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x48000100 }
+ },
+/* pkrlic $rd,$rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_rbi, { 0x48000300 }
+ },
+/* pkrla $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000028 }
+ },
+/* pkrlau $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000029 }
+ },
+/* pkrlah $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c00002a }
+ },
+/* pkrlac $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c00002b }
+ },
+/* lock $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c000001 }
+ },
+/* unlk $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c000003 }
+ },
+/* swrd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c000004 }
+ },
+/* swrdl $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c000005 }
+ },
+/* swwr $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000006 }
+ },
+/* swwru $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c000007 }
+ },
+/* dwrd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c00000c }
+ },
+/* dwrdl $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c00000d }
+ },
+/* cam36 $rd,$rt,${cam-z},${cam-y} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), ',', OP (CAM_Y), 0 } },
+ & ifmt_cam36, { 0x4c000400 }
+ },
+/* cam72 $rd,$rt,${cam-y},${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Y), ',', OP (CAM_Z), 0 } },
+ & ifmt_cam36, { 0x4c000440 }
+ },
+/* cam144 $rd,$rt,${cam-y},${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Y), ',', OP (CAM_Z), 0 } },
+ & ifmt_cam36, { 0x4c000480 }
+ },
+/* cam288 $rd,$rt,${cam-y},${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Y), ',', OP (CAM_Z), 0 } },
+ & ifmt_cam36, { 0x4c0004c0 }
+ },
+/* cm32and $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000ab }
+ },
+/* cm32andn $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000a3 }
+ },
+/* cm32or $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000aa }
+ },
+/* cm32ra $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c0000b0 }
+ },
+/* cm32rd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c0000a1 }
+ },
+/* cm32ri $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c0000a4 }
+ },
+/* cm32rs $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_add, { 0x4c0000a0 }
+ },
+/* cm32sa $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000b8 }
+ },
+/* cm32sd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c0000a9 }
+ },
+/* cm32si $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c0000ac }
+ },
+/* cm32ss $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000a8 }
+ },
+/* cm32xor $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000a2 }
+ },
+/* cm64clr $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c000085 }
+ },
+/* cm64ra $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c000090 }
+ },
+/* cm64rd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c000081 }
+ },
+/* cm64ri $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c000084 }
+ },
+/* cm64ria2 $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c000094 }
+ },
+/* cm64rs $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c000080 }
+ },
+/* cm64sa $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c000098 }
+ },
+/* cm64sd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c000089 }
+ },
+/* cm64si $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_cm32rd, { 0x4c00008c }
+ },
+/* cm64sia2 $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c00009c }
+ },
+/* cm64ss $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c000088 }
+ },
+/* cm128ria2 $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c000095 }
+ },
+/* cm128ria3 $rd,$rs,$rt,${cm-3z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
+ & ifmt_cm128ria3, { 0x4c000090 }
+ },
+/* cm128ria4 $rd,$rs,$rt,${cm-4z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
+ & ifmt_cm128ria4, { 0x4c0000b0 }
+ },
+/* cm128sia2 $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c00009d }
+ },
+/* cm128sia3 $rd,$rs,$rt,${cm-3z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
+ & ifmt_cm128ria3, { 0x4c000098 }
+ },
+/* cm128sia4 $rd,$rs,$rt,${cm-4z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
+ & ifmt_cm128ria4, { 0x4c0000b8 }
+ },
+/* cm128vsa $rd,$rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_cm32and, { 0x4c0000a6 }
+ },
+/* cfc $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_chkhdr, { 0x4c000000 }
+ },
+/* ctc $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_ctc, { 0x4c000002 }
+ },
+};
+
+#undef A
+#undef OPERAND
+#undef MNEM
+#undef OP
+
+/* Formats for ALIAS macro-insns. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define F(f) & iq2000_cgen_ifld_table[IQ2000_##f]
+#else
+#define F(f) & iq2000_cgen_ifld_table[IQ2000_/**/f]
+#endif
+static const CGEN_IFMT ifmt_nop = {
+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_li = {
+ 32, 32, 0xfc1f0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_move = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lb_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lbu_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lh_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lw_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_add = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_addu = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_and = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_j = {
+ 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_or = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_sll = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_slt = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_sltu = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_sra = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_srl = {
+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_not = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_subi = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_sub = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_subu = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sb_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sh_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_xor = {
+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_ldw_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sdw_base_0 = {
+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_avail = {
+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cam36 = {
+ 32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cam72 = {
+ 32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cam144 = {
+ 32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cam288 = {
+ 32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32read = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64read = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32mlog = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32and = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32andn = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32or = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32ra = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32rd = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32ri = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32rs = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32sa = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32sd = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32si = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32ss = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm32xor = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64clr = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64ra = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64rd = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64ri = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64ria2 = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64rs = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64sa = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64sd = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64si = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64sia2 = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm64ss = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm128ria2 = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm128ria3 = {
+ 32, 32, 0xfc00fffc, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_4FUNC) }, { F (F_CM_3Z) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm128ria4 = {
+ 32, 32, 0xfc00fff8, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_3FUNC) }, { F (F_CM_4Z) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm128sia2 = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm128sia3 = {
+ 32, 32, 0xfc00fffc, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_4FUNC) }, { F (F_CM_3Z) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cm128sia4 = {
+ 32, 32, 0xfc00fff8, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_3FUNC) }, { F (F_CM_4Z) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_cmphdr = {
+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_dbd = {
+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m2_dbd = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_dpwt = {
+ 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_free = {
+ 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_lock = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrla = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrlac = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrlah = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrlau = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrli = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrlic = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrlih = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_pkrliu = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_rba = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_rbal = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_rbar = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_rbi = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_rbil = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_rbir = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_swwr = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_swwru = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_tstod = {
+ 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_unlk = {
+ 32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_wba = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_wbac = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_wbau = {
+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_wbi = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_wbic = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_m_wbiu = {
+ 32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
+};
+
+#undef F
+
+/* Each non-simple macro entry points to an array of expansion possibilities. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_INSN_##a)
+#else
+#define A(a) (1 << CGEN_INSN_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) IQ2000_OPERAND_##op
+#else
+#define OPERAND(op) IQ2000_OPERAND_/**/op
+#endif
+#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+
+/* The macro instruction table. */
+
+static const CGEN_IBASE iq2000_cgen_macro_insn_table[] =
+{
+/* nop */
+ {
+ -1, "nop", "nop", 32,
+ { 0|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* li $rs,$imm */
+ {
+ -1, "li", "li", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* move $rd,$rt */
+ {
+ -1, "move", "move", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* lb $rt,$lo16 */
+ {
+ -1, "lb-base-0", "lb", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* lbu $rt,$lo16 */
+ {
+ -1, "lbu-base-0", "lbu", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* lh $rt,$lo16 */
+ {
+ -1, "lh-base-0", "lh", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* lw $rt,$lo16 */
+ {
+ -1, "lw-base-0", "lw", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* add $rt,$rs,$lo16 */
+ {
+ -1, "m-add", "add", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* addu $rt,$rs,$lo16 */
+ {
+ -1, "m-addu", "addu", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* and $rt,$rs,$lo16 */
+ {
+ -1, "m-and", "and", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* j $rs */
+ {
+ -1, "m-j", "j", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* or $rt,$rs,$lo16 */
+ {
+ -1, "m-or", "or", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sll $rd,$rt,$rs */
+ {
+ -1, "m-sll", "sll", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* slt $rt,$rs,$imm */
+ {
+ -1, "m-slt", "slt", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sltu $rt,$rs,$imm */
+ {
+ -1, "m-sltu", "sltu", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sra $rd,$rt,$rs */
+ {
+ -1, "m-sra", "sra", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* srl $rd,$rt,$rs */
+ {
+ -1, "m-srl", "srl", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* not $rd,$rt */
+ {
+ -1, "not", "not", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* subi $rt,$rs,$mlo16 */
+ {
+ -1, "subi", "subi", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sub $rt,$rs,$mlo16 */
+ {
+ -1, "m-sub", "sub", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* subu $rt,$rs,$mlo16 */
+ {
+ -1, "m-subu", "subu", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sb $rt,$lo16 */
+ {
+ -1, "sb-base-0", "sb", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sh $rt,$lo16 */
+ {
+ -1, "sh-base-0", "sh", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* sw $rt,$lo16 */
+ {
+ -1, "sw-base-0", "sw", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* xor $rt,$rs,$lo16 */
+ {
+ -1, "m-xor", "xor", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
+ },
+/* ldw $rt,$lo16 */
+ {
+ -1, "ldw-base-0", "ldw", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(LOAD_DELAY)|A(EVEN_REG_NUM)|A(ALIAS), { (1<<MACH_IQ2000) } }
+ },
+/* sdw $rt,$lo16 */
+ {
+ -1, "sdw-base-0", "sdw", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(EVEN_REG_NUM)|A(ALIAS), { (1<<MACH_IQ2000) } }
+ },
+/* avail */
+ {
+ -1, "m-avail", "avail", 32,
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cam36 $rd,$rt,${cam-z} */
+ {
+ -1, "m-cam36", "cam36", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cam72 $rd,$rt,${cam-z} */
+ {
+ -1, "m-cam72", "cam72", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cam144 $rd,$rt,${cam-z} */
+ {
+ -1, "m-cam144", "cam144", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cam288 $rd,$rt,${cam-z} */
+ {
+ -1, "m-cam288", "cam288", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32read $rd,$rt */
+ {
+ -1, "m-cm32read", "cm32read", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64read $rd,$rt */
+ {
+ -1, "m-cm64read", "cm64read", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32mlog $rs,$rt */
+ {
+ -1, "m-cm32mlog", "cm32mlog", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32and $rs,$rt */
+ {
+ -1, "m-cm32and", "cm32and", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32andn $rs,$rt */
+ {
+ -1, "m-cm32andn", "cm32andn", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32or $rs,$rt */
+ {
+ -1, "m-cm32or", "cm32or", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32ra $rs,$rt */
+ {
+ -1, "m-cm32ra", "cm32ra", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32rd $rt */
+ {
+ -1, "m-cm32rd", "cm32rd", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32ri $rt */
+ {
+ -1, "m-cm32ri", "cm32ri", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32rs $rs,$rt */
+ {
+ -1, "m-cm32rs", "cm32rs", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32sa $rs,$rt */
+ {
+ -1, "m-cm32sa", "cm32sa", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32sd $rt */
+ {
+ -1, "m-cm32sd", "cm32sd", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32si $rt */
+ {
+ -1, "m-cm32si", "cm32si", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32ss $rs,$rt */
+ {
+ -1, "m-cm32ss", "cm32ss", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm32xor $rs,$rt */
+ {
+ -1, "m-cm32xor", "cm32xor", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64clr $rt */
+ {
+ -1, "m-cm64clr", "cm64clr", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64ra $rs,$rt */
+ {
+ -1, "m-cm64ra", "cm64ra", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64rd $rt */
+ {
+ -1, "m-cm64rd", "cm64rd", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64ri $rt */
+ {
+ -1, "m-cm64ri", "cm64ri", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64ria2 $rs,$rt */
+ {
+ -1, "m-cm64ria2", "cm64ria2", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64rs $rs,$rt */
+ {
+ -1, "m-cm64rs", "cm64rs", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64sa $rs,$rt */
+ {
+ -1, "m-cm64sa", "cm64sa", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64sd $rt */
+ {
+ -1, "m-cm64sd", "cm64sd", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64si $rt */
+ {
+ -1, "m-cm64si", "cm64si", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64sia2 $rs,$rt */
+ {
+ -1, "m-cm64sia2", "cm64sia2", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm64ss $rs,$rt */
+ {
+ -1, "m-cm64ss", "cm64ss", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm128ria2 $rs,$rt */
+ {
+ -1, "m-cm128ria2", "cm128ria2", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm128ria3 $rs,$rt,${cm-3z} */
+ {
+ -1, "m-cm128ria3", "cm128ria3", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm128ria4 $rs,$rt,${cm-4z} */
+ {
+ -1, "m-cm128ria4", "cm128ria4", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm128sia2 $rs,$rt */
+ {
+ -1, "m-cm128sia2", "cm128sia2", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm128sia3 $rs,$rt,${cm-3z} */
+ {
+ -1, "m-cm128sia3", "cm128sia3", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cm128sia4 $rs,$rt,${cm-4z} */
+ {
+ -1, "m-cm128sia4", "cm128sia4", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* cmphdr */
+ {
+ -1, "m-cmphdr", "cmphdr", 32,
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* dbd $rd,$rt */
+ {
+ -1, "m-dbd", "dbd", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* dbd $rt */
+ {
+ -1, "m2-dbd", "dbd", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* dpwt $rs */
+ {
+ -1, "m-dpwt", "dpwt", 32,
+ { 0|A(NO_DIS)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* free $rs */
+ {
+ -1, "m-free", "free", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* lock $rt */
+ {
+ -1, "m-lock", "lock", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrla $rs,$rt */
+ {
+ -1, "m-pkrla", "pkrla", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlac $rs,$rt */
+ {
+ -1, "m-pkrlac", "pkrlac", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlah $rs,$rt */
+ {
+ -1, "m-pkrlah", "pkrlah", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlau $rs,$rt */
+ {
+ -1, "m-pkrlau", "pkrlau", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrli $rs,$rt,$bytecount */
+ {
+ -1, "m-pkrli", "pkrli", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlic $rs,$rt,$bytecount */
+ {
+ -1, "m-pkrlic", "pkrlic", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrlih $rs,$rt,$bytecount */
+ {
+ -1, "m-pkrlih", "pkrlih", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* pkrliu $rs,$rt,$bytecount */
+ {
+ -1, "m-pkrliu", "pkrliu", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* rba $rs,$rt */
+ {
+ -1, "m-rba", "rba", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* rbal $rs,$rt */
+ {
+ -1, "m-rbal", "rbal", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* rbar $rs,$rt */
+ {
+ -1, "m-rbar", "rbar", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* rbi $rs,$rt,$bytecount */
+ {
+ -1, "m-rbi", "rbi", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* rbil $rs,$rt,$bytecount */
+ {
+ -1, "m-rbil", "rbil", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* rbir $rs,$rt,$bytecount */
+ {
+ -1, "m-rbir", "rbir", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* swwr $rs,$rt */
+ {
+ -1, "m-swwr", "swwr", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* swwru $rs,$rt */
+ {
+ -1, "m-swwru", "swwru", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* tstod $rs */
+ {
+ -1, "m-tstod", "tstod", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* unlk $rt */
+ {
+ -1, "m-unlk", "unlk", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* wba $rs,$rt */
+ {
+ -1, "m-wba", "wba", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* wbac $rs,$rt */
+ {
+ -1, "m-wbac", "wbac", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* wbau $rs,$rt */
+ {
+ -1, "m-wbau", "wbau", 32,
+ { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* wbi $rs,$rt,$bytecount */
+ {
+ -1, "m-wbi", "wbi", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* wbic $rs,$rt,$bytecount */
+ {
+ -1, "m-wbic", "wbic", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+/* wbiu $rs,$rt,$bytecount */
+ {
+ -1, "m-wbiu", "wbiu", 32,
+ { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
+ },
+};
+
+/* The macro instruction opcode table. */
+
+static const CGEN_OPCODE iq2000_cgen_macro_insn_opcode_table[] =
+{
+/* nop */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_nop, { 0x0 }
+ },
+/* li $rs,$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (IMM), 0 } },
+ & ifmt_li, { 0x34000000 }
+ },
+/* move $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_move, { 0x25 }
+ },
+/* lb $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_lb_base_0, { 0x80000000 }
+ },
+/* lbu $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_lbu_base_0, { 0x90000000 }
+ },
+/* lh $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_lh_base_0, { 0x84000000 }
+ },
+/* lw $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_lw_base_0, { 0x8c000000 }
+ },
+/* add $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_m_add, { 0x20000000 }
+ },
+/* addu $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_m_addu, { 0x24000000 }
+ },
+/* and $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_m_and, { 0x30000000 }
+ },
+/* j $rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), 0 } },
+ & ifmt_m_j, { 0x8 }
+ },
+/* or $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_m_or, { 0x34000000 }
+ },
+/* sll $rd,$rt,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
+ & ifmt_m_sll, { 0x4 }
+ },
+/* slt $rt,$rs,$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
+ & ifmt_m_slt, { 0x28000000 }
+ },
+/* sltu $rt,$rs,$imm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
+ & ifmt_m_sltu, { 0x2c000000 }
+ },
+/* sra $rd,$rt,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
+ & ifmt_m_sra, { 0x7 }
+ },
+/* srl $rd,$rt,$rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
+ & ifmt_m_srl, { 0x6 }
+ },
+/* not $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_not, { 0x27 }
+ },
+/* subi $rt,$rs,$mlo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (MLO16), 0 } },
+ & ifmt_subi, { 0x24000000 }
+ },
+/* sub $rt,$rs,$mlo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (MLO16), 0 } },
+ & ifmt_m_sub, { 0x24000000 }
+ },
+/* subu $rt,$rs,$mlo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (MLO16), 0 } },
+ & ifmt_m_subu, { 0x24000000 }
+ },
+/* sb $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_sb_base_0, { 0xa0000000 }
+ },
+/* sh $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_sh_base_0, { 0xa4000000 }
+ },
+/* sw $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_sw_base_0, { 0xac000000 }
+ },
+/* xor $rt,$rs,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
+ & ifmt_m_xor, { 0x38000000 }
+ },
+/* ldw $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_ldw_base_0, { 0xc0000000 }
+ },
+/* sdw $rt,$lo16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
+ & ifmt_sdw_base_0, { 0xe0000000 }
+ },
+/* avail */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_m_avail, { 0x4c000024 }
+ },
+/* cam36 $rd,$rt,${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
+ & ifmt_m_cam36, { 0x4c000400 }
+ },
+/* cam72 $rd,$rt,${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
+ & ifmt_m_cam72, { 0x4c000440 }
+ },
+/* cam144 $rd,$rt,${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
+ & ifmt_m_cam144, { 0x4c000480 }
+ },
+/* cam288 $rd,$rt,${cam-z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
+ & ifmt_m_cam288, { 0x4c0004c0 }
+ },
+/* cm32read $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_m_cm32read, { 0x4c0000b0 }
+ },
+/* cm64read $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_m_cm64read, { 0x4c000090 }
+ },
+/* cm32mlog $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32mlog, { 0x4c0000aa }
+ },
+/* cm32and $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32and, { 0x4c0000ab }
+ },
+/* cm32andn $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32andn, { 0x4c0000a3 }
+ },
+/* cm32or $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32or, { 0x4c0000aa }
+ },
+/* cm32ra $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32ra, { 0x4c0000b0 }
+ },
+/* cm32rd $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm32rd, { 0x4c0000a1 }
+ },
+/* cm32ri $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm32ri, { 0x4c0000a4 }
+ },
+/* cm32rs $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32rs, { 0x4c0000a0 }
+ },
+/* cm32sa $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32sa, { 0x4c0000b8 }
+ },
+/* cm32sd $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm32sd, { 0x4c0000a9 }
+ },
+/* cm32si $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm32si, { 0x4c0000ac }
+ },
+/* cm32ss $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32ss, { 0x4c0000a8 }
+ },
+/* cm32xor $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm32xor, { 0x4c0000a2 }
+ },
+/* cm64clr $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm64clr, { 0x4c000085 }
+ },
+/* cm64ra $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm64ra, { 0x4c000090 }
+ },
+/* cm64rd $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm64rd, { 0x4c000081 }
+ },
+/* cm64ri $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm64ri, { 0x4c000084 }
+ },
+/* cm64ria2 $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm64ria2, { 0x4c000094 }
+ },
+/* cm64rs $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm64rs, { 0x4c000080 }
+ },
+/* cm64sa $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm64sa, { 0x4c000098 }
+ },
+/* cm64sd $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm64sd, { 0x4c000089 }
+ },
+/* cm64si $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_cm64si, { 0x4c00008c }
+ },
+/* cm64sia2 $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm64sia2, { 0x4c00009c }
+ },
+/* cm64ss $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm64ss, { 0x4c000088 }
+ },
+/* cm128ria2 $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm128ria2, { 0x4c000095 }
+ },
+/* cm128ria3 $rs,$rt,${cm-3z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
+ & ifmt_m_cm128ria3, { 0x4c000090 }
+ },
+/* cm128ria4 $rs,$rt,${cm-4z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
+ & ifmt_m_cm128ria4, { 0x4c0000b0 }
+ },
+/* cm128sia2 $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_cm128sia2, { 0x4c00009d }
+ },
+/* cm128sia3 $rs,$rt,${cm-3z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
+ & ifmt_m_cm128sia3, { 0x4c000098 }
+ },
+/* cm128sia4 $rs,$rt,${cm-4z} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
+ & ifmt_m_cm128sia4, { 0x4c0000b8 }
+ },
+/* cmphdr */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_m_cmphdr, { 0x4c00002c }
+ },
+/* dbd $rd,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
+ & ifmt_m_dbd, { 0x4c000021 }
+ },
+/* dbd $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m2_dbd, { 0x4c000021 }
+ },
+/* dpwt $rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), 0 } },
+ & ifmt_m_dpwt, { 0x4c000023 }
+ },
+/* free $rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), 0 } },
+ & ifmt_m_free, { 0x4c000025 }
+ },
+/* lock $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_lock, { 0x4c000001 }
+ },
+/* pkrla $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_pkrla, { 0x4c000028 }
+ },
+/* pkrlac $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_pkrlac, { 0x4c00002b }
+ },
+/* pkrlah $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_pkrlah, { 0x4c00002a }
+ },
+/* pkrlau $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_pkrlau, { 0x4c000029 }
+ },
+/* pkrli $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_pkrli, { 0x48000000 }
+ },
+/* pkrlic $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_pkrlic, { 0x48000300 }
+ },
+/* pkrlih $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_pkrlih, { 0x48000200 }
+ },
+/* pkrliu $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_pkrliu, { 0x48000100 }
+ },
+/* rba $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_rba, { 0x4c000008 }
+ },
+/* rbal $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_rbal, { 0x4c000009 }
+ },
+/* rbar $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_rbar, { 0x4c00000a }
+ },
+/* rbi $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_rbi, { 0x4c000200 }
+ },
+/* rbil $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_rbil, { 0x4c000300 }
+ },
+/* rbir $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_rbir, { 0x4c000100 }
+ },
+/* swwr $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_swwr, { 0x4c000006 }
+ },
+/* swwru $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_swwru, { 0x4c000007 }
+ },
+/* tstod $rs */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), 0 } },
+ & ifmt_m_tstod, { 0x4c000027 }
+ },
+/* unlk $rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RT), 0 } },
+ & ifmt_m_unlk, { 0x4c000003 }
+ },
+/* wba $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_wba, { 0x4c000010 }
+ },
+/* wbac $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_wbac, { 0x4c000012 }
+ },
+/* wbau $rs,$rt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
+ & ifmt_m_wbau, { 0x4c000011 }
+ },
+/* wbi $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_wbi, { 0x4c000600 }
+ },
+/* wbic $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_wbic, { 0x4c000500 }
+ },
+/* wbiu $rs,$rt,$bytecount */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
+ & ifmt_m_wbiu, { 0x4c000700 }
+ },
+};
+
+#undef A
+#undef OPERAND
+#undef MNEM
+#undef OP
+
+#ifndef CGEN_ASM_HASH_P
+#define CGEN_ASM_HASH_P(insn) 1
+#endif
+
+#ifndef CGEN_DIS_HASH_P
+#define CGEN_DIS_HASH_P(insn) 1
+#endif
+
+/* Return non-zero if INSN is to be added to the hash table.
+ Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */
+
+static int
+asm_hash_insn_p (insn)
+ const CGEN_INSN *insn ATTRIBUTE_UNUSED;
+{
+ return CGEN_ASM_HASH_P (insn);
+}
+
+static int
+dis_hash_insn_p (insn)
+ const CGEN_INSN *insn;
+{
+ /* If building the hash table and the NO-DIS attribute is present,
+ ignore. */
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
+ return 0;
+ return CGEN_DIS_HASH_P (insn);
+}
+
+#ifndef CGEN_ASM_HASH
+#define CGEN_ASM_HASH_SIZE 127
+#ifdef CGEN_MNEMONIC_OPERANDS
+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
+#else
+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
+#endif
+#endif
+
+/* It doesn't make much sense to provide a default here,
+ but while this is under development we do.
+ BUFFER is a pointer to the bytes of the insn, target order.
+ VALUE is the first base_insn_bitsize bits as an int in host order. */
+
+#ifndef CGEN_DIS_HASH
+#define CGEN_DIS_HASH_SIZE 256
+#define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
+#endif
+
+/* The result is the hash value of the insn.
+ Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */
+
+static unsigned int
+asm_hash_insn (mnem)
+ const char * mnem;
+{
+ return CGEN_ASM_HASH (mnem);
+}
+
+/* BUF is a pointer to the bytes of the insn, target order.
+ VALUE is the first base_insn_bitsize bits as an int in host order. */
+
+static unsigned int
+dis_hash_insn (buf, value)
+ const char * buf ATTRIBUTE_UNUSED;
+ CGEN_INSN_INT value ATTRIBUTE_UNUSED;
+{
+ return CGEN_DIS_HASH (buf, value);
+}
+
+static void set_fields_bitsize PARAMS ((CGEN_FIELDS *, int));
+
+/* Set the recorded length of the insn in the CGEN_FIELDS struct. */
+
+static void
+set_fields_bitsize (fields, size)
+ CGEN_FIELDS *fields;
+ int size;
+{
+ CGEN_FIELDS_BITSIZE (fields) = size;
+}
+
+/* Function to call before using the operand instance table.
+ This plugs the opcode entries and macro instructions into the cpu table. */
+
+void
+iq2000_cgen_init_opcode_table (cd)
+ CGEN_CPU_DESC cd;
+{
+ int i;
+ int num_macros = (sizeof (iq2000_cgen_macro_insn_table) /
+ sizeof (iq2000_cgen_macro_insn_table[0]));
+ const CGEN_IBASE *ib = & iq2000_cgen_macro_insn_table[0];
+ const CGEN_OPCODE *oc = & iq2000_cgen_macro_insn_opcode_table[0];
+ CGEN_INSN *insns = (CGEN_INSN *) xmalloc (num_macros * sizeof (CGEN_INSN));
+ memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+ for (i = 0; i < num_macros; ++i)
+ {
+ insns[i].base = &ib[i];
+ insns[i].opcode = &oc[i];
+ iq2000_cgen_build_insn_regex (& insns[i]);
+ }
+ cd->macro_insn_table.init_entries = insns;
+ cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
+ cd->macro_insn_table.num_init_entries = num_macros;
+
+ oc = & iq2000_cgen_insn_opcode_table[0];
+ insns = (CGEN_INSN *) cd->insn_table.init_entries;
+ for (i = 0; i < MAX_INSNS; ++i)
+ {
+ insns[i].opcode = &oc[i];
+ iq2000_cgen_build_insn_regex (& insns[i]);
+ }
+
+ cd->sizeof_fields = sizeof (CGEN_FIELDS);
+ cd->set_fields_bitsize = set_fields_bitsize;
+
+ cd->asm_hash_p = asm_hash_insn_p;
+ cd->asm_hash = asm_hash_insn;
+ cd->asm_hash_size = CGEN_ASM_HASH_SIZE;
+
+ cd->dis_hash_p = dis_hash_insn_p;
+ cd->dis_hash = dis_hash_insn;
+ cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
+}
diff --git a/opcodes/iq2000-opc.h b/opcodes/iq2000-opc.h
new file mode 100644
index 00000000000..4dca525ffe1
--- /dev/null
+++ b/opcodes/iq2000-opc.h
@@ -0,0 +1,181 @@
+/* Instruction opcode header for iq2000.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef IQ2000_OPC_H
+#define IQ2000_OPC_H
+
+/* -- opc.h */
+
+/* Allows reason codes to be output when assembler errors occur. */
+#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+
+/* Override disassembly hashing - there are variable bits in the top
+ byte of these instructions. */
+#define CGEN_DIS_HASH_SIZE 8
+#define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 6) % CGEN_DIS_HASH_SIZE)
+
+/* following activates check beyond hashing since some iq2000 and iq10
+ instructions have same mnemonics but different functionality. */
+#define CGEN_VALIDATE_INSN_SUPPORTED
+
+extern int iq2000_cgen_insn_supported (CGEN_CPU_DESC cd, CGEN_INSN *insn);
+
+/* -- asm.c */
+/* Enum declaration for iq2000 instruction types. */
+typedef enum cgen_insn_type {
+ IQ2000_INSN_INVALID, IQ2000_INSN_ADD2, IQ2000_INSN_ADD, IQ2000_INSN_ADDI2
+ , IQ2000_INSN_ADDI, IQ2000_INSN_ADDIU2, IQ2000_INSN_ADDIU, IQ2000_INSN_ADDU2
+ , IQ2000_INSN_ADDU, IQ2000_INSN_ADO162, IQ2000_INSN_ADO16, IQ2000_INSN_AND2
+ , IQ2000_INSN_AND, IQ2000_INSN_ANDI2, IQ2000_INSN_ANDI, IQ2000_INSN_ANDOI2
+ , IQ2000_INSN_ANDOI, IQ2000_INSN_NOR2, IQ2000_INSN_NOR, IQ2000_INSN_OR2
+ , IQ2000_INSN_OR, IQ2000_INSN_ORI2, IQ2000_INSN_ORI, IQ2000_INSN_RAM
+ , IQ2000_INSN_SLL, IQ2000_INSN_SLLV2, IQ2000_INSN_SLLV, IQ2000_INSN_SLMV2
+ , IQ2000_INSN_SLMV, IQ2000_INSN_SLT2, IQ2000_INSN_SLT, IQ2000_INSN_SLTI2
+ , IQ2000_INSN_SLTI, IQ2000_INSN_SLTIU2, IQ2000_INSN_SLTIU, IQ2000_INSN_SLTU2
+ , IQ2000_INSN_SLTU, IQ2000_INSN_SRA2, IQ2000_INSN_SRA, IQ2000_INSN_SRAV2
+ , IQ2000_INSN_SRAV, IQ2000_INSN_SRL, IQ2000_INSN_SRLV2, IQ2000_INSN_SRLV
+ , IQ2000_INSN_SRMV2, IQ2000_INSN_SRMV, IQ2000_INSN_SUB2, IQ2000_INSN_SUB
+ , IQ2000_INSN_SUBU2, IQ2000_INSN_SUBU, IQ2000_INSN_XOR2, IQ2000_INSN_XOR
+ , IQ2000_INSN_XORI2, IQ2000_INSN_XORI, IQ2000_INSN_BBI, IQ2000_INSN_BBIN
+ , IQ2000_INSN_BBV, IQ2000_INSN_BBVN, IQ2000_INSN_BEQ, IQ2000_INSN_BEQL
+ , IQ2000_INSN_BGEZ, IQ2000_INSN_BGEZAL, IQ2000_INSN_BGEZALL, IQ2000_INSN_BGEZL
+ , IQ2000_INSN_BLTZ, IQ2000_INSN_BLTZL, IQ2000_INSN_BLTZAL, IQ2000_INSN_BLTZALL
+ , IQ2000_INSN_BMB0, IQ2000_INSN_BMB1, IQ2000_INSN_BMB2, IQ2000_INSN_BMB3
+ , IQ2000_INSN_BNE, IQ2000_INSN_BNEL, IQ2000_INSN_JALR, IQ2000_INSN_JR
+ , IQ2000_INSN_LB, IQ2000_INSN_LBU, IQ2000_INSN_LH, IQ2000_INSN_LHU
+ , IQ2000_INSN_LUI, IQ2000_INSN_LW, IQ2000_INSN_SB, IQ2000_INSN_SH
+ , IQ2000_INSN_SW, IQ2000_INSN_BREAK, IQ2000_INSN_SYSCALL, IQ2000_INSN_ANDOUI
+ , IQ2000_INSN_ANDOUI2, IQ2000_INSN_ORUI2, IQ2000_INSN_ORUI, IQ2000_INSN_BGTZ
+ , IQ2000_INSN_BGTZL, IQ2000_INSN_BLEZ, IQ2000_INSN_BLEZL, IQ2000_INSN_MRGB
+ , IQ2000_INSN_MRGB2, IQ2000_INSN_BCTXT, IQ2000_INSN_BC0F, IQ2000_INSN_BC0FL
+ , IQ2000_INSN_BC3F, IQ2000_INSN_BC3FL, IQ2000_INSN_BC0T, IQ2000_INSN_BC0TL
+ , IQ2000_INSN_BC3T, IQ2000_INSN_BC3TL, IQ2000_INSN_CFC0, IQ2000_INSN_CFC1
+ , IQ2000_INSN_CFC2, IQ2000_INSN_CFC3, IQ2000_INSN_CHKHDR, IQ2000_INSN_CTC0
+ , IQ2000_INSN_CTC1, IQ2000_INSN_CTC2, IQ2000_INSN_CTC3, IQ2000_INSN_JCR
+ , IQ2000_INSN_LUC32, IQ2000_INSN_LUC32L, IQ2000_INSN_LUC64, IQ2000_INSN_LUC64L
+ , IQ2000_INSN_LUK, IQ2000_INSN_LULCK, IQ2000_INSN_LUM32, IQ2000_INSN_LUM32L
+ , IQ2000_INSN_LUM64, IQ2000_INSN_LUM64L, IQ2000_INSN_LUR, IQ2000_INSN_LURL
+ , IQ2000_INSN_LUULCK, IQ2000_INSN_MFC0, IQ2000_INSN_MFC1, IQ2000_INSN_MFC2
+ , IQ2000_INSN_MFC3, IQ2000_INSN_MTC0, IQ2000_INSN_MTC1, IQ2000_INSN_MTC2
+ , IQ2000_INSN_MTC3, IQ2000_INSN_PKRL, IQ2000_INSN_PKRLR1, IQ2000_INSN_PKRLR30
+ , IQ2000_INSN_RB, IQ2000_INSN_RBR1, IQ2000_INSN_RBR30, IQ2000_INSN_RFE
+ , IQ2000_INSN_RX, IQ2000_INSN_RXR1, IQ2000_INSN_RXR30, IQ2000_INSN_SLEEP
+ , IQ2000_INSN_SRRD, IQ2000_INSN_SRRDL, IQ2000_INSN_SRULCK, IQ2000_INSN_SRWR
+ , IQ2000_INSN_SRWRU, IQ2000_INSN_TRAPQFL, IQ2000_INSN_TRAPQNE, IQ2000_INSN_TRAPREL
+ , IQ2000_INSN_WB, IQ2000_INSN_WBU, IQ2000_INSN_WBR1, IQ2000_INSN_WBR1U
+ , IQ2000_INSN_WBR30, IQ2000_INSN_WBR30U, IQ2000_INSN_WX, IQ2000_INSN_WXU
+ , IQ2000_INSN_WXR1, IQ2000_INSN_WXR1U, IQ2000_INSN_WXR30, IQ2000_INSN_WXR30U
+ , IQ2000_INSN_LDW, IQ2000_INSN_SDW, IQ2000_INSN_J, IQ2000_INSN_JAL
+ , IQ2000_INSN_BMB, IQ2000_INSN_ANDOUI_Q10, IQ2000_INSN_ANDOUI2_Q10, IQ2000_INSN_ORUI_Q10
+ , IQ2000_INSN_ORUI2_Q10, IQ2000_INSN_MRGBQ10, IQ2000_INSN_MRGBQ102, IQ2000_INSN_JQ10
+ , IQ2000_INSN_JALQ10, IQ2000_INSN_JALQ10_2, IQ2000_INSN_BBIL, IQ2000_INSN_BBINL
+ , IQ2000_INSN_BBVL, IQ2000_INSN_BBVNL, IQ2000_INSN_BGTZAL, IQ2000_INSN_BGTZALL
+ , IQ2000_INSN_BLEZAL, IQ2000_INSN_BLEZALL, IQ2000_INSN_BGTZ_Q10, IQ2000_INSN_BGTZL_Q10
+ , IQ2000_INSN_BLEZ_Q10, IQ2000_INSN_BLEZL_Q10, IQ2000_INSN_BMB_Q10, IQ2000_INSN_BMBL
+ , IQ2000_INSN_BRI, IQ2000_INSN_BRV, IQ2000_INSN_BCTX, IQ2000_INSN_YIELD
+ , IQ2000_INSN_CRC32, IQ2000_INSN_CRC32B, IQ2000_INSN_CNT1S, IQ2000_INSN_AVAIL
+ , IQ2000_INSN_FREE, IQ2000_INSN_TSTOD, IQ2000_INSN_CMPHDR, IQ2000_INSN_MCID
+ , IQ2000_INSN_DBA, IQ2000_INSN_DBD, IQ2000_INSN_DPWT, IQ2000_INSN_CHKHDRQ10
+ , IQ2000_INSN_RBA, IQ2000_INSN_RBAL, IQ2000_INSN_RBAR, IQ2000_INSN_WBA
+ , IQ2000_INSN_WBAU, IQ2000_INSN_WBAC, IQ2000_INSN_RBI, IQ2000_INSN_RBIL
+ , IQ2000_INSN_RBIR, IQ2000_INSN_WBI, IQ2000_INSN_WBIC, IQ2000_INSN_WBIU
+ , IQ2000_INSN_PKRLI, IQ2000_INSN_PKRLIH, IQ2000_INSN_PKRLIU, IQ2000_INSN_PKRLIC
+ , IQ2000_INSN_PKRLA, IQ2000_INSN_PKRLAU, IQ2000_INSN_PKRLAH, IQ2000_INSN_PKRLAC
+ , IQ2000_INSN_LOCK, IQ2000_INSN_UNLK, IQ2000_INSN_SWRD, IQ2000_INSN_SWRDL
+ , IQ2000_INSN_SWWR, IQ2000_INSN_SWWRU, IQ2000_INSN_DWRD, IQ2000_INSN_DWRDL
+ , IQ2000_INSN_CAM36, IQ2000_INSN_CAM72, IQ2000_INSN_CAM144, IQ2000_INSN_CAM288
+ , IQ2000_INSN_CM32AND, IQ2000_INSN_CM32ANDN, IQ2000_INSN_CM32OR, IQ2000_INSN_CM32RA
+ , IQ2000_INSN_CM32RD, IQ2000_INSN_CM32RI, IQ2000_INSN_CM32RS, IQ2000_INSN_CM32SA
+ , IQ2000_INSN_CM32SD, IQ2000_INSN_CM32SI, IQ2000_INSN_CM32SS, IQ2000_INSN_CM32XOR
+ , IQ2000_INSN_CM64CLR, IQ2000_INSN_CM64RA, IQ2000_INSN_CM64RD, IQ2000_INSN_CM64RI
+ , IQ2000_INSN_CM64RIA2, IQ2000_INSN_CM64RS, IQ2000_INSN_CM64SA, IQ2000_INSN_CM64SD
+ , IQ2000_INSN_CM64SI, IQ2000_INSN_CM64SIA2, IQ2000_INSN_CM64SS, IQ2000_INSN_CM128RIA2
+ , IQ2000_INSN_CM128RIA3, IQ2000_INSN_CM128RIA4, IQ2000_INSN_CM128SIA2, IQ2000_INSN_CM128SIA3
+ , IQ2000_INSN_CM128SIA4, IQ2000_INSN_CM128VSA, IQ2000_INSN_CFC, IQ2000_INSN_CTC
+} CGEN_INSN_TYPE;
+
+/* Index of `invalid' insn place holder. */
+#define CGEN_INSN_INVALID IQ2000_INSN_INVALID
+
+/* Total number of insns in table. */
+#define MAX_INSNS ((int) IQ2000_INSN_CTC + 1)
+
+/* This struct records data prior to insertion or after extraction. */
+struct cgen_fields
+{
+ int length;
+ long f_nil;
+ long f_anyof;
+ long f_opcode;
+ long f_rs;
+ long f_rt;
+ long f_rd;
+ long f_shamt;
+ long f_cp_op;
+ long f_cp_op_10;
+ long f_cp_grp;
+ long f_func;
+ long f_imm;
+ long f_rd_rs;
+ long f_rd_rt;
+ long f_rt_rs;
+ long f_jtarg;
+ long f_jtargq10;
+ long f_offset;
+ long f_count;
+ long f_bytecount;
+ long f_index;
+ long f_mask;
+ long f_maskq10;
+ long f_maskl;
+ long f_excode;
+ long f_rsrvd;
+ long f_10_11;
+ long f_24_19;
+ long f_5;
+ long f_10;
+ long f_25;
+ long f_cam_z;
+ long f_cam_y;
+ long f_cm_3func;
+ long f_cm_4func;
+ long f_cm_3z;
+ long f_cm_4z;
+};
+
+#define CGEN_INIT_PARSE(od) \
+{\
+}
+#define CGEN_INIT_INSERT(od) \
+{\
+}
+#define CGEN_INIT_EXTRACT(od) \
+{\
+}
+#define CGEN_INIT_PRINT(od) \
+{\
+}
+
+
+#endif /* IQ2000_OPC_H */
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index d8862f78de5..176ffeb4694 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -1,6 +1,6 @@
/* Print mips instructions for GDB, the GNU debugger, or for objdump.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp).
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "dis-asm.h"
+#include "libiberty.h"
#include "opcode/mips.h"
#include "opintl.h"
@@ -39,14 +40,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Mips instructions are at maximum this many bytes long. */
#define INSNLEN 4
+static void set_default_mips_dis_options
+ PARAMS ((struct disassemble_info *));
+static void parse_mips_dis_option
+ PARAMS ((const char *, unsigned int));
+static void parse_mips_dis_options
+ PARAMS ((const char *));
static int _print_insn_mips
PARAMS ((bfd_vma, struct disassemble_info *, enum bfd_endian));
static int print_insn_mips
PARAMS ((bfd_vma, unsigned long int, struct disassemble_info *));
-static void print_insn_arg
+static void print_insn_args
PARAMS ((const char *, unsigned long, bfd_vma, struct disassemble_info *));
-static void mips_isa_type
- PARAMS ((int, int *, int *));
static int print_insn_mips16
PARAMS ((bfd_vma, struct disassemble_info *));
static int is_newabi
@@ -57,417 +62,948 @@ static void print_mips16_insn_arg
/* FIXME: These should be shared with gdb somehow. */
+struct mips_cp0sel_name {
+ unsigned int cp0reg;
+ unsigned int sel;
+ const char * const name;
+};
+
/* The mips16 register names. */
static const char * const mips16_reg_names[] = {
"s0", "s1", "v0", "v1", "a0", "a1", "a2", "a3"
};
-static const char * const mips32_reg_names[] = {
- "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
- "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
- "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
- "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra",
- "sr", "lo", "hi", "bad", "cause", "pc",
- "fv0", "$f1", "fv1", "$f3", "ft0", "$f5", "ft1", "$f7",
- "ft2", "$f9", "ft3", "$f11", "fa0", "$f13", "fa1", "$f15",
- "ft4", "f17", "ft5", "f19", "fs0", "f21", "fs1", "f23",
- "fs2", "$f25", "fs3", "$f27", "fs4", "$f29", "fs5", "$f31",
- "fsr", "fir", "fp", "inx", "rand", "tlblo", "ctxt", "tlbhi",
- "epc", "prid"
+static const char * const mips_gpr_names_numeric[32] = {
+ "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
+ "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15",
+ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",
+ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "$31"
};
-static const char * const mips64_reg_names[] = {
- "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
- "a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
- "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
- "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra",
- "sr", "lo", "hi", "bad", "cause", "pc",
- "fv0", "$f1", "fv1", "$f3", "ft0", "ft1", "ft2", "ft3",
- "ft4", "ft5", "ft6", "ft7", "fa0", "fa1", "fa2", "fa3",
- "fa4", "fa5", "fa6", "fa7", "ft8", "ft9", "ft10", "ft11",
- "fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",
- "fsr", "fir", "fp", "inx", "rand", "tlblo", "ctxt", "tlbhi",
- "epc", "prid"
+static const char * const mips_gpr_names_oldabi[32] = {
+ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
+ "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
+ "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra"
};
-/* Scalar register names. _print_insn_mips() decides which register name
- table to use. */
-static const char * const *reg_names = NULL;
-
-/* Print insn arguments for 32/64-bit code. */
+static const char * const mips_gpr_names_newabi[32] = {
+ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
+ "a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
+ "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra"
+};
-static void
-print_insn_arg (d, l, pc, info)
- const char *d;
- register unsigned long int l;
- bfd_vma pc;
- struct disassemble_info *info;
-{
- int delta;
+static const char * const mips_fpr_names_numeric[32] = {
+ "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7",
+ "$f8", "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15",
+ "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",
+ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31"
+};
- switch (*d)
- {
- case ',':
- case '(':
- case ')':
- case '[':
- case ']':
- (*info->fprintf_func) (info->stream, "%c", *d);
- break;
+static const char * const mips_fpr_names_32[32] = {
+ "fv0", "fv0f", "fv1", "fv1f", "ft0", "ft0f", "ft1", "ft1f",
+ "ft2", "ft2f", "ft3", "ft3f", "fa0", "fa0f", "fa1", "fa1f",
+ "ft4", "ft4f", "ft5", "ft5f", "fs0", "fs0f", "fs1", "fs1f",
+ "fs2", "fs2f", "fs3", "fs3f", "fs4", "fs4f", "fs5", "fs5f"
+};
- case 's':
- case 'b':
- case 'r':
- case 'v':
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[(l >> OP_SH_RS) & OP_MASK_RS]);
- break;
+static const char * const mips_fpr_names_n32[32] = {
+ "fv0", "ft14", "fv1", "ft15", "ft0", "ft1", "ft2", "ft3",
+ "ft4", "ft5", "ft6", "ft7", "fa0", "fa1", "fa2", "fa3",
+ "fa4", "fa5", "fa6", "fa7", "fs0", "ft8", "fs1", "ft9",
+ "fs2", "ft10", "fs3", "ft11", "fs4", "ft12", "fs5", "ft13"
+};
- case 't':
- case 'w':
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
- break;
+static const char * const mips_fpr_names_64[32] = {
+ "fv0", "ft12", "fv1", "ft13", "ft0", "ft1", "ft2", "ft3",
+ "ft4", "ft5", "ft6", "ft7", "fa0", "fa1", "fa2", "fa3",
+ "fa4", "fa5", "fa6", "fa7", "ft8", "ft9", "ft10", "ft11",
+ "fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7"
+};
- case 'i':
- case 'u':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_IMMEDIATE) & OP_MASK_IMMEDIATE);
- break;
+static const char * const mips_cp0_names_numeric[32] = {
+ "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
+ "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15",
+ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",
+ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "$31"
+};
- case 'j': /* Same as i, but sign-extended. */
- case 'o':
- delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
- if (delta & 0x8000)
- delta |= ~0xffff;
- (*info->fprintf_func) (info->stream, "%d",
- delta);
- break;
+static const char * const mips_cp0_names_mips3264[32] = {
+ "c0_index", "c0_random", "c0_entrylo0", "c0_entrylo1",
+ "c0_context", "c0_pagemask", "c0_wired", "$7",
+ "c0_badvaddr", "c0_count", "c0_entryhi", "c0_compare",
+ "c0_status", "c0_cause", "c0_epc", "c0_prid",
+ "c0_config", "c0_lladdr", "c0_watchlo", "c0_watchhi",
+ "c0_xcontext", "$21", "$22", "c0_debug",
+ "c0_depc", "c0_perfcnt", "c0_errctl", "c0_cacheerr",
+ "c0_taglo", "c0_taghi", "c0_errorepc", "c0_desave",
+};
- case 'h':
- (*info->fprintf_func) (info->stream, "0x%x",
- (unsigned int) ((l >> OP_SH_PREFX)
- & OP_MASK_PREFX));
- break;
+static const struct mips_cp0sel_name mips_cp0sel_names_mips3264[] = {
+ { 16, 1, "c0_config1" },
+ { 16, 2, "c0_config2" },
+ { 16, 3, "c0_config3" },
+ { 18, 1, "c0_watchlo,1" },
+ { 18, 2, "c0_watchlo,2" },
+ { 18, 3, "c0_watchlo,3" },
+ { 18, 4, "c0_watchlo,4" },
+ { 18, 5, "c0_watchlo,5" },
+ { 18, 6, "c0_watchlo,6" },
+ { 18, 7, "c0_watchlo,7" },
+ { 19, 1, "c0_watchhi,1" },
+ { 19, 2, "c0_watchhi,2" },
+ { 19, 3, "c0_watchhi,3" },
+ { 19, 4, "c0_watchhi,4" },
+ { 19, 5, "c0_watchhi,5" },
+ { 19, 6, "c0_watchhi,6" },
+ { 19, 7, "c0_watchhi,7" },
+ { 25, 1, "c0_perfcnt,1" },
+ { 25, 2, "c0_perfcnt,2" },
+ { 25, 3, "c0_perfcnt,3" },
+ { 25, 4, "c0_perfcnt,4" },
+ { 25, 5, "c0_perfcnt,5" },
+ { 25, 6, "c0_perfcnt,6" },
+ { 25, 7, "c0_perfcnt,7" },
+ { 27, 1, "c0_cacheerr,1" },
+ { 27, 2, "c0_cacheerr,2" },
+ { 27, 3, "c0_cacheerr,3" },
+ { 28, 1, "c0_datalo" },
+ { 29, 1, "c0_datahi" }
+};
- case 'k':
- (*info->fprintf_func) (info->stream, "0x%x",
- (unsigned int) ((l >> OP_SH_CACHE)
- & OP_MASK_CACHE));
- break;
+static const char * const mips_cp0_names_mips3264r2[32] = {
+ "c0_index", "c0_random", "c0_entrylo0", "c0_entrylo1",
+ "c0_context", "c0_pagemask", "c0_wired", "c0_hwrena",
+ "c0_badvaddr", "c0_count", "c0_entryhi", "c0_compare",
+ "c0_status", "c0_cause", "c0_epc", "c0_prid",
+ "c0_config", "c0_lladdr", "c0_watchlo", "c0_watchhi",
+ "c0_xcontext", "$21", "$22", "c0_debug",
+ "c0_depc", "c0_perfcnt", "c0_errctl", "c0_cacheerr",
+ "c0_taglo", "c0_taghi", "c0_errorepc", "c0_desave",
+};
- case 'a':
- info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff)
- | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2));
- (*info->print_address_func) (info->target, info);
- break;
+static const struct mips_cp0sel_name mips_cp0sel_names_mips3264r2[] = {
+ { 4, 1, "c0_contextconfig" },
+ { 5, 1, "c0_pagegrain" },
+ { 12, 1, "c0_intctl" },
+ { 12, 2, "c0_srsctl" },
+ { 12, 3, "c0_srsmap" },
+ { 15, 1, "c0_ebase" },
+ { 16, 1, "c0_config1" },
+ { 16, 2, "c0_config2" },
+ { 16, 3, "c0_config3" },
+ { 18, 1, "c0_watchlo,1" },
+ { 18, 2, "c0_watchlo,2" },
+ { 18, 3, "c0_watchlo,3" },
+ { 18, 4, "c0_watchlo,4" },
+ { 18, 5, "c0_watchlo,5" },
+ { 18, 6, "c0_watchlo,6" },
+ { 18, 7, "c0_watchlo,7" },
+ { 19, 1, "c0_watchhi,1" },
+ { 19, 2, "c0_watchhi,2" },
+ { 19, 3, "c0_watchhi,3" },
+ { 19, 4, "c0_watchhi,4" },
+ { 19, 5, "c0_watchhi,5" },
+ { 19, 6, "c0_watchhi,6" },
+ { 19, 7, "c0_watchhi,7" },
+ { 23, 1, "c0_tracecontrol" },
+ { 23, 2, "c0_tracecontrol2" },
+ { 23, 3, "c0_usertracedata" },
+ { 23, 4, "c0_tracebpc" },
+ { 25, 1, "c0_perfcnt,1" },
+ { 25, 2, "c0_perfcnt,2" },
+ { 25, 3, "c0_perfcnt,3" },
+ { 25, 4, "c0_perfcnt,4" },
+ { 25, 5, "c0_perfcnt,5" },
+ { 25, 6, "c0_perfcnt,6" },
+ { 25, 7, "c0_perfcnt,7" },
+ { 27, 1, "c0_cacheerr,1" },
+ { 27, 2, "c0_cacheerr,2" },
+ { 27, 3, "c0_cacheerr,3" },
+ { 28, 1, "c0_datalo" },
+ { 28, 2, "c0_taglo1" },
+ { 28, 3, "c0_datalo1" },
+ { 28, 4, "c0_taglo2" },
+ { 28, 5, "c0_datalo2" },
+ { 28, 6, "c0_taglo3" },
+ { 28, 7, "c0_datalo3" },
+ { 29, 1, "c0_datahi" },
+ { 29, 2, "c0_taghi1" },
+ { 29, 3, "c0_datahi1" },
+ { 29, 4, "c0_taghi2" },
+ { 29, 5, "c0_datahi2" },
+ { 29, 6, "c0_taghi3" },
+ { 29, 7, "c0_datahi3" },
+};
- case 'p':
- /* Sign extend the displacement. */
- delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
- if (delta & 0x8000)
- delta |= ~0xffff;
- info->target = (delta << 2) + pc + INSNLEN;
- (*info->print_address_func) (info->target, info);
- break;
+/* SB-1: MIPS64 (mips_cp0_names_mips3264) with minor mods. */
+static const char * const mips_cp0_names_sb1[32] = {
+ "c0_index", "c0_random", "c0_entrylo0", "c0_entrylo1",
+ "c0_context", "c0_pagemask", "c0_wired", "$7",
+ "c0_badvaddr", "c0_count", "c0_entryhi", "c0_compare",
+ "c0_status", "c0_cause", "c0_epc", "c0_prid",
+ "c0_config", "c0_lladdr", "c0_watchlo", "c0_watchhi",
+ "c0_xcontext", "$21", "$22", "c0_debug",
+ "c0_depc", "c0_perfcnt", "c0_errctl", "c0_cacheerr_i",
+ "c0_taglo_i", "c0_taghi_i", "c0_errorepc", "c0_desave",
+};
- case 'd':
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[(l >> OP_SH_RD) & OP_MASK_RD]);
- break;
+static const struct mips_cp0sel_name mips_cp0sel_names_sb1[] = {
+ { 16, 1, "c0_config1" },
+ { 18, 1, "c0_watchlo,1" },
+ { 19, 1, "c0_watchhi,1" },
+ { 22, 0, "c0_perftrace" },
+ { 23, 3, "c0_edebug" },
+ { 25, 1, "c0_perfcnt,1" },
+ { 25, 2, "c0_perfcnt,2" },
+ { 25, 3, "c0_perfcnt,3" },
+ { 25, 4, "c0_perfcnt,4" },
+ { 25, 5, "c0_perfcnt,5" },
+ { 25, 6, "c0_perfcnt,6" },
+ { 25, 7, "c0_perfcnt,7" },
+ { 26, 1, "c0_buserr_pa" },
+ { 27, 1, "c0_cacheerr_d" },
+ { 27, 3, "c0_cacheerr_d_pa" },
+ { 28, 1, "c0_datalo_i" },
+ { 28, 2, "c0_taglo_d" },
+ { 28, 3, "c0_datalo_d" },
+ { 29, 1, "c0_datahi_i" },
+ { 29, 2, "c0_taghi_d" },
+ { 29, 3, "c0_datahi_d" },
+};
- case 'U':
- {
- /* First check for both rd and rt being equal. */
- unsigned int reg = (l >> OP_SH_RD) & OP_MASK_RD;
- if (reg == ((l >> OP_SH_RT) & OP_MASK_RT))
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[reg]);
- else
- {
- /* If one is zero use the other. */
- if (reg == 0)
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
- else if (((l >> OP_SH_RT) & OP_MASK_RT) == 0)
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[reg]);
- else /* Bogus, result depends on processor. */
- (*info->fprintf_func) (info->stream, "%s or %s",
- reg_names[reg],
- reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
- }
- }
- break;
+static const char * const mips_hwr_names_numeric[32] = {
+ "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
+ "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15",
+ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",
+ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "$31"
+};
- case 'z':
- (*info->fprintf_func) (info->stream, "%s", reg_names[0]);
- break;
+static const char * const mips_hwr_names_mips3264r2[32] = {
+ "hwr_cpunum", "hwr_synci_step", "hwr_cc", "hwr_ccres",
+ "$4", "$5", "$6", "$7",
+ "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15",
+ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",
+ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "$31"
+};
- case '<':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_SHAMT) & OP_MASK_SHAMT);
- break;
+struct mips_abi_choice {
+ const char *name;
+ const char * const *gpr_names;
+ const char * const *fpr_names;
+};
- case 'c':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_CODE) & OP_MASK_CODE);
- break;
+struct mips_abi_choice mips_abi_choices[] = {
+ { "numeric", mips_gpr_names_numeric, mips_fpr_names_numeric },
+ { "32", mips_gpr_names_oldabi, mips_fpr_names_32 },
+ { "n32", mips_gpr_names_newabi, mips_fpr_names_n32 },
+ { "64", mips_gpr_names_newabi, mips_fpr_names_64 },
+};
- case 'q':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_CODE2) & OP_MASK_CODE2);
- break;
+struct mips_arch_choice {
+ const char *name;
+ int bfd_mach_valid;
+ unsigned long bfd_mach;
+ int processor;
+ int isa;
+ const char * const *cp0_names;
+ const struct mips_cp0sel_name *cp0sel_names;
+ unsigned int cp0sel_names_len;
+ const char * const *hwr_names;
+};
- case 'C':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_COPZ) & OP_MASK_COPZ);
- break;
+const struct mips_arch_choice mips_arch_choices[] = {
+ { "numeric", 0, 0, 0, 0,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+
+ { "r3000", 1, bfd_mach_mips3000, CPU_R3000, ISA_MIPS1,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r3900", 1, bfd_mach_mips3900, CPU_R3900, ISA_MIPS1,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r4000", 1, bfd_mach_mips4000, CPU_R4000, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r4010", 1, bfd_mach_mips4010, CPU_R4010, ISA_MIPS2,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "vr4100", 1, bfd_mach_mips4100, CPU_VR4100, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "vr4111", 1, bfd_mach_mips4111, CPU_R4111, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "vr4120", 1, bfd_mach_mips4120, CPU_VR4120, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r4300", 1, bfd_mach_mips4300, CPU_R4300, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r4400", 1, bfd_mach_mips4400, CPU_R4400, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r4600", 1, bfd_mach_mips4600, CPU_R4600, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r4650", 1, bfd_mach_mips4650, CPU_R4650, ISA_MIPS3,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r5000", 1, bfd_mach_mips5000, CPU_R5000, ISA_MIPS4,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "vr5400", 1, bfd_mach_mips5400, CPU_VR5400, ISA_MIPS4,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "vr5500", 1, bfd_mach_mips5500, CPU_VR5500, ISA_MIPS4,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r6000", 1, bfd_mach_mips6000, CPU_R6000, ISA_MIPS2,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r8000", 1, bfd_mach_mips8000, CPU_R8000, ISA_MIPS4,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r10000", 1, bfd_mach_mips10000, CPU_R10000, ISA_MIPS4,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "r12000", 1, bfd_mach_mips12000, CPU_R12000, ISA_MIPS4,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+ { "mips5", 1, bfd_mach_mips5, CPU_MIPS5, ISA_MIPS5,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+
+ /* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
+ Note that MIPS-3D and MDMX are not applicable to MIPS32. (See
+ _MIPS32 Architecture For Programmers Volume I: Introduction to the
+ MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
+ page 1. */
+ { "mips32", 1, bfd_mach_mipsisa32, CPU_MIPS32,
+ ISA_MIPS32 | INSN_MIPS16,
+ mips_cp0_names_mips3264,
+ mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
+ mips_hwr_names_numeric },
+
+ { "mips32r2", 1, bfd_mach_mipsisa32r2, CPU_MIPS32R2,
+ ISA_MIPS32R2 | INSN_MIPS16,
+ mips_cp0_names_mips3264r2,
+ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
+ mips_hwr_names_mips3264r2 },
+
+ /* For stock MIPS64, disassemble all applicable MIPS-specified ASEs. */
+ { "mips64", 1, bfd_mach_mipsisa64, CPU_MIPS64,
+ ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX,
+ mips_cp0_names_mips3264,
+ mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
+ mips_hwr_names_numeric },
+
+ { "sb1", 1, bfd_mach_mips_sb1, CPU_SB1,
+ ISA_MIPS64 | INSN_MIPS3D | INSN_SB1,
+ mips_cp0_names_sb1,
+ mips_cp0sel_names_sb1, ARRAY_SIZE (mips_cp0sel_names_sb1),
+ mips_hwr_names_numeric },
+
+ /* This entry, mips16, is here only for ISA/processor selection; do
+ not print its name. */
+ { "", 1, bfd_mach_mips16, CPU_MIPS16, ISA_MIPS3 | INSN_MIPS16,
+ mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+};
- case 'B':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_CODE20) & OP_MASK_CODE20);
- break;
+/* ISA and processor type to disassemble for, and register names to use.
+ set_default_mips_dis_options and parse_mips_dis_options fill in these
+ values. */
+static int mips_processor;
+static int mips_isa;
+static const char * const *mips_gpr_names;
+static const char * const *mips_fpr_names;
+static const char * const *mips_cp0_names;
+static const struct mips_cp0sel_name *mips_cp0sel_names;
+static int mips_cp0sel_names_len;
+static const char * const *mips_hwr_names;
+
+static const struct mips_abi_choice *choose_abi_by_name
+ PARAMS ((const char *, unsigned int));
+static const struct mips_arch_choice *choose_arch_by_name
+ PARAMS ((const char *, unsigned int));
+static const struct mips_arch_choice *choose_arch_by_number
+ PARAMS ((unsigned long));
+static const struct mips_cp0sel_name *lookup_mips_cp0sel_name
+ PARAMS ((const struct mips_cp0sel_name *, unsigned int, unsigned int,
+ unsigned int));
+
+static const struct mips_abi_choice *
+choose_abi_by_name (name, namelen)
+ const char *name;
+ unsigned int namelen;
+{
+ const struct mips_abi_choice *c;
+ unsigned int i;
- case 'J':
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_CODE19) & OP_MASK_CODE19);
- break;
+ for (i = 0, c = NULL; i < ARRAY_SIZE (mips_abi_choices) && c == NULL; i++)
+ {
+ if (strncmp (mips_abi_choices[i].name, name, namelen) == 0
+ && strlen (mips_abi_choices[i].name) == namelen)
+ c = &mips_abi_choices[i];
+ }
+ return c;
+}
- case 'S':
- case 'V':
- (*info->fprintf_func) (info->stream, "$f%d",
- (l >> OP_SH_FS) & OP_MASK_FS);
- break;
+static const struct mips_arch_choice *
+choose_arch_by_name (name, namelen)
+ const char *name;
+ unsigned int namelen;
+{
+ const struct mips_arch_choice *c = NULL;
+ unsigned int i;
- case 'T':
- case 'W':
- (*info->fprintf_func) (info->stream, "$f%d",
- (l >> OP_SH_FT) & OP_MASK_FT);
- break;
+ for (i = 0, c = NULL; i < ARRAY_SIZE (mips_arch_choices) && c == NULL; i++)
+ {
+ if (strncmp (mips_arch_choices[i].name, name, namelen) == 0
+ && strlen (mips_arch_choices[i].name) == namelen)
+ c = &mips_arch_choices[i];
+ }
+ return c;
+}
- case 'D':
- (*info->fprintf_func) (info->stream, "$f%d",
- (l >> OP_SH_FD) & OP_MASK_FD);
- break;
+static const struct mips_arch_choice *
+choose_arch_by_number (mach)
+ unsigned long mach;
+{
+ static unsigned long hint_bfd_mach;
+ static const struct mips_arch_choice *hint_arch_choice;
+ const struct mips_arch_choice *c;
+ unsigned int i;
+
+ /* We optimize this because even if the user specifies no
+ flags, this will be done for every instruction! */
+ if (hint_bfd_mach == mach
+ && hint_arch_choice != NULL
+ && hint_arch_choice->bfd_mach == hint_bfd_mach)
+ return hint_arch_choice;
+
+ for (i = 0, c = NULL; i < ARRAY_SIZE (mips_arch_choices) && c == NULL; i++)
+ {
+ if (mips_arch_choices[i].bfd_mach_valid
+ && mips_arch_choices[i].bfd_mach == mach)
+ {
+ c = &mips_arch_choices[i];
+ hint_bfd_mach = mach;
+ hint_arch_choice = c;
+ }
+ }
+ return c;
+}
- case 'R':
- (*info->fprintf_func) (info->stream, "$f%d",
- (l >> OP_SH_FR) & OP_MASK_FR);
- break;
+void
+set_default_mips_dis_options (info)
+ struct disassemble_info *info;
+{
+ const struct mips_arch_choice *chosen_arch;
+
+ /* Defaults: mipsIII/r3000 (?!), (o)32-style ("oldabi") GPR names,
+ and numeric FPR, CP0 register, and HWR names. */
+ mips_isa = ISA_MIPS3;
+ mips_processor = CPU_R3000;
+ mips_gpr_names = mips_gpr_names_oldabi;
+ mips_fpr_names = mips_fpr_names_numeric;
+ mips_cp0_names = mips_cp0_names_numeric;
+ mips_cp0sel_names = NULL;
+ mips_cp0sel_names_len = 0;
+ mips_hwr_names = mips_hwr_names_numeric;
+
+ /* If an ELF "newabi" binary, use the n32/(n)64 GPR names. */
+ if (info->flavour == bfd_target_elf_flavour && info->symbols != NULL)
+ {
+ Elf_Internal_Ehdr *header;
- case 'E':
- (*info->fprintf_func) (info->stream, "$%d",
- (l >> OP_SH_RT) & OP_MASK_RT);
- break;
+ header = elf_elfheader (bfd_asymbol_bfd (*(info->symbols)));
+ if (is_newabi (header))
+ mips_gpr_names = mips_gpr_names_newabi;
+ }
- case 'G':
- (*info->fprintf_func) (info->stream, "$%d",
- (l >> OP_SH_RD) & OP_MASK_RD);
- break;
+ /* Set ISA, architecture, and cp0 register names as best we can. */
+#if ! SYMTAB_AVAILABLE
+ /* This is running out on a target machine, not in a host tool.
+ FIXME: Where does mips_target_info come from? */
+ target_processor = mips_target_info.processor;
+ mips_isa = mips_target_info.isa;
+#else
+ chosen_arch = choose_arch_by_number (info->mach);
+ if (chosen_arch != NULL)
+ {
+ mips_processor = chosen_arch->processor;
+ mips_isa = chosen_arch->isa;
+ mips_cp0_names = chosen_arch->cp0_names;
+ mips_cp0sel_names = chosen_arch->cp0sel_names;
+ mips_cp0sel_names_len = chosen_arch->cp0sel_names_len;
+ mips_hwr_names = chosen_arch->hwr_names;
+ }
+#endif
+}
- case 'N':
- (*info->fprintf_func) (info->stream, "$fcc%d",
- (l >> OP_SH_BCC) & OP_MASK_BCC);
- break;
+void
+parse_mips_dis_option (option, len)
+ const char *option;
+ unsigned int len;
+{
+ unsigned int i, optionlen, vallen;
+ const char *val;
+ const struct mips_abi_choice *chosen_abi;
+ const struct mips_arch_choice *chosen_arch;
- case 'M':
- (*info->fprintf_func) (info->stream, "$fcc%d",
- (l >> OP_SH_CCC) & OP_MASK_CCC);
- break;
+ /* Look for the = that delimits the end of the option name. */
+ for (i = 0; i < len; i++)
+ {
+ if (option[i] == '=')
+ break;
+ }
+ if (i == 0) /* Invalid option: no name before '='. */
+ return;
+ if (i == len) /* Invalid option: no '='. */
+ return;
+ if (i == (len - 1)) /* Invalid option: no value after '='. */
+ return;
+
+ optionlen = i;
+ val = option + (optionlen + 1);
+ vallen = len - (optionlen + 1);
+
+ if (strncmp("gpr-names", option, optionlen) == 0
+ && strlen("gpr-names") == optionlen)
+ {
+ chosen_abi = choose_abi_by_name (val, vallen);
+ if (chosen_abi != NULL)
+ mips_gpr_names = chosen_abi->gpr_names;
+ return;
+ }
- case 'P':
- (*info->fprintf_func) (info->stream, "%d",
- (l >> OP_SH_PERFREG) & OP_MASK_PERFREG);
- break;
+ if (strncmp("fpr-names", option, optionlen) == 0
+ && strlen("fpr-names") == optionlen)
+ {
+ chosen_abi = choose_abi_by_name (val, vallen);
+ if (chosen_abi != NULL)
+ mips_fpr_names = chosen_abi->fpr_names;
+ return;
+ }
- case 'e':
- (*info->fprintf_func) (info->stream, "%d",
- (l >> OP_SH_VECBYTE) & OP_MASK_VECBYTE);
- break;
+ if (strncmp("cp0-names", option, optionlen) == 0
+ && strlen("cp0-names") == optionlen)
+ {
+ chosen_arch = choose_arch_by_name (val, vallen);
+ if (chosen_arch != NULL)
+ {
+ mips_cp0_names = chosen_arch->cp0_names;
+ mips_cp0sel_names = chosen_arch->cp0sel_names;
+ mips_cp0sel_names_len = chosen_arch->cp0sel_names_len;
+ }
+ return;
+ }
- case '%':
- (*info->fprintf_func) (info->stream, "%d",
- (l >> OP_SH_VECALIGN) & OP_MASK_VECALIGN);
- break;
+ if (strncmp("hwr-names", option, optionlen) == 0
+ && strlen("hwr-names") == optionlen)
+ {
+ chosen_arch = choose_arch_by_name (val, vallen);
+ if (chosen_arch != NULL)
+ mips_hwr_names = chosen_arch->hwr_names;
+ return;
+ }
- case 'H':
- (*info->fprintf_func) (info->stream, "%d",
- (l >> OP_SH_SEL) & OP_MASK_SEL);
- break;
+ if (strncmp("reg-names", option, optionlen) == 0
+ && strlen("reg-names") == optionlen)
+ {
+ /* We check both ABI and ARCH here unconditionally, so
+ that "numeric" will do the desirable thing: select
+ numeric register names for all registers. Other than
+ that, a given name probably won't match both. */
+ chosen_abi = choose_abi_by_name (val, vallen);
+ if (chosen_abi != NULL)
+ {
+ mips_gpr_names = chosen_abi->gpr_names;
+ mips_fpr_names = chosen_abi->fpr_names;
+ }
+ chosen_arch = choose_arch_by_name (val, vallen);
+ if (chosen_arch != NULL)
+ {
+ mips_cp0_names = chosen_arch->cp0_names;
+ mips_cp0sel_names = chosen_arch->cp0sel_names;
+ mips_cp0sel_names_len = chosen_arch->cp0sel_names_len;
+ mips_hwr_names = chosen_arch->hwr_names;
+ }
+ return;
+ }
- case 'O':
- (*info->fprintf_func) (info->stream, "%d",
- (l >> OP_SH_ALN) & OP_MASK_ALN);
- break;
+ /* Invalid option. */
+}
- case 'Q':
- {
- unsigned int vsel = (l >> OP_SH_VSEL) & OP_MASK_VSEL;
- if ((vsel & 0x10) == 0)
- {
- int fmt;
- vsel &= 0x0f;
- for (fmt = 0; fmt < 3; fmt++, vsel >>= 1)
- if ((vsel & 1) == 0)
- break;
- (*info->fprintf_func) (info->stream, "$v%d[%d]",
- (l >> OP_SH_FT) & OP_MASK_FT,
- vsel >> 1);
- }
- else if ((vsel & 0x08) == 0)
- {
- (*info->fprintf_func) (info->stream, "$v%d",
- (l >> OP_SH_FT) & OP_MASK_FT);
- }
- else
- {
- (*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_FT) & OP_MASK_FT);
- }
- }
- break;
+void
+parse_mips_dis_options (options)
+ const char *options;
+{
+ const char *option_end;
- case 'X':
- (*info->fprintf_func) (info->stream, "$v%d",
- (l >> OP_SH_FD) & OP_MASK_FD);
- break;
+ if (options == NULL)
+ return;
- case 'Y':
- (*info->fprintf_func) (info->stream, "$v%d",
- (l >> OP_SH_FS) & OP_MASK_FS);
- break;
+ while (*options != '\0')
+ {
+ /* Skip empty options. */
+ if (*options == ',')
+ {
+ options++;
+ continue;
+ }
- case 'Z':
- (*info->fprintf_func) (info->stream, "$v%d",
- (l >> OP_SH_FT) & OP_MASK_FT);
- break;
+ /* We know that *options is neither NUL or a comma. */
+ option_end = options + 1;
+ while (*option_end != ',' && *option_end != '\0')
+ option_end++;
- default:
- /* xgettext:c-format */
- (*info->fprintf_func) (info->stream,
- _("# internal error, undefined modifier(%c)"),
- *d);
- break;
+ parse_mips_dis_option (options, option_end - options);
+
+ /* Go on to the next one. If option_end points to a comma, it
+ will be skipped above. */
+ options = option_end;
}
}
+
+static const struct mips_cp0sel_name *
+lookup_mips_cp0sel_name(names, len, cp0reg, sel)
+ const struct mips_cp0sel_name *names;
+ unsigned int len, cp0reg, sel;
+{
+ unsigned int i;
+
+ for (i = 0; i < len; i++)
+ if (names[i].cp0reg == cp0reg && names[i].sel == sel)
+ return &names[i];
+ return NULL;
+}
-/* Figure out the MIPS ISA and CPU based on the machine number. */
+/* Print insn arguments for 32/64-bit code. */
static void
-mips_isa_type (mach, isa, cputype)
- int mach;
- int *isa;
- int *cputype;
+print_insn_args (d, l, pc, info)
+ const char *d;
+ register unsigned long int l;
+ bfd_vma pc;
+ struct disassemble_info *info;
{
- switch (mach)
+ int op, delta;
+ unsigned int lsb, msb, msbd;
+
+ lsb = 0;
+
+ for (; *d != '\0'; d++)
{
- case bfd_mach_mips3000:
- *cputype = CPU_R3000;
- *isa = ISA_MIPS1;
- break;
- case bfd_mach_mips3900:
- *cputype = CPU_R3900;
- *isa = ISA_MIPS1;
- break;
- case bfd_mach_mips4000:
- *cputype = CPU_R4000;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4010:
- *cputype = CPU_R4010;
- *isa = ISA_MIPS2;
- break;
- case bfd_mach_mips4100:
- *cputype = CPU_VR4100;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4111:
- *cputype = CPU_R4111;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4120:
- *cputype = CPU_VR4120;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4300:
- *cputype = CPU_R4300;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4400:
- *cputype = CPU_R4400;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4600:
- *cputype = CPU_R4600;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips4650:
- *cputype = CPU_R4650;
- *isa = ISA_MIPS3;
- break;
- case bfd_mach_mips5000:
- *cputype = CPU_R5000;
- *isa = ISA_MIPS4;
- break;
- case bfd_mach_mips5400:
- *cputype = CPU_VR5400;
- *isa = ISA_MIPS4;
- break;
- case bfd_mach_mips5500:
- *cputype = CPU_VR5500;
- *isa = ISA_MIPS4;
- break;
- case bfd_mach_mips6000:
- *cputype = CPU_R6000;
- *isa = ISA_MIPS2;
- break;
- case bfd_mach_mips8000:
- *cputype = CPU_R8000;
- *isa = ISA_MIPS4;
- break;
- case bfd_mach_mips10000:
- *cputype = CPU_R10000;
- *isa = ISA_MIPS4;
- break;
- case bfd_mach_mips12000:
- *cputype = CPU_R12000;
- *isa = ISA_MIPS4;
- break;
- case bfd_mach_mips16:
- *cputype = CPU_MIPS16;
- *isa = ISA_MIPS3 | INSN_MIPS16;
- break;
- case bfd_mach_mips5:
- *cputype = CPU_MIPS5;
- *isa = ISA_MIPS5;
- break;
- case bfd_mach_mips_sb1:
- *cputype = CPU_SB1;
- *isa = ISA_MIPS64 | INSN_MIPS3D | INSN_SB1;
- break;
- case bfd_mach_mipsisa32:
- *cputype = CPU_MIPS32;
- /* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
- Note that MIPS-3D and MDMX are not applicable to MIPS32. (See
- _MIPS32 Architecture For Programmers Volume I: Introduction to the
- MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
- page 1. */
- *isa = ISA_MIPS32 | INSN_MIPS16;
- break;
- case bfd_mach_mipsisa64:
- *cputype = CPU_MIPS64;
- /* For stock MIPS64, disassemble all applicable MIPS-specified ASEs. */
- *isa = ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX;
- break;
+ switch (*d)
+ {
+ case ',':
+ case '(':
+ case ')':
+ case '[':
+ case ']':
+ (*info->fprintf_func) (info->stream, "%c", *d);
+ break;
+
+ case '+':
+ /* Extension character; switch for second char. */
+ d++;
+ switch (*d)
+ {
+ case '\0':
+ /* xgettext:c-format */
+ (*info->fprintf_func) (info->stream,
+ _("# internal error, incomplete extension sequence (+)"));
+ return;
+
+ case 'A':
+ lsb = (l >> OP_SH_SHAMT) & OP_MASK_SHAMT;
+ (*info->fprintf_func) (info->stream, "0x%x", lsb);
+ break;
+
+ case 'B':
+ msb = (l >> OP_SH_INSMSB) & OP_MASK_INSMSB;
+ (*info->fprintf_func) (info->stream, "0x%x", msb - lsb + 1);
+ break;
+
+ case 'C':
+ msbd = (l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD;
+ (*info->fprintf_func) (info->stream, "0x%x", msbd + 1);
+ break;
+
+ case 'D':
+ {
+ const struct mips_cp0sel_name *n;
+ unsigned int cp0reg, sel;
+
+ cp0reg = (l >> OP_SH_RD) & OP_MASK_RD;
+ sel = (l >> OP_SH_SEL) & OP_MASK_SEL;
+
+ /* CP0 register including 'sel' code for mtcN (et al.), to be
+ printed textually if known. If not known, print both
+ CP0 register name and sel numerically since CP0 register
+ with sel 0 may have a name unrelated to register being
+ printed. */
+ n = lookup_mips_cp0sel_name(mips_cp0sel_names,
+ mips_cp0sel_names_len, cp0reg, sel);
+ if (n != NULL)
+ (*info->fprintf_func) (info->stream, "%s", n->name);
+ else
+ (*info->fprintf_func) (info->stream, "$%d,%d", cp0reg, sel);
+ break;
+ }
- default:
- *cputype = CPU_R3000;
- *isa = ISA_MIPS3;
- break;
+ default:
+ /* xgettext:c-format */
+ (*info->fprintf_func) (info->stream,
+ _("# internal error, undefined extension sequence (+%c)"),
+ *d);
+ return;
+ }
+ break;
+
+ case 's':
+ case 'b':
+ case 'r':
+ case 'v':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[(l >> OP_SH_RS) & OP_MASK_RS]);
+ break;
+
+ case 't':
+ case 'w':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+ break;
+
+ case 'i':
+ case 'u':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_IMMEDIATE) & OP_MASK_IMMEDIATE);
+ break;
+
+ case 'j': /* Same as i, but sign-extended. */
+ case 'o':
+ delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
+ if (delta & 0x8000)
+ delta |= ~0xffff;
+ (*info->fprintf_func) (info->stream, "%d",
+ delta);
+ break;
+
+ case 'h':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (unsigned int) ((l >> OP_SH_PREFX)
+ & OP_MASK_PREFX));
+ break;
+
+ case 'k':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (unsigned int) ((l >> OP_SH_CACHE)
+ & OP_MASK_CACHE));
+ break;
+
+ case 'a':
+ info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff)
+ | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2));
+ (*info->print_address_func) (info->target, info);
+ break;
+
+ case 'p':
+ /* Sign extend the displacement. */
+ delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
+ if (delta & 0x8000)
+ delta |= ~0xffff;
+ info->target = (delta << 2) + pc + INSNLEN;
+ (*info->print_address_func) (info->target, info);
+ break;
+
+ case 'd':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[(l >> OP_SH_RD) & OP_MASK_RD]);
+ break;
+
+ case 'U':
+ {
+ /* First check for both rd and rt being equal. */
+ unsigned int reg = (l >> OP_SH_RD) & OP_MASK_RD;
+ if (reg == ((l >> OP_SH_RT) & OP_MASK_RT))
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[reg]);
+ else
+ {
+ /* If one is zero use the other. */
+ if (reg == 0)
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+ else if (((l >> OP_SH_RT) & OP_MASK_RT) == 0)
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[reg]);
+ else /* Bogus, result depends on processor. */
+ (*info->fprintf_func) (info->stream, "%s or %s",
+ mips_gpr_names[reg],
+ mips_gpr_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+ }
+ }
+ break;
+
+ case 'z':
+ (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[0]);
+ break;
+
+ case '<':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_SHAMT) & OP_MASK_SHAMT);
+ break;
+
+ case 'c':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_CODE) & OP_MASK_CODE);
+ break;
+
+ case 'q':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_CODE2) & OP_MASK_CODE2);
+ break;
+
+ case 'C':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_COPZ) & OP_MASK_COPZ);
+ break;
+
+ case 'B':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_CODE20) & OP_MASK_CODE20);
+ break;
+
+ case 'J':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_CODE19) & OP_MASK_CODE19);
+ break;
+
+ case 'S':
+ case 'V':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_fpr_names[(l >> OP_SH_FS) & OP_MASK_FS]);
+ break;
+
+ case 'T':
+ case 'W':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_fpr_names[(l >> OP_SH_FT) & OP_MASK_FT]);
+ break;
+
+ case 'D':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_fpr_names[(l >> OP_SH_FD) & OP_MASK_FD]);
+ break;
+
+ case 'R':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_fpr_names[(l >> OP_SH_FR) & OP_MASK_FR]);
+ break;
+
+ case 'E':
+ /* Coprocessor register for lwcN instructions, et al.
+
+ Note that there is no load/store cp0 instructions, and
+ that FPU (cp1) instructions disassemble this field using
+ 'T' format. Therefore, until we gain understanding of
+ cp2 register names, we can simply print the register
+ numbers. */
+ (*info->fprintf_func) (info->stream, "$%d",
+ (l >> OP_SH_RT) & OP_MASK_RT);
+ break;
+
+ case 'G':
+ /* Coprocessor register for mtcN instructions, et al. Note
+ that FPU (cp1) instructions disassemble this field using
+ 'S' format. Therefore, we only need to worry about cp0,
+ cp2, and cp3. */
+ op = (l >> OP_SH_OP) & OP_MASK_OP;
+ if (op == OP_OP_COP0)
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_cp0_names[(l >> OP_SH_RD) & OP_MASK_RD]);
+ else
+ (*info->fprintf_func) (info->stream, "$%d",
+ (l >> OP_SH_RD) & OP_MASK_RD);
+ break;
+
+ case 'K':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_hwr_names[(l >> OP_SH_RD) & OP_MASK_RD]);
+ break;
+
+ case 'N':
+ (*info->fprintf_func) (info->stream, "$fcc%d",
+ (l >> OP_SH_BCC) & OP_MASK_BCC);
+ break;
+
+ case 'M':
+ (*info->fprintf_func) (info->stream, "$fcc%d",
+ (l >> OP_SH_CCC) & OP_MASK_CCC);
+ break;
+
+ case 'P':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_PERFREG) & OP_MASK_PERFREG);
+ break;
+
+ case 'e':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_VECBYTE) & OP_MASK_VECBYTE);
+ break;
+
+ case '%':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_VECALIGN) & OP_MASK_VECALIGN);
+ break;
+
+ case 'H':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_SEL) & OP_MASK_SEL);
+ break;
+
+ case 'O':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_ALN) & OP_MASK_ALN);
+ break;
+
+ case 'Q':
+ {
+ unsigned int vsel = (l >> OP_SH_VSEL) & OP_MASK_VSEL;
+ if ((vsel & 0x10) == 0)
+ {
+ int fmt;
+ vsel &= 0x0f;
+ for (fmt = 0; fmt < 3; fmt++, vsel >>= 1)
+ if ((vsel & 1) == 0)
+ break;
+ (*info->fprintf_func) (info->stream, "$v%d[%d]",
+ (l >> OP_SH_FT) & OP_MASK_FT,
+ vsel >> 1);
+ }
+ else if ((vsel & 0x08) == 0)
+ {
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FT) & OP_MASK_FT);
+ }
+ else
+ {
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_FT) & OP_MASK_FT);
+ }
+ }
+ break;
+
+ case 'X':
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FD) & OP_MASK_FD);
+ break;
+
+ case 'Y':
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FS) & OP_MASK_FS);
+ break;
+
+ case 'Z':
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FT) & OP_MASK_FT);
+ break;
+
+ default:
+ /* xgettext:c-format */
+ (*info->fprintf_func) (info->stream,
+ _("# internal error, undefined modifier(%c)"),
+ *d);
+ return;
+ }
}
}
-
+
/* Check if the object uses NewABI conventions. */
static int
@@ -497,7 +1033,6 @@ print_insn_mips (memaddr, word, info)
struct disassemble_info *info;
{
register const struct mips_opcode *op;
- int target_processor, mips_isa;
static bfd_boolean init = 0;
static const struct mips_opcode *mips_hash[OP_MASK_OP + 1];
@@ -523,15 +1058,6 @@ print_insn_mips (memaddr, word, info)
init = 1;
}
-#if ! SYMTAB_AVAILABLE
- /* This is running out on a target machine, not in a host tool.
- FIXME: Where does mips_target_info come from? */
- target_processor = mips_target_info.processor;
- mips_isa = mips_target_info.isa;
-#else
- mips_isa_type (info->mach, &mips_isa, &target_processor);
-#endif
-
info->bytes_per_chunk = INSNLEN;
info->display_endian = info->endian;
info->insn_info_valid = 1;
@@ -551,7 +1077,7 @@ print_insn_mips (memaddr, word, info)
register const char *d;
/* We always allow to disassemble the jalx instruction. */
- if (! OPCODE_IS_MEMBER (op, mips_isa, target_processor)
+ if (! OPCODE_IS_MEMBER (op, mips_isa, mips_processor)
&& strcmp (op->name, "jalx"))
continue;
@@ -583,8 +1109,7 @@ print_insn_mips (memaddr, word, info)
if (d != NULL && *d != '\0')
{
(*info->fprintf_func) (info->stream, "\t");
- for (; *d != '\0'; d++)
- print_insn_arg (d, word, memaddr, info);
+ print_insn_args (d, word, memaddr, info);
}
return INSNLEN;
@@ -613,6 +1138,9 @@ _print_insn_mips (memaddr, info, endianness)
bfd_byte buffer[INSNLEN];
int status;
+ set_default_mips_dis_options (info);
+ parse_mips_dis_options (info->disassembler_options);
+
#if 1
/* FIXME: If odd address, this is CLEARLY a mips 16 instruction. */
/* Only a few tools will work this way. */
@@ -629,18 +1157,6 @@ _print_insn_mips (memaddr, info, endianness)
return print_insn_mips16 (memaddr, info);
#endif
- /* Use mips64_reg_names for new ABI. */
- reg_names = mips32_reg_names;
-
- if (info->flavour == bfd_target_elf_flavour && info->symbols != NULL)
- {
- Elf_Internal_Ehdr *header;
-
- header = elf_elfheader (bfd_asymbol_bfd (*(info->symbols)));
- if (is_newabi (header))
- reg_names = mips64_reg_names;
- }
-
status = (*info->read_memory_func) (memaddr, buffer, INSNLEN, info);
if (status == 0)
{
@@ -879,11 +1395,11 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
break;
case '0':
- (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[0]);
+ (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[0]);
break;
case 'S':
- (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[29]);
+ (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[29]);
break;
case 'P':
@@ -891,18 +1407,18 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
break;
case 'R':
- (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[31]);
+ (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[31]);
break;
case 'X':
(*info->fprintf_func) (info->stream, "%s",
- mips32_reg_names[((l >> MIPS16OP_SH_REGR32)
- & MIPS16OP_MASK_REGR32)]);
+ mips_gpr_names[((l >> MIPS16OP_SH_REGR32)
+ & MIPS16OP_MASK_REGR32)]);
break;
case 'Y':
(*info->fprintf_func) (info->stream, "%s",
- mips32_reg_names[MIPS16OP_EXTRACT_REG32R (l)]);
+ mips_gpr_names[MIPS16OP_EXTRACT_REG32R (l)]);
break;
case '<':
@@ -1185,10 +1701,10 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
if (amask > 0 && amask < 5)
{
- (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[4]);
+ (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[4]);
if (amask > 1)
(*info->fprintf_func) (info->stream, "-%s",
- mips32_reg_names[amask + 3]);
+ mips_gpr_names[amask + 3]);
need_comma = 1;
}
@@ -1203,10 +1719,10 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
{
(*info->fprintf_func) (info->stream, "%s%s",
need_comma ? "," : "",
- mips32_reg_names[16]);
+ mips_gpr_names[16]);
if (smask > 1)
(*info->fprintf_func) (info->stream, "-%s",
- mips32_reg_names[smask + 15]);
+ mips_gpr_names[smask + 15]);
need_comma = 1;
}
@@ -1214,7 +1730,7 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
{
(*info->fprintf_func) (info->stream, "%s%s",
need_comma ? "," : "",
- mips32_reg_names[31]);
+ mips_gpr_names[31]);
need_comma = 1;
}
@@ -1237,3 +1753,57 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
abort ();
}
}
+
+void
+print_mips_disassembler_options (stream)
+ FILE *stream;
+{
+ int i;
+
+ fprintf (stream, _("\n\
+The following MIPS specific disassembler options are supported for use\n\
+with the -M switch (multiple options should be separated by commas):\n"));
+
+ fprintf (stream, _("\n\
+ gpr-names=ABI Print GPR names according to specified ABI.\n\
+ Default: based on binary being disassembled.\n"));
+
+ fprintf (stream, _("\n\
+ fpr-names=ABI Print FPR names according to specified ABI.\n\
+ Default: numeric.\n"));
+
+ fprintf (stream, _("\n\
+ cp0-names=ARCH Print CP0 register names according to\n\
+ specified architecture.\n\
+ Default: based on binary being disassembled.\n"));
+
+ fprintf (stream, _("\n\
+ hwr-names=ARCH Print HWR names according to specified \n\
+ architecture.\n\
+ Default: based on binary being disassembled.\n"));
+
+ fprintf (stream, _("\n\
+ reg-names=ABI Print GPR and FPR names according to\n\
+ specified ABI.\n"));
+
+ fprintf (stream, _("\n\
+ reg-names=ARCH Print CP0 register and HWR names according to\n\
+ specified architecture.\n"));
+
+ fprintf (stream, _("\n\
+ For the options above, the following values are supported for \"ABI\":\n\
+ "));
+ for (i = 0; mips_abi_choices[i].name != NULL; i++)
+ fprintf (stream, " %s", mips_abi_choices[i].name);
+ fprintf (stream, _("\n"));
+
+ fprintf (stream, _("\n\
+ For the options above, The following values are supported for \"ARCH\":\n\
+ "));
+ for (i = 0; mips_arch_choices[i].name != NULL; i++)
+ if (*mips_arch_choices[i].name != '\0')
+ fprintf (stream, " %s", mips_arch_choices[i].name);
+ fprintf (stream, _("\n"));
+
+ fprintf (stream, _("\n"));
+}
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 61a2ebd79a5..228357a0c10 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -4,7 +4,8 @@
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
Extended for MIPS32 support by Anders Norlander, and by SiByte, Inc.
- MIPS-3D and MDMX support added by Broadcom Corporation (SiByte).
+ MIPS-3D, MDMX, and MIPS32 Release 2 support added by Broadcom
+ Corporation (SiByte).
This file is part of GDB, GAS, and the GNU binutils.
@@ -85,6 +86,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define I5 INSN_ISA5
#define I32 INSN_ISA32
#define I64 INSN_ISA64
+#define I33 INSN_ISA32R2
/* MIPS64 MIPS-3D ASE support. */
#define I16 INSN_MIPS16
@@ -137,8 +139,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* name, args, match, mask, pinfo, membership */
{"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, I4|I32|G3 },
{"prefx", "h,t(b)", 0x4c00000f, 0xfc0007ff, RD_b|RD_t, I4 },
-{"nop", "", 0x00000000, 0xffffffff, 0, I1 },
-{"ssnop", "", 0x00000040, 0xffffffff, 0, I32|N55 },
+{"nop", "", 0x00000000, 0xffffffff, 0, I1 }, /* sll */
+{"ssnop", "", 0x00000040, 0xffffffff, 0, I32|N55 }, /* sll */
+{"ehb", "", 0x000000c0, 0xffffffff, 0, I33 }, /* sll */
{"li", "t,j", 0x24000000, 0xffe00000, WR_t, I1 }, /* addiu */
{"li", "t,i", 0x34000000, 0xffe00000, WR_t, I1 }, /* ori */
{"li", "t,I", 0, (int) M_LI, INSN_MACRO, I1 },
@@ -486,6 +489,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ddivu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
{"ddivu", "d,v,t", 0, (int) M_DDIVU_3, INSN_MACRO, I3 },
{"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 },
/* 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,
@@ -516,8 +521,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmaccus", "d,s,t", 0x00000469, 0xfc0007ff, RD_s|RD_t|WR_LO|WR_d, N412 },
{"dmadd16", "s,t", 0x00000029, 0xfc00ffff, RD_s|RD_t|MOD_LO, N411 },
{"dmfc0", "t,G", 0x40200000, 0xffe007ff, LCD|WR_t|RD_C0, I3 },
+{"dmfc0", "t,+D", 0x40200000, 0xffe007f8, LCD|WR_t|RD_C0, I64 },
{"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, LCD|WR_t|RD_C0, I64 },
{"dmtc0", "t,G", 0x40a00000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC, I3 },
+{"dmtc0", "t,+D", 0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, I64 },
{"dmtc0", "t,G,H", 0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, I64 },
{"dmfc1", "t,S", 0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I3 },
{"dmfc1", "t,G", 0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I3 },
@@ -574,7 +581,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dsub", "d,v,I", 0, (int) M_DSUB_I, INSN_MACRO, I3 },
{"dsubu", "d,v,t", 0x0000002f, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
{"dsubu", "d,v,I", 0, (int) M_DSUBU_I, INSN_MACRO, I3 },
+{"ei", "", 0x41606020, 0xffffffff, WR_t|WR_C0, I33 },
+{"ei", "t", 0x41606020, 0xffe0ffff, WR_t|WR_C0, I33 },
{"eret", "", 0x42000018, 0xffffffff, 0, I3|I32 },
+{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, I33 },
{"floor.l.d", "D,S", 0x4620000b, 0xffff003f, WR_D|RD_S|FP_D, I3 },
{"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S, I3 },
{"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_D, I2 },
@@ -583,7 +593,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"flushd", "", 0xbc020000, 0xffffffff, 0, L1 },
{"flushid", "", 0xbc030000, 0xffffffff, 0, L1 },
{"hibernate","", 0x42000023, 0xffffffff, 0, V1 },
+{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, I33 },
{"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, I1 },
+{"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, I33 },
{"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, I1 }, /* jr */
/* SVR4 PIC code requires special handling for j, so it must be a
macro. */
@@ -594,6 +606,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"j", "a", 0x08000000, 0xfc000000, UBD, I1 },
{"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, I1 },
{"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, I1 },
+{"jalr.hb", "s", 0x0000fc09, 0xfc1fffff, UBD|RD_s|WR_d, I33 },
+{"jalr.hb", "d,s", 0x00000409, 0xfc1f07ff, UBD|RD_s|WR_d, I33 },
/* SVR4 PIC code requires special handling for jal, so it must be a
macro. */
{"jal", "d,s", 0, (int) M_JAL_2, INSN_MACRO, I1 },
@@ -702,11 +716,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mfpc", "t,P", 0x4000c801, 0xffe0ffc1, LCD|WR_t|RD_C0, M1|N5 },
{"mfps", "t,P", 0x4000c800, 0xffe0ffc1, LCD|WR_t|RD_C0, M1|N5 },
{"mfc0", "t,G", 0x40000000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
+{"mfc0", "t,+D", 0x40000000, 0xffe007f8, LCD|WR_t|RD_C0, I32 },
{"mfc0", "t,G,H", 0x40000000, 0xffe007f8, LCD|WR_t|RD_C0, I32 },
{"mfc1", "t,S", 0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I1 },
{"mfc1", "t,G", 0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I1 },
+{"mfhc1", "t,S", 0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I33 },
+{"mfhc1", "t,G", 0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I33 },
{"mfc2", "t,G", 0x48000000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
{"mfc2", "t,G,H", 0x48000000, 0xffe007f8, LCD|WR_t|RD_C2, I32 },
+{"mfhc2", "t,i", 0x48600000, 0xffe00000, LCD|WR_t|RD_C2, I33 },
{"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
{"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, I32 },
{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, N5 },
@@ -762,11 +780,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mtpc", "t,P", 0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0, M1|N5 },
{"mtps", "t,P", 0x4080c800, 0xffe0ffc1, COD|RD_t|WR_C0, M1|N5 },
{"mtc0", "t,G", 0x40800000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC, I1 },
+{"mtc0", "t,+D", 0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, I32 },
{"mtc0", "t,G,H", 0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, I32 },
{"mtc1", "t,S", 0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I1 },
{"mtc1", "t,G", 0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I1 },
+{"mthc1", "t,S", 0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I33 },
+{"mthc1", "t,G", 0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I33 },
{"mtc2", "t,G", 0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I1 },
{"mtc2", "t,G,H", 0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I32 },
+{"mthc2", "t,i", 0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC, I33 },
{"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, I1 },
{"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, I32 },
{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, N5 },
@@ -890,6 +912,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"remu", "z,s,t", 0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HILO, I1 },
{"remu", "d,v,t", 0, (int) M_REMU_3, INSN_MACRO, I1 },
{"remu", "d,v,I", 0, (int) M_REMU_3I, INSN_MACRO, I1 },
+{"rdhwr", "t,K", 0x7c00003b, 0xffe007ff, WR_t, I33 },
+{"rdpgpr", "d,w", 0x41400000, 0xffe007ff, WR_d, I33 },
{"rfe", "", 0x42000010, 0xffffffff, 0, I1|T3 },
{"rnas.qh", "X,Q", 0x78200025, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
{"rnau.ob", "X,Q", 0x78000021, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX|SB1 },
@@ -901,8 +925,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, I1 },
{"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, I1 },
{"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, I1 },
-{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, N5 },
-{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, N5 },
+{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, N5|I33 },
+{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, N5|I33 },
+{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, I33 },
+{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, I33 },
+{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, I33 },
+{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, I33 },
+{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, I33 },
{"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, I3 },
{"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S, I3 },
{"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_D, I2 },
@@ -950,6 +979,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"sdr", "t,o(b)", 0xb4000000, 0xfc000000, SM|RD_t|RD_b, I3 },
{"sdr", "t,A(b)", 0, (int) M_SDR_AB, INSN_MACRO, I3 },
{"sdxc1", "S,t(b)", 0x4c000009, 0xfc0007ff, SM|RD_S|RD_t|RD_b, I4 },
+{"seb", "d,w", 0x7c000420, 0xffe007ff, WR_d|RD_t, I33 },
+{"seh", "d,w", 0x7c000620, 0xffe007ff, WR_d|RD_t, I33 },
{"selsl", "d,v,t", 0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t, L1 },
{"selsr", "d,v,t", 0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t, L1 },
{"seq", "d,v,t", 0, (int) M_SEQ, INSN_MACRO, I1 },
@@ -1057,6 +1088,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"sync", "", 0x0000000f, 0xffffffff, INSN_SYNC, I2|G1 },
{"sync.p", "", 0x0000040f, 0xffffffff, INSN_SYNC, I2 },
{"sync.l", "", 0x0000000f, 0xffffffff, INSN_SYNC, I2 },
+{"synci", "o(b)", 0x041f0000, 0xfc1f0000, SM|RD_b, I33 },
{"syscall", "", 0x0000000c, 0xffffffff, TRAP, I1 },
{"syscall", "B", 0x0000000c, 0xfc00003f, TRAP, I1 },
{"teqi", "s,j", 0x040c0000, 0xfc1f0000, RD_s|TRAP, I2 },
@@ -1125,6 +1157,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"wait", "J", 0x42000020, 0xfe00003f, TRAP, I32|N55 },
{"waiti", "", 0x42000020, 0xffffffff, TRAP, L1 },
{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, L1 },
+{"wrpgpr", "d,w", 0x41c00000, 0xffe007ff, RD_t, I33 },
+{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, I33 },
{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, I1 },
{"xor.ob", "X,Y,Q", 0x7800000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
diff --git a/opcodes/msp430-dis.c b/opcodes/msp430-dis.c
new file mode 100644
index 00000000000..767ffa472c1
--- /dev/null
+++ b/opcodes/msp430-dis.c
@@ -0,0 +1,805 @@
+/* Disassemble MSP430 instructions.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public 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 <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "dis-asm.h"
+#include "opintl.h"
+#include "libiberty.h"
+
+#define DASM_SECTION
+#include "opcode/msp430.h"
+#undef DASM_SECTION
+
+
+static unsigned short msp430dis_opcode
+ PARAMS ((bfd_vma, disassemble_info *));
+int print_insn_msp430
+ PARAMS ((bfd_vma, disassemble_info *));
+int msp430_nooperands
+ PARAMS ((struct msp430_opcode_s *, bfd_vma, unsigned short, char *, int *));
+int msp430_singleoperand
+ PARAMS ((disassemble_info *, struct msp430_opcode_s *, bfd_vma, unsigned short,
+ char *, char *, int *));
+int msp430_doubleoperand
+ PARAMS ((disassemble_info *, struct msp430_opcode_s *, bfd_vma, unsigned short,
+ char *, char *, char *, char *, int *));
+int msp430_branchinstr
+ PARAMS ((disassemble_info *, struct msp430_opcode_s *, bfd_vma, unsigned short,
+ char *, char *, int *));
+
+#define PS(x) (0xffff & (x))
+
+static unsigned short
+msp430dis_opcode (addr, info)
+ bfd_vma addr;
+ disassemble_info *info;
+{
+ bfd_byte buffer[2];
+ int status;
+
+ status = info->read_memory_func (addr, buffer, 2, info);
+ if (status != 0)
+ {
+ info->memory_error_func (status, addr, info);
+ return -1;
+ }
+ return bfd_getl16 (buffer);
+}
+
+int
+print_insn_msp430 (addr, info)
+ bfd_vma addr;
+ disassemble_info *info;
+{
+ void *stream = info->stream;
+ fprintf_ftype prin = info->fprintf_func;
+ struct msp430_opcode_s *opcode;
+ char op1[32], op2[32], comm1[64], comm2[64];
+ int cmd_len = 0;
+ unsigned short insn;
+ int cycles = 0;
+ char *bc = "";
+ char dinfo[32]; /* Debug purposes. */
+
+ insn = msp430dis_opcode (addr, info);
+ sprintf (dinfo, "0x%04x", insn);
+
+ if (((int) addr & 0xffff) > 0xffdf)
+ {
+ (*prin) (stream, "interrupt service routine at 0x%04x", 0xffff & insn);
+ return 2;
+ }
+
+ *comm1 = 0;
+ *comm2 = 0;
+
+ for (opcode = msp430_opcodes; opcode->name; opcode++)
+ {
+ if ((insn & opcode->bin_mask) == opcode->bin_opcode
+ && opcode->bin_opcode != 0x9300)
+ {
+ *op1 = 0;
+ *op2 = 0;
+ *comm1 = 0;
+ *comm2 = 0;
+
+ /* r0 as destination. Ad should be zero. */
+ if (opcode->insn_opnumb == 3 && (insn & 0x000f) == 0
+ && (0x0080 & insn) == 0)
+ {
+ cmd_len =
+ msp430_branchinstr (info, opcode, addr, insn, op1, comm1,
+ &cycles);
+ if (cmd_len)
+ break;
+ }
+
+ switch (opcode->insn_opnumb)
+ {
+ case 0:
+ cmd_len = msp430_nooperands (opcode, addr, insn, comm1, &cycles);
+ break;
+ case 2:
+ cmd_len =
+ msp430_doubleoperand (info, opcode, addr, insn, op1, op2,
+ comm1, comm2, &cycles);
+ if (insn & BYTE_OPERATION)
+ bc = ".b";
+ break;
+ case 1:
+ cmd_len =
+ msp430_singleoperand (info, opcode, addr, insn, op1, comm1,
+ &cycles);
+ if (insn & BYTE_OPERATION && opcode->fmt != 3)
+ bc = ".b";
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (cmd_len)
+ break;
+ }
+
+ dinfo[5] = 0;
+
+ if (cmd_len < 1)
+ {
+ /* Unknown opcode, or invalid combination of operands. */
+ (*prin) (stream, ".word 0x%04x; ????", PS (insn));
+ return 2;
+ }
+
+ (*prin) (stream, "%s%s", opcode->name, bc);
+
+ if (*op1)
+ (*prin) (stream, "\t%s", op1);
+ if (*op2)
+ (*prin) (stream, ",");
+
+ if (strlen (op1) < 7)
+ (*prin) (stream, "\t");
+ if (!strlen (op1))
+ (*prin) (stream, "\t");
+
+ if (*op2)
+ (*prin) (stream, "%s", op2);
+ if (strlen (op2) < 8)
+ (*prin) (stream, "\t");
+
+ if (*comm1 || *comm2)
+ (*prin) (stream, ";");
+ else if (cycles)
+ {
+ if (*op2)
+ (*prin) (stream, ";");
+ else
+ {
+ if (strlen (op1) < 7)
+ (*prin) (stream, ";");
+ else
+ (*prin) (stream, "\t;");
+ }
+ }
+ if (*comm1)
+ (*prin) (stream, "%s", comm1);
+ if (*comm1 && *comm2)
+ (*prin) (stream, ",");
+ if (*comm2)
+ (*prin) (stream, " %s", comm2);
+ return cmd_len;
+}
+
+int
+msp430_nooperands (opcode, addr, insn, comm, cycles)
+ struct msp430_opcode_s *opcode;
+ bfd_vma addr ATTRIBUTE_UNUSED;
+ unsigned short insn ATTRIBUTE_UNUSED;
+ char *comm;
+ int *cycles;
+{
+ /* Pop with constant. */
+ if (insn == 0x43b2)
+ return 0;
+ if (insn == opcode->bin_opcode)
+ return 2;
+
+ if (opcode->fmt == 0)
+ {
+ if ((insn & 0x0f00) != 3 || (insn & 0x0f00) != 2)
+ return 0;
+
+ strcpy (comm, "emulated...");
+ *cycles = 1;
+ }
+ else
+ {
+ strcpy (comm, "return from interupt");
+ *cycles = 5;
+ }
+
+ return 2;
+}
+
+
+int
+msp430_singleoperand (info, opcode, addr, insn, op, comm, cycles)
+ disassemble_info *info;
+ struct msp430_opcode_s *opcode;
+ bfd_vma addr;
+ unsigned short insn;
+ char *op;
+ char *comm;
+ int *cycles;
+{
+ int regs = 0, regd = 0;
+ int ad = 0, as = 0;
+ int where = 0;
+ int cmd_len = 2;
+ short dst = 0;
+
+ regd = insn & 0x0f;
+ regs = (insn & 0x0f00) >> 8;
+ as = (insn & 0x0030) >> 4;
+ ad = (insn & 0x0080) >> 7;
+
+ switch (opcode->fmt)
+ {
+ case 0: /* Emulated work with dst register. */
+ if (regs != 2 && regs != 3 && regs != 1)
+ return 0;
+
+ /* Check if not clr insn. */
+ if (opcode->bin_opcode == 0x4300 && (ad || as))
+ return 0;
+
+ /* Check if really inc, incd insns. */
+ if ((opcode->bin_opcode & 0xff00) == 0x5300 && as == 3)
+ return 0;
+
+ if (ad == 0)
+ {
+ *cycles = 1;
+
+ /* Register. */
+ if (regd == 0)
+ {
+ *cycles += 1;
+ sprintf (op, "r0");
+ }
+ else if (regd == 1)
+ sprintf (op, "r1");
+
+ else if (regd == 2)
+ sprintf (op, "r2");
+
+ else
+ sprintf (op, "r%d", regd);
+ }
+ else /* ad == 1 msp430dis_opcode. */
+ {
+ if (regd == 0)
+ {
+ /* PC relative. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ *cycles = 4;
+ sprintf (op, "0x%04x", dst);
+ sprintf (comm, "PC rel. abs addr 0x%04x",
+ PS ((short) (addr + 2) + dst));
+ }
+ else if (regd == 2)
+ {
+ /* Absolute. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ *cycles = 4;
+ sprintf (op, "&0x%04x", PS (dst));
+ }
+ else
+ {
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ *cycles = 4;
+ sprintf (op, "%d(r%d)", dst, regd);
+ }
+ }
+ break;
+
+ case 2: /* rrc, push, call, swpb, rra, sxt, push, call, reti etc... */
+
+ if (as == 0)
+ {
+ if (regd == 3)
+ {
+ /* Constsnts. */
+ sprintf (op, "#0");
+ sprintf (comm, "r3 As==00");
+ }
+ else
+ {
+ /* Register. */
+ sprintf (op, "r%d", regd);
+ }
+ *cycles = 1;
+ }
+ else if (as == 2)
+ {
+ *cycles = 1;
+ if (regd == 2)
+ {
+ sprintf (op, "#4");
+ sprintf (comm, "r2 As==10");
+ }
+ else if (regd == 3)
+ {
+ sprintf (op, "#2");
+ sprintf (comm, "r3 As==10");
+ }
+ else
+ {
+ *cycles = 3;
+ /* Indexed register mode @Rn. */
+ sprintf (op, "@r%d", regd);
+ }
+ }
+ else if (as == 3)
+ {
+ *cycles = 1;
+ if (regd == 2)
+ {
+ sprintf (op, "#8");
+ sprintf (comm, "r2 As==11");
+ }
+ else if (regd == 3)
+ {
+ sprintf (op, "#-1");
+ sprintf (comm, "r3 As==11");
+ }
+ else if (regd == 0)
+ {
+ *cycles = 3;
+ /* absolute. @pc+ */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op, "#%d", dst);
+ sprintf (comm, "#0x%04x", PS (dst));
+ }
+ else
+ {
+ *cycles = 3;
+ sprintf (op, "@r%d+", regd);
+ }
+ }
+ else if (as == 1)
+ {
+ *cycles = 4;
+ if (regd == 0)
+ {
+ /* PC relative. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op, "0x%04x", PS (dst));
+ sprintf (comm, "PC rel. 0x%04x",
+ PS ((short) addr + 2 + dst));
+ }
+ else if (regd == 2)
+ {
+ /* Absolute. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op, "&0x%04x", PS (dst));
+ }
+ else if (regd == 3)
+ {
+ *cycles = 1;
+ sprintf (op, "#1");
+ sprintf (comm, "r3 As==01");
+ }
+ else
+ {
+ /* Indexd. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op, "%d(r%d)", dst, regd);
+ }
+ }
+ break;
+
+ case 3: /* Jumps. */
+ where = insn & 0x03ff;
+ if (where & 0x200)
+ where |= ~0x03ff;
+ if (where > 512 || where < -511)
+ return 0;
+
+ where *= 2;
+ sprintf (op, "$%+-8d", where + 2);
+ sprintf (comm, "abs 0x%x", PS ((short) (addr) + 2 + where));
+ *cycles = 2;
+ return 2;
+ break;
+ default:
+ cmd_len = 0;
+ }
+
+ return cmd_len;
+}
+
+int
+msp430_doubleoperand (info, opcode, addr, insn, op1, op2, comm1, comm2, cycles)
+ disassemble_info *info;
+ struct msp430_opcode_s *opcode;
+ bfd_vma addr;
+ unsigned short insn;
+ char *op1, *op2;
+ char *comm1, *comm2;
+ int *cycles;
+{
+ int regs = 0, regd = 0;
+ int ad = 0, as = 0;
+ int cmd_len = 2;
+ short dst = 0;
+
+ regd = insn & 0x0f;
+ regs = (insn & 0x0f00) >> 8;
+ as = (insn & 0x0030) >> 4;
+ ad = (insn & 0x0080) >> 7;
+
+ if (opcode->fmt == 0)
+ {
+ /* Special case: rla and rlc are the only 2 emulated instructions that
+ fall into two operand instructions. */
+ /* With dst, there are only:
+ Rm Register,
+ x(Rm) Indexed,
+ 0xXXXX Relative,
+ &0xXXXX Absolute
+ emulated_ins dst
+ basic_ins dst, dst. */
+
+ if (regd != regs || as != ad)
+ return 0; /* May be 'data' section. */
+
+ if (ad == 0)
+ {
+ /* Register mode. */
+ if (regd == 3)
+ {
+ strcpy (comm1, "Illegal as emulation instr");
+ return -1;
+ }
+
+ sprintf (op1, "r%d", regd);
+ *cycles = 1;
+ }
+ else /* ad == 1 */
+ {
+ if (regd == 0)
+ {
+ /* PC relative, Symbolic. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 4;
+ *cycles = 6;
+ sprintf (op1, "0x%04x", PS (dst));
+ sprintf (comm1, "PC rel. 0x%04x",
+ PS ((short) addr + 2 + dst));
+
+ }
+ else if (regd == 2)
+ {
+ /* Absolute. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 4;
+ *cycles = 6;
+ sprintf (op1, "&0x%04x", PS (dst));
+ }
+ else
+ {
+ /* Indexed. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 4;
+ *cycles = 6;
+ sprintf (op1, "%d(r%d)", dst, regd);
+ }
+ }
+
+ *op2 = 0;
+ *comm2 = 0;
+ return cmd_len;
+ }
+
+ /* Two operands exactly. */
+ if (ad == 0 && regd == 3)
+ {
+ /* R2/R3 are illegal as dest: may be data section. */
+ strcpy (comm1, "Illegal as 2-op instr");
+ return -1;
+ }
+
+ /* Source. */
+ if (as == 0)
+ {
+ *cycles = 1;
+ if (regs == 3)
+ {
+ /* Constsnts. */
+ sprintf (op1, "#0");
+ sprintf (comm1, "r3 As==00");
+ }
+ else
+ {
+ /* Register. */
+ sprintf (op1, "r%d", regs);
+ }
+ }
+ else if (as == 2)
+ {
+ *cycles = 1;
+
+ if (regs == 2)
+ {
+ sprintf (op1, "#4");
+ sprintf (comm1, "r2 As==10");
+ }
+ else if (regs == 3)
+ {
+ sprintf (op1, "#2");
+ sprintf (comm1, "r3 As==10");
+ }
+ else
+ {
+ *cycles = 2;
+
+ /* Indexed register mode @Rn. */
+ sprintf (op1, "@r%d", regs);
+ }
+ if (!regs)
+ *cycles = 3;
+ }
+ else if (as == 3)
+ {
+ if (regs == 2)
+ {
+ sprintf (op1, "#8");
+ sprintf (comm1, "r2 As==11");
+ *cycles = 1;
+ }
+ else if (regs == 3)
+ {
+ sprintf (op1, "#-1");
+ sprintf (comm1, "r3 As==11");
+ *cycles = 1;
+ }
+ else if (regs == 0)
+ {
+ *cycles = 3;
+ /* Absolute. @pc+ */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "#%d", dst);
+ sprintf (comm1, "#0x%04x", PS (dst));
+ }
+ else
+ {
+ *cycles = 2;
+ sprintf (op1, "@r%d+", regs);
+ }
+ }
+ else if (as == 1)
+ {
+ if (regs == 0)
+ {
+ *cycles = 4;
+ /* PC relative. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "0x%04x", PS (dst));
+ sprintf (comm1, "PC rel. 0x%04x",
+ PS ((short) addr + 2 + dst));
+ }
+ else if (regs == 2)
+ {
+ *cycles = 2;
+ /* Absolute. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "&0x%04x", PS (dst));
+ sprintf (comm1, "0x%04x", PS (dst));
+ }
+ else if (regs == 3)
+ {
+ *cycles = 1;
+ sprintf (op1, "#1");
+ sprintf (comm1, "r3 As==01");
+ }
+ else
+ {
+ *cycles = 3;
+ /* Indexed. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "%d(r%d)", dst, regs);
+ }
+ }
+
+ /* Destination. Special care needed on addr + XXXX. */
+
+ if (ad == 0)
+ {
+ /* Register. */
+ if (regd == 0)
+ {
+ *cycles += 1;
+ sprintf (op2, "r0");
+ }
+ else if (regd == 1)
+ sprintf (op2, "r1");
+
+ else if (regd == 2)
+ sprintf (op2, "r2");
+
+ else
+ sprintf (op2, "r%d", regd);
+ }
+ else /* ad == 1. */
+ {
+ * cycles += 3;
+
+ if (regd == 0)
+ {
+ /* PC relative. */
+ *cycles += 1;
+ dst = msp430dis_opcode (addr + cmd_len, info);
+ sprintf (op2, "0x%04x", PS (dst));
+ sprintf (comm2, "PC rel. 0x%04x",
+ PS ((short) addr + cmd_len + dst));
+ cmd_len += 2;
+ }
+ else if (regd == 2)
+ {
+ /* Absolute. */
+ dst = msp430dis_opcode (addr + cmd_len, info);
+ cmd_len += 2;
+ sprintf (op2, "&0x%04x", PS (dst));
+ }
+ else
+ {
+ dst = msp430dis_opcode (addr + cmd_len, info);
+ cmd_len += 2;
+ sprintf (op2, "%d(r%d)", dst, regd);
+ }
+ }
+
+ return cmd_len;
+}
+
+
+int
+msp430_branchinstr (info, opcode, addr, insn, op1, comm1, cycles)
+ disassemble_info *info;
+ struct msp430_opcode_s *opcode ATTRIBUTE_UNUSED;
+ bfd_vma addr ATTRIBUTE_UNUSED;
+ unsigned short insn;
+ char *op1;
+ char *comm1;
+ int *cycles;
+{
+ int regs = 0, regd = 0;
+ int ad = 0, as = 0;
+ int cmd_len = 2;
+ short dst = 0;
+
+ regd = insn & 0x0f;
+ regs = (insn & 0x0f00) >> 8;
+ as = (insn & 0x0030) >> 4;
+ ad = (insn & 0x0080) >> 7;
+
+ if (regd != 0) /* Destination register is not a PC. */
+ return 0;
+
+ /* dst is a source register. */
+ if (as == 0)
+ {
+ /* Constants. */
+ if (regs == 3)
+ {
+ *cycles = 1;
+ sprintf (op1, "#0");
+ sprintf (comm1, "r3 As==00");
+ }
+ else
+ {
+ /* Register. */
+ *cycles = 1;
+ sprintf (op1, "r%d", regs);
+ }
+ }
+ else if (as == 2)
+ {
+ if (regs == 2)
+ {
+ *cycles = 2;
+ sprintf (op1, "#4");
+ sprintf (comm1, "r2 As==10");
+ }
+ else if (regs == 3)
+ {
+ *cycles = 1;
+ sprintf (op1, "#2");
+ sprintf (comm1, "r3 As==10");
+ }
+ else
+ {
+ /* Indexed register mode @Rn. */
+ *cycles = 2;
+ sprintf (op1, "@r%d", regs);
+ }
+ }
+ else if (as == 3)
+ {
+ if (regs == 2)
+ {
+ *cycles = 1;
+ sprintf (op1, "#8");
+ sprintf (comm1, "r2 As==11");
+ }
+ else if (regs == 3)
+ {
+ *cycles = 1;
+ sprintf (op1, "#-1");
+ sprintf (comm1, "r3 As==11");
+ }
+ else if (regs == 0)
+ {
+ /* Absolute. @pc+ */
+ *cycles = 3;
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "#0x%04x", PS (dst));
+ }
+ else
+ {
+ *cycles = 2;
+ sprintf (op1, "@r%d+", regs);
+ }
+ }
+ else if (as == 1)
+ {
+ * cycles = 3;
+
+ if (regs == 0)
+ {
+ /* PC relative. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ (*cycles)++;
+ sprintf (op1, "0x%04x", PS (dst));
+ sprintf (comm1, "PC rel. 0x%04x",
+ PS ((short) addr + 2 + dst));
+ }
+ else if (regs == 2)
+ {
+ /* Absolute. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "&0x%04x", PS (dst));
+ }
+ else if (regs == 3)
+ {
+ (*cycles)--;
+ sprintf (op1, "#1");
+ sprintf (comm1, "r3 As==01");
+ }
+ else
+ {
+ /* Indexd. */
+ dst = msp430dis_opcode (addr + 2, info);
+ cmd_len += 2;
+ sprintf (op1, "%d(r%d)", dst, regs);
+ }
+ }
+
+ return cmd_len;
+}
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 861e4104d52..9a14a1daeb9 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -61,6 +61,13 @@ ip2k-dis.c
ip2k-ibld.c
ip2k-opc.c
ip2k-opc.h
+iq2000-asm.c
+iq2000-desc.c
+iq2000-desc.h
+iq2000-dis.c
+iq2000-ibld.c
+iq2000-opc.c
+iq2000-opc.h
m10200-dis.c
m10200-opc.c
m10300-dis.c
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 75f34c87e57..1b62f87af99 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4552,8 +4552,8 @@ const struct powerpc_macro powerpc_macros[] = {
{ "extlwi", 4, PPCCOM, "rlwinm %0,%1,%3,0,(%2)-1" },
{ "extlwi.", 4, PPCCOM, "rlwinm. %0,%1,%3,0,(%2)-1" },
-{ "extrwi", 4, PPCCOM, "rlwinm %0,%1,(%2)+(%3),32-(%2),31" },
-{ "extrwi.", 4, PPCCOM, "rlwinm. %0,%1,(%2)+(%3),32-(%2),31" },
+{ "extrwi", 4, PPCCOM, "rlwinm %0,%1,((%2)+(%3))&((%2)+(%3)<>32),32-(%2),31" },
+{ "extrwi.", 4, PPCCOM, "rlwinm. %0,%1,((%2)+(%3))&((%2)+(%3)<>32),32-(%2),31" },
{ "inslwi", 4, PPCCOM, "rlwimi %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1" },
{ "inslwi.", 4, PPCCOM, "rlwimi. %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1"},
{ "insrwi", 4, PPCCOM, "rlwimi %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1" },
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 966a10eb712..a23110febfd 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -1,20 +1,20 @@
/* Disassemble SH instructions.
- Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1997, 1998, 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
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "sysdep.h"
@@ -315,6 +315,9 @@ print_insn_sh (memaddr, info)
case bfd_mach_sh2:
target_arch = arch_sh2;
break;
+ case bfd_mach_sh2e:
+ target_arch = arch_sh2e;
+ break;
case bfd_mach_sh_dsp:
target_arch = arch_sh_dsp;
break;
diff --git a/opcodes/sh-opc.h b/opcodes/sh-opc.h
index 21f64dde61a..f415e5e472e 100644
--- a/opcodes/sh-opc.h
+++ b/opcodes/sh-opc.h
@@ -1,167 +1,176 @@
/* Definitions for SH opcodes.
- Copyright 1993, 1994, 1995, 1997, 1999, 2000
+ Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2003
Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-typedef enum {
- HEX_0,
- HEX_1,
- HEX_2,
- HEX_3,
- HEX_4,
- HEX_5,
- HEX_6,
- HEX_7,
- HEX_8,
- HEX_9,
- HEX_A,
- HEX_B,
- HEX_C,
- HEX_D,
- HEX_E,
- HEX_F,
- REG_N,
- REG_M,
- SDT_REG_N,
- REG_NM,
- REG_B,
- BRANCH_12,
- BRANCH_8,
- IMM0_4,
- IMM0_4BY2,
- IMM0_4BY4,
- IMM1_4,
- IMM1_4BY2,
- IMM1_4BY4,
- PCRELIMM_8BY2,
- PCRELIMM_8BY4,
- IMM0_8,
- IMM0_8BY2,
- IMM0_8BY4,
- IMM1_8,
- IMM1_8BY2,
- IMM1_8BY4,
- PPI,
- NOPX,
- NOPY,
- MOVX,
- MOVY,
- PSH,
- PMUL,
- PPI3,
- PDC,
- PPIC,
- REPEAT
-} sh_nibble_type;
-
-typedef enum {
- A_END,
- A_BDISP12,
- A_BDISP8,
- A_DEC_M,
- A_DEC_N,
- A_DISP_GBR,
- A_PC,
- A_DISP_PC,
- A_DISP_PC_ABS,
- A_DISP_REG_M,
- A_DISP_REG_N,
- A_GBR,
- A_IMM,
- A_INC_M,
- A_INC_N,
- A_IND_M,
- A_IND_N,
- A_PMOD_N,
- A_PMODY_N,
- A_IND_R0_REG_M,
- A_IND_R0_REG_N,
- A_MACH,
- A_MACL,
- A_PR,
- A_R0,
- A_R0_GBR,
- A_REG_M,
- A_REG_N,
- A_REG_B,
- A_SR,
- A_VBR,
- A_MOD,
- A_RE,
- A_RS,
- A_DSR,
- DSP_REG_M,
- DSP_REG_N,
- DSP_REG_X,
- DSP_REG_Y,
- DSP_REG_E,
- DSP_REG_F,
- DSP_REG_G,
- A_A0,
- A_X0,
- A_X1,
- A_Y0,
- A_Y1,
- A_SSR,
- A_SPC,
- A_SGR,
- A_DBR,
- F_REG_N,
- F_REG_M,
- D_REG_N,
- D_REG_M,
- X_REG_N, /* Only used for argument parsing */
- X_REG_M, /* Only used for argument parsing */
- DX_REG_N,
- DX_REG_M,
- V_REG_N,
- V_REG_M,
- XMTRX_M4,
- F_FR0,
- FPUL_N,
- FPUL_M,
- FPSCR_N,
- FPSCR_M
-} sh_arg_type;
-
-typedef enum {
- A_A1_NUM = 5,
- A_A0_NUM = 7,
- A_X0_NUM, A_X1_NUM, A_Y0_NUM, A_Y1_NUM,
- A_M0_NUM, A_A1G_NUM, A_M1_NUM, A_A0G_NUM
-} sh_dsp_reg_nums;
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public 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. */
+
+typedef enum
+ {
+ HEX_0,
+ HEX_1,
+ HEX_2,
+ HEX_3,
+ HEX_4,
+ HEX_5,
+ HEX_6,
+ HEX_7,
+ HEX_8,
+ HEX_9,
+ HEX_A,
+ HEX_B,
+ HEX_C,
+ HEX_D,
+ HEX_E,
+ HEX_F,
+ REG_N,
+ REG_M,
+ SDT_REG_N,
+ REG_NM,
+ REG_B,
+ BRANCH_12,
+ BRANCH_8,
+ IMM0_4,
+ IMM0_4BY2,
+ IMM0_4BY4,
+ IMM1_4,
+ IMM1_4BY2,
+ IMM1_4BY4,
+ PCRELIMM_8BY2,
+ PCRELIMM_8BY4,
+ IMM0_8,
+ IMM0_8BY2,
+ IMM0_8BY4,
+ IMM1_8,
+ IMM1_8BY2,
+ IMM1_8BY4,
+ PPI,
+ NOPX,
+ NOPY,
+ MOVX,
+ MOVY,
+ PSH,
+ PMUL,
+ PPI3,
+ PDC,
+ PPIC,
+ REPEAT
+ }
+sh_nibble_type;
+
+typedef enum
+ {
+ A_END,
+ A_BDISP12,
+ A_BDISP8,
+ A_DEC_M,
+ A_DEC_N,
+ A_DISP_GBR,
+ A_PC,
+ A_DISP_PC,
+ A_DISP_PC_ABS,
+ A_DISP_REG_M,
+ A_DISP_REG_N,
+ A_GBR,
+ A_IMM,
+ A_INC_M,
+ A_INC_N,
+ A_IND_M,
+ A_IND_N,
+ A_PMOD_N,
+ A_PMODY_N,
+ A_IND_R0_REG_M,
+ A_IND_R0_REG_N,
+ A_MACH,
+ A_MACL,
+ A_PR,
+ A_R0,
+ A_R0_GBR,
+ A_REG_M,
+ A_REG_N,
+ A_REG_B,
+ A_SR,
+ A_VBR,
+ A_MOD,
+ A_RE,
+ A_RS,
+ A_DSR,
+ DSP_REG_M,
+ DSP_REG_N,
+ DSP_REG_X,
+ DSP_REG_Y,
+ DSP_REG_E,
+ DSP_REG_F,
+ DSP_REG_G,
+ A_A0,
+ A_X0,
+ A_X1,
+ A_Y0,
+ A_Y1,
+ A_SSR,
+ A_SPC,
+ A_SGR,
+ A_DBR,
+ F_REG_N,
+ F_REG_M,
+ D_REG_N,
+ D_REG_M,
+ X_REG_N, /* Only used for argument parsing. */
+ X_REG_M, /* Only used for argument parsing. */
+ DX_REG_N,
+ DX_REG_M,
+ V_REG_N,
+ V_REG_M,
+ XMTRX_M4,
+ F_FR0,
+ FPUL_N,
+ FPUL_M,
+ FPSCR_N,
+ FPSCR_M
+ }
+sh_arg_type;
+
+typedef enum
+ {
+ A_A1_NUM = 5,
+ A_A0_NUM = 7,
+ A_X0_NUM, A_X1_NUM, A_Y0_NUM, A_Y1_NUM,
+ A_M0_NUM, A_A1G_NUM, A_M1_NUM, A_A0G_NUM
+ }
+sh_dsp_reg_nums;
#define arch_sh1 0x0001
#define arch_sh2 0x0002
#define arch_sh3 0x0004
#define arch_sh3e 0x0008
#define arch_sh4 0x0010
+#define arch_sh2e 0x0020
#define arch_sh_dsp 0x0100
#define arch_sh3_dsp 0x0200
-#define arch_sh1_up (arch_sh1 | arch_sh2_up)
-#define arch_sh2_up (arch_sh2 | arch_sh3_up | arch_sh_dsp)
-#define arch_sh3_up (arch_sh3 | arch_sh3e_up | arch_sh3_dsp)
+#define arch_sh1_up (arch_sh1 | arch_sh2_up)
+#define arch_sh2_up (arch_sh2 | arch_sh2e_up | arch_sh3_up | arch_sh_dsp)
+#define arch_sh2e_up (arch_sh2e | arch_sh3e_up)
+#define arch_sh3_up (arch_sh3 | arch_sh3e_up | arch_sh3_dsp)
#define arch_sh3e_up (arch_sh3e | arch_sh4_up)
-#define arch_sh4_up arch_sh4
+#define arch_sh4_up arch_sh4
#define arch_sh_dsp_up (arch_sh_dsp | arch_sh3_dsp_up)
#define arch_sh3_dsp_up arch_sh3_dsp
-typedef struct {
+typedef struct
+{
char *name;
sh_arg_type arg[4];
sh_nibble_type nibbles[4];
@@ -170,8 +179,8 @@ typedef struct {
#ifdef DEFINE_TABLE
-const sh_opcode_info sh_table[] = {
-
+const sh_opcode_info sh_table[] =
+ {
/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM0_8}, arch_sh1_up},
/* 0011nnnnmmmm1100 add <REG_M>,<REG_N> */{"add",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_C}, arch_sh1_up},
@@ -306,9 +315,9 @@ const sh_opcode_info sh_table[] = {
/* 0100nnnn10111010 lds <REG_N>,Y1 */{"lds",{A_REG_N,A_Y1},{HEX_4,REG_N,HEX_B,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn01011010 lds <REG_N>,FPUL */{"lds",{A_REG_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_A}, arch_sh3e_up},
-
-/* 0100nnnn01101010 lds <REG_M>,FPSCR */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}, arch_sh3e_up},
+/* 0100nnnn01011010 lds <REG_N>,FPUL */{"lds",{A_REG_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_A}, arch_sh2e_up},
+
+/* 0100nnnn01101010 lds <REG_M>,FPSCR */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}, arch_sh2e_up},
/* 0100nnnn00000110 lds.l @<REG_N>+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}, arch_sh1_up},
@@ -328,9 +337,9 @@ const sh_opcode_info sh_table[] = {
/* 0100nnnn10110110 lds.l @<REG_N>+,Y1 */{"lds.l",{A_INC_N,A_Y1},{HEX_4,REG_N,HEX_B,HEX_6}, arch_sh_dsp_up},
-/* 0100nnnn01010110 lds.l @<REG_M>+,FPUL*/{"lds.l",{A_INC_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_6}, arch_sh3e_up},
-
-/* 0100nnnn01100110 lds.l @<REG_M>+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}, arch_sh3e_up},
+/* 0100nnnn01010110 lds.l @<REG_M>+,FPUL*/{"lds.l",{A_INC_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_6}, arch_sh2e_up},
+
+/* 0100nnnn01100110 lds.l @<REG_M>+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}, arch_sh2e_up},
/* 0000000000111000 ldtlb */{"ldtlb",{0},{HEX_0,HEX_0,HEX_3,HEX_8}, arch_sh3_up},
@@ -551,9 +560,9 @@ const sh_opcode_info sh_table[] = {
/* 0000nnnn10111010 sts Y1,<REG_N> */{"sts",{A_Y1,A_REG_N},{HEX_0,REG_N,HEX_B,HEX_A}, arch_sh_dsp_up},
-/* 0000nnnn01011010 sts FPUL,<REG_N> */{"sts",{FPUL_M,A_REG_N},{HEX_0,REG_N,HEX_5,HEX_A}, arch_sh3e_up},
-
-/* 0000nnnn01101010 sts FPSCR,<REG_N> */{"sts",{FPSCR_M,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}, arch_sh3e_up},
+/* 0000nnnn01011010 sts FPUL,<REG_N> */{"sts",{FPUL_M,A_REG_N},{HEX_0,REG_N,HEX_5,HEX_A}, arch_sh2e_up},
+
+/* 0000nnnn01101010 sts FPSCR,<REG_N> */{"sts",{FPSCR_M,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}, arch_sh2e_up},
/* 0100nnnn00000010 sts.l MACH,@-<REG_N>*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}, arch_sh1_up},
@@ -573,9 +582,9 @@ const sh_opcode_info sh_table[] = {
/* 0100nnnn10110110 sts.l Y1,@-<REG_N> */{"sts.l",{A_Y1,A_DEC_N},{HEX_4,REG_N,HEX_B,HEX_2}, arch_sh_dsp_up},
-/* 0100nnnn01010010 sts.l FPUL,@-<REG_N>*/{"sts.l",{FPUL_M,A_DEC_N},{HEX_4,REG_N,HEX_5,HEX_2}, arch_sh3e_up},
-
-/* 0100nnnn01100010 sts.l FPSCR,@-<REG_N>*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}, arch_sh3e_up},
+/* 0100nnnn01010010 sts.l FPUL,@-<REG_N>*/{"sts.l",{FPUL_M,A_DEC_N},{HEX_4,REG_N,HEX_5,HEX_2}, arch_sh2e_up},
+
+/* 0100nnnn01100010 sts.l FPSCR,@-<REG_N>*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}, arch_sh2e_up},
/* 0011nnnnmmmm1000 sub <REG_M>,<REG_N> */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}, arch_sh1_up},
@@ -736,57 +745,57 @@ const sh_opcode_info sh_table[] = {
/* 11111101xxyynnnn plds <DSP_REG_N>,MACL */
{"plds", {DSP_REG_N,A_MACL},{PPI,PPIC,HEX_F,HEX_D}, arch_sh_dsp_up},
-/* 1111nnnn01011101 fabs <F_REG_N> */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh3e_up},
+/* 1111nnnn01011101 fabs <F_REG_N> */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh2e_up},
/* 1111nnnn01011101 fabs <D_REG_N> */{"fabs",{D_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh4_up},
-/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh3e_up},
+/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh2e_up},
/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh4_up},
-/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh3e_up},
+/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh2e_up},
/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh4_up},
-/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh3e_up},
+/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh2e_up},
/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh4_up},
/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_B,HEX_D}, arch_sh4_up},
/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_A,HEX_D}, arch_sh4_up},
-/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh3e_up},
+/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh2e_up},
/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh4_up},
/* 1111nnmm11101101 fipr <V_REG_M>,<V_REG_N>*/{"fipr",{V_REG_M,V_REG_N},{HEX_F,REG_NM,HEX_E,HEX_D}, arch_sh4_up},
-/* 1111nnnn10001101 fldi0 <F_REG_N> */{"fldi0",{F_REG_N},{HEX_F,REG_N,HEX_8,HEX_D}, arch_sh3e_up},
+/* 1111nnnn10001101 fldi0 <F_REG_N> */{"fldi0",{F_REG_N},{HEX_F,REG_N,HEX_8,HEX_D}, arch_sh2e_up},
-/* 1111nnnn10011101 fldi1 <F_REG_N> */{"fldi1",{F_REG_N},{HEX_F,REG_N,HEX_9,HEX_D}, arch_sh3e_up},
+/* 1111nnnn10011101 fldi1 <F_REG_N> */{"fldi1",{F_REG_N},{HEX_F,REG_N,HEX_9,HEX_D}, arch_sh2e_up},
-/* 1111nnnn00011101 flds <F_REG_N>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}, arch_sh3e_up},
+/* 1111nnnn00011101 flds <F_REG_N>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}, arch_sh2e_up},
-/* 1111nnnn00101101 float FPUL,<F_REG_N>*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh3e_up},
+/* 1111nnnn00101101 float FPUL,<F_REG_N>*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh2e_up},
/* 1111nnnn00101101 float FPUL,<D_REG_N>*/{"float",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh4_up},
-/* 1111nnnnmmmm1110 fmac FR0,<F_REG_M>,<F_REG_N>*/{"fmac",{F_FR0,F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}, arch_sh3e_up},
+/* 1111nnnnmmmm1110 fmac FR0,<F_REG_M>,<F_REG_N>*/{"fmac",{F_FR0,F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}, arch_sh2e_up},
-/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh3e_up},
+/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh2e_up},
/* 1111nnnnmmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh4_up},
-/* 1111nnnnmmmm1000 fmov @<REG_M>,<F_REG_N>*/{"fmov",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh3e_up},
+/* 1111nnnnmmmm1000 fmov @<REG_M>,<F_REG_N>*/{"fmov",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2e_up},
/* 1111nnnnmmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
-/* 1111nnnnmmmm1010 fmov <F_REG_M>,@<REG_N>*/{"fmov",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh3e_up},
+/* 1111nnnnmmmm1010 fmov <F_REG_M>,@<REG_N>*/{"fmov",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh2e_up},
/* 1111nnnnmmmm1010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
-/* 1111nnnnmmmm1001 fmov @<REG_M>+,<F_REG_N>*/{"fmov",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh3e_up},
+/* 1111nnnnmmmm1001 fmov @<REG_M>+,<F_REG_N>*/{"fmov",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh2e_up},
/* 1111nnnnmmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
-/* 1111nnnnmmmm1011 fmov <F_REG_M>,@-<REG_N>*/{"fmov",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh3e_up},
+/* 1111nnnnmmmm1011 fmov <F_REG_M>,@-<REG_N>*/{"fmov",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh2e_up},
/* 1111nnnnmmmm1011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
-/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<F_REG_N>*/{"fmov",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh3e_up},
+/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<F_REG_N>*/{"fmov",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2e_up},
/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
-/* 1111nnnnmmmm0111 fmov <F_REG_M>,@(R0,<REG_N>)*/{"fmov",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh3e_up},
+/* 1111nnnnmmmm0111 fmov <F_REG_M>,@(R0,<REG_N>)*/{"fmov",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2e_up},
/* 1111nnnnmmmm0111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
/* 1111nnnnmmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
@@ -801,22 +810,22 @@ const sh_opcode_info sh_table[] = {
/* 1111nnnnmmmm0111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
-/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh3e_up},
+/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2e_up},
-/* 1111nnnnmmmm1010 fmov.s <F_REG_M>,@<REG_N>*/{"fmov.s",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh3e_up},
+/* 1111nnnnmmmm1010 fmov.s <F_REG_M>,@<REG_N>*/{"fmov.s",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh2e_up},
-/* 1111nnnnmmmm1001 fmov.s @<REG_M>+,<F_REG_N>*/{"fmov.s",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh3e_up},
+/* 1111nnnnmmmm1001 fmov.s @<REG_M>+,<F_REG_N>*/{"fmov.s",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh2e_up},
-/* 1111nnnnmmmm1011 fmov.s <F_REG_M>,@-<REG_N>*/{"fmov.s",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh3e_up},
+/* 1111nnnnmmmm1011 fmov.s <F_REG_M>,@-<REG_N>*/{"fmov.s",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh2e_up},
-/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh3e_up},
+/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2e_up},
-/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh3e_up},
+/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2e_up},
-/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh3e_up},
+/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh2e_up},
/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh4_up},
-/* 1111nnnn01001101 fneg <F_REG_N> */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh3e_up},
+/* 1111nnnn01001101 fneg <F_REG_N> */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh2e_up},
/* 1111nnnn01001101 fneg <D_REG_N> */{"fneg",{D_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh4_up},
/* 1111101111111101 frchg */{"frchg",{0},{HEX_F,HEX_B,HEX_F,HEX_D}, arch_sh4_up},
@@ -826,12 +835,12 @@ const sh_opcode_info sh_table[] = {
/* 1111nnnn01101101 fsqrt <F_REG_N> */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh3e_up},
/* 1111nnnn01101101 fsqrt <D_REG_N> */{"fsqrt",{D_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh4_up},
-/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}, arch_sh3e_up},
+/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}, arch_sh2e_up},
-/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh3e_up},
+/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh2e_up},
/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh4_up},
-/* 1111nnnn00111101 ftrc <F_REG_N>,FPUL*/{"ftrc",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh3e_up},
+/* 1111nnnn00111101 ftrc <F_REG_N>,FPUL*/{"ftrc",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh2e_up},
/* 1111nnnn00111101 ftrc <D_REG_N>,FPUL*/{"ftrc",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh4_up},
/* 1111nn0111111101 ftrv XMTRX_M4,<V_REG_n>*/{"ftrv",{XMTRX_M4,V_REG_N},{HEX_F,REG_NM,HEX_F,HEX_D}, arch_sh4_up},
diff --git a/opcodes/sh64-dis.c b/opcodes/sh64-dis.c
index 631678c4c6f..063c26104b8 100644
--- a/opcodes/sh64-dis.c
+++ b/opcodes/sh64-dis.c
@@ -1,5 +1,5 @@
/* Disassemble SH64 instructions.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 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
@@ -25,6 +25,7 @@
/* We need to refer to the ELF header structure. */
#include "elf-bfd.h"
#include "elf/sh.h"
+#include "elf32-sh64.h"
#define ELF_MODE32_CODE_LABEL_P(SYM) \
(((elf_symbol_type *) (SYM))->internal_elf_sym.st_other & STO_SH5_ISA32)
diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c
index 47ebb313744..c68df389cb1 100644
--- a/opcodes/sparc-dis.c
+++ b/opcodes/sparc-dis.c
@@ -1,20 +1,20 @@
/* Print SPARC instructions.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002 Free Software Foundation, Inc.
+ 2000, 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
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
@@ -46,7 +46,8 @@ static const struct sparc_opcode **sorted_opcodes;
static int opcode_bits[4] = { 0x01c00000, 0x0, 0x01f80000, 0x01f80000 };
#define HASH_INSN(INSN) \
((((INSN) >> 24) & 0xc0) | (((INSN) & opcode_bits[((INSN) >> 30) & 3]) >> 19))
-struct opcode_hash {
+struct opcode_hash
+{
struct opcode_hash *next;
const struct sparc_opcode *opcode;
};
@@ -257,7 +258,7 @@ print_insn_sparc (memaddr, info)
}
/* On SPARClite variants such as DANlite (sparc86x), instructions
- are always big-endian even when the machine is in little-endian mode. */
+ are always big-endian even when the machine is in little-endian mode. */
if (info->endian == BFD_ENDIAN_BIG || info->mach == bfd_mach_sparc_sparclite)
getword = bfd_getb32;
else
@@ -265,10 +266,10 @@ print_insn_sparc (memaddr, info)
insn = getword (buffer);
- info->insn_info_valid = 1; /* We do return this info */
- info->insn_type = dis_nonbranch; /* Assume non branch insn */
- info->branch_delay_insns = 0; /* Assume no delay */
- info->target = 0; /* Assume no target known */
+ info->insn_info_valid = 1; /* We do return this info. */
+ info->insn_type = dis_nonbranch; /* Assume non branch insn. */
+ info->branch_delay_insns = 0; /* Assume no delay. */
+ info->target = 0; /* Assume no target known. */
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
{
@@ -316,32 +317,34 @@ print_insn_sparc (memaddr, info)
if (opcode->args[0] != ',')
(*info->fprintf_func) (stream, " ");
+
for (s = opcode->args; *s != '\0'; ++s)
{
while (*s == ',')
{
(*info->fprintf_func) (stream, ",");
++s;
- switch (*s) {
- case 'a':
- (*info->fprintf_func) (stream, "a");
- is_annulled = 1;
- ++s;
- continue;
- case 'N':
- (*info->fprintf_func) (stream, "pn");
- ++s;
- continue;
-
- case 'T':
- (*info->fprintf_func) (stream, "pt");
- ++s;
- continue;
-
- default:
- break;
- } /* switch on arg */
- } /* while there are comma started args */
+ switch (*s)
+ {
+ case 'a':
+ (*info->fprintf_func) (stream, "a");
+ is_annulled = 1;
+ ++s;
+ continue;
+ case 'N':
+ (*info->fprintf_func) (stream, "pn");
+ ++s;
+ continue;
+
+ case 'T':
+ (*info->fprintf_func) (stream, "pt");
+ ++s;
+ continue;
+
+ default:
+ break;
+ }
+ }
(*info->fprintf_func) (stream, " ");
@@ -682,26 +685,33 @@ print_insn_sparc (memaddr, info)
unsigned long prev_insn;
int errcode;
- errcode =
- (*info->read_memory_func)
+ if (memaddr >= 4)
+ errcode =
+ (*info->read_memory_func)
(memaddr - 4, buffer, sizeof (buffer), info);
+ else
+ errcode = 1;
+
prev_insn = getword (buffer);
if (errcode == 0)
{
/* If it is a delayed branch, we need to look at the
instruction before the delayed branch. This handles
- sequences such as
+ sequences such as:
sethi %o1, %hi(_foo), %o1
call _printf
- or %o1, %lo(_foo), %o1
- */
+ or %o1, %lo(_foo), %o1 */
if (is_delayed_branch (prev_insn))
{
- errcode = (*info->read_memory_func)
- (memaddr - 8, buffer, sizeof (buffer), info);
+ if (memaddr >= 8)
+ errcode = (*info->read_memory_func)
+ (memaddr - 8, buffer, sizeof (buffer), info);
+ else
+ errcode = 1;
+
prev_insn = getword (buffer);
}
}
@@ -746,7 +756,7 @@ print_insn_sparc (memaddr, info)
}
}
- info->insn_type = dis_noninsn; /* Mark as non-valid instruction */
+ info->insn_type = dis_noninsn; /* Mark as non-valid instruction. */
(*info->fprintf_func) (stream, _("unknown"));
return sizeof (buffer);
}
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 022d139ecc9..73230181702 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,3 +1,13 @@
+2003-01-09 Michael Chastain <mec@shout.net>
+
+ From Chet Ramey, <chet@po.cwru.edu>, the readline maintainer:
+ * display.c: Fix perverse screen refresh with UTF-8.
+
+2003-01-08 Chris Demetriou <cgd@broadcom.com>
+
+ * config.guess: Update to 2003-01-03 version.
+ * config.sub: Update to 2003-01-03 version.
+
2002-12-16 Christopher Faylor <cgf@redhat.com>
* configure.in: Remove --enable-shared option. It shouldn't be used
diff --git a/readline/display.c b/readline/display.c
index dec0de3e0d7..e151cf2862b 100644
--- a/readline/display.c
+++ b/readline/display.c
@@ -74,7 +74,7 @@ static void insert_some_chars PARAMS((char *, int, int));
static void cr PARAMS((void));
#if defined (HANDLE_MULTIBYTE)
-static int _rl_col_width PARAMS((char *, int, int));
+static int _rl_col_width PARAMS((const char *, int, int));
static int *_rl_wrapped_line;
#else
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
@@ -1352,9 +1352,9 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
{
_rl_output_some_chars (nfd + lendiff, temp - lendiff);
#if 0
- _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
-#else
_rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
+#else
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
#endif
}
}
@@ -1514,8 +1514,15 @@ _rl_move_cursor_relative (new, data)
#if defined (HANDLE_MULTIBYTE)
/* If we have multibyte characters, NEW is indexed by the buffer point in
a multibyte string, but _rl_last_c_pos is the display position. In
- this case, NEW's display position is not obvious. */
- if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
+ this case, NEW's display position is not obvious and must be
+ calculated. */
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ {
+ if (_rl_last_c_pos == new)
+ return;
+ }
+ else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
+ return;
#else
if (_rl_last_c_pos == new) return;
#endif
@@ -1598,11 +1605,7 @@ _rl_move_cursor_relative (new, data)
#endif
{
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- tputs (_rl_term_cr, 1, _rl_output_character_function);
- for (i = 0; i < new; i++)
- putc (data[i], rl_outstream);
- }
+ _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
else
_rl_backspace (_rl_last_c_pos - new);
}
@@ -2144,7 +2147,7 @@ _rl_current_display_line ()
scan from the beginning of the string to take the state into account. */
static int
_rl_col_width (str, start, end)
- char *str;
+ const char *str;
int start, end;
{
wchar_t wc;
@@ -2220,4 +2223,3 @@ _rl_col_width (str, start, end)
return width;
}
#endif /* HANDLE_MULTIBYTE */
-
diff --git a/readline/support/config.guess b/readline/support/config.guess
index c5438deabca..ca12b79a540 100755
--- a/readline/support/config.guess
+++ b/readline/support/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2002-08-23'
+timestamp='2003-01-03'
# 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
@@ -98,30 +98,31 @@ trap 'exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-# This shell variable is my proudest work .. or something. --bje
+# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
-dummy=$tmpdir/dummy ;
-files="$dummy.c $dummy.o $dummy.rel $dummy" ;
-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
- rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;
-unset files'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -178,7 +179,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -223,6 +235,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:MicroBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -257,7 +272,7 @@ main:
jsr \$26,exit
.end main
EOF
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
case `$dummy` in
0-0)
@@ -286,7 +301,6 @@ EOF
;;
esac
fi
- rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
@@ -437,16 +451,18 @@ EOF
exit (-1);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy \
+ $CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
- Night_Hawk:*:*:PowerMAX_OS)
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -521,8 +537,7 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -620,11 +635,21 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -658,8 +683,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -717,15 +741,15 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
@@ -753,7 +777,6 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c && rmdir $tmpdir
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
@@ -766,13 +789,16 @@ EOF
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
- echo i386-pc-interix3
+ echo i586-pc-interix3
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
+ echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -815,8 +841,26 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- rm -f $dummy.c && rmdir $tmpdir
- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -911,7 +955,6 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c && rmdir $tmpdir
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@@ -929,6 +972,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -963,9 +1023,6 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -992,9 +1049,12 @@ EOF
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1011,9 +1071,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1108,7 +1165,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1131,11 +1188,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1154,12 +1206,6 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1280,8 +1326,7 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-rm -f $dummy.c $dummy && rmdir $tmpdir
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
diff --git a/readline/support/config.sub b/readline/support/config.sub
index b0222f7ea0b..04baf3d80d1 100755
--- a/readline/support/config.sub
+++ b/readline/support/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2002-08-22'
+timestamp='2003-01-03'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -229,7 +229,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
+ | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -245,11 +245,13 @@ case $basic_machine in
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
@@ -294,7 +296,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -315,11 +317,13 @@ case $basic_machine in
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39 | mipstx39el \
- | none-* | np1-* | ns16k-* | ns32k-* \
+ | mipstx39-* | mipstx39el-* \
+ | msp430-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -329,7 +333,7 @@ case $basic_machine in
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -716,6 +720,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -901,10 +909,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
- t3d)
- basic_machine=alpha-cray
- os=-unicos
- ;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
@@ -913,6 +917,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
+ tic4x | c4x*)
+ basic_machine=tic4x-unknown
+ os=-coff
+ ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -973,10 +981,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1047,10 +1051,6 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1113,11 +1113,12 @@ case $os in
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -microbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1129,8 +1130,10 @@ case $os in
;;
esac
;;
+ -nto-qnx*)
+ ;;
-nto*)
- os=-nto-qnx
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 35bcfb5dd9c..f3bc71d2612 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,11 @@
+2003-01-23 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh/gencode.c: Replace sh3e with sh2e except in fsqrt.
+
2002-08-24 Geoffrey Keating <geoffk@redhat.com>
* MAINTAINERS: Update my email address.
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index a3973301715..ca21f156d7b 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-10 Ben Elliston <bje@redhat.com>
+
+ * README.Cygnus: Rename from this ..
+ * README: .. to this.
+
2002-09-27 Andrew Cagney <ac131313@redhat.com>
* wrapper.c (sim_open): Add support for -m<mem-size>.
@@ -62,31 +67,9 @@
CRm is 1.
(write_cp13_reg): Allow bit 0 of reg 1 of CRm 1 to be written to.
-2002-05-20 Nick Clifton <nickc@cambridge.redhat.com>
-
- * Makefile.in (SWI_TARGET_SWITCHES): Define.
- * armos.c (swi_mask): Define. Initialise to supporting all
- SWI emulations.
- (ARMul_OSInit): For XScale targets, only support the ANGEL
- SWI interface. (This is at the request if Intel).
- (ARMul_OSHandleSWI): Examine swi_mask to see if a particular
- SWI call should be emulated.
- Do not fall through from AngelSWI_Reason_WriteC.
- Propagate exit code from RedBoot Exit SWI.
- * rdi-dgb.h (swi_mask): Prototype.
- (SWI_MASK_DEMON, SWI_MASK_ANGEL, SWI_MASK_REDBOOT): Define.
- * wrapper.c: Include run-sim.h.
- (sim_target_parse_command_line): New function. Look for and
- handle --swi-support switch.
- (sim_target_parse_arg_array): New function. Process an argv
- array for parsing by sim_target_parse_command_line.
- (sim_target_display_usage): New function. Describe syntax of
- --swi-suppoort switch.
- (sim_open): Add call to sim_target_parse_arg_array).
-
2002-05-17 Nick Clifton <nickc@cambridge.redhat.com>
- * Makefile.in (SWI_TARGET_SWITCHES): Define.
+ * Makefile.in (SIM_TARGET_SWITCHES): Define.
* armos.c (swi_mask): Define. Initialise to supporting all
SWI emulations.
(ARMul_OSInit): For XScale targets, only support the ANGEL
diff --git a/sim/arm/README.Cygnus b/sim/arm/README
index adfb766451d..adfb766451d 100644
--- a/sim/arm/README.Cygnus
+++ b/sim/arm/README
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 37ded334d89..46a2cc8181f 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-08 Kazu Hirata <kazu@cs.umass.edu>
+
+ * run.c (usage): Fix typos.
+
2002-11-27 Richard Sandiford <rsandifo@redhat.com>
* sim-fpu.c (sim_fpu_inv): Use sim_fpu_div.
diff --git a/sim/common/run.c b/sim/common/run.c
index ca3194b5277..4131dd79bbb 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -326,8 +326,8 @@ usage ()
fprintf (stderr, "-c size Set simulator cache size to `size'.\n");
#endif
#ifdef SIM_H8300
- fprintf (stderr, "-h Executable is for h8/300h.\n");
- fprintf (stderr, "-S Executable is for h8/300s.\n");
+ fprintf (stderr, "-h Executable is for H8/300H.\n");
+ fprintf (stderr, "-S Executable is for H8S.\n");
#endif
fprintf (stderr, "-m size Set memory size of simulator, in bytes.\n");
#ifdef SIM_HAVE_ENVIRONMENT
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 657a69f4a9c..2753416a768 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,22 @@
+2003-02-05 Kazu Hirata <kazu@cs.umass.edu>
+
+ * compile.c (init_pointers): Abort if wreg never gets initialized.
+ (sim_resume): Fix the handling of exts.w and extu.w.
+
+2003-01-31 Kazu Hirata <kazu@cs.umass.edu>
+
+ * compile.c (sim_resume): Fix the handling of bxor.
+
+2003-01-16 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c: Change K&R function definitions to ISO.
+ (fetch): Make static, and eliminate unused parameter 'n'.
+
+2002-12-26 Kazu Hirata <kazu@cs.umass.edu>
+
+ * compile.c: Fix formatting.
+ * inst.h: Likewise.
+
2002-07-29 Andrey Volkov <avolkov@transas.com>
* compile.c: Include "gdb/sim-h8300.h"
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 8e4b55d6a28..2a066a3fc1d 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -83,8 +83,9 @@ void sim_set_simcache_size PARAMS ((int));
#define HIGH_BYTE(x) (((x) >> 8) & 0xff)
#define P(X,Y) ((X << 8) | Y)
-#define BUILDSR() cpu.ccr = (I << 7) | (UI << 6)| (H<<5) | (U<<4) | \
- (N << 3) | (Z << 2) | (V<<1) | C;
+#define BUILDSR() \
+ cpu.ccr = ((I << 7) | (UI << 6) | (H << 5) | (U << 4) \
+ | (N << 3) | (Z << 2) | (V << 1) | C);
#define BUILDEXR() \
if (h8300smode) cpu.exr = (trace<<7) | intMask;
@@ -99,17 +100,19 @@ void sim_set_simcache_size PARAMS ((int));
ui = ((cpu.ccr >> 6) & 1);\
intMaskBit = (cpu.ccr >> 7) & 1;
-#define GETEXR() \
- if (h8300smode) { \
- trace = (cpu.exr >> 7) & 1;\
- intMask = cpu.exr & 7; }
+#define GETEXR() \
+ if (h8300smode) \
+ { \
+ trace = (cpu.exr >> 7) & 1; \
+ intMask = cpu.exr & 7; \
+ }
#ifdef __CHAR_IS_SIGNED__
#define SEXTCHAR(x) ((char) (x))
#endif
#ifndef SEXTCHAR
-#define SEXTCHAR(x) ((x & 0x80) ? (x | ~0xff): x & 0xff)
+#define SEXTCHAR(x) ((x & 0x80) ? (x | ~0xff) : x & 0xff)
#endif
#define UEXTCHAR(x) ((x) & 0xff)
@@ -124,19 +127,19 @@ int h8300smode = 0;
static int memory_size;
static int
-get_now ()
+get_now (void)
{
return time (0); /* WinXX HAS UNIX like 'time', so why not using it? */
}
static int
-now_persec ()
+now_persec (void)
{
return 1;
}
static int
-bitfrom (x)
+bitfrom (int x)
{
switch (x & SIZE)
{
@@ -152,7 +155,7 @@ bitfrom (x)
}
static unsigned int
-lvalue (x, rn)
+lvalue (int x, int rn)
{
switch (x / 4)
{
@@ -172,11 +175,7 @@ lvalue (x, rn)
}
static unsigned int
-decode (addr, data, dst)
- int addr;
- unsigned char *data;
- decoded_inst *dst;
-
+decode (int addr, unsigned char *data, decoded_inst *dst)
{
int rs = 0;
int rd = 0;
@@ -478,7 +477,7 @@ decode (addr, data, dst)
}
static void
-compile (pc)
+compile (int pc)
{
int idx;
@@ -547,9 +546,8 @@ static unsigned int *lreg[18];
#define SET_MEMORY_B(x,y) \
(x < memory_size ? (cpu.memory[(x)] = y) : (cpu.eightbit[x & 0xff] = y))
-int
-fetch (arg, n)
- ea_type *arg;
+static int
+fetch (ea_type *arg)
{
int rn = arg->reg;
int abs = arg->literal;
@@ -631,9 +629,7 @@ fetch (arg, n)
static void
-store (arg, n)
- ea_type *arg;
- int n;
+store (ea_type *arg, int n)
{
int rn = arg->reg;
int abs = arg->literal;
@@ -707,7 +703,7 @@ static union
littleendian;
static void
-init_pointers ()
+init_pointers (void)
{
static int init;
@@ -757,6 +753,7 @@ init_pointers ()
}
p++;
}
+ wreg[i] = wreg[i + 8] = 0;
while (q < u)
{
if (*q == 0x2233)
@@ -769,6 +766,8 @@ init_pointers ()
}
q++;
}
+ if (wreg[i] == 0 || wreg[i + 8] == 0)
+ abort ();
cpu.regs[i] = 0;
lreg[i] = &cpu.regs[i];
}
@@ -782,11 +781,7 @@ init_pointers ()
}
static void
-control_c (sig, code, scp, addr)
- int sig;
- int code;
- char *scp;
- char *addr;
+control_c (int sig)
{
cpu.state = SIM_STATE_STOPPED;
cpu.exception = SIGINT;
@@ -802,10 +797,7 @@ control_c (sig, code, scp, addr)
#define I (intMaskBit != 0)
static int
-mop (code, bsize, sign)
- decoded_inst *code;
- int bsize;
- int sign;
+mop (decoded_inst *code, int bsize, int sign)
{
int multiplier;
int multiplicand;
@@ -935,8 +927,7 @@ case O (name, SB): \
}
int
-sim_stop (sd)
- SIM_DESC sd;
+sim_stop (SIM_DESC sd)
{
cpu.state = SIM_STATE_STOPPED;
cpu.exception = SIGINT;
@@ -966,8 +957,7 @@ sim_stop (sd)
#define TICK_REGNUM 13
void
-sim_resume (sd, step, siggnal)
- SIM_DESC sd;
+sim_resume (SIM_DESC sd, int step, int siggnal)
{
static int init1;
int cycles = 0;
@@ -1022,15 +1012,15 @@ sim_resume (sd, step, siggnal)
#define ALUOP(STORE, NAME, HOW) \
- case O (NAME,SB): HOW; if (STORE)goto alu8;else goto just_flags_alu8; \
- case O (NAME, SW): HOW; if (STORE)goto alu16;else goto just_flags_alu16; \
- case O (NAME,SL): HOW; if (STORE)goto alu32;else goto just_flags_alu32;
+ case O (NAME, SB): HOW; if (STORE) goto alu8; else goto just_flags_alu8; \
+ case O (NAME, SW): HOW; if (STORE) goto alu16; else goto just_flags_alu16; \
+ case O (NAME, SL): HOW; if (STORE) goto alu32; else goto just_flags_alu32;
-#define LOGOP(NAME, HOW) \
- case O (NAME,SB): HOW; goto log8;\
- case O (NAME, SW): HOW; goto log16;\
- case O (NAME,SL): HOW; goto log32;
+#define LOGOP(NAME, HOW) \
+ case O (NAME, SB): HOW; goto log8; \
+ case O (NAME, SW): HOW; goto log16; \
+ case O (NAME, SL): HOW; goto log32;
@@ -1140,32 +1130,36 @@ sim_resume (sd, step, siggnal)
case O (O_EEPMOV, SB):
case O (O_EEPMOV, SW):
- if (h8300hmode||h8300smode)
+ if (h8300hmode || h8300smode)
{
- register unsigned char *_src,*_dst;
- unsigned int count = (code->opcode == O(O_EEPMOV, SW))?cpu.regs[R4_REGNUM]&0xffff:
- cpu.regs[R4_REGNUM]&0xff;
-
- _src = cpu.regs[R5_REGNUM] < memory_size ? cpu.memory+cpu.regs[R5_REGNUM] :
- cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff);
- if ((_src+count)>=(cpu.memory+memory_size))
+ register unsigned char *_src, *_dst;
+ unsigned int count = ((code->opcode == O (O_EEPMOV, SW))
+ ? cpu.regs[R4_REGNUM] & 0xffff
+ : cpu.regs[R4_REGNUM] & 0xff);
+
+ _src = (cpu.regs[R5_REGNUM] < memory_size
+ ? cpu.memory + cpu.regs[R5_REGNUM]
+ : cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff));
+ if ((_src + count) >= (cpu.memory + memory_size))
{
- if ((_src+count)>=(cpu.eightbit+0x100))
+ if ((_src + count) >= (cpu.eightbit + 0x100))
goto illegal;
}
- _dst = cpu.regs[R6_REGNUM] < memory_size ? cpu.memory+cpu.regs[R6_REGNUM] :
- cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff);
- if ((_dst+count)>=(cpu.memory+memory_size))
+ _dst = (cpu.regs[R6_REGNUM] < memory_size
+ ? cpu.memory + cpu.regs[R6_REGNUM]
+ : cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff));
+ if ((_dst + count) >= (cpu.memory + memory_size))
{
- if ((_dst+count)>=(cpu.eightbit+0x100))
+ if ((_dst + count) >= (cpu.eightbit + 0x100))
goto illegal;
}
- memcpy(_dst,_src,count);
+ memcpy (_dst, _src, count);
- cpu.regs[R5_REGNUM]+=count;
- cpu.regs[R6_REGNUM]+=count;
- cpu.regs[R4_REGNUM]&=(code->opcode == O(O_EEPMOV, SW))?(~0xffff):(~0xff);
- cycles += 2*count;
+ cpu.regs[R5_REGNUM] += count;
+ cpu.regs[R6_REGNUM] += count;
+ cpu.regs[R4_REGNUM] &= ((code->opcode == O (O_EEPMOV, SW))
+ ? (~0xffff) : (~0xff));
+ cycles += 2 * count;
goto next;
}
goto illegal;
@@ -1514,7 +1508,7 @@ sim_resume (sd, step, siggnal)
OBITOP (O_BIAND, 1, 0, c = !(ea & m) && C);
OBITOP (O_BOR, 1, 0, c = (ea & m) || C);
OBITOP (O_BIOR, 1, 0, c = !(ea & m) || C);
- OBITOP (O_BXOR, 1, 0, c = (ea & m) != C);
+ OBITOP (O_BXOR, 1, 0, c = ((ea & m) != 0) != C);
OBITOP (O_BIXOR, 1, 0, c = !(ea & m) != C);
#define MOP(bsize, signed) \
@@ -1548,7 +1542,7 @@ sim_resume (sd, step, siggnal)
goto illegal;
}
res = fetch (&code->src);
- store (&code->src,res|0x80);
+ store (&code->src, res | 0x80);
goto just_flags_log8;
case O (O_DIVU, SB):
@@ -1615,7 +1609,7 @@ sim_resume (sd, step, siggnal)
goto next;
}
case O (O_EXTS, SW):
- rd = GET_B_REG (code->src.reg + 8) & 0xff; /* Yes, src, not dst. */
+ rd = GET_W_REG (code->src.reg) & 0xff; /* Yes, src, not dst. */
ea = rd & 0x80 ? -256 : 0;
res = rd + ea;
goto log16;
@@ -1625,7 +1619,7 @@ sim_resume (sd, step, siggnal)
res = rd + ea;
goto log32;
case O (O_EXTU, SW):
- rd = GET_B_REG (code->src.reg + 8) & 0xff;
+ rd = GET_W_REG (code->src.reg) & 0xff;
ea = 0;
res = rd + ea;
goto log16;
@@ -1673,7 +1667,7 @@ sim_resume (sd, step, siggnal)
goto next;
default:
- illegal:
+ illegal:
cpu.state = SIM_STATE_STOPPED;
cpu.exception = SIGILL;
goto end;
@@ -1880,19 +1874,14 @@ sim_resume (sd, step, siggnal)
}
int
-sim_trace (sd)
- SIM_DESC sd;
+sim_trace (SIM_DESC sd)
{
/* FIXME: Unfinished. */
abort ();
}
int
-sim_write (sd, addr, buffer, size)
- SIM_DESC sd;
- SIM_ADDR addr;
- unsigned char *buffer;
- int size;
+sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
int i;
@@ -1913,11 +1902,7 @@ sim_write (sd, addr, buffer, size)
}
int
-sim_read (sd, addr, buffer, size)
- SIM_DESC sd;
- SIM_ADDR addr;
- unsigned char *buffer;
- int size;
+sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
init_pointers ();
if (addr < 0)
@@ -1931,11 +1916,7 @@ sim_read (sd, addr, buffer, size)
int
-sim_store_register (sd, rn, value, length)
- SIM_DESC sd;
- int rn;
- unsigned char *value;
- int length;
+sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
{
int longval;
int shortval;
@@ -1984,18 +1965,14 @@ sim_store_register (sd, rn, value, length)
}
int
-sim_fetch_register (sd, rn, buf, length)
- SIM_DESC sd;
- int rn;
- unsigned char *buf;
- int length;
+sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
{
int v;
int longreg = 0;
init_pointers ();
- if (!h8300smode && rn >=EXR_REGNUM)
+ if (!h8300smode && rn >= EXR_REGNUM)
rn++;
switch (rn)
{
@@ -2049,10 +2026,7 @@ sim_fetch_register (sd, rn, buf, length)
}
void
-sim_stop_reason (sd, reason, sigrc)
- SIM_DESC sd;
- enum sim_stop *reason;
- int *sigrc;
+sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
{
#if 0 /* FIXME: This should work but we can't use it.
grep for SLEEP above. */
@@ -2072,14 +2046,13 @@ sim_stop_reason (sd, reason, sigrc)
/* FIXME: Rename to sim_set_mem_size. */
void
-sim_size (n)
- int n;
+sim_size (int n)
{
/* Memory size is fixed. */
}
void
-sim_set_simcache_size (n)
+sim_set_simcache_size (int n)
{
if (cpu.cache)
free (cpu.cache);
@@ -2092,9 +2065,7 @@ sim_set_simcache_size (n)
void
-sim_info (sd, verbose)
- SIM_DESC sd;
- int verbose;
+sim_info (SIM_DESC sd, int verbose)
{
double timetaken = (double) cpu.ticks / (double) now_persec ();
double virttime = cpu.cycles / 10.0e6;
@@ -2142,8 +2113,7 @@ sim_info (sd, verbose)
FLAG is non-zero for the H8/300H. */
void
-set_h8300h (h_flag, s_flag)
- int h_flag, s_flag;
+set_h8300h (int h_flag, int s_flag)
{
/* FIXME: Much of the code in sim_load can be moved to sim_open.
This function being replaced by a sim_open:ARGV configuration
@@ -2153,11 +2123,10 @@ set_h8300h (h_flag, s_flag)
}
SIM_DESC
-sim_open (kind, ptr, abfd, argv)
- SIM_OPEN_KIND kind;
- struct host_callback_struct *ptr;
- struct _bfd *abfd;
- char **argv;
+sim_open (SIM_OPEN_KIND kind,
+ struct host_callback_struct *ptr,
+ struct _bfd *abfd,
+ char **argv)
{
/* FIXME: Much of the code in sim_load can be moved here. */
@@ -2169,9 +2138,7 @@ sim_open (kind, ptr, abfd, argv)
}
void
-sim_close (sd, quitting)
- SIM_DESC sd;
- int quitting;
+sim_close (SIM_DESC sd, int quitting)
{
/* Nothing to do. */
}
@@ -2179,11 +2146,7 @@ sim_close (sd, quitting)
/* Called by gdb to load a program into memory. */
SIM_RC
-sim_load (sd, prog, abfd, from_tty)
- SIM_DESC sd;
- char *prog;
- bfd *abfd;
- int from_tty;
+sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
{
bfd *prog_bfd;
@@ -2265,11 +2228,7 @@ sim_load (sd, prog, abfd, from_tty)
}
SIM_RC
-sim_create_inferior (sd, abfd, argv, env)
- SIM_DESC sd;
- struct _bfd *abfd;
- char **argv;
- char **env;
+sim_create_inferior (SIM_DESC sd, struct _bfd *abfd, char **argv, char **env)
{
if (abfd != NULL)
cpu.pc = bfd_get_start_address (abfd);
@@ -2279,17 +2238,14 @@ sim_create_inferior (sd, abfd, argv, env)
}
void
-sim_do_command (sd, cmd)
- SIM_DESC sd;
- char *cmd;
+sim_do_command (SIM_DESC sd, char *cmd)
{
(*sim_callback->printf_filtered) (sim_callback,
"This simulator does not accept any commands.\n");
}
void
-sim_set_callbacks (ptr)
- struct host_callback_struct *ptr;
+sim_set_callbacks (struct host_callback_struct *ptr)
{
sim_callback = ptr;
}
diff --git a/sim/h8300/inst.h b/sim/h8300/inst.h
index bcf8e4a6b33..7f6e4008859 100644
--- a/sim/h8300/inst.h
+++ b/sim/h8300/inst.h
@@ -14,14 +14,13 @@
outside of main memory refers to the eightbit area (in theory, this
can only happen when simulating H8/300H programs). We make no attempt
to catch overlapping addresses, wrapped addresses, etc etc. */
-#define H8300_MSIZE (1<<16)
+#define H8300_MSIZE (1 << 16)
/* avolkov:
Next 2 macros are ugly for any workstation, but while they're work.
- Memory size MUST be configurable.
- */
-#define H8300H_MSIZE (1<<18)
-#define H8300S_MSIZE (1<<24)
+ Memory size MUST be configurable. */
+#define H8300H_MSIZE (1 << 18)
+#define H8300S_MSIZE (1 << 24)
#define CSIZE 1000
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index c92eb064c07..0482ab2b0a2 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,53 @@
+2003-01-14 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen (LUXC1, SUXC1): New, for mipsV and mips64.
+
+2003-01-14 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen (EI, DI): Remove.
+
+2003-01-05 Richard Sandiford <rsandifo@redhat.com>
+
+ * Makefile.in (tmp-run-multi): Fix mips16 filter.
+
+2003-01-04 Richard Sandiford <rsandifo@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
+ Gavin Romig-Koch <gavin@redhat.com>
+ Graydon Hoare <graydon@redhat.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Dave Brolley <brolley@redhat.com>
+ Chris Demetriou <cgd@broadcom.com>
+
+ * configure.in (mips64vr*): Define TARGET_ENABLE_FR to 1.
+ (sim_mach_default): New variable.
+ (mips64vr-*-*, mips64vrel-*-*): New configurations.
+ Add a new simulator generator, MULTI.
+ * configure: Regenerate.
+ * Makefile.in (SIM_MULTI_OBJ, SIM_EXTRA_DISTCLEAN): New variables.
+ (multi-run.o): New dependency.
+ (SIM_MULTI_ALL, SIM_MULTI_IGEN_CONFIGS): New variables.
+ (tmp-mach-multi, tmp-itable-multi, tmp-run-multi): New rules.
+ (tmp-multi): Combine them.
+ (BUILT_SRC_FROM_MULTI): New variable. Depend on tmp-multi.
+ (clean-extra): Remove sources in BUILT_SRC_FROM_MULTI.
+ (distclean-extra): New rule.
+ * sim-main.h: Include bfd.h.
+ (MIPS_MACH): New macro.
+ * mips.igen (vr4120, vr5400, vr5500): New models.
+ (clo, clz, dclo, dclz, madd, maddu, msub, msub, mul): Add *vr5500.
+ * vr.igen: Replace with new version.
+
+2003-01-04 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.in: Use SIM_AC_OPTION_RESERVED_BITS(1).
+ * configure: Regenerate.
+
+2002-12-31 Chris Demetriou <cgd@broadcom.com>
+
+ * sim-main.h (check_branch_bug, mark_branch_bug): Remove.
+ * mips.igen: Remove all invocations of check_branch_bug and
+ mark_branch_bug.
+
2002-12-16 Chris Demetriou <cgd@broadcom.com>
* tconfig.in: Include "gdb/callback.h" and "gdb/remote-sim.h".
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index e0e9fafcafe..b709ce869bb 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -33,6 +33,7 @@ SIM_M16_OBJ = \
itable.o \
m16run.o \
+SIM_MULTI_OBJ = itable.o @sim_multi_obj@
MIPS_EXTRA_OBJS = @mips_extra_objs@
MIPS_EXTRA_LIBS = @mips_extra_libs@
@@ -57,6 +58,7 @@ SIM_SUBTARGET=@SIM_SUBTARGET@
SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
SIM_EXTRA_CLEAN = clean-extra
+SIM_EXTRA_DISTCLEAN = distclean-extra
SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
@@ -74,6 +76,8 @@ cp1.o: $(srcdir)/cp1.c config.h sim-main.h
mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
+multi-run.o: multi-include.h tmp-mach-multi
+
../igen/igen:
cd ../igen && $(MAKE)
@@ -98,6 +102,7 @@ BUILT_SRC_FROM_GEN = \
SIM_IGEN_ALL = tmp-igen
SIM_M16_ALL = tmp-m16
+SIM_MULTI_ALL = tmp-multi
$(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
@@ -291,10 +296,99 @@ tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
touch tmp-m16
+BUILT_SRC_FROM_MULTI = @sim_multi_src@
+SIM_MULTI_IGEN_CONFIGS = @sim_multi_igen_configs@
+
+$(BUILT_SRC_FROM_MULTI): tmp-multi
+tmp-multi: tmp-mach-multi tmp-itable-multi tmp-run-multi targ-vals.h
+tmp-mach-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
+ for t in $(SIM_MULTI_IGEN_CONFIGS); do \
+ p=`echo $${t} | sed -e 's/:.*//'` ; \
+ m=`echo $${t} | sed -e 's/.*:\(.*\):.*/\1/'` ; \
+ f=`echo $${t} | sed -e 's/.*://'` ; \
+ case $${p} in \
+ m16*) e="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
+ *) e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
+ esac; \
+ ../igen/igen \
+ $(IGEN_TRACE) \
+ $${e} \
+ -I $(srcdir) \
+ -Werror \
+ -Wnodiscard \
+ -N 0 \
+ -M $${m} \
+ -G gen-direct-access \
+ -G gen-zero-r0 \
+ -i $(IGEN_INSN) \
+ -P $${p}_ \
+ -x \
+ -n $${p}_icache.h -hc tmp-icache.h \
+ -n $${p}_icache.c -c tmp-icache.c \
+ -n $${p}_semantics.h -hs tmp-semantics.h \
+ -n $${p}_semantics.c -s tmp-semantics.c \
+ -n $${p}_idecode.h -hd tmp-idecode.h \
+ -n $${p}_idecode.c -d tmp-idecode.c \
+ -n $${p}_model.h -hm tmp-model.h \
+ -n $${p}_model.c -m tmp-model.c \
+ -n $${p}_support.h -hf tmp-support.h \
+ -n $${p}_support.c -f tmp-support.c \
+ -n $${p}_engine.h -he tmp-engine.h \
+ -n $${p}_engine.c -e tmp-engine.c \
+ ; \
+ $(srcdir)/../../move-if-change tmp-icache.h $${p}_icache.h ; \
+ $(srcdir)/../../move-if-change tmp-icache.c $${p}_icache.c ; \
+ $(srcdir)/../../move-if-change tmp-idecode.h $${p}_idecode.h ; \
+ $(srcdir)/../../move-if-change tmp-idecode.c $${p}_idecode.c ; \
+ $(srcdir)/../../move-if-change tmp-semantics.h $${p}_semantics.h ; \
+ $(srcdir)/../../move-if-change tmp-semantics.c $${p}_semantics.c ; \
+ $(srcdir)/../../move-if-change tmp-model.h $${p}_model.h ; \
+ $(srcdir)/../../move-if-change tmp-model.c $${p}_model.c ; \
+ $(srcdir)/../../move-if-change tmp-support.h $${p}_support.h ; \
+ $(srcdir)/../../move-if-change tmp-support.c $${p}_support.c ; \
+ $(srcdir)/../../move-if-change tmp-engine.h $${p}_engine.h ; \
+ $(srcdir)/../../move-if-change tmp-engine.c $${p}_engine.c ; \
+ done
+ touch tmp-mach-multi
+tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
+ ../igen/igen \
+ $(IGEN_TRACE) \
+ -I $(srcdir) \
+ -Werror \
+ -Wnodiscard \
+ -Wnowidth \
+ -N 0 \
+ @sim_multi_flags@ \
+ -G gen-direct-access \
+ -G gen-zero-r0 \
+ -i $(IGEN_INSN) \
+ -n itable.h -ht tmp-itable.h \
+ -n itable.c -t tmp-itable.c \
+ #
+ $(srcdir)/../../move-if-change tmp-itable.h itable.h
+ $(srcdir)/../../move-if-change tmp-itable.c itable.c
+ touch tmp-itable-multi
+tmp-run-multi: $(srcdir)/m16run.c
+ for t in $(SIM_MULTI_IGEN_CONFIGS); do \
+ case $${t} in \
+ m16*) \
+ m=`echo $${t} | sed -e 's/^m16//' -e 's/:.*//'`; \
+ sed < $(srcdir)/m16run.c > tmp-run \
+ -e "s/^sim_/m16$${m}_/" \
+ -e "s/m16_/m16$${m}_/" \
+ -e "s/m32_/m32$${m}_/" ; \
+ $(srcdir)/../../move-if-change tmp-run m16$${m}_run.c ; \
+ esac \
+ done
+ touch tmp-run-multi
+
clean-extra:
rm -f $(BUILT_SRC_FROM_GEN)
rm -f $(BUILT_SRC_FROM_IGEN)
rm -f $(BUILT_SRC_FROM_M16)
+ rm -f $(BUILT_SRC_FROM_MULTI)
rm -f tmp-*
rm -f m16*.o m32*.o itable*.o
+distclean-extra:
+ rm -f multi-include.h multi-run.c
diff --git a/sim/mips/configure b/sim/mips/configure
index 92ea0b5f514..a0471b3c752 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -163,6 +163,8 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
ac_help="$ac_help
+ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
+ac_help="$ac_help
--enable-sim-endian=endian Specify target byte endian orientation."
ac_help="$ac_help
--enable-sim-bitsize=N Specify target bitsize (32 or 64)."
@@ -697,7 +699,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:701: checking how to run the C preprocessor" >&5
+echo "configure:703: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -712,13 +714,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 716 "configure"
+#line 718 "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:722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:724: \"$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
:
@@ -729,13 +731,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 733 "configure"
+#line 735 "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:739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:741: \"$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
:
@@ -746,13 +748,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 750 "configure"
+#line 752 "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:756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:758: \"$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
:
@@ -777,7 +779,7 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:781: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:783: 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
@@ -804,7 +806,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:808: checking for POSIXized ISC" >&5
+echo "configure:810: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -825,12 +827,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:829: checking for ANSI C header files" >&5
+echo "configure:831: 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 834 "configure"
+#line 836 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -838,7 +840,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:844: \"$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*
@@ -855,7 +857,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 859 "configure"
+#line 861 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -873,7 +875,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 877 "configure"
+#line 879 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -894,7 +896,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 898 "configure"
+#line 900 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -905,7 +907,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -929,12 +931,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:933: checking for working const" >&5
+echo "configure:935: 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 938 "configure"
+#line 940 "configure"
#include "confdefs.h"
int main() {
@@ -983,7 +985,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1004,21 +1006,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1008: checking for inline" >&5
+echo "configure:1010: 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 1015 "configure"
+#line 1017 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1044,12 +1046,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1048: checking for off_t" >&5
+echo "configure:1050: 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 1053 "configure"
+#line 1055 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1077,12 +1079,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1081: checking for size_t" >&5
+echo "configure:1083: 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 1086 "configure"
+#line 1088 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1112,19 +1114,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:1116: checking for working alloca.h" >&5
+echo "configure:1118: 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 1121 "configure"
+#line 1123 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1130: \"$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
@@ -1145,12 +1147,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1149: checking for alloca" >&5
+echo "configure:1151: 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 1154 "configure"
+#line 1156 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1178,7 +1180,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1184: \"$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
@@ -1210,12 +1212,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1214: checking whether alloca needs Cray hooks" >&5
+echo "configure:1216: 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 1219 "configure"
+#line 1221 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1240,12 +1242,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:1244: checking for $ac_func" >&5
+echo "configure:1246: 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 1249 "configure"
+#line 1251 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1268,7 +1270,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1274: \"$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
@@ -1295,7 +1297,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1299: checking stack direction for C alloca" >&5
+echo "configure:1301: 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
@@ -1303,7 +1305,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1307 "configure"
+#line 1309 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1322,7 +1324,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1328: \"$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
@@ -1347,17 +1349,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:1351: checking for $ac_hdr" >&5
+echo "configure:1353: 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 1356 "configure"
+#line 1358 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1363: \"$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*
@@ -1386,12 +1388,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1390: checking for $ac_func" >&5
+echo "configure:1392: 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 1395 "configure"
+#line 1397 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1414,7 +1416,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1420: \"$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
@@ -1439,7 +1441,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1443: checking for working mmap" >&5
+echo "configure:1445: 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
@@ -1447,7 +1449,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1451 "configure"
+#line 1453 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1587,7 +1589,7 @@ main()
}
EOF
-if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1593: \"$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
@@ -1610,12 +1612,12 @@ EOF
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1614: checking for Cygwin environment" >&5
+echo "configure:1616: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1619 "configure"
+#line 1621 "configure"
#include "confdefs.h"
int main() {
@@ -1626,7 +1628,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -1643,19 +1645,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1647: checking for mingw32 environment" >&5
+echo "configure:1649: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1652 "configure"
+#line 1654 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -1722,7 +1724,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1726: checking host system type" >&5
+echo "configure:1728: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1743,7 +1745,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1747: checking target system type" >&5
+echo "configure:1749: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1761,7 +1763,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1765: checking build system type" >&5
+echo "configure:1767: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1805,7 +1807,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# 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:1809: checking for $ac_word" >&5
+echo "configure:1811: 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
@@ -1835,7 +1837,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:1839: checking for $ac_word" >&5
+echo "configure:1841: 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
@@ -1886,7 +1888,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:1890: checking for $ac_word" >&5
+echo "configure:1892: 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
@@ -1918,7 +1920,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1924: 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.
@@ -1929,12 +1931,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1933 "configure"
+#line 1935 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1940: \"$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
@@ -1960,12 +1962,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:1964: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1966: 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:1969: checking whether we are using GNU C" >&5
+echo "configure:1971: 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
@@ -1974,7 +1976,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1978: \"$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:1980: \"$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
@@ -1993,7 +1995,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:1997: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1999: 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
@@ -2036,7 +2038,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:2040: checking for a BSD compatible install" >&5
+echo "configure:2042: 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
@@ -2104,7 +2106,7 @@ AR=${AR-ar}
# 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:2108: checking for $ac_word" >&5
+echo "configure:2110: 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
@@ -2139,17 +2141,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:2143: checking for $ac_hdr" >&5
+echo "configure:2145: 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 2148 "configure"
+#line 2150 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2155: \"$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*
@@ -2179,12 +2181,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2183: checking for $ac_func" >&5
+echo "configure:2185: 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 2188 "configure"
+#line 2190 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2207,7 +2209,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2213: \"$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
@@ -2236,12 +2238,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2240: checking for $ac_func" >&5
+echo "configure:2242: 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 2245 "configure"
+#line 2247 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2264,7 +2266,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2270: \"$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
@@ -2298,19 +2300,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2302: checking for LC_MESSAGES" >&5
+echo "configure:2304: 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 2307 "configure"
+#line 2309 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2316: \"$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
@@ -2331,7 +2333,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2335: checking whether NLS is requested" >&5
+echo "configure:2337: 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"
@@ -2351,7 +2353,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2355: checking whether included gettext is requested" >&5
+echo "configure:2357: 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"
@@ -2370,17 +2372,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2374: checking for libintl.h" >&5
+echo "configure:2376: 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 2379 "configure"
+#line 2381 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2386: \"$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*
@@ -2397,19 +2399,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:2401: checking for gettext in libc" >&5
+echo "configure:2403: 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 2406 "configure"
+#line 2408 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2415: \"$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
@@ -2425,7 +2427,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:2429: checking for bindtextdomain in -lintl" >&5
+echo "configure:2431: 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
@@ -2433,7 +2435,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2437 "configure"
+#line 2439 "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
@@ -2444,7 +2446,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2450: \"$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
@@ -2460,19 +2462,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:2464: checking for gettext in libintl" >&5
+echo "configure:2466: 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 2469 "configure"
+#line 2471 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2478: \"$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
@@ -2500,7 +2502,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:2504: checking for $ac_word" >&5
+echo "configure:2506: 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
@@ -2534,12 +2536,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2538: checking for $ac_func" >&5
+echo "configure:2540: 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 2543 "configure"
+#line 2545 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2562,7 +2564,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2568: \"$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
@@ -2589,7 +2591,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:2593: checking for $ac_word" >&5
+echo "configure:2595: 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
@@ -2625,7 +2627,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:2629: checking for $ac_word" >&5
+echo "configure:2631: 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
@@ -2657,7 +2659,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2661 "configure"
+#line 2663 "configure"
#include "confdefs.h"
int main() {
@@ -2665,7 +2667,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2697,7 +2699,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:2701: checking for $ac_word" >&5
+echo "configure:2703: 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
@@ -2731,7 +2733,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:2735: checking for $ac_word" >&5
+echo "configure:2737: 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
@@ -2767,7 +2769,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:2771: checking for $ac_word" >&5
+echo "configure:2773: 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
@@ -2857,7 +2859,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2861: checking for catalogs to be installed" >&5
+echo "configure:2863: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2885,17 +2887,17 @@ echo "configure:2861: 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:2889: checking for linux/version.h" >&5
+echo "configure:2891: 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 2894 "configure"
+#line 2896 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2901: \"$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*
@@ -2964,17 +2966,17 @@ for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2968: checking for $ac_hdr" >&5
+echo "configure:2970: 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 2973 "configure"
+#line 2975 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2980: \"$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*
@@ -3004,17 +3006,17 @@ for ac_hdr in sys/time.h sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3008: checking for $ac_hdr" >&5
+echo "configure:3010: 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 3013 "configure"
+#line 3015 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3020: \"$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*
@@ -3044,17 +3046,17 @@ for ac_hdr in fcntl.h fpu_control.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3048: checking for $ac_hdr" >&5
+echo "configure:3050: 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 3053 "configure"
+#line 3055 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3060: \"$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*
@@ -3084,17 +3086,17 @@ for ac_hdr in dlfcn.h errno.h sys/stat.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3088: checking for $ac_hdr" >&5
+echo "configure:3090: 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 3093 "configure"
+#line 3095 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3100: \"$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*
@@ -3123,12 +3125,12 @@ done
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3127: checking for $ac_func" >&5
+echo "configure:3129: 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 3132 "configure"
+#line 3134 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3151,7 +3153,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3157: \"$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
@@ -3178,7 +3180,7 @@ done
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3182: checking for bind in -lsocket" >&5
+echo "configure:3184: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3186,7 +3188,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3190 "configure"
+#line 3192 "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
@@ -3197,7 +3199,7 @@ int main() {
bind()
; return 0; }
EOF
-if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3203: \"$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
@@ -3225,7 +3227,7 @@ else
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3229: checking for gethostbyname in -lnsl" >&5
+echo "configure:3231: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3233,7 +3235,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3237 "configure"
+#line 3239 "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
@@ -3244,7 +3246,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3250: \"$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
@@ -3420,12 +3422,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3424: checking return type of signal handlers" >&5
+echo "configure:3426: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3429 "configure"
+#line 3431 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3442,7 +3444,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3464,7 +3466,7 @@ EOF
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3468: checking for executable suffix" >&5
+echo "configure:3470: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3474,7 +3476,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3624,14 +3626,14 @@ else
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3628: checking whether byte ordering is bigendian" >&5
+echo "configure:3630: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3635 "configure"
+#line 3637 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3642,11 +3644,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3650 "configure"
+#line 3652 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3657,7 +3659,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3677,7 +3679,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3681 "configure"
+#line 3683 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3690,7 +3692,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3773,7 +3775,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:3777: checking compiler warning flags" >&5
+echo "configure:3779: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -3783,14 +3785,14 @@ echo "configure:3777: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 3787 "configure"
+#line 3789 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -3805,6 +3807,23 @@ rm -f conftest*
fi
+default_sim_reserved_bits="1"
+# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
+if test "${enable_sim_reserved_bits+set}" = set; then
+ enableval="$enable_sim_reserved_bits"
+ case "${enableval}" in
+ yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
+ no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
+ *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
+esac
+if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
+ echo "Setting reserved flags = $sim_reserved_bits" 6>&1
+fi
+else
+ sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
+fi
+
+
# DEPRECATED
#
# Instead of defining a `subtarget' macro, code should be checking
@@ -3812,6 +3831,7 @@ fi
# in question.
#
case "${target}" in
+ mips64vr*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
mipsisa32*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
mipsisa64*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
@@ -4044,6 +4064,8 @@ sim_igen_machine="-M mipsIV"
sim_m16_machine="-M mips16"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
+sim_mach_default="mips8000"
+
case "${target}" in
mips*tx39*) sim_gen=IGEN
sim_igen_filter="32,f"
@@ -4051,16 +4073,29 @@ case "${target}" in
;;
mips64vr43*-*-*) sim_gen=IGEN
sim_igen_machine="-M mipsIV"
+ sim_mach_default="mips8000"
;;
mips64vr5*-*-*) sim_gen=IGEN
sim_igen_machine="-M vr5000"
+ sim_mach_default="mips5000"
;;
mips64vr41*) sim_gen=M16
sim_igen_machine="-M vr4100"
sim_m16_machine="-M vr4100"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
+ sim_mach_default="mips4100"
;;
+ mips64vr-*-* | mips64vrel-*-*)
+ sim_gen=MULTI
+ sim_multi_configs="\
+ vr4100:mipsIII,mips16,vr4100:32,64:mips4100,mips4111\
+ vr4120:mipsIII,mips16,vr4120:32,64:mips4120\
+ vr5000:mipsIV:32,64,f:mips4300,mips5000\
+ vr5400:mipsIV,vr5400:32,64,f:mips5400\
+ vr5500:mipsIV,vr5500:32,64,f:mips5500"
+ sim_multi_default=mips5000
+ ;;
mips64*-*-*) sim_igen_filter="32,64,f"
sim_gen=IGEN
;;
@@ -4071,25 +4106,232 @@ case "${target}" in
mipsisa32*-*-*) sim_gen=IGEN
sim_igen_machine="-M mips32"
sim_igen_filter="32,f"
+ sim_mach_default="mipsisa32"
;;
mipsisa64sb1*-*-*) sim_gen=IGEN
sim_igen_machine="-M mips64,sb1"
sim_igen_filter="32,64,f"
+ sim_mach_default="mips_sb1"
;;
mipsisa64*-*-*) sim_gen=IGEN
sim_igen_machine="-M mips64,mips3d"
sim_igen_filter="32,64,f"
+ sim_mach_default="mipsisa64"
;;
mips*lsi*) sim_gen=M16
sim_igen_machine="-M mipsIII,mips16"
sim_m16_machine="-M mips16,mipsIII"
sim_igen_filter="32,f"
sim_m16_filter="16"
+ sim_mach_default="mips4000"
;;
mips*-*-*) sim_gen=IGEN
sim_igen_filter="32,f"
;;
esac
+
+# The MULTI generator can combine several simulation engines into one.
+# executable. A configuration which uses the MULTI should set two
+# variables: ${sim_multi_configs} and ${sim_multi_default}.
+#
+# ${sim_multi_configs} is the list of engines to build. Each
+# space-separated entry has the form NAME:MACHINE:FILTER:BFDMACHS,
+# where:
+#
+# - NAME is a C-compatible prefix for the engine,
+# - MACHINE is a -M argument,
+# - FILTER is a -F argument, and
+# - BFDMACHS is a comma-separated list of bfd machines that the
+# simulator can run.
+#
+# Each entry will have a separate simulation engine whose prefix is
+# m32<NAME>. If the machine list includes "mips16", there will also
+# be a mips16 engine, prefix m16<NAME>. The mips16 engine will be
+# generated using the same machine list as the 32-bit version,
+# but the filter will be "16" instead of FILTER.
+#
+# The simulator compares the bfd mach against BFDMACHS to decide
+# which engine to use. Entries in BFDMACHS should be bfd_mach
+# values with "bfd_mach_" removed. ${sim_multi_default} says
+# which entry should be the default.
+if test ${sim_gen} = MULTI; then
+
+ # Simple sanity check.
+ if test -z "${sim_multi_configs}" || test -z "${sim_multi_default}"; then
+ { echo "configure: error: Error in configure.in: MULTI simulator not set up correctly" 1>&2; exit 1; }
+ fi
+
+ # Start in a known state.
+ rm -f multi-include.h multi-run.c
+ sim_multi_flags=
+ sim_multi_src=
+ sim_multi_obj=multi-run.o
+ sim_multi_igen_configs=
+ sim_seen_default=no
+
+ cat << __EOF__ > multi-run.c
+/* Main entry point for MULTI simulators.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ --
+
+ This file was generated by sim/mips/configure. */
+
+#include "sim-main.h"
+#include "multi-include.h"
+
+#define SD sd
+#define CPU cpu
+
+void
+sim_engine_run (SIM_DESC sd,
+ int next_cpu_nr,
+ int nr_cpus,
+ int signal) /* ignore */
+{
+ int mach;
+
+ if (STATE_ARCHITECTURE (sd) == NULL)
+ mach = bfd_mach_${sim_multi_default};
+ else
+ mach = STATE_ARCHITECTURE (SD)->mach;
+
+ switch (mach)
+ {
+__EOF__
+
+ for fc in ${sim_multi_configs}; do
+
+ # Split up the entry. ${c} contains the first three elements.
+ # Note: outer sqaure brackets are m4 quotes.
+ c=`echo ${fc} | sed 's/:[^:]*$//'`
+ bfdmachs=`echo ${fc} | sed 's/.*://'`
+ name=`echo ${c} | sed 's/:.*//'`
+ machine=`echo ${c} | sed 's/.*:\(.*\):.*/\1/'`
+ filter=`echo ${c} | sed 's/.*://'`
+
+ # Build the following lists:
+ #
+ # sim_multi_flags: all -M and -F flags used by the simulator
+ # sim_multi_src: all makefile-generated source files
+ # sim_multi_obj: the objects for ${sim_multi_src}
+ # sim_multi_igen_configs: igen configuration strings.
+ #
+ # Each entry in ${sim_multi_igen_configs} is a prefix (m32
+ # or m16) followed by the NAME, MACHINE and FILTER part of
+ # the ${sim_multi_configs} entry.
+ sim_multi_flags="${sim_multi_flags} -F ${filter} -M ${machine}"
+
+ # Check whether mips16 handling is needed.
+ case ${c} in
+ *:*mips16*:*)
+ # Run igen twice, once for normal mode and once for mips16.
+ ws="m32 m16"
+
+ # The top-level function for the mips16 simulator is
+ # in a file m16${name}_run.c, generated by the
+ # tmp-run-multi Makefile rule.
+ sim_multi_src="${sim_multi_src} m16${name}_run.c"
+ sim_multi_obj="${sim_multi_obj} m16${name}_run.o"
+ sim_multi_flags="${sim_multi_flags} -F 16"
+ ;;
+ *)
+ ws=m32
+ ;;
+ esac
+
+ # Now add the list of igen-generated files to ${sim_multi_src}
+ # and ${sim_multi_obj}.
+ for w in ${ws}; do
+ for base in engine icache idecode model semantics support; do
+ sim_multi_src="${sim_multi_src} ${w}${name}_${base}.c"
+ sim_multi_src="${sim_multi_src} ${w}${name}_${base}.h"
+ sim_multi_obj="${sim_multi_obj} ${w}${name}_${base}.o"
+ done
+ sim_multi_igen_configs="${sim_multi_igen_configs} ${w}${c}"
+ done
+
+ # Add an include for the engine.h file. This file declares the
+ # top-level foo_engine_run() function.
+ echo "#include \"${w}${name}_engine.h\"" >> multi-include.h
+
+ # Add case statements for this engine to sim_engine_run().
+ for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
+ echo " case bfd_mach_${mach}:" >> multi-run.c
+ if test ${mach} = ${sim_multi_default}; then
+ echo " default:" >> multi-run.c
+ sim_seen_default=yes
+ fi
+ done
+ echo " ${w}${name}_engine_run (sd, next_cpu_nr, nr_cpus, signal);" \
+ >> multi-run.c
+ echo " break;" >> multi-run.c
+ done
+
+ # Check whether we added a 'default:' label.
+ if test ${sim_seen_default} = no; then
+ { echo "configure: error: Error in configure.in: \${sim_multi_configs} doesn't have an entry for \${sim_multi_default}" 1>&2; exit 1; }
+ fi
+
+ cat << __EOF__ >> multi-run.c
+ }
+}
+
+int
+mips_mach_multi (SIM_DESC sd)
+{
+ if (STATE_ARCHITECTURE (sd) == NULL)
+ return bfd_mach_${sim_multi_default};
+
+ switch (STATE_ARCHITECTURE (SD)->mach)
+ {
+__EOF__
+
+ # Add case statements for this engine to mips_mach_multi().
+ for fc in ${sim_multi_configs}; do
+
+ # Split up the entry. ${c} contains the first three elements.
+ # Note: outer sqaure brackets are m4 quotes.
+ c=`echo ${fc} | sed 's/:[^:]*$//'`
+ bfdmachs=`echo ${fc} | sed 's/.*://'`
+
+ for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
+ echo " case bfd_mach_${mach}:" >> multi-run.c
+ done
+ done
+
+ cat << __EOF__ >> multi-run.c
+ return (STATE_ARCHITECTURE (SD)->mach);
+ default:
+ return bfd_mach_${sim_multi_default};
+ }
+}
+__EOF__
+
+ SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_MULTI"
+else
+ # For clean-extra
+ sim_multi_src=doesnt-exist.c
+
+ if test x"${sim_mach_default}" = x""; then
+ { echo "configure: error: Error in configure.in: \${sim_mach_default} not defined" 1>&2; exit 1; }
+ fi
+ SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_DEFAULT=bfd_mach_${sim_mach_default}"
+fi
sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}"
@@ -4097,6 +4339,10 @@ sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}"
+
+
+
+
#
# Add simulated hardware devices
#
@@ -4185,7 +4431,7 @@ esac
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4189: checking for X" >&5
+echo "configure:4435: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -4247,12 +4493,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4251 "configure"
+#line 4497 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4502: \"$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*
@@ -4321,14 +4567,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4325 "configure"
+#line 4571 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -4421,17 +4667,17 @@ for ac_hdr in string.h strings.h stdlib.h stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4425: checking for $ac_hdr" >&5
+echo "configure:4671: 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 4430 "configure"
+#line 4676 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4681: \"$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*
@@ -4458,7 +4704,7 @@ fi
done
echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
-echo "configure:4462: checking for fabs in -lm" >&5
+echo "configure:4708: checking for fabs in -lm" >&5
ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4466,7 +4712,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
+#line 4716 "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
@@ -4477,7 +4723,7 @@ int main() {
fabs()
; return 0; }
EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4727: \"$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
@@ -4507,12 +4753,12 @@ fi
for ac_func in aint anint sqrt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4511: checking for $ac_func" >&5
+echo "configure:4757: 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 4516 "configure"
+#line 4762 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4535,7 +4781,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4785: \"$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
@@ -4774,6 +5020,10 @@ s%@SIM_SUBTARGET@%$SIM_SUBTARGET%g
s%@sim_igen_flags@%$sim_igen_flags%g
s%@sim_m16_flags@%$sim_m16_flags%g
s%@sim_gen@%$sim_gen%g
+s%@sim_multi_flags@%$sim_multi_flags%g
+s%@sim_multi_igen_configs@%$sim_multi_igen_configs%g
+s%@sim_multi_src@%$sim_multi_src%g
+s%@sim_multi_obj@%$sim_multi_obj%g
s%@mips_extra_objs@%$mips_extra_objs%g
s%@mips_igen_engine@%$mips_igen_engine%g
s%@mips_extra_libs@%$mips_extra_libs%g
diff --git a/sim/mips/configure.in b/sim/mips/configure.in
index 3672b66e73a..1ea4901f87c 100644
--- a/sim/mips/configure.in
+++ b/sim/mips/configure.in
@@ -10,6 +10,7 @@ SIM_AC_OPTION_INLINE()
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_HOSTENDIAN
SIM_AC_OPTION_WARNINGS
+SIM_AC_OPTION_RESERVED_BITS(1)
# DEPRECATED
#
@@ -18,6 +19,7 @@ SIM_AC_OPTION_WARNINGS
# in question.
#
case "${target}" in
+ mips64vr*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
mipsisa32*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
mipsisa64*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
@@ -100,6 +102,8 @@ sim_igen_machine="-M mipsIV"
sim_m16_machine="-M mips16"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
+sim_mach_default="mips8000"
+
case "${target}" in
mips*tx39*) sim_gen=IGEN
sim_igen_filter="32,f"
@@ -107,16 +111,29 @@ case "${target}" in
;;
mips64vr43*-*-*) sim_gen=IGEN
sim_igen_machine="-M mipsIV"
+ sim_mach_default="mips8000"
;;
mips64vr5*-*-*) sim_gen=IGEN
sim_igen_machine="-M vr5000"
+ sim_mach_default="mips5000"
;;
mips64vr41*) sim_gen=M16
sim_igen_machine="-M vr4100"
sim_m16_machine="-M vr4100"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
+ sim_mach_default="mips4100"
;;
+ mips64vr-*-* | mips64vrel-*-*)
+ sim_gen=MULTI
+ sim_multi_configs="\
+ vr4100:mipsIII,mips16,vr4100:32,64:mips4100,mips4111\
+ vr4120:mipsIII,mips16,vr4120:32,64:mips4120\
+ vr5000:mipsIV:32,64,f:mips4300,mips5000\
+ vr5400:mipsIV,vr5400:32,64,f:mips5400\
+ vr5500:mipsIV,vr5500:32,64,f:mips5500"
+ sim_multi_default=mips5000
+ ;;
mips64*-*-*) sim_igen_filter="32,64,f"
sim_gen=IGEN
;;
@@ -127,30 +144,241 @@ case "${target}" in
mipsisa32*-*-*) sim_gen=IGEN
sim_igen_machine="-M mips32"
sim_igen_filter="32,f"
+ sim_mach_default="mipsisa32"
;;
mipsisa64sb1*-*-*) sim_gen=IGEN
sim_igen_machine="-M mips64,sb1"
sim_igen_filter="32,64,f"
+ sim_mach_default="mips_sb1"
;;
mipsisa64*-*-*) sim_gen=IGEN
sim_igen_machine="-M mips64,mips3d"
sim_igen_filter="32,64,f"
+ sim_mach_default="mipsisa64"
;;
mips*lsi*) sim_gen=M16
sim_igen_machine="-M mipsIII,mips16"
sim_m16_machine="-M mips16,mipsIII"
sim_igen_filter="32,f"
sim_m16_filter="16"
+ sim_mach_default="mips4000"
;;
mips*-*-*) sim_gen=IGEN
sim_igen_filter="32,f"
;;
esac
+
+# The MULTI generator can combine several simulation engines into one.
+# executable. A configuration which uses the MULTI should set two
+# variables: ${sim_multi_configs} and ${sim_multi_default}.
+#
+# ${sim_multi_configs} is the list of engines to build. Each
+# space-separated entry has the form NAME:MACHINE:FILTER:BFDMACHS,
+# where:
+#
+# - NAME is a C-compatible prefix for the engine,
+# - MACHINE is a -M argument,
+# - FILTER is a -F argument, and
+# - BFDMACHS is a comma-separated list of bfd machines that the
+# simulator can run.
+#
+# Each entry will have a separate simulation engine whose prefix is
+# m32<NAME>. If the machine list includes "mips16", there will also
+# be a mips16 engine, prefix m16<NAME>. The mips16 engine will be
+# generated using the same machine list as the 32-bit version,
+# but the filter will be "16" instead of FILTER.
+#
+# The simulator compares the bfd mach against BFDMACHS to decide
+# which engine to use. Entries in BFDMACHS should be bfd_mach
+# values with "bfd_mach_" removed. ${sim_multi_default} says
+# which entry should be the default.
+if test ${sim_gen} = MULTI; then
+
+ # Simple sanity check.
+ if test -z "${sim_multi_configs}" || test -z "${sim_multi_default}"; then
+ AC_MSG_ERROR(Error in configure.in: MULTI simulator not set up correctly)
+ fi
+
+ # Start in a known state.
+ rm -f multi-include.h multi-run.c
+ sim_multi_flags=
+ sim_multi_src=
+ sim_multi_obj=multi-run.o
+ sim_multi_igen_configs=
+ sim_seen_default=no
+
+ cat << __EOF__ > multi-run.c
+/* Main entry point for MULTI simulators.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ --
+
+ This file was generated by sim/mips/configure. */
+
+#include "sim-main.h"
+#include "multi-include.h"
+
+#define SD sd
+#define CPU cpu
+
+void
+sim_engine_run (SIM_DESC sd,
+ int next_cpu_nr,
+ int nr_cpus,
+ int signal) /* ignore */
+{
+ int mach;
+
+ if (STATE_ARCHITECTURE (sd) == NULL)
+ mach = bfd_mach_${sim_multi_default};
+ else
+ mach = STATE_ARCHITECTURE (SD)->mach;
+
+ switch (mach)
+ {
+__EOF__
+
+ for fc in ${sim_multi_configs}; do
+
+ # Split up the entry. ${c} contains the first three elements.
+ # Note: outer sqaure brackets are m4 quotes.
+ c=`echo ${fc} | sed ['s/:[^:]*$//']`
+ bfdmachs=`echo ${fc} | sed 's/.*://'`
+ name=`echo ${c} | sed 's/:.*//'`
+ machine=`echo ${c} | sed 's/.*:\(.*\):.*/\1/'`
+ filter=`echo ${c} | sed 's/.*://'`
+
+ # Build the following lists:
+ #
+ # sim_multi_flags: all -M and -F flags used by the simulator
+ # sim_multi_src: all makefile-generated source files
+ # sim_multi_obj: the objects for ${sim_multi_src}
+ # sim_multi_igen_configs: igen configuration strings.
+ #
+ # Each entry in ${sim_multi_igen_configs} is a prefix (m32
+ # or m16) followed by the NAME, MACHINE and FILTER part of
+ # the ${sim_multi_configs} entry.
+ sim_multi_flags="${sim_multi_flags} -F ${filter} -M ${machine}"
+
+ # Check whether mips16 handling is needed.
+ case ${c} in
+ *:*mips16*:*)
+ # Run igen twice, once for normal mode and once for mips16.
+ ws="m32 m16"
+
+ # The top-level function for the mips16 simulator is
+ # in a file m16${name}_run.c, generated by the
+ # tmp-run-multi Makefile rule.
+ sim_multi_src="${sim_multi_src} m16${name}_run.c"
+ sim_multi_obj="${sim_multi_obj} m16${name}_run.o"
+ sim_multi_flags="${sim_multi_flags} -F 16"
+ ;;
+ *)
+ ws=m32
+ ;;
+ esac
+
+ # Now add the list of igen-generated files to ${sim_multi_src}
+ # and ${sim_multi_obj}.
+ for w in ${ws}; do
+ for base in engine icache idecode model semantics support; do
+ sim_multi_src="${sim_multi_src} ${w}${name}_${base}.c"
+ sim_multi_src="${sim_multi_src} ${w}${name}_${base}.h"
+ sim_multi_obj="${sim_multi_obj} ${w}${name}_${base}.o"
+ done
+ sim_multi_igen_configs="${sim_multi_igen_configs} ${w}${c}"
+ done
+
+ # Add an include for the engine.h file. This file declares the
+ # top-level foo_engine_run() function.
+ echo "#include \"${w}${name}_engine.h\"" >> multi-include.h
+
+ # Add case statements for this engine to sim_engine_run().
+ for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
+ echo " case bfd_mach_${mach}:" >> multi-run.c
+ if test ${mach} = ${sim_multi_default}; then
+ echo " default:" >> multi-run.c
+ sim_seen_default=yes
+ fi
+ done
+ echo " ${w}${name}_engine_run (sd, next_cpu_nr, nr_cpus, signal);" \
+ >> multi-run.c
+ echo " break;" >> multi-run.c
+ done
+
+ # Check whether we added a 'default:' label.
+ if test ${sim_seen_default} = no; then
+ AC_MSG_ERROR(Error in configure.in: \${sim_multi_configs} doesn't have an entry for \${sim_multi_default})
+ fi
+
+ cat << __EOF__ >> multi-run.c
+ }
+}
+
+int
+mips_mach_multi (SIM_DESC sd)
+{
+ if (STATE_ARCHITECTURE (sd) == NULL)
+ return bfd_mach_${sim_multi_default};
+
+ switch (STATE_ARCHITECTURE (SD)->mach)
+ {
+__EOF__
+
+ # Add case statements for this engine to mips_mach_multi().
+ for fc in ${sim_multi_configs}; do
+
+ # Split up the entry. ${c} contains the first three elements.
+ # Note: outer sqaure brackets are m4 quotes.
+ c=`echo ${fc} | sed ['s/:[^:]*$//']`
+ bfdmachs=`echo ${fc} | sed 's/.*://'`
+
+ for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
+ echo " case bfd_mach_${mach}:" >> multi-run.c
+ done
+ done
+
+ cat << __EOF__ >> multi-run.c
+ return (STATE_ARCHITECTURE (SD)->mach);
+ default:
+ return bfd_mach_${sim_multi_default};
+ }
+}
+__EOF__
+
+ SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_MULTI"
+else
+ # For clean-extra
+ sim_multi_src=doesnt-exist.c
+
+ if test x"${sim_mach_default}" = x""; then
+ AC_MSG_ERROR(Error in configure.in: \${sim_mach_default} not defined)
+ fi
+ SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_DEFAULT=bfd_mach_${sim_mach_default}"
+fi
sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}"
AC_SUBST(sim_igen_flags)
AC_SUBST(sim_m16_flags)
AC_SUBST(sim_gen)
+AC_SUBST(sim_multi_flags)
+AC_SUBST(sim_multi_igen_configs)
+AC_SUBST(sim_multi_src)
+AC_SUBST(sim_multi_obj)
#
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 39267a0bf1b..81fb2001b27 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -55,7 +55,10 @@
// (or which pre-date or use different encodings than the standard
// instructions) are (for the most part) in separate .igen files.
:model:::vr4100:mips4100: // vr.igen
+:model:::vr4120:mips4120:
:model:::vr5000:mips5000:
+:model:::vr5400:mips5400:
+:model:::vr5500:mips5500:
:model:::r3900:mips3900: // tx.igen
// MIPS Application Specific Extensions (ASEs)
@@ -565,10 +568,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] == (signed_word) GPR[RT])
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -588,10 +589,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] == (signed_word) GPR[RT])
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -614,10 +613,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] >= 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -638,13 +635,11 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if (RS == 31)
Unpredictable ();
RA = (CIA + 8);
if ((signed_word) GPR[RS] >= 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -664,7 +659,6 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if (RS == 31)
Unpredictable ();
RA = (CIA + 8);
@@ -672,7 +666,6 @@
executed */
if ((signed_word) GPR[RS] >= 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -694,10 +687,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] >= 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -720,10 +711,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] > 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -743,12 +732,10 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
/* NOTE: The branch occurs AFTER the next instruction has been
executed */
if ((signed_word) GPR[RS] > 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -771,12 +758,10 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
/* NOTE: The branch occurs AFTER the next instruction has been
executed */
if ((signed_word) GPR[RS] <= 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -796,10 +781,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] <= 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -822,10 +805,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] < 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -846,7 +827,6 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if (RS == 31)
Unpredictable ();
RA = (CIA + 8);
@@ -854,7 +834,6 @@
executed */
if ((signed_word) GPR[RS] < 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -874,13 +853,11 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if (RS == 31)
Unpredictable ();
RA = (CIA + 8);
if ((signed_word) GPR[RS] < 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -902,12 +879,10 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
/* NOTE: The branch occurs AFTER the next instruction has been
executed */
if ((signed_word) GPR[RS] < 0)
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -930,10 +905,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] != (signed_word) GPR[RT])
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
}
@@ -953,10 +926,8 @@
*r3900:
{
address_word offset = EXTEND16 (OFFSET) << 2;
- check_branch_bug ();
if ((signed_word) GPR[RS] != (signed_word) GPR[RT])
{
- mark_branch_bug (NIA+offset);
DELAY_SLOT (NIA + offset);
}
else
@@ -1010,6 +981,7 @@
"clo r<RD>, r<RS>"
*mips32:
*mips64:
+*vr5500:
{
unsigned32 temp = GPR[RS];
unsigned32 i, mask;
@@ -1034,6 +1006,7 @@
"clz r<RD>, r<RS>"
*mips32:
*mips64:
+*vr5500:
{
unsigned32 temp = GPR[RS];
unsigned32 i, mask;
@@ -1143,6 +1116,7 @@
011100,5.RS,5.RT,5.RD,00000,100101:SPECIAL2:64::DCLO
"dclo r<RD>, r<RS>"
*mips64:
+*vr5500:
{
unsigned64 temp = GPR[RS];
unsigned32 i;
@@ -1166,6 +1140,7 @@
011100,5.RS,5.RT,5.RD,00000,100100:SPECIAL2:64::DCLZ
"dclz r<RD>, r<RS>"
*mips64:
+*vr5500:
{
unsigned64 temp = GPR[RS];
unsigned32 i;
@@ -2189,6 +2164,7 @@
"madd r<RS>, r<RT>"
*mips32:
*mips64:
+*vr5500:
{
signed64 temp;
check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2208,6 +2184,7 @@
"maddu r<RS>, r<RT>"
*mips32:
*mips64:
+*vr5500:
{
unsigned64 temp;
check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2312,6 +2289,7 @@
"msub r<RS>, r<RT>"
*mips32:
*mips64:
+*vr5500:
{
signed64 temp;
check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2331,6 +2309,7 @@
"msubu r<RS>, r<RT>"
*mips32:
*mips64:
+*vr5500:
{
unsigned64 temp;
check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2388,6 +2367,7 @@
"mul r<RD>, r<RS>, r<RT>"
*mips32:
*mips64:
+*vr5500:
{
signed64 prod;
if (NotWordValue (GPR[RS]) || NotWordValue (GPR[RT]))
@@ -3792,13 +3772,11 @@
*mipsIII:
{
check_fpu (SD_);
- check_branch_bug ();
TRACE_BRANCH_INPUT (PREVCOC1());
if (PREVCOC1() == TF)
{
address_word dest = NIA + (EXTEND16 (OFFSET) << 2);
TRACE_BRANCH_RESULT (dest);
- mark_branch_bug (dest);
DELAY_SLOT (dest);
}
else if (ND)
@@ -3824,11 +3802,9 @@
*r3900:
{
check_fpu (SD_);
- check_branch_bug ();
if (GETFCC(CC) == TF)
{
address_word dest = NIA + (EXTEND16 (OFFSET) << 2);
- mark_branch_bug (dest);
DELAY_SLOT (dest);
}
else if (ND)
@@ -4295,6 +4271,22 @@
}
+010011,5.BASE,5.INDEX,5.0,5.FD,000101:COP1X:64,f::LUXC1
+"luxc1 f<FD>, r<INDEX>(r<BASE>)"
+*mipsV:
+*mips64:
+{
+ address_word base = GPR[BASE];
+ address_word index = GPR[INDEX];
+ address_word vaddr = base + index;
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ /* Arrange for the bottom 3 bits of (base + index) to be 0. */
+ if ((vaddr & 0x7) != 0)
+ index -= (vaddr & 0x7);
+ COP_LD (1, FD, do_load (SD_, AccessLength_DOUBLEWORD, base, index));
+}
+
110001,5.BASE,5.FT,16.OFFSET:COP1:32,f::LWC1
"lwc1 f<FT>, <OFFSET>(r<BASE>)"
@@ -4767,6 +4759,24 @@
}
+010011,5.BASE,5.INDEX,5.FS,00000,001101:COP1X:64,f::SUXC1
+"suxc1 f<FS>, r<INDEX>(r<BASE>)"
+*mipsV:
+*mips64:
+{
+ unsigned64 v;
+ address_word base = GPR[BASE];
+ address_word index = GPR[INDEX];
+ address_word vaddr = base + index;
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ /* Arrange for the bottom 3 bits of (base + index) to be 0. */
+ if ((vaddr & 0x7) != 0)
+ index -= (vaddr & 0x7);
+ do_store (SD_, AccessLength_DOUBLEWORD, base, index, COP_SD (1, FS));
+}
+
+
010001,10,3.FMT,00000,5.FS,5.FD,000100:COP1:32,f::SQRT.fmt
"sqrt.%s<FMT> f<FD>, f<FS>"
*mipsII:
@@ -5018,17 +5028,6 @@
}
-010000,1,0000000000000000000,111001:COP0:32::DI
-"di"
-*mipsI:
-*mipsII:
-*mipsIII:
-*mipsIV:
-*mipsV:
-*vr4100:
-*vr5000:
-
-
010000,00001,5.RT,5.RD,00000000000:COP0:64::DMFC0
"dmfc0 r<RT>, r<RD>"
*mipsIII:
@@ -5053,18 +5052,6 @@
}
-010000,1,0000000000000000000,111000:COP0:32::EI
-"ei"
-*mipsI:
-*mipsII:
-*mipsIII:
-*mipsIV:
-*mipsV:
-*mips64:
-*vr4100:
-*vr5000:
-
-
010000,1,0000000000000000000,011000:COP0:32::ERET
"eret"
*mipsIII:
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index fed625ecb54..2f3ffa40bb5 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -1,5 +1,5 @@
/* MIPS Simulator definition.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
@@ -41,7 +41,7 @@ mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ER
typedef address_word sim_cia;
#include "sim-base.h"
-
+#include "bfd.h"
/* Deprecated macros and types for manipulating 64bit values. Use
../common/sim-bits.h and ../common/sim-endian.h macros instead. */
@@ -423,10 +423,6 @@ struct _sim_cpu {
hilo_history lo_history;
#define LOHISTORY (&(CPU)->lo_history)
-#define check_branch_bug()
-#define mark_branch_bug(TARGET)
-
-
sim_cpu_base base;
};
@@ -950,6 +946,12 @@ void mips_cpu_exception_trigger(SIM_DESC sd, sim_cpu* cpu, address_word pc);
void mips_cpu_exception_suspend(SIM_DESC sd, sim_cpu* cpu, int exception);
void mips_cpu_exception_resume(SIM_DESC sd, sim_cpu* cpu, int exception);
+#ifdef MIPS_MACH_MULTI
+extern int mips_mach_multi(SIM_DESC sd);
+#define MIPS_MACH(SD) mips_mach_multi(SD)
+#else
+#define MIPS_MACH(SD) MIPS_MACH_DEFAULT
+#endif
#if H_REVEALS_MODULE_P (SIM_MAIN_INLINE)
#include "sim-main.c"
diff --git a/sim/mips/vr.igen b/sim/mips/vr.igen
index 863bb556229..0eb5f4de2d9 100644
--- a/sim/mips/vr.igen
+++ b/sim/mips/vr.igen
@@ -3,76 +3,321 @@
// NEC specific instructions
//
-// Integer Instructions
-// --------------------
-//
-// MulAcc is the Multiply Accumulator.
-// This register is mapped on the the HI and LO registers.
-// Upper 32 bits of MulAcc is mapped on to lower 32 bits of HI register.
-// Lower 32 bits of MulAcc is mapped on to lower 32 bits of LO register.
+:%s::::MFHI:int hi
+{
+ return hi ? "hi" : "";
+}
+:%s::::SAT:int s
+{
+ return s ? "s" : "";
+}
-:function:::unsigned64:MulAcc:
-*vr4100:
+:%s::::UNS:int u
{
- unsigned64 result = U8_4 (HI, LO);
- return result;
+ return u ? "u" : "";
}
-:function:::void:SET_MulAcc:unsigned64 value
-*vr4100:
+// Simulate the various kinds of multiply and multiply-accumulate instructions.
+// Perform an operation of the form:
+//
+// LHS (+/-) GPR[RS] * GPR[RT]
+//
+// and store it in the 64-bit accumulator. Optionally copy either LO or
+// HI into a general purpose register.
+//
+// - RD is the destination register of the LO or HI move
+// - RS are RT are the multiplication source registers
+// - ACCUMULATE_P is true if LHS should be the value of the 64-bit accumulator,
+// false if it should be 0.
+// - STORE_HI_P is true if HI should be stored in RD, false if LO should be.
+// - UNSIGNED_P is true if the operation should be unsigned.
+// - SATURATE_P is true if the result should be saturated to a 32-bit value.
+// - SUBTRACT_P is true if the right hand side should be subtraced from LHS,
+// false if it should be added.
+// - SHORT_P is true if RS and RT must be 16-bit numbers.
+// - DOUBLE_P is true if the 64-bit accumulator is in LO, false it is a
+// concatenation of the low 32 bits of HI and LO.
+:function:::void:do_vr_mul_op:int rd, int rs, int rt, int accumulate_p, int store_hi_p, int unsigned_p, int saturate_p, int subtract_p, int short_p, int double_p
{
- /* 64 bit specific */
- *AL4_8 (&HI) = VH4_8 (value);
- *AL4_8 (&LO) = VL4_8 (value);
+ unsigned64 lhs, x, y, xcut, ycut, product, result;
+
+ check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
+
+ lhs = (!accumulate_p ? 0 : double_p ? LO : U8_4 (HI, LO));
+ x = GPR[rs];
+ y = GPR[rt];
+
+ /* Work out the canonical form of X and Y from their significant bits. */
+ if (!short_p)
+ {
+ /* Normal sign-extension rule for 32-bit operands. */
+ xcut = EXTEND32 (x);
+ ycut = EXTEND32 (y);
+ }
+ else if (unsigned_p)
+ {
+ /* Operands must be zero-extended 16-bit numbers. */
+ xcut = x & 0xffff;
+ ycut = y & 0xffff;
+ }
+ else
+ {
+ /* Likewise but sign-extended. */
+ xcut = EXTEND16 (x);
+ ycut = EXTEND16 (y);
+ }
+ if (x != xcut || y != ycut)
+ sim_engine_abort (SD, CPU, CIA,
+ "invalid multiplication operand at 0x%08lx\n",
+ (long) CIA);
+
+ TRACE_ALU_INPUT2 (x, y);
+ product = (unsigned_p ? x * y : EXTEND32 (x) * EXTEND32 (y));
+ result = (subtract_p ? lhs - product : lhs + product);
+ if (saturate_p)
+ {
+ /* Saturate the result to 32 bits. An unsigned, unsaturated
+ result is zero-extended to 64 bits, but unsigned overflow
+ causes all 64 bits to be set. */
+ if (!unsigned_p && (unsigned64) EXTEND32 (result) != result)
+ result = ((signed64) result < 0 ? -0x7fffffff - 1 : 0x7fffffff);
+ else if (unsigned_p && (result >> 32) != 0)
+ result = (unsigned64) 0 - 1;
+ }
+ TRACE_ALU_RESULT (result);
+
+ if (double_p)
+ LO = result;
+ else
+ {
+ LO = EXTEND32 (result);
+ HI = EXTEND32 (VH4_8 (result));
+ }
+ if (rd != 0)
+ GPR[rd] = store_hi_p ? HI : LO;
}
-:function:::signed64:SignedMultiply:signed32 l, signed32 r
-*vr4100:
+// 32-bit rotate right of X by Y bits.
+:function:::unsigned64:do_ror:unsigned32 x,unsigned32 y
+*vr5400:
+*vr5500:
{
- signed64 result = (signed64) l * (signed64) r;
+ unsigned64 result;
+
+ y &= 31;
+ TRACE_ALU_INPUT2 (x, y);
+ result = EXTEND32 (ROTR32 (x, y));
+ TRACE_ALU_RESULT (result);
return result;
}
-:function:::unsigned64:UnsignedMultiply:unsigned32 l, unsigned32 r
-*vr4100:
+// Likewise 64-bit
+:function:::unsigned64:do_dror:unsigned64 x,unsigned64 y
+*vr5400:
+*vr5500:
{
- unsigned64 result = (unsigned64) l * (unsigned64) r;
+ unsigned64 result;
+
+ y &= 63;
+ TRACE_ALU_INPUT2 (x, y);
+ result = ROTR64 (x, y);
+ TRACE_ALU_RESULT (result);
return result;
}
-:function:::unsigned64:Low32Bits:unsigned64 value
+
+// VR4100 instructions.
+
+000000,5.RS,5.RT,00000,00000,101000::32::MADD16
+"madd16 r<RS>, r<RT>"
*vr4100:
{
- unsigned64 result = (signed64) (signed32) VL4_8 (value);
- return result;
+ do_vr_mul_op (SD_, 0, RS, RT,
+ 1 /* accumulate */,
+ 0 /* store in LO */,
+ 0 /* signed arithmetic */,
+ 0 /* don't saturate */,
+ 0 /* don't subtract */,
+ 1 /* short */,
+ 0 /* single */);
}
-:function:::unsigned64:High32Bits:unsigned64 value
+000000,5.RS,5.RT,00000,00000,101001::64::DMADD16
+"dmadd16 r<RS>, r<RT>"
*vr4100:
{
- unsigned64 result = (signed64) (signed32) VH4_8 (value);
- return result;
+ do_vr_mul_op (SD_, 0, RS, RT,
+ 1 /* accumulate */,
+ 0 /* store in LO */,
+ 0 /* signed arithmetic */,
+ 0 /* don't saturate */,
+ 0 /* don't subtract */,
+ 1 /* short */,
+ 1 /* double */);
}
-// Multiply, Accumulate
-000000,5.RS,5.RT,00000,00000,101000::64::MAC
-"mac r<RS>, r<RT>"
-*vr4100:
+// VR4120 and VR4130 instructions.
+
+000000,5.RS,5.RT,5.RD,1.SAT,1.MFHI,00,1.UNS,101001::64::DMACC
+"dmacc%s<MFHI>%s<UNS>%s<SAT> r<RD>, r<RS>, r<RT>"
+*vr4120:
{
- SET_MulAcc (SD_, MulAcc (SD_) + SignedMultiply (SD_, GPR[RS], GPR[RT]));
+ do_vr_mul_op (SD_, RD, RS, RT,
+ 1 /* accumulate */,
+ MFHI, UNS, SAT,
+ 0 /* don't subtract */,
+ SAT /* short */,
+ 1 /* double */);
}
+000000,5.RS,5.RT,5.RD,1.SAT,1.MFHI,00,1.UNS,101000::32::MACC_4120
+"macc%s<MFHI>%s<UNS>%s<SAT> r<RD>, r<RS>, r<RT>"
+*vr4120:
+{
+ do_vr_mul_op (SD_, RD, RS, RT,
+ 1 /* accumulate */,
+ MFHI, UNS, SAT,
+ 0 /* don't subtract */,
+ SAT /* short */,
+ 0 /* single */);
+}
-// D-Multiply, Accumulate
-000000,5.RS,5.RT,00000,00000,101001::64::DMAC
-"dmac r<RS>, r<RT>"
-*vr4100:
+
+// VR5400 and VR5500 instructions.
+
+000000,5.RS,5.RT,5.RD,0,1.MFHI,001,01100,1.UNS::32::MUL
+"mul%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
+*vr5400:
+*vr5500:
{
- LO = LO + SignedMultiply (SD_, GPR[RS], GPR[RT]);
+ do_vr_mul_op (SD_, RD, RS, RT,
+ 0 /* don't accumulate */,
+ MFHI, UNS,
+ 0 /* don't saturate */,
+ 0 /* don't subtract */,
+ 0 /* not short */,
+ 0 /* single */);
}
+000000,5.RS,5.RT,5.RD,0,1.MFHI,011,01100,1.UNS::32::MULS
+"muls%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
+*vr5400:
+*vr5500:
+{
+ do_vr_mul_op (SD_, RD, RS, RT,
+ 0 /* don't accumulate */,
+ MFHI, UNS,
+ 0 /* don't saturate */,
+ 1 /* subtract */,
+ 0 /* not short */,
+ 0 /* single */);
+}
+
+000000,5.RS,5.RT,5.RD,0,1.MFHI,101,01100,1.UNS::32::MACC_5xxx
+"macc%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
+*vr5400:
+*vr5500:
+{
+ do_vr_mul_op (SD_, RD, RS, RT,
+ 1 /* accumulate */,
+ MFHI, UNS,
+ 0 /* don't saturate */,
+ 0 /* don't subtract */,
+ 0 /* not short */,
+ 0 /* single */);
+}
+
+000000,5.RS,5.RT,5.RD,0,1.MFHI,111,01100,1.UNS::32::MSAC
+"msac%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
+*vr5400:
+*vr5500:
+{
+ do_vr_mul_op (SD_, RD, RS, RT,
+ 1 /* accumulate */,
+ MFHI, UNS,
+ 0 /* don't saturate */,
+ 1 /* subtract */,
+ 0 /* not short */,
+ 0 /* single */);
+}
+
+000000,00001,5.RT,5.RD,5.SHIFT,000010::32::ROR
+"ror r<RD>, r<RT>, <SHIFT>"
+*vr5400:
+*vr5500:
+{
+ GPR[RD] = do_ror (SD_, GPR[RT], SHIFT);
+}
+
+000000,5.RS,5.RT,5.RD,00001,000110::32::RORV
+"rorv r<RD>, r<RT>, r<RS>"
+*vr5400:
+*vr5500:
+{
+ GPR[RD] = do_ror (SD_, GPR[RT], GPR[RS]);
+}
+
+000000,00001,5.RT,5.RD,5.SHIFT,111010::64::DROR
+"dror r<RD>, r<RT>, <SHIFT>"
+*vr5400:
+*vr5500:
+{
+ GPR[RD] = do_dror (SD_, GPR[RT], SHIFT);
+}
+
+000000,00001,5.RT,5.RD,5.SHIFT,111110::64::DROR32
+"dror32 r<RD>, r<RT>, <SHIFT>"
+*vr5400:
+*vr5500:
+{
+ GPR[RD] = do_dror (SD_, GPR[RT], SHIFT + 32);
+}
+
+000000,5.RS,5.RT,5.RD,00001,010110::64::DRORV
+"drorv r<RD>, r<RT>, r<RS>"
+*vr5400:
+*vr5500:
+{
+ GPR[RD] = do_dror (SD_, GPR[RT], GPR[RS]);
+}
+
+010011,5.BASE,5.INDEX,5.0,5.FD,000101:COP1X:64::LUXC1
+"luxc1 f<FD>, r<INDEX>(r<BASE>)"
+*vr5500:
+{
+ check_fpu (SD_);
+ COP_LD (1, FD, do_load (SD_, AccessLength_DOUBLEWORD,
+ (GPR[BASE] + GPR[INDEX]) & ~MASK64 (2, 0), 0));
+}
+
+010011,5.BASE,5.INDEX,5.FS,00000,001101:COP1X:64::SUXC1
+"suxc1 f<FS>, r<INDEX>(r<BASE>)"
+*vr5500:
+{
+ check_fpu (SD_);
+ do_store (SD_, AccessLength_DOUBLEWORD,
+ (GPR[BASE] + GPR[INDEX]) & ~MASK64 (2, 0), 0,
+ COP_SD (1, FS));
+}
+
+010000,1,19.*,100000:COP0:32::WAIT
+"wait"
+*vr5500:
+
+011100,00000,5.RT,5.DR,00000,111101:SPECIAL:64::MFDR
+"mfdr r<RT>, r<DR>"
+*vr5400:
+*vr5500:
+011100,00100,5.RT,5.DR,00000,111101:SPECIAL:64::MTDR
+"mtdr r<RT>, r<DR>"
+*vr5400:
+*vr5500:
+011100,00000,00000,00000,00000,111110:SPECIAL:64::DRET
+"dret"
+*vr5400:
+*vr5500:
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 8e2445a7e11..167fdd1ffda 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -226,22 +226,22 @@ op tab[] =
"R[n] = (R[m] & 0xffff);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fabs <FREG_N>", "1111nnnn01011101",
"FP_UNARY (n, fabs);",
"/* FIXME: FR(n) &= 0x7fffffff; */",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fadd <FREG_M>,<FREG_N>", "1111nnnnmmmm0000",
"FP_OP (n, +, m);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fcmp/eq <FREG_M>,<FREG_N>", "1111nnnnmmmm0100",
"FP_CMP (n, ==, m);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fcmp/gt <FREG_M>,<FREG_N>", "1111nnnnmmmm0101",
"FP_CMP (n, >, m);",
},
@@ -278,7 +278,7 @@ op tab[] =
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fdiv <FREG_M>,<FREG_N>", "1111nnnnmmmm0011",
"FP_OP (n, /, m);",
"/* FIXME: check for DP and (n & 1) == 0? */",
@@ -291,19 +291,19 @@ op tab[] =
"/* FIXME: check for DP and (n & 1) == 0? */",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fldi0 <FREG_N>", "1111nnnn10001101",
"SET_FR (n, (float)0.0);",
"/* FIXME: check for DP and (n & 1) == 0? */",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fldi1 <FREG_N>", "1111nnnn10011101",
"SET_FR (n, (float)1.0);",
"/* FIXME: check for DP and (n & 1) == 0? */",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "flds <FREG_N>,FPUL", "1111nnnn00011101",
" union",
" {",
@@ -314,7 +314,7 @@ op tab[] =
" FPUL = u.i;",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "float FPUL,<FREG_N>", "1111nnnn00101101",
/* sh4 */
"if (FPSCR_PR)",
@@ -325,13 +325,13 @@ op tab[] =
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmac <FREG_0>,<FREG_M>,<FREG_N>", "1111nnnnmmmm1110",
"SET_FR (n, FR(m) * FR(0) + FR(n));",
"/* FIXME: check for DP and (n & 1) == 0? */",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov <FREG_M>,<FREG_N>", "1111nnnnmmmm1100",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -345,7 +345,7 @@ op tab[] =
" SET_FR (n, FR (m));",
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov.s <FREG_M>,@<REG_N>", "1111nnnnmmmm1010",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -358,7 +358,7 @@ op tab[] =
" WLAT (R[n], FI(m));",
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov.s @<REG_M>,<FREG_N>", "1111nnnnmmmm1000",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -371,7 +371,7 @@ op tab[] =
" SET_FI(n, RLAT(R[m]));",
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov.s @<REG_M>+,<FREG_N>", "1111nnnnmmmm1001",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -386,7 +386,7 @@ op tab[] =
" R[m] += 4;",
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov.s <FREG_M>,@-<REG_N>", "1111nnnnmmmm1011",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -401,7 +401,7 @@ op tab[] =
" WLAT (R[n], FI(m));",
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov.s @(R0,<REG_M>),<FREG_N>", "1111nnnnmmmm0110",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -414,7 +414,7 @@ op tab[] =
" SET_FI(n, RLAT(R[0] + R[m]));",
"}",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fmov.s <FREG_M>,@(R0,<REG_N>)", "1111nnnnmmmm0111",
/* sh4 */
"if (FPSCR_SZ) {",
@@ -430,12 +430,12 @@ op tab[] =
/* sh4: See fmov instructions above for move to/from extended fp registers */
- /* sh3e */
+ /* sh2e */
{ "", "", "fmul <FREG_M>,<FREG_N>", "1111nnnnmmmm0010",
"FP_OP(n, *, m);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fneg <FREG_N>", "1111nnnn01001101",
"FP_UNARY(n, -);",
},
@@ -455,12 +455,12 @@ op tab[] =
"FP_UNARY(n, sqrt);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fsub <FREG_M>,<FREG_N>", "1111nnnnmmmm0001",
"FP_OP(n, -, m);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "ftrc <FREG_N>, FPUL", "1111nnnn00111101",
/* sh4 */
"if (FPSCR_PR) {",
@@ -476,7 +476,7 @@ op tab[] =
" FPUL = (int)FR(n);",
},
- /* sh3e */
+ /* sh2e */
{ "", "", "fsts FPUL,<FREG_N>", "1111nnnn00001101",
" union",
" {",
@@ -561,11 +561,11 @@ op tab[] =
"SREG (m) = RLAT(R[n]);",
"R[n] += 4;",
},
- /* sh3e / sh-dsp (lds <REG_N>,DSR) */
+ /* sh2e / sh-dsp (lds <REG_N>,DSR) */
{ "", "n", "lds <REG_N>,FPSCR", "0100nnnn01101010",
"SET_FPSCR(R[n]);",
},
- /* sh3e / sh-dsp (lds.l @<REG_N>+,DSR) */
+ /* sh2e / sh-dsp (lds.l @<REG_N>+,DSR) */
{ "", "n", "lds.l @<REG_N>+,FPSCR", "0100nnnn01100110",
"MA (1);",
"SET_FPSCR (RLAT(R[n]));",